Ejemplo n.º 1
0
def noise_flyover(nexus):
    nexus.analyses.takeoff.noise.settings.flyover = True
    nexus.analyses.takeoff.noise.settings.sideline = False
    results = nexus.results
    mission = nexus.missions.takeoff
    results.flyover = mission.evaluate()
    if nexus.save_data:
        save_results(results.flyover, 'flyover.res')
    else:
        results.flyover = load_results('flyover.res')

    noise_segment = results.flyover.segments.climb
    noise_settings = nexus.analyses.takeoff.noise.settings
    noise_config = nexus.vehicle_configurations.takeoff
    noise_analyses = nexus.analyses.takeoff
    noise_config.engine_flag = True
    noise_config.print_output = 0
    noise_config.output_file = 'Noise_Flyover_climb.dat'
    noise_config.output_file_engine = 'Noise_Flyover_climb_Engine.dat'

    if nexus.npoints_takeoff_sign == -1:
        noise_result_takeoff_FL_clb = 500. + nexus.missions.sideline_takeoff.segments.climb.state.numerics.number_control_points
    else:
        noise_result_takeoff_FL_clb = compute_noise(noise_config,
                                                    noise_analyses,
                                                    noise_segment,
                                                    noise_settings)

    noise_segment = results.flyover.segments.cutback
    noise_settings = nexus.analyses.takeoff.noise.settings
    noise_config = nexus.vehicle_configurations.cutback
    noise_config.print_output = 1
    noise_config.engine_flag = True
    noise_config.output_file = 'Noise_Flyover_cutback.dat'
    noise_config.output_file_engine = 'Noise_Flyover_cutback_Engine.dat'

    if nexus.npoints_takeoff_sign == -1:
        noise_result_takeoff_FL_cutback = 500. + nexus.missions.sideline_takeoff.segments.climb.state.numerics.number_control_points
    else:
        noise_result_takeoff_FL_cutback = compute_noise(
            noise_config, noise_analyses, noise_segment, noise_settings)

    noise_result_takeoff_FL = 10. * np.log10(
        10**(noise_result_takeoff_FL_clb / 10) +
        10**(noise_result_takeoff_FL_cutback / 10))

    nexus.summary.noise.flyover = noise_result_takeoff_FL

    return nexus
Ejemplo n.º 2
0
def noise_approach(nexus):
    nexus.analyses.landing.noise.settings.approach = True
    results = nexus.results
    mission = nexus.missions.landing
    results.approach = mission.evaluate()
    if nexus.save_data:
        save_results(results.approach, 'approach.res')
    else:
        results.approach = load_results('approach.res')

    noise_segment = results.approach.segments.descent
    noise_analyses = nexus.analyses.landing
    noise_settings = nexus.analyses.landing.noise.settings
    noise_config = nexus.vehicle_configurations.landing

    noise_config.engine_flag = True
    noise_config.print_output = 0
    noise_config.output_file = 'Noise_Approach.dat'
    noise_config.output_file_engine = 'Noise_Approach_Engine.dat'

    noise_result_approach = compute_noise(noise_config, noise_analyses,
                                          noise_segment, noise_settings)

    nexus.summary.noise.approach = noise_result_approach

    return nexus
Ejemplo n.º 3
0
def sideline_noise(analyses,noise_configs):  
    """This method calculates sideline noise of a turbofan aircraft
            
    Assumptions:
        N/A

    Source:
        N/A 

    Inputs:
        analyses        - data structure of SUAVE analyses                [None]
        noise_configs   - data structure for SUAVE vehicle configurations [None]

    Outputs: 
        SPL             - sound pressure level                            [dB]

    Properties Used:
        N/A 
        
    """ 

    # Update number of control points for noise 
    mission                                                     = analyses.missions.sideline_takeoff 
    sideline_initialization_results                             = mission.evaluate() 
    n_points                                                    = np.ceil(sideline_initialization_results.segments.climb.conditions.frames.inertial.time[-1] /0.5 +1) 
    mission.npoints_sideline_sign                               = np.sign(n_points) 
    mission.segments.climb.state.numerics.number_control_points = int(np.minimum(200, np.abs(n_points))[0])

    # Set up analysis 
    noise_segment                                  = mission.segments.climb  
    noise_segment.analyses.noise.settings.sideline = True
    noise_segment.analyses.noise.settings.flyover  = False  
    noise_analyses                                 = noise_segment.analyses 
    noise_settings                                 = noise_segment.analyses.noise.settings 
    noise_config                                   = noise_configs.takeoff 
    noise_config.engine_flag                       = True
    noise_config.print_output                      = 0
    noise_config.output_file                       = 'Noise_Sideline.dat'
    noise_config.output_file_engine                = 'Noise_Sideline_Engine.dat'
    
    
    # Determine the x0
    x0              = 0.    
    position_vector = noise_segment.conditions.frames.inertial.position_vector
    degree          = 3
    coefs           = np.polyfit(-position_vector[:,2],position_vector[:,0],degree)
    for idx,coef in enumerate(coefs):
        x0 += coef * 304.8 ** (degree-idx) 

    noise_segment.analyses.noise.settings.mic_x_position = x0   
    noise_config.engine_flag                             = True 
    
    if mission.npoints_sideline_sign == -1:
        noise_result_takeoff_SL = 500. + noise_segment.missions.sideline_takeoff.segments.climb.state.numerics.number_control_points
    else:
        noise_result_takeoff_SL = compute_noise(noise_config,noise_analyses,noise_segment,noise_settings)    

    return noise_result_takeoff_SL
Ejemplo n.º 4
0
def approach_noise(analyses, noise_configs):
    """This method calculates approach noise of a turbofan aircraft
            
    Assumptions:
        N/A

    Source:
        N/A 

    Inputs:
        analyses        - data structure of SUAVE analyses                [None]
        noise_configs   - data structure for SUAVE vehicle configurations [None]

    Outputs: 
        SPL             - sound pressure level                            [dB]

    Properties Used:
        N/A 
        
    """
    # Update number of control points for noise
    mission = analyses.missions.landing
    approach_initialization = mission.evaluate()
    n_points = np.ceil(approach_initialization.segments.descent.conditions.
                       frames.inertial.time[-1] / 0.5 + 1)
    mission.npoints_takeoff_sign = np.sign(n_points)
    mission.segments.descent.state.numerics.number_control_points = int(
        np.minimum(200, np.abs(n_points))[0])

    # Set up analysis
    noise_segment = mission.segments.descent
    noise_segment.analyses.noise.settings.approach = True
    noise_analyses = noise_segment.analyses
    noise_settings = noise_segment.analyses.noise.settings
    noise_config = noise_configs.landing
    noise_config.engine_flag = True
    noise_config.print_output = 0
    noise_config.output_file = 'Noise_Approach.dat'
    noise_config.output_file_engine = 'Noise_Approach_Engine.dat'

    noise_result_approach = compute_noise(noise_config, noise_analyses,
                                          noise_segment, noise_settings)

    return noise_result_approach
Ejemplo n.º 5
0
def noise_sideline(nexus):
    nexus.analyses.takeoff.noise.settings.sideline = True
    nexus.analyses.takeoff.noise.settings.flyover = False
    results = nexus.results
    mission = nexus.missions.sideline_takeoff
    results.sideline = mission.evaluate()
    if nexus.save_data:
        save_results(results.sideline, 'sideline.res')
    else:
        results.sideline = load_results('sideline.res')

    # Determine the x0
    x0 = 0.
    position_vector = results.sideline.segments.climb.conditions.frames.inertial.position_vector
    degree = 3
    coefs = np.polyfit(-position_vector[:, 2], position_vector[:, 0], degree)
    for idx, coef in enumerate(coefs):
        x0 += coef * 304.8**(degree - idx)

    nexus.analyses.takeoff.noise.settings.mic_x_position = x0
    noise_segment = results.sideline.segments.climb
    noise_settings = nexus.analyses.takeoff.noise.settings
    noise_config = nexus.vehicle_configurations.takeoff
    noise_analyses = nexus.analyses.takeoff
    noise_config.engine_flag = True
    noise_config.print_output = 0
    noise_config.output_file = 'Noise_Sideline.dat'
    noise_config.output_file_engine = 'Noise_Sideline_Engine.dat'

    if nexus.npoints_sideline_sign == -1:
        noise_result_takeoff_SL = 500. + nexus.missions.sideline_takeoff.segments.climb.state.numerics.number_control_points
    else:
        noise_result_takeoff_SL = compute_noise(noise_config, noise_analyses,
                                                noise_segment, noise_settings)

    nexus.summary.noise = Data()
    nexus.summary.noise.sideline = noise_result_takeoff_SL

    return nexus
Ejemplo n.º 6
0
def flyover_noise(analyses, noise_configs):
    """This method calculates flyover noise of a turbofan aircraft
            
    Assumptions:
        N/A

    Source:
        N/A 

    Inputs:
        analyses        - data structure of SUAVE analyses                [None]
        noise_configs   - data structure for SUAVE vehicle configurations [None]

    Outputs: 
        SPL             - sound pressure level                            [dB]

    Properties Used:
        N/A 
        
    """
    # Update number of control points for noise
    mission = analyses.missions.takeoff
    takeoff_initialization = mission.evaluate()
    n_points = np.ceil(takeoff_initialization.segments.climb.conditions.frames.
                       inertial.time[-1] / 0.5 + 1)
    mission.npoints_takeoff_sign = np.sign(n_points)
    mission.segments.climb.state.numerics.number_control_points = int(
        np.minimum(200, np.abs(n_points))[0])

    # Set up analysis
    noise_segment = mission.segments.climb
    noise_segment.analyses.noise.settings.sideline = False
    noise_segment.analyses.noise.settings.flyover = True
    noise_settings = noise_segment.analyses.noise.settings
    noise_config = noise_configs.takeoff
    noise_analyses = noise_segment.analyses
    noise_config.engine_flag = True
    noise_config.print_output = 0
    noise_config.output_file = 'Noise_Flyover_climb.dat'
    noise_config.output_file_engine = 'Noise_Flyover_climb_Engine.dat'
    noise_config.engine_flag = True

    if mission.npoints_takeoff_sign == -1:
        noise_result_takeoff_FL_clb = 500. + noise_segment.missions.sideline_takeoff.segments.climb.state.numerics.number_control_points
    else:
        noise_result_takeoff_FL_clb = compute_noise(noise_config,
                                                    noise_analyses,
                                                    noise_segment,
                                                    noise_settings)

    noise_segment = mission.segments.cutback
    noise_config = noise_configs.cutback
    noise_config.print_output = 0
    noise_config.engine_flag = True
    noise_config.output_file = 'Noise_Flyover_cutback.dat'
    noise_config.output_file_engine = 'Noise_Flyover_cutback_Engine.dat'

    if mission.npoints_takeoff_sign == -1:
        noise_result_takeoff_FL_cutback = 500. + noise_segment.missions.sideline_takeoff.segments.climb.state.numerics.number_control_points
    else:
        noise_result_takeoff_FL_cutback = compute_noise(
            noise_config, noise_analyses, noise_segment, noise_settings)

    noise_result_takeoff_FL = 10. * np.log10(
        10**(noise_result_takeoff_FL_clb / 10) +
        10**(noise_result_takeoff_FL_cutback / 10))

    return noise_result_takeoff_FL