fastga.models.aerodynamics.external.openvsp.openvsp module
Estimation of cl/cm/oswald aero coefficients using OPENVSP.
- class fastga.models.aerodynamics.external.openvsp.openvsp.OpenVSPSimpleGeometry(**kwargs)[source]
Bases:
openmdao.components.external_code_comp.ExternalCodeCompExecution of OpenVSP for clean surfaces.
Intialize the ExternalCodeComp component.
- check_config(logger)[source]
Perform optional error checks.
- Parameters
logger (object) – The object that manages logging output.
- compute_cl_alpha_aircraft(inputs, outputs, altitude, mach, aoa_angle)[source]
Function that perform a complete calculation of aerodynamic parameters under OpenVSP and returns only the cl_alpha_aircraft parameter.
- compute_cl_alpha_mach(inputs, outputs, aoa_angle, altitude, cruise_mach)[source]
Function that performs multiple run of OpenVSP to get an interpolation of Cl_alpha as a function of Mach for later use in the computation of the V-n diagram.
- compute_aero_coeff(inputs, outputs, altitude, mach, aoa_angle)[source]
Function that computes in OpenVSP environment all the aerodynamic parameters @0° and aoa_angle and calculate the associated derivatives.
@param inputs: inputs parameters defined within FAST-OAD-GA @param outputs: outputs parameters defined within FAST-OAD-GA @param altitude: altitude for aerodynamic calculation in meters @param mach: air speed expressed in mach @param aoa_angle: air speed angle of attack with respect to aircraft @return: cl_0_wing, cl_alpha_wing, cm_0_wing, y_vector_wing, cl_vector_wing, coeff_k_wing, cl_0_htp, cl_aoa_htp, cl_alpha_htp, cl_alpha_htp_isolated, y_vector_htp, cl_vector_htp, coeff_k_htp parameters.
- compute_aero(inputs, outputs, altitude, mach, aoa_angle, comp_opt='wing')[source]
Function that computes in OpenVSP environment the wing, horizontal stablizer(htp), and complete aircraft (considering wing and horizontal tail plan) and returns the different aerodynamic parameters. The downwash is done by OpenVSP considering far field.
- Parameters
inputs – inputs parameters defined within FAST-OAD-GA
outputs – outputs parameters defined within FAST-OAD-GA
altitude – altitude for aerodynamic calculation in meters
mach – air speed expressed in mach
aoa_angle – air speed angle of attack with respect to aircraft
comp_opt – component to evaluate can be “wing”, “htp” or “ac”
- Returns
wing/htp and aircraft dictionaries including their respective aerodynamic
coefficients
- static search_results(result_folder_path, geometry_set)[source]
Search the results folder to see if the geometry has already been calculated.
- static save_geometry(result_folder_path, geometry_set)[source]
Save geometry if not already computed by finding first available index.
- static define_geometry(inputs, mach)[source]
Extract geometrical parameters
- Parameters
inputs – inputs in the OpenMDAO format
mach – Mach number
- Return s_ref_wing
wing reference surface area
- Return area_ratio
rea ratio between wing and horizontal stabilizer
- Return s_ref_wing
geometry dataset for openvsp calculation
- static post_process_wing(inputs, wing_0, wing_aoa, s_ref_wing, aoa_angle)[source]
Computes wing data not produced by OpenVSP based on available ones
- Parameters
inputs – inputs in the OpenMDAO format
wing_0 – wing aerodynamic coefficient with 0 angle of attack
wing_aoa – wing aerodynamic coefficient with input angle of attack
s_ref_wing – wing reference surface area
aoa_angle – input angle of attack
- Returns
lift coefficient at 0 aoa, lift coefficient at input aoa, lift slope coefficient,
pitching moment coefficient, span vector, lift coefficient vector, chord vector, lift induced drag coefficient
- static post_process_htp(htp_0, htp_aoa, htp_0_isolated, htp_aoa_isolated, aoa_angle, area_ratio)[source]
Computes htp data not produced by OpenVSP based on available ones
- Parameters
htp_0 – htp aerodynamic coefficient with 0 angle of attack
htp_aoa – htp aerodynamic coefficient with input angle of attack
htp_0_isolated – isolated htp aerodynamic coefficient with 0 angle of attack
htp_aoa_isolated – isolated htp aerodynamic coefficient with input angle of attack
aoa_angle – input angle of attack
area_ratio – ratio between htp reference area and wing reference area
- Returns
htp lift coefficient at 0 aoa, htp lift coefficient at input aoa, htp lift slope
coefficient, isolated htp lift slope coefficient, span vector, lift coefficient vector, lift induced drag coefficient
- static resize_vector(vectors)[source]
Format the size of results that need to be passed as array to the size declared to OpenMDAO if the original array is bigger we resize it, otherwise we complete with zeros. First vector always has to be the y vector, any other vector can be a quantity expressed as that vector.
- Parameters
vectors – a tuple with wing aerodynamic results
- Returns
length-modified aerodynamic results
- static assign_read_data(data, area_ratio, saved_area_ratio, s_ref_wing)[source]
When results already exists, read and assign existing data and apply the new area ratio
- Parameters
data – existing results under the form of a dataframe
area_ratio – area ratio between the wing and the horizontal stabilizer
saved_area_ratio – area ratio between the wing and the horizontal stabilizer in
existing results :param s_ref_wing: wing reference surface area
- Returns
aerodynamic characteristic parameters of wing and horizontal stabilizer
- class fastga.models.aerodynamics.external.openvsp.openvsp.OpenVSPSimpleGeometryDP(**kwargs)[source]
Bases:
fastga.models.aerodynamics.external.openvsp.openvsp.OpenVSPSimpleGeometryExecution of OpenVSP for surfaces with slipstream effects.
Intialize the ExternalCodeComp component.
- compute_wing_rotor(inputs, outputs, altitude, mach, aoa_angle, thrust, power)[source]
Function that computes in OpenVSP environment the wing with a rotor and returns the different aerodynamic parameters.
@param inputs: inputs parameters defined within FAST-OAD-GA @param outputs: outputs parameters defined within FAST-OAD-GA @param altitude: altitude for aerodynamic calculation in meters @param mach: air speed expressed in mach @param aoa_angle: air speed angle of attack with respect to wing (degree) @param thrust: total aircraft thrust for computation of thrust coefficient (will be divided by engine count) @param power: total aircraft power for computation of power coefficient (will be divided by engine count) @return: wing dictionary including aero parameters as keys: y_vector, cl_vector, cd_vector, cm_vector, cl, cdi, cm, coeff_e
- fastga.models.aerodynamics.external.openvsp.openvsp.generate_wing_rotor_file(engine_count: int)[source]
Uses the base VSPAERO template file to generate a file with all the line required to launch OpenVSP with n rotors in the run
- Parameters
engine_count – the number of engine in the run
return the path to the new template file for the n rotor run.