aerodynamic_coefficients
#
This module contains the factory functions for setting up the aerodynamic interface of artificial and celestial bodies in an environment.
Functions#

Factory function for creating aerodynamic interface model settings entirely from constant coefficients. 

Factory function for creating aerodynamic interface model settings from custom coefficients. 
Factory function for creating aerodynamic interface model settings from custom coefficients. 


Factory function for creating aerodynamic interface model settings from userdefined, 1d tabulated coefficients. 

Factory function for creating aerodynamic interface model settings from userdefined, 1d tabulated force coefficients. 

Factory function for creating aerodynamic interface model settings from tabulated force coefficients from files. 

Factory function for creating aerodynamic interface model settings from tabulated coefficients from files. 

Factory function for creating aerodynamic interface model settings by applying one constant scaling factor/value to all coefficients of an existing model settings object. 

Factory function for creating aerodynamic interface model settings by applying constant scaling factors/values to the coefficients of an existing model settings object. 

Factory function for creating aerodynamic interface model settings by applying custom scaling factors/values to the coefficients of an existing model settings object. 
 constant(reference_area: float, constant_force_coefficient: numpy.ndarray[numpy.float64[3, 1]], are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings entirely from constant coefficients.
Factory function for settings object, defining aerodynamic interface model entirely from constant aerodynamic coefficients, i.e. coefficients are not a function of any independent variables.
 Parameters:
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
constant_force_coefficient (numpy.ndarray) – Constant force coefficients.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg are_coefficients_in_aerodynamic_frame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedConstantAerodynamicCoefficientSettings
class Return type:
Examples
In this example, we create
AerodynamicCoefficientSettings
for the artificial body “Vehicle”, using only constant aerodynamic coefficients:# Define the reference area and constant aerodynamic coefficients reference_area = 20.0 drag_coefficient = 1.5 lift_coefficient = 0.3 # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( reference_area, constant_force_coefficient=[drag_coefficient, 0, lift_coefficient], are_coefficients_in_aerodynamic_frame=True, are_coefficients_in_negative_axis_direction=True ) # Assign aerodynamic interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", aero_coefficient_settings)
 custom_aerodynamic_force_coefficients(force_coefficient_function: Callable[[List[float]], numpy.ndarray[numpy.float64[3, 1]]], reference_area: float, independent_variable_names: List[tudatpy.kernel.numerical_simulation.environment.AerodynamicCoefficientsIndependentVariables], are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings from custom coefficients.
Factory function for settings object, defining aerodynamic interface model via a custom force coefficient function (function of independent variable).
 Parameters:
force_coefficient_function (callable[[list[float]], numpy.ndarray[numpy.float64[3, 1]]]) – Function that is defining the aerodynamic coefficients as function of an independent variable (see arg independent_variable_names).
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
independent_variable_name (list[environment.AerodynamicCoefficientsIndependentVariables]) – Vector with identifiers for the independent variable w.r.t. which the aerodynamic coefficients are defined.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg are_coefficients_in_aerodynamic_frame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedCustomAerodynamicCoefficientSettings
class Return type:
CustomAerodynamicCoefficientSettings
Examples
In this example, we create
AerodynamicCoefficientSettings
for the artificial body “Vehicle”, using a function based on the mach number:def force_coefficients(variables_list): # Extract the mach number mach_number = variables_list[0] # If the mach number is below 3, use fixed coefficients if mach_number <= 3: return [0.99, 0, 1.08] # Same if the mach number is above 10 elif mach_number >= 10: return [0.82, 0, 0.88] # Otherwise, vary linearly between the ones at M=3 and M=10 CD = 1.06670.02457*mach_number CL = 1.16360.02786*mach_number return [CD, 0, CL] # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.custom( force_coefficients, reference_area=1.50, independent_variable_names=[environment.AerodynamicCoefficientsIndependentVariables.mach_number_dependent] ) # Assign the aerodynamic coefficient interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", aero_coefficient_settings)
 custom_aerodynamic_force_and_moment_coefficients(force_coefficient_function: Callable[[List[float]], numpy.ndarray[numpy.float64[3, 1]]], moment_coefficient_function: Callable[[List[float]], numpy.ndarray[numpy.float64[3, 1]]], reference_length: float, reference_area: float, moment_reference_point: numpy.ndarray[numpy.float64[3, 1]], independent_variable_names: List[tudatpy.kernel.numerical_simulation.environment.AerodynamicCoefficientsIndependentVariables], are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings from custom coefficients.
Factory function for settings object, defining aerodynamic interface model via a custom force coefficient function (function of independent variable).
 Parameters:
force_coefficient_function (callable[[list[float]], numpy.ndarray[numpy.float64[3, 1]]]) – Function that is defining the aerodynamic force coefficients as function of an independent variable (see arg independent_variable_names).
moment_coefficient_function (callable[[list[float]], numpy.ndarray[numpy.float64[3, 1]]]) – Function that is defining the aerodynamic moment coefficients as function of an independent variable (see arg independent_variable_names).
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
reference_length (float) – Reference length with which aerodynamic moments are nondimensionalized.
moment_reference_point (numpy.ndarray[numpy.float64[3, 1]]) – Reference point in the bodyfixed frame w.r.t. which the moments are provided.
independent_variable_name (list[environment.AerodynamicCoefficientsIndependentVariables]) – Vector with identifiers for the independent variable w.r.t. which the aerodynamic coefficients are defined.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg are_coefficients_in_aerodynamic_frame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedCustomAerodynamicCoefficientSettings
class Return type:
CustomAerodynamicCoefficientSettings
 tabulated(independent_variables: List[float], force_coefficients: List[numpy.ndarray[numpy.float64[3, 1]]], moment_coefficients: List[numpy.ndarray[numpy.float64[3, 1]]], reference_length: float, reference_area: float, lateral_reference_length: float, moment_reference_point: numpy.ndarray[numpy.float64[3, 1]], independent_variable_name: tudatpy.kernel.numerical_simulation.environment.AerodynamicCoefficientsIndependentVariables, are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = None) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings from userdefined, 1d tabulated coefficients.
Factory function for settings object, defining aerodynamic interface model via userdefined, 1dimensional, tabulated aerodynamic force and moment coefficients (tabulated w.r.t. independent variable).
 Parameters:
independent_variables (list[float]) – Values of independent variables at which the coefficients in the input multi vector are defined (size 1).
force_coefficients (list[numpy.ndarray[numpy.float64[3, 1]]]) – Values of force coefficients at independent variables defined by independent_variables.
moment_coefficients (list[numpy.ndarray[numpy.float64[3, 1]]]) – Values of moment coefficients at independent variables defined by independent_variables.
reference_length (float) – Reference length with which aerodynamic moments about x and z axes are nondimensionalized.
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
lateral_reference_length (float) – Reference length with which aerodynamic moment about yaxis is nondimensionalized.
moment_reference_point (numpy.ndarray[numpy.float64[3, 1]]) – Point w.r.t. aerodynamic moment is calculated.
independent_variable_name (list[environment.AerodynamicCoefficientsIndependentVariables]) – Vector with identifiers for the independent variable w.r.t. which the aerodynamic coefficients are defined.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg areCoefficientsInAerodynamicFrame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
interpolator_settings (math.interpolators.InterpolatorSettings, default = None) – Interpolator settings object, where the conditions for interpolation of tabulated inputs are saved.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedTabulatedAerodynamicCoefficientSettings
class (viaTabulatedAerodynamicCoefficientSettingsBase
class) Return type:
TabulatedAerodynamicCoefficientSettings
Examples
In this example, aerodynamic force and moment coefficients are defined as multidimensional arrays. The values for the aerodynamic coefficients vary with Mach number, and are defined for Mach numbers of 3, 5, 10, and 15. This example also shows how to set the required reference point, lengths, and area.
# Define the aerodynamic force coefficients [CD, CS, CL] for different mach numbers aero_coefficients_array_force = [ [0.7647, 0, 0.9722], [0.6729, 0, 0.8461], [0.6240, 0, 0.7838], [0.6246, 0, 0.7841] ] # Define the aerodynamic moment coefficients for different mach numbers aero_coefficients_array_moment = [ [0.45, 0, 0], [0.50, 0, 0], [0.53, 0, 0], [0.55, 0, 0] ] # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.tabulated( independent_variables=[3, 5, 10, 15], # Mach number at which the coefficients are defined force_coefficients=aero_coefficients_array_force, moment_coefficients=aero_coefficients_array_moment, reference_length=0.25, reference_area=1.50, lateral_reference_length=0.25, moment_reference_point=[0, 0.015, 0.01], independent_variable_name=environment.AerodynamicCoefficientsIndependentVariables.mach_number_dependent ) # Assign the aerodynamic coefficient interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", aero_coefficient_settings)
 tabulated_force_only(independent_variables: List[float], force_coefficients: List[numpy.ndarray[numpy.float64[3, 1]]], reference_area: float, independent_variable_name: tudatpy.kernel.numerical_simulation.environment.AerodynamicCoefficientsIndependentVariables, are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = None) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings from userdefined, 1d tabulated force coefficients.
Factory function for settings object, defining aerodynamic interface model via userdefined, 1dimensional, tabulated aerodynamic force coefficients (tabulated w.r.t. independent variable).
 Parameters:
independent_variables (list[float]) – Values of independent variables at which the coefficients in the input multi vector are defined (size 1)
force_coefficients (list[numpy.ndarray[numpy.float64[3, 1]]]) – Values of force coefficients at independent variables defined by independent_variables.
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
independent_variable_name (environment.AerodynamicCoefficientsIndependentVariables) – Identifier of the independent variable w.r.t. which the aerodynamic coefficients are defined.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg areCoefficientsInAerodynamicFrame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
interpolator_settings (math.interpolators.InterpolatorSettings, default = None) – Interpolator settings object, where the conditions for interpolation of tabulated inputs are saved. Pointer to an interpolator settings object where the conditions for interpolation of tabulated inputs are saved.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedTabulatedAerodynamicCoefficientSettings
class Return type:
TabulatedAerodynamicCoefficientSettings
Examples
In this example, aerodynamic force coefficients are defined as a multidimensional array. The values for the force coefficients vary with Mach number, and are defined for Mach numbers of 3, 5, 10, and 15.
# Define the aerodynamic coefficients [CD, CS, CL] for different mach numbers aero_coefficients_array = [ [0.7647, 0, 0.9722], [0.6729, 0, 0.8461], [0.6240, 0, 0.7838], [0.6246, 0, 0.7841] ] # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.tabulated_force_only( independent_variables=[3.0, 5.0, 10.0, 15.0], # Mach number at which the coefficients are defined force_coefficients=aero_coefficients_array, reference_area=1.50, independent_variable_name=environment.AerodynamicCoefficientsIndependentVariables.mach_number_dependent ) # Assign the aerodynamic coefficient interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", aero_coefficient_settings)
 tabulated_force_only_from_files(force_coefficient_files: Dict[int, str], reference_area: float, independent_variable_names: List[tudatpy.kernel.numerical_simulation.environment.AerodynamicCoefficientsIndependentVariables], are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = None) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings from tabulated force coefficients from files.
Factory function for settings object, defining aerodynamic interface model via userdefined, tabulated aerodynamic force coefficients (tabulated w.r.t. independent variable), obtained from data files.
 Parameters:
force_coefficient_files (Dict[int, str]) – Path of the aerodynamic coefficient files corresponding to the force coefficient of the given dict key.
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
independent_variable_names (list[environment.AerodynamicCoefficientsIndependentVariables]) – Vector with identifiers for the independent variable w.r.t. which the aerodynamic coefficients are defined.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg areCoefficientsInAerodynamicFrame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
interpolator_settings (math.interpolators.InterpolatorSettings, default = None) – Interpolator settings object, where the conditions for interpolation of tabulated inputs are saved.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedTabulatedAerodynamicCoefficientSettings
class Return type:
TabulatedAerodynamicCoefficientSettings
Examples
In this example, the drag and lift coefficients of the Space Transport System are defined from two data files. Both of these data files contain coefficient values dependent on both the angle of attack and the mach number, as shown in the example in the independent_variable_names input. This example is taken from the reentry trajectory example.
# Define the aerodynamic coefficient files (leave C_S empty) aero_coefficients_files = {0: "input/STS_CD.dat", 2:"input/STS_CL.dat"} # Setup the aerodynamic coefficients settings tabulated from the files coefficient_settings = environment_setup.aerodynamic_coefficients.tabulated_force_only_from_files( force_coefficient_files=aero_coefficients_files, reference_area=2690.0*0.3048*0.3048, independent_variable_names=[environment.angle_of_attack_dependent, environment.mach_number_dependent] ) # Add predefined aerodynamic coefficients database to the body environment_setup.add_aerodynamic_coefficient_interface(bodies, "STS", coefficient_settings)
 tabulated_from_files(force_coefficient_files: Dict[int, str], moment_coefficient_files: Dict[int, str], reference_length: float, reference_area: float, lateral_reference_length: float, moment_reference_point: numpy.ndarray[numpy.float64[3, 1]], independent_variable_names: List[tudatpy.kernel.numerical_simulation.environment.AerodynamicCoefficientsIndependentVariables], are_coefficients_in_aerodynamic_frame: bool = True, are_coefficients_in_negative_axis_direction: bool = True, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = None) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings from tabulated coefficients from files.
Factory function for settings object, defining aerodynamic interface model via userdefined, tabulated aerodynamic force and moment coefficients (tabulated w.r.t. independent variable), obtained from data files.
 Parameters:
force_coefficient_files (Dict[int, str]) – Path of the aerodynamic coefficient files corresponding to the force coefficient of the given dict key.
moment_coefficient_files (Dict[int, str]) – Path of the aerodynamic coefficient files corresponding to the moment coefficient of the given dict key.
reference_length (float) – Reference length with which aerodynamic moments about x and z axes are nondimensionalized.
reference_area (float) – Reference area with which aerodynamic forces and moments are nondimensionalized.
lateral_reference_length (float) – Reference length with which aerodynamic moment about yaxis is nondimensionalized.
moment_reference_point (numpy.ndarray[numpy.float64[3, 1]]) – Point w.r.t. aerodynamic moment is calculated.
independent_variable_names (list[environment.AerodynamicCoefficientsIndependentVariables]) – Vector with identifiers for the independent variable w.r.t. which the aerodynamic coefficients are defined.
are_coefficients_in_aerodynamic_frame (bool, default = True) – Boolean to define whether the aerodynamic coefficients are defined in the aerodynamic frame (drag, side, lift force) or in the body frame (typically denoted as Cx, Cy, Cz).
are_coefficients_in_negative_axis_direction (bool, default = True) – Boolean to define whether the aerodynamic coefficients are positive along the positive axes of the body or aerodynamic frame (see arg areCoefficientsInAerodynamicFrame). Note that for drag, side and lift force, the coefficients are typically defined in negative direction.
interpolator_settings (math.interpolators.InterpolatorSettings, default = None) – Interpolator settings object, where the conditions for interpolation of tabulated inputs are saved.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedTabulatedAerodynamicCoefficientSettings
class Return type:
TabulatedAerodynamicCoefficientSettings
Examples
This example is very similar to the one for tabulated_force_only_from_files, with the distinction that a pitching moment coefficient is added.
# Define the force coefficient files (leave C_S empty) force_coefficients_files = {0: "input/STS_CD.dat", 2:"input/STS_CL.dat"} # Define the moment coefficient files (leave C_S empty) moment_coefficients_files = {0: "input/STS_CM.dat"} # Setup the aerodynamic coefficients settings tabulated from the files coefficient_settings = environment_setup.aerodynamic_coefficients.tabulated_from_files( force_coefficient_files=force_coefficients_files, moment_coefficient_files=moment_coefficients_files, reference_length=11.9, reference_area=2690.0*0.3048*0.3048, lateral_reference_length=11.9, moment_reference_point = [2.5, 0, 0.25], independent_variable_names=[environment.angle_of_attack_dependent, environment.mach_number_dependent] ) # Add the predefined aerodynamic coefficients database to the body environment_setup.add_aerodynamic_coefficient_interface(bodies, "STS", coefficient_settings)
 scaled_by_constant(unscaled_coefficient_settings: tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings, force_scaling_constant: float, moment_scaling_constant: float, is_scaling_absolute: bool = False) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings by applying one constant scaling factor/value to all coefficients of an existing model settings object.
Factory function for settings object, defining aerodynamic interface based on scaling the coefficients of an existing model settings object by one constant factor or value. Via the
is_scaling_absolute
boolean, the user can apply a constant scaling factor or an absolute value to the resulting force and moment coefficients (for instance for an uncertainty analysis). Parameters:
unscaled_coefficient_settings (AerodynamicCoefficientSettings) – Existing aerodynamic interface model settings object that is used as the base for the scaled settings object.
force_scaling_constant (float) – Constant scaling factor to be applied to all aerodynamic force coefficients.
moment_scaling_constant (float) – Constant scaling factor to be applied to all aerodynamic moment coefficients.
False (is_scaling_absolute, default =) – Boolean indicating whether aerodynamic coefficient scaling is absolute. Setting this boolean to true will add the scaling value to the base value, instead of the default behaviour of multiplying the base value by the scaling factor.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedScaledAerodynamicCoefficientInterfaceSettings
class Return type:
ScaledAerodynamicCoefficientInterfaceSettings
Examples
In this example, we first set constant aerodynamic coefficients, like in the earlier example. Then, we use the scaled_by_constant function to scale the force coefficients by 1.1. Since the is_scaling_absolute equals False by default, the force coefficients are then increased by 10%.
# Define the reference area and constant aerodynamic coefficients reference_area = 20.0 drag_coefficient = 1.5 lift_coefficient = 0.3 # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( reference_area, constant_force_coefficient=[drag_coefficient, 0, lift_coefficient] ) # Define scaled aerodynamic coefficient to increase the force coefficients by 10% scaled_aero_coefficient_settings = environment_setup.aerodynamic_coefficients.scaled_by_constant( unscaled_coefficient_settings=aero_coefficient_settings, force_scaling_constant=1.1, moment_scaling_constant=1.0 ) # Assign aerodynamic interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", scaled_aero_coefficient_settings)
 scaled_by_vector(unscaled_coefficient_settings: tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings, force_scaling_vector: numpy.ndarray[numpy.float64[3, 1]], moment_scaling_vector: numpy.ndarray[numpy.float64[3, 1]], is_scaling_absolute: bool = False) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings by applying constant scaling factors/values to the coefficients of an existing model settings object.
Factory function for settings object, defining aerodynamic interface based on scaling the coefficients of an existing model settings object by constant factors or values. Via the
is_scaling_absolute
boolean, the user can apply one constant scaling factor or an absolute value to each resulting force and moment coefficient (for instance for an uncertainty analysis). Parameters:
unscaled_coefficient_settings (AerodynamicCoefficientSettings) – Existing aerodynamic interface model settings object that is used as the base for the scaled settings object.
force_scaling_vector (numpy.ndarray[numpy.float64[3, 1]]) – Constant scaling factors to be applied to each aerodynamic force coefficient.
moment_scaling_vector (numpy.ndarray[numpy.float64[3, 1]]) – Constant scaling factors to be applied to each aerodynamic moment coefficient.
False (is_scaling_absolute, default =) – Boolean indicating whether aerodynamic coefficient scaling is absolute. Setting this boolean to true will add the scaling value to the base value, instead of the default behaviour of multiplying the base value by the scaling factor.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedScaledAerodynamicCoefficientInterfaceSettings
class Return type:
ScaledAerodynamicCoefficientInterfaceSettings
Examples
In this example, we first set constant aerodynamic coefficients, like in the earlier example. Then, we use the scaled_by_vector function to scale the drag coefficient by 2.
# Define the reference area and constant aerodynamic coefficients reference_area = 20.0 drag_coefficient = 1.5 lift_coefficient = 0.3 # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( reference_area, constant_force_coefficient=[drag_coefficient, 0, lift_coefficient] ) # Define scaled aerodynamic coefficient to increase CD by a factor of 2 scaled_aero_coefficient_settings = environment_setup.aerodynamic_coefficients.scaled_by_vector( unscaled_coefficient_settings=aero_coefficient_settings, force_scaling_vector=[2.0, 1.0, 1.0], moment_scaling_vector=[1.0, 1.0, 1.0] ) # Assign aerodynamic interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", scaled_aero_coefficient_settings)
 scaled_by_vector_function(unscaled_coefficient_settings: tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings, force_scaling_vector_function: Callable[[float], numpy.ndarray[numpy.float64[3, 1]]], moment_scaling_vector_function: Callable[[float], numpy.ndarray[numpy.float64[3, 1]]], is_scaling_absolute: bool = False) tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings #
Factory function for creating aerodynamic interface model settings by applying custom scaling factors/values to the coefficients of an existing model settings object.
Factory function for settings object, defining aerodynamic interface based on scaling the coefficients of an existing model settings object by custom factors or values. Via the
is_scaling_absolute
boolean, the user can apply the scaling factors or absolute values to each resulting force and moment coefficient (for instance for an uncertainty analysis). Parameters:
unscaled_coefficient_settings (AerodynamicCoefficientSettings) – Existing aerodynamic interface model settings object that is used as the base for the scaled settings object.
force_scaling_vector_function (callable[[float], numpy.ndarray[numpy.float64[3, 1]]]) – Custom scaling factors to be applied to each aerodynamic force coefficient.
moment_scaling_vector_function (callable[[float], numpy.ndarray[numpy.float64[3, 1]]]) – Custom scaling factors to be applied to each aerodynamic moment coefficient.
False (is_scaling_absolute, default =) – Boolean indicating whether aerodynamic coefficient scaling is absolute. Setting this boolean to true will add the scaling value to the base value, instead of the default behaviour of multiplying the base value by the scaling factor.
 Returns:
Instance of the
AerodynamicCoefficientSettings
derivedScaledAerodynamicCoefficientInterfaceSettings
class Return type:
ScaledAerodynamicCoefficientInterfaceSettings
Examples
In this example, we first set constant aerodynamic coefficients, like in the earlier example. Then, we use the scaled_by_vector_function function to scale the drag and lift coefficients according to a function that varies with time. This scaling function essentially adds noise to the CD and CL following as a sin or cos function.
# Define the reference area and constant aerodynamic coefficients reference_area = 20.0 drag_coefficient = 1.5 lift_coefficient = 0.3 # Create the aerodynamic interface settings aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( reference_area, constant_force_coefficient=[drag_coefficient, 0, lift_coefficient] ) # Define the aerodynamic coefficient scaling as a function of time def aero_coefficient_scaling(time): CD_scale = 1 + 0.25*np.sin(time/10) CL_scale = 1 + 0.25*np.cos(time/15) return [CD_scale, 1.0, CL_scale] # Define scaled aerodynamic coefficient to increase CD by a factor of 2 scaled_aero_coefficient_settings = environment_setup.aerodynamic_coefficients.scaled_by_vector_function( unscaled_coefficient_settings=aero_coefficient_settings, force_scaling_vector_function=aero_coefficient_scaling, moment_scaling_vector_function=lambda x: [1.0, 1.0, 1.0] ) # Assign aerodynamic interface to the vehicle environment_setup.add_aerodynamic_coefficient_interface(bodies, "Vehicle", scaled_aero_coefficient_settings)
Classes#
Base class for providing settings for aerodynamic interface model. 

Class for defining model settings from constant aerodynamic coefficients. 
 class AerodynamicCoefficientSettings#
Base class for providing settings for aerodynamic interface model.
Functional (base) class for settings of aerodynamic interface models that require no information in addition to their type. Aerodynamic interface model settings requiring additional information must be defined using an object derived from this class.
 add_single_control_surface(self: tudatpy.kernel.numerical_simulation.environment_setup.aerodynamic_coefficients.AerodynamicCoefficientSettings, control_surface_settings: tudat::simulation_setup::ControlSurfaceIncrementAerodynamicCoefficientSettings, control_surface_name: str) None #
No documentation found.
 class ConstantAerodynamicCoefficientSettings#
Class for defining model settings from constant aerodynamic coefficients.
AerodynamicCoefficientSettings derived class for aerodynamic interface model settings using only constant aerodynamic coefficients.