fastga.models.aerodynamics.external.vlm.vlm module
Vortex Lattice Method implementation.
- class fastga.models.aerodynamics.external.vlm.vlm.VLMSimpleGeometry(**kwargs)[source]
Bases:
openmdao.core.explicitcomponent.ExplicitComponentComputation of the aerodynamics properties using the in-house VLM code.
Initializing parameters used in VLM computation.
- compute_cl_alpha_aircraft(inputs, altitude, mach, aoa_angle)[source]
Function that perform a complete calculation of aerodynamic parameters under VLM and returns only the cl_alpha_aircraft parameter.
- Parameters
inputs – input necessary to compute the aircraft aerodynamics.
altitude – altitude at which the aerodynamic properties are computed, in m.
mach – mach number used for the computation
aoa_angle – angle of attack used in the aoa derivative computation, in deg.
- compute_cl_alpha_mach(inputs, 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, altitude, mach, aoa_angle)[source]
Function that computes in VLM environment all the aerodynamic parameters @0° and aoa_angle and calculate the associated derivatives.
@param inputs: inputs 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, coef_k_wing, cl_0_htp, cl_X_htp, cl_alpha_htp, cl_alpha_htp_isolated, y_vector_htp, cl_vector_htp, coef_k_htp parameters.
^
- y | Points defining the panel
- are named clockwise. A(x_1,y_1), B(x_2,y_2), P(x_c,y_c)
P3–B—|—–P4 Reference: | | | | John J. Bertin, Russell M. Cummings - Aerodynamics for Engineers | | | | p.394-398 T1 | +–P–T2—-> | | | x | | | P2–A——–P1
- compute_wing(inputs, altitude: float, mach: float, aoa_angle: float, flaps_angle: Optional[float] = 0.0, use_airfoil: Optional[bool] = True)[source]
VLM computations for the wing alone.
- Parameters
inputs – inputs 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 (degree)
flaps_angle – flaps angle in Deg (default=0.0: i.e. no deflection)
use_airfoil – adds the camber line coordinates of the selected airfoil (default=True)
- Returns
wing dictionary including aero parameters as keys: y_vector, cl_vector, cd_vector,
cm_vector, cl, cdi, cm, coef_e
- compute_htp(inputs, altitude: float, mach: float, aoa_angle: float, use_airfoil: Optional[bool] = True)[source]
VLM computation for the horizontal tail alone.
- Parameters
inputs – inputs 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 (degree).
use_airfoil – adds the camber line coordinates of the selected airfoil (default=True).
- Returns
htp dictionary including aero parameters as keys: y_vector, cl_vector, cd_vector,
cm_vector, cl, cdi, cm, coef_e.
- compute_aircraft(inputs, altitude: float, mach: float, aoa_angle: float, flaps_angle: Optional[float] = 0.0, use_airfoil: Optional[bool] = True, saved_wing_result: Optional[dict] = None)[source]
VLM computation for the complete aircraft.
- Parameters
inputs – inputs 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 (degree).
use_airfoil – adds the camber line coordinates of the selected airfoil (default=True).
flaps_angle – flaps angle in Deg (default=0.0: i.e. no deflection).
saved_wing_result – if existing result are available, used them instead of
recomputing. :return: wing/htp and aircraft dictionaries including their respective aerodynamic coefficients.
- generate_twist(dictionary, twist, y_start, y_end)[source]
Add the twist on the lifting surface assuming a linear variation between y_start and y_end.
- Parameters
dictionary – dictionary which contains the point coordinates of the lifting surface
twist – wing twist variation between root and tip, <0 when tip is pointed downwards
y_start – y coordinate of the start of linear twist
:param y_end:y coordinate of the end of linear twist
- generate_curvature(dictionary, file_name)[source]
Generates curvature corresponding to the airfoil contained in .af file.
- apply_deflection(inputs, deflection_angle)[source]
Apply panel angle deflection due to flaps angle [UNUSED: deflection_angle=0.0].
- 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.
- post_processing_wing(width_max, span_wing, mach, dihedral_angle, wing_0, wing_aoa, aoa_angle, aspect_ratio_wing, cl_wing_airfoil, cdp_wing_airfoil)[source]
Calculate aerodynamic characteristic with VLM results :param width_max: maximum fuselage width :param span_wing: wing span :param mach: Mach number :param dihedral_angle: wing dihedral angle :param wing_0: wing aerodynamic characteristics with zero angle of attack :param wing_aoa: wing aerodynamic characteristics with input angle of attack :param aoa_angle: input angle of attack :param aspect_ratio_wing: wing aspect ratio :param cl_wing_airfoil: airfoil lift coefficient curve :param cdp_wing_airfoil: airfoil pressure drag coefficient curve
- Returns
post-processed data for other use
- post_processing_htp_ac(beta, aspect_ratio_htp, area_ratio, mach, aoa_angle, cl_htp_airfoil, cdp_htp_airfoil, htp_0, htp_aoa)[source]
Calculate aerodynamic characteristic with VLM results
- Parameters
beta – sweep angle of the htp
aspect_ratio_htp – htp aspect ratio
area_ratio – area ratio between wing and htp
mach – Mach number
aoa_angle – input angle of attack
cl_htp_airfoil – airfoil lift coefficient curve
cdp_htp_airfoil – airfoil pressure drag coefficient curve
htp_0 – htp aerodynamic characteristics data list with zero angle of attack
htp_aoa – htp aerodynamic characteristics data list with input angle of attack
- Returns
post-processed data for other use
- read_value_from_data(result_file_path, sref_wing, area_ratio, saved_area_ratio)[source]
Read existed data to speed up the process
- Parameters
result_file_path – path to the file with existing data
sref_wing – wing reference area
area_ratio – area ratio between wing and horizontal stabilizer
saved_area_ratio – area ratio between wing and horizontal stabilizer in existing data
- Returns
existing data
- 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 aic_computation(x_1, y_1, x_2, y_2, x_c, y_c, n_x, n_y)[source]
^
- y | Points defining the panel
- are named clockwise. A(x_1,y_1), B(x_2,y_2), P(x_c,y_c)
P3–B—|—–P4 Reference: | | | | John J. Bertin, Russell M. Cummings - Aerodynamics for Engineers | | | | p.394-398 T1 | +–P–T2—-> | | | x | | | P2–A——–P1
The P point is the center point of all the panel in AIC matrix construction. For each linear equations in the AIC linear system, each P point of each panel is considered (double for loop).