CHOICE
- class choice.CHOICE(input_folder='Input/', output_folder='Output/', perf_file='performanceResults.txt', weight_file='weightAircraft.txt', noise_file='inputNoise.txt', file_type=None)[source]
Instantiate input files and folders to be used for the noise calculation.
- Parameters:
input_folder (str) – input files folder path
output_folder (str) – output files folder path
perf_file (str) – file containing the engine performance parameters
weight_file (str) – file containing engine sizing data
noise_file (str) – file that is used to define the noise calculation study
file_type (str) – file type for noise source matrices (csv, m, None)
Reading and editing input files
Module choice_read_and write
Used to read and edit external / input files.
- class choice.choice_read_and_write.MultptPerfData(pf)[source]
Instantiate the multipoint performance data for each point.
- Parameters:
pf (list) – A list of data from the performance file
- class choice.choice_read_and_write.ReadFiles(weight_file, noise_file, perf_file)[source]
Instantiate files to be read.
- Parameters:
weight_file (str) – File with data on engine sizing
noise_file (str) – File to define the cases to be run and required inputs for noise prediction
perf_file (str) – File containing the engine performance data for every point
Interface
Module choice_interf
Choice interface: used to set the required parameters for the noise calculation and call the physics-based methods from the module choice_physics.
- class choice.choice_interf.NoiseChoice(noiseFile)[source]
Instantiate the required input arguments for the noise prediction cases to be run.
- Parameters:
noiseFile (dict) – Definition of the noise cases to be performed.
- class choice.choice_interf.NoiseMatrices(modules=None)[source]
A class that defines the noise level for each aircraft noise component.
- Parameters:
modules (list) – Fan, Lpc, Lpt, etc.
- class choice.choice_interf.NoiseMatricesCerification(modules=None)[source]
A class that defines the noise level for each aircraft noise component.
- Parameters:
modules (list) – Fan, Lpc, Lpt, etc.
- class choice.choice_interf.NoiseSources(prms, theta, fband)[source]
Instantiate noise source object
- Parameters:
prms (Prms) – Acoustic pressure arrays for each aircraft noise component
theta (ndarray) – 1D array containg directivity angles
fband (ndarray) – 1D array containg the 1/3 octave band frequencies
- classmethod compute(traj, modules, noise, weight, performance, nop, output_folder, ext=None)[source]
Compute the acoustic pressure for each noise component.
- Parameters:
traj (Trajectory) – A Trajectory object with the trajectory data
modules (list) – Fan, Lpc, Lpt, etc.
noise (NoiseChoice) – A NoiseChoice object with the required input arguments for the noise prediction
weight (WeightChoice) – A WeightChoice object with the engine size and architecture
performance (PerformanceChoice) – A PerformanceChoice object with the engine performance data
nop (int) – Number of operating point
output_folder (str) – Output folder path
ext (str) – File extension for noise source matrices
- Return NoiseSources:
A Prms object with the rms acoustic pressure for each component, the directivity angles and the 1/3 octave band frequencies
- class choice.choice_interf.PerformanceChoice(ptr, trajPerf, point, n_traj, weight_choice, mpd, input_folder)[source]
Instantiate the engine performance data.
- Parameters:
ptr (int) – Operating point (trajectory) number in order of appearance in the inputNoise.txt
trajPerf (bool) – If true, trajectory data are used, else, single point study is performed
point (str) – Operating point
n_traj (int) – Number of trajectory points
Weight_choice (WeightChoice) – Engine sizing data
mpd (MultptPerfData) – Multipoint performance data
input_folder (str) – Input files folder path
- get_variable(point, name)[source]
Returns the value of the item with the specified key for the provided point.
- classmethod set(ptr, modules, n_traj, mpd, noise_choice, weight_choice, input_folder)[source]
Sets the performance data for each component.
- Parameters:
ptr (int) – Operating point (trajectory) number in order of appearance in the inputNoise.txt
modules (list) – Engine components
n_traj (int) – Number of trajectory points
mpd (MultptPerfData) – Multipoint performance data
noise_choice (NoiseChoice) – Noise prediction input data
weight_choice (WeightChoice) – Engine sizing data
input_folder (str) – Input files folder
- Return PerformanceChoice:
A PerformanceChoice object
- class choice.choice_interf.Prms(npts)[source]
Instantiate rms acoustic pressure for each aircraft noise component.
- Parameters:
npts (int) – Number of trajectory points
- class choice.choice_interf.Trajectory(ipnt, opPnt, noise_choice, input_folder)[source]
Instantiate the trajectory data of the aircraft.
- Parameters:
ipnt (int) – Operating point (trajectory) number in order of appearance in the inputNoise.txt
opPnt (str) – Operating point (trajectory), e.g. Approach, Cutback, Sideline
noise_choice (NoiseChoice) – Noise prediction input data
- static get_dx(x1, y1, z1, dt, gamma, c0, Va, tnext)[source]
Computes distance travelled until the location of the next noise sample generation.
- Parameters:
x1 (float) – x coordinate of first sample (in relation to microphone)
y1 (float) – y coordinate (height) of first sample (in relation to microphone)
z1 (float) – z coordinate of microphone
dt (float) – Time interval between sounds reaching the microphone
gamma (float) – Flight path angle
c0 (float) – Speed of sound at aircraft location
Va (float) – Aircraft speed
tnext (float) – Next sampling time
- Return float:
The distance that the aircraft travelled
- get_xsi(xmic, ymic, zmic)[source]
Computes the angle between the direction of the aircraft’s motion and the sound propagation path.
- Parameters:
xmic (float) – Microphone/observer horizontal distance (m)
ymic (float) – Microphone/observer height (m)
zmic (float) – Microphone/observer lateral horizontal distance (m)
- read_trajectory_input(opPnt, input_folder, h_engine)[source]
Reads and stores the trajectory data (position, velocity and angle of attack) for the provided operating point
- Parameters:
opPnt (str) – Operating point
- classmethod set(ipnt, opPnt, noise_choice, input_folder)[source]
Sets the required trajectory details for the noise calculation.
- Parameters:
ipnt (int) – Operating point (trajectory) number in order of appearance in the inputNoise.txt
opPnt (str) – Operating point (trajectory), e.g. Approach, Cutback, Sideline
noise_choice (NoiseChoice) – NoiseChoice object
- Return Trajectory:
A trajectory object
- set_time_vector(ipnt, noise_choice)[source]
Computes the retarded time.
- Parameters:
ipnt (int) – Operating point (trajectory) number in order of appearance in the inputNoise.txt
noise_choice (NoiseChoice) – NoiseChoice object
- class choice.choice_interf.WeightChoice(weightFile)[source]
Instantiate the engine size and architecture data.
- Parameters:
weightFile (dict) – Engine sizing data.
- choice.choice_interf.certificationLimits(noEngines, MTOW)[source]
Computes EPNL certification limits.
- choice.choice_interf.compute_SPLi(prmsi)[source]
Computes Sound Pressure Level matrix from rms acoustic pressure.
- choice.choice_interf.interpolate_to_t_source(traj, modules, prms)[source]
Computes the Sound Pressure Level for the times that the sound reaches the microphone.
- Parameters:
traj (Trajectory) – A Trajectory object with the trajectory data
modules (list) – Fan, Lpc, Lpt, etc.
prms (Prms) – A Prms object with the rms acoustic pressure for each component
- Returns:
For the times that the sound reaches the microphone, a NoiseMatrices object with the Sound Pressure Level for each component, the observation angle, the Mach number and the angle of attack
- choice.choice_interf.set_rotational_speeds_choice(mpd, weightChoice, comp)[source]
Estimates absolute speeds from relative rotating speeds (from performance) using several points.
- Parameters:
mpd (MultptPerfData) – Multipoint performance data
weightChoice (WeightChoice) – Engine sizing data
comp (str) – Engine component
- Return MultptPerfData:
Updated multipoint performance data
Methods for noise prediction
Module choice_physics
Physics and methods for the noise prediction broken down in modules.
- class choice.choice_physics.Airframe(opPoint, N_wheels, N_struts, nlg, d_wheel, d_strut, d_wire, NoFlap, S_flap, span_flap, Sw, span, ND, span_hor_tail, Sht, span_ver_tail, Svt, flap_type, slat_type, theta, fband)[source]
Instantiate airframe source noise prediction.
- Parameters:
opPoint (list) – Approach, Cutback, Sideline
N_wheels (int) – Array containing the number of wheels in each landing gear system
N_struts (int) – Array containing the number of main struts in each landing gear system
nlg (int) – Number of landing gear systems
d_wheel (ndarray) – 1D array containing the diameters of landing gear wheels (in)
d_strut (ndarray) – 1D array containing typical diameter of landing gear struts (in)
d_wire (ndarray) – 1D array containing typical diameter of landing gear wire/small pipes (in)
NoFlap (int) – Number of flap elements
S_flap (ndarray) – 1D array containing the area of each flap (m**2)
span_flap (ndarray) – 1D array containing the span of each flap (m)
Sw (float) – Aircraft reference area (m**2)
span (float) – Wing span (m)
ND (int) – Coefficient for jet aircraft (1 => + 6dB in wing trailing edge OASPL)
span_hor_tail (float) – Horizontal tail span (m)
Sht (float) – Horizontal tail area (m)
span_ver_tail (float) – Vertical tail span (m)
Svt (float) – Vertical tail area (m)
flap_type (str) – Flap type: 1slot, 2slot, 3slot
slat_type (str) – Leading edge high-lift system type: slat, le_flap
theta (ndarray) – 1D array containing the longitudinal directivity angles (deg)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
- calc(Ta, Ha, Ma, Va, phi, defl_flap, defl_slat, LG)[source]
Airframe source noise model based on a combination of methods found in public literature. Trailing-edge and landing gear noise are modelled separately. The references for each method are found in the description of the corresponding functions.
- Parameters:
Ta (float) – Atmospheric static temperature (K)
Ha (float) – Flight altitude (m)
Ma (float) – Aircraft Mach number
Va (float) – Aircraft speed (m/s)
phi (float) – Lateral directivity angle (deg)
defl_flap (float) – Flap deflection angle (rad)
defl_flap – Slat deflection angle (rad)
LG (int) – Landing gear position (0 => retracted, 1 => extended)
- Return ndarray:
2D array of Rms or effective acoustic pressure for airframe component
- full_matrix(mato, nl)[source]
Computes the coefficients that are required for the landing gear calculation for every directivity angle and returns a nc x nthet array where nc is the order of the equation of each noise component.
- getLandingGear(Nt, Ns, M, c0, dl, dh, dtire)[source]
Landing gear source noise model based on the method presented by Sen et al. (R. Sen, B. Hardy, K. Yamamoto, Y. Guo., G. Miller “Airframe Noise Sub-Component Definition and Model”. NASA/CR-2004-213255.)
- Parameters:
Nt (int) – Number of wheels/tires
Ns (int) – Number of main struts
M (float) – Aircraft Mach number
c0 (float) – Speed of sound (m/s)
dl (float) – Representative length scale for low frequency noise component (ft)
dh (float) – Representative length scale for high frequency noise component (ft)
dtire (float) – Representative length scale for tire noise component (ft)
- Return ndarray:
2D array of Rms or effective acoustic pressure for landing gear
- get_le_slats(Va, ny, S, b, dir_factor, ND, slat_type)[source]
Leading edge high-lift system source noise model developed by Fink (M.R. Fink, “Airframe Noise Prediction Method”, FAA-RD-77-29 and M.R. Fink, “Noise Component Method for Airframe Noise”).
- Parameters:
Va (float) – Aircraft speed (m/s)
ny (float) – Kinematic viscocity (m**2/s)
S (float) – Wing or tail area (m**2)
b (float) – Wing or tail span (m)
dir_factor (float) – Equals cos(phi) where phi is lateral directivity calculated from the flyover plane
ND (int) – Coefficient for jet aircraft (1 => + 6dB in wing trailing edge OASPL)
- Return ndarray:
2D array of Rms or effective acoustic pressure for leading edge flaps
- get_te_flaps(Va, Sf, bf, defl_flap, flap_type, phi)[source]
Trailing edge flap source noise model developed by Fink (M.R. Fink, “Airframe Noise Prediction Method”, FAA-RD-77-29 and M.R. Fink, “Noise Component Method for Airframe Noise”).
- Parameters:
Va (float) – Aircraft speed (m/s)
Sf (float) – Flap area (m**2)
bf (float) – Flap span (m)
defl_flap (float) – Flap deflection angle (rad)
phi (float) – Lateral directivity calculated from the flyover plane
- Return ndarray:
2D array of Rms or effective acoustic pressure for trailing edge flaps
- get_wing_and_tail(Va, ny, S, b, dir_factor, ND)[source]
Trailing edge source noise model for wing and tail surfaces developed by Fink (M.R. Fink, “Noise Component Method for Airframe Noise”).
- Parameters:
Va (float) – Aircraft speed (m/s)
ny (float) – Kinematic viscocity (m**2/s)
S (float) – Wing or tail area (m**2)
b (float) – Wing or tail span (m)
dir_factor (float) – Equals cos(phi) where phi is lateral directivity calculated from the flyover plane
ND (int) – Coefficient for jet aircraft (1 => + 6dB in wing trailing edge OASPL)
- Return ndarray:
2D array of Rms or effective acoustic pressure for wing and tail airframe component
- class choice.choice_physics.Combustor(type_comb, Aec, De, Dh, Lc, h, Nfmax, theta, fband)[source]
Instantiate combustor source noise prediction.
- Parameters:
type_comb (str) – Combustor type, SAC or DAC
Aec (float) – Combustor exit area (ft^2)
De (float) – Exhaust nozzle exit plane effective diameter (ft)
Dh (float) – Exhaust nozzle exit plane hydraulic diameter (ft)
Lc (float) – Combustor nominal length (ft)
h (float) – Annulus height at combustor exit (ft)
Nfmax (int) – Total number of DAC fuel nozzles
theta (ndarray) – 1D array containing the directivity angles (deg)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
- calc(Nf, pattern, pa, p3, p4, p7, ta, t3, t4, t5, w3)[source]
Combustor source noise model based on the method for low-emissions combustors developed by Gliebe et al. (P. Gliebe, R. Mani, H. Shin, B. Mitchell, G. Ashford, S. Salamah and S. Connel. “Aeroacoustic Prediction Codes”. NASA-CR-210244). Includes model for SAC (Single-Annular Combustor) and DAC (Dual-Annular Combustor).
- Parameters:
Nf (int) – Number of ignited fuel nozzles
pattern (int/float) – Fuel nozzle firing pattern
pa (float) – Atmospheric pressure (Pa)
p3 (float) – Combustor inlet pressure (Pa)
p4 (float) – Combustor exit pressure (Pa)
p7 (float) – Turbine last stage exit pressure (Pa)
ta (float) – Atmospheric temperature (K)
t3 (float) – Combustor inlet temperature (K)
t4 (float) – Combustor exit temperature (K)
t5 (float) – Turbine last stage exit temperature (K)
w3 (float) – Combustor inlet flow (kg/s)
- Return ndarray:
2D array of Rms or effective acoustic pressure for combustor component
- class choice.choice_physics.FanCompressor(component, MtipD, N_rotors, N_stators, rss, theta, fband, f, distortion=None)[source]
Instantiate fan or compressor source noise prediction.
- Parameters:
component (str) – Compressor component, fan, LPC, IPC
MtipD (float) – Rotor tip relative inlet Mach number at design point
N_rotors (int) – Number of rotors
N_stators (int) – Number of stators
rss (float) – Rotor-stator spacing
theta (ndarray) – 1D array containing the directivity angles (deg)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
f (ndarray) – 1D array containing frequencies (Hz)
- calc(operatingPoint, Mtip, Mu, dT, xnl, g1)[source]
Fan and compressor source noise model based on the methods developed by Heidman (M. F. Heidmann. “Interim Prediction Method for Fan and Compressor Source Noise”. NASA-TM-X71763) and updated by Kontos et al. (K. B. Kontos, B. A. Janardan and P. R. Gliebe. “Improved NASA-ANOPP Noise Prediction Computer Code for Advanced Subsonic Propulsion Systems”. NASA-CR-195480).
- Parameters:
operatingPoint (str) – Approach, Cutback, Sideline
Mtip (float) – Rotor tip relative inlet Mach number at operating point
Mu (float) – Blade Mach number
dT (float) – Temperature rise across fan or compressor stage
xnl (float) – Fan rotational speed (rps)
g1 (float) – Mass flow rate passing through fan or compressor (kg/s)
- Return ndarray:
2D array of Rms or effective acoustic pressure for tone, broadband and combination tone noise
- fanCompr_broadband(operatingPoint, Mtr, fb, dT, g1)[source]
Fan and compressor broadband noise estimation.
- fanCompr_tone(operatingPoint, acc, Mtr, dT, g1, delta_cutoff, fb)[source]
Fan and compressor discrete tone noise estimation.
- get_Fig10a(M_tr)[source]
Get characteristic peak sound pressure level of fundamental discrete tone for inlet duct according to Fig. 10(a) in Heidmann and eq. 5 in Kontos.
- get_Fig10b(M_tr)[source]
Get characteristic peak sound pressure level of fundamental discrete tone for discharge duct according to Fig. 10(b) in Heidmann.
- get_Fig4a(M_tr)[source]
Get peak broadband sound pressure levels from Fig 4(a) for inlet duct according to Heidmann.
- get_Fig4b(M_tr)[source]
Get peak broadband sound pressure levels from Fig 4(b) for discharge duct according to Heidmann and eq. 3a-3b in Kontos.
- class choice.choice_physics.Jet(A_core_caj, A_bypass_caj, type, theta, fband)[source]
Instantiate jet source noise prediction.
- Parameters:
A_core_caj (float) – Nozzle exit flow area of inner stream or circular jet (m^2)
A_bypass_caj (float) – Nozzle exit flow area of outer stream (m^2)
type (str) – Nozzle type, mix or separate
theta (ndarray) – 1D array containing the directivity angles (deg)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
- calc(dmdt_1, dmdt_2, v_1, v_2, T_1, T_2, Ta, Pa)[source]
Jet source noise model for circular and coaxial jets based on the methods presented by Russel (J. W. Russel. “An empirical Method for Predicting the mixing Noise Levels of Subsonic Circular and Coaxial Jets”. NASA-CR-3786).
- Parameters:
dmdt_1 (float) – Mass flow rate of inner stream or circular jet (kg/s)
dmdt_2 (float) – Mass flow rate of outer stream (kg/s)
v_1 (float) – Nozzle exit flow velocity of inner stream or circular jet (m/s)
v_2 (float) – Nozzle exit flow velocity of outer stream (m/s)
T_1 (float) – Nozzle exit flow total temperature of inner stream or circular jet (K)
T_2 (float) – Nozzle exit flow total temperature of outer stream (K)
Ta (float) – Ambient static temperature (K)
Pa (float) – Ambient pressure (Pa)
- Return ndarray:
2D array of Rms or effective acoustic pressure for jet component
- class choice.choice_physics.PropagationEffects(ymic, use_ground_refl, spherical_spr, atm_atten, fband, xsii, Mai, xsi_alphai, dTisa, elevation)[source]
Instantiate noise estimation at microphone/observer.
- Parameters:
ymic (float) – Microphone height (m)
use_ground_refl (bool) – True to account for ground reflection or False else
spherical_spr (bool) – True to account for spherical spreading or False else
atm_atten (bool) – True to account for atmospheric attenuation or False else
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
xsii (ndarray) – 1D array containing observation angles (rad)
Mai (ndarray) – 1D array containing Mach number
xsi_alphai (ndarray) – 1D array containing directivity angle accounting for angle of attack (deg)
dTisa (float) – Deviation from ISA temperature (K)
elevation (float) – Ground elevation at microphone location (m)
- static atmospheric_attenuation(t_k, pa, relHum, r, fband, third_octave_band=False)[source]
Computes the absorption for a sound wave travelling through the atmosphere. Modelled according to the ISO 9613-1:1993 report.
- Parameters:
t_k – 1D array containing atmospheric temperature (K)
pa – 1D array containing atmospheric pressure (Pa)
relHum (float) – Relative humidity
r – 1D array containing distance between source and observer (m)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
third_octave_band (bool) – If True 1/3 octave bands are used and coefficients are estimated using the Volpe method (E. D. Rickley, G. G. Fleming, C. Roof. “Simplified procedure for computing the absorption of sound by the atmosphere”)
- Return ndarray:
1D array containing the atmospheric absorption in dB.
- convert_to_3rd_octave_bands(spl_dop, fdop_u, fdop_l)[source]
Convert dopplerized frequency spectrum to 1/3 octave bands
- flightEffects(nti, theta, x, y, r1, tai, SPLi, comp, phi)[source]
Computes the sound pressure level and the acoustic pressure matrices accounting for propagation effects.
- Parameters:
nti (int) – Number of trajectory points
theta (ndarray) – 1D array containing the directivity angles (deg)
x (ndarray) – 1D array containing aircraft horizontal distance relative to the microphone (m)
y (ndarray) – 1D array containing aircraft altitude relative to the microphone (m)
r1 (ndarray) – 1D array containing aircraft distance relative to the microphone (m)
tai (ndarray) – 1D array containing atmospheric temperature (K)
SPLi (ndarray) – 3D array containing Sound pressure level at the source (dB)
comp (string) – Noise component
- Returns:
An SPL and a prms array
- getDopplerShift(fband, xsii, Mai)[source]
Computes the frequency shift due to the movement of the aircraft.
- ground_reflection(y_plane, r1, ta, fband)[source]
Computes the ground effects factor for a sound wave that does not travel directly from the source to the observer.
- Parameters:
y_plane (float) – Aircraft altitude relative to the microphone (m)
r1 (float) – Aircraft distance relative to the microphone (m)
ta (float) – Atmospheric static temperature (K)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
- Return array:
1D array containing ground effects factor
- lateral_attenuation(phi, engine='wing')[source]
Calculation of engine-installation effects (lateral directional effects attributed to wing or fuselage mounted engines) for conventional aircraft. The method is based on the SAE AIR 5662 report, “Method for Predicting Lateral Attenuation of Airplane Noise”.
- Parameters:
phi – depression angle (deg)
engine – wing or fus depending on where the engine is mounted
- class choice.choice_physics.Turbine(N_rotors, SRS, theta, fband, f)[source]
Instantiate turbine source noise prediction.
- Parameters:
N_rotors (int) – Number of rotors
SRS (float) – Stator-rotor spacing
theta (ndarray) – 1D array containing the directivity angles (deg)
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
f (ndarray) – 1D array containing frequencies (Hz)
- calc(Vtr, Texit, xnl, mcore, Cax)[source]
Turbine source noise model based on the method developed by Dunn and Peart (D. G. Dunn and N. A. Peart. “Aircraft Noise Source and Contour Estimation”. NASA-CR-114649).
- Parameters:
Vtr (float) – Relative tip speed of turbine last rotor
Texit (float) – Exhaust temperature (K)
xnl (float) – Rotational speed (rps)
mcore (float) – Mass flow (kg/s)
Cax (float) – Axial velocity (m/s)
- Return ndarray:
2D array of Rms or effective acoustic pressure for turbine component
General functions
Module choice_aux
Choice auxiliary routines such as error handling and file editing and writing.
- choice.choice_aux.SPL2prms(SPL)[source]
For a given SPL matrix computes the acoustic mean square pressure.
- class choice.choice_aux.chapter3(noEngines, MTOW)[source]
Instantiate the EPNL certification limits for every operating point.
- Parameters:
noEngines (int) – Number of engines
MTOW (float) – Maximum take-off weight (tn)
- choice.choice_aux.gen_noise_source_matr_subr(output_folder, operatingPoint, nfreq, nthet, n_traj_pts, prms, ext)[source]
Save component SPL matrices to files.
- Parameters:
operatingPoint (str) – Approach, Cutback, Sideline
nfreq (int) – Number of frequencies
nthet (int) – Number of directivity angles
n_traj_pts (int) – Number of trajectory points
prms (Prms) – Rms or effective acoustic pressure for all components
ext (str) – File extension for noise source matrices
- choice.choice_aux.get_Cax(gam, p, t, w, A)[source]
Computes the axial flow speed from pressure, temperature, mass flow and area.
- choice.choice_aux.get_M(gam, xfunc0)[source]
Computes the Mach number in the fan and compressor components.
- choice.choice_aux.loadStorageMat(fname, ndata, nvars)[source]
Reads data from file and returns a 2D array.
- Parameters:
fname (str) – File name
ndata (int) – Number of data loaded along the trajectory
nvars (int) – Number of variables stored for particular module
- Return ndarray:
2D array with the data
- choice.choice_aux.plot_airframe_source(fband, theta, prms_airframe, prms_wing, prms_hor_tail, prms__flap, prms_slat, prms_lg_m, prms_lg, prms_lg_n, theta_plot, point)[source]
Plot airframe source spectrum.
- Parameters:
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
theta (ndarray) – 1D array containing the longitudinal directivities (deg)
prms_airframe (ndarray) – 1D array containing the mean square (rms) acoustic pressure for the trailing edge (Pa)
prms_wing (ndarray) – 1D array containing the rms acoustic pressure for the wing (Pa)
prms_hor_tail (ndarray) – 1D array containing therms acoustic pressure for the horizontal tail (Pa)
prms__flap (ndarray) – 1D array containing the rms acoustic pressure for the flaps (Pa)
prms_slat (ndarray) – 1D array containing the rms acoustic pressure for the slats (Pa)
prms_lg_m (ndarray) – 1D array containing the rms acoustic pressure for the main landing gear (Pa)
prms_lg (ndarray) – 1D array containing the rms acoustic pressure for all landing gears (Pa)
prms_lg_n (ndarray) – 1D array containing the rms acoustic pressure for the nose landing gear (Pa)
theta_plot (ndarray) – Directivity angle for which to plot the source (deg)
point (int) – Point in the trajectory
- choice.choice_aux.plot_source(fband, theta, prms, theta_plot, point, modules)[source]
Plot total source spectrum.
- Parameters:
fband (ndarray) – 1D array containing the 1/3 octave band frequencies (Hz)
theta (ndarray) – 1D array containing the longitudinal directivities (deg)
prms (ndarray) – A Prms object
theta_plot (ndarray) – Directivity angle for which to plot the source (deg)
point (int) – Point in the trajectory
modules (list) – Fan, Lpc, Lpt, etc.
- choice.choice_aux.preProcessFanFile(fname, d1, a2)[source]
Computes missing data from fan performance file and saves new file. (This routine is only called if the file has stars)
- choice.choice_aux.preProcessLptFile(fname, de, ae)[source]
Computes missing data from lpt performance file and saves new file. (This routine is only called if the file has stars)
- choice.choice_aux.save_3D_matrix(fname, n_rows, n_cols, n_2d_mat, mat, ext=None)[source]
Saves a 3D matrix for in output file.
- choice.choice_aux.setMachNumbers(p1, t1, g1, Ain, D1, xnl, gamma)[source]
Computes the blade Mach numbers for a component.
- Parameters:
p1 (float) – Pressure (Pa)
t1 (float) – Temperature (K)
g1 (float) – Mass flow (kg/s)
Ain (float) – Area (m**2)
D1 (float) – Diameter (m)
xnl (float) – Rotational speed (rps)
gamma (float) – Heat capacity ratio
- Returns:
Blade and relative tip Mach number and mid point speed
- choice.choice_aux.set_frequencies(nb, nfreq, fmin=50, fmax=10000)[source]
Computes the 1/3 octave band frequency, the mid-frequency of each band and all the frequencies from the given minimum to the maximum value.
- Parameters:
nb (int) – Number of bands
nfreq (int) – Number of frequencies
fmin (float) – The minimum frequency value (Hz)
fmax (float) – The maximum frequency value (Hz)
- Return ndarray:
The computed frequencies in 1D array form
Data
Module choice_data
Contains default data for components and tabulated data for noise empirical models.