PolarCorrection¶
- class sharpy.generators.polaraeroforces.PolarCorrection[source]¶
This generator corrects the aerodynamic forces from UVLM based on the airfoil polars provided by the user in the
aero.h5
file. Polars are entered for each airfoil, in a table comprisingAoA (rad), CL, CD, CM
.This
generator_id = 'PolarCorrection'
and can be used in the coupled solvers through thecorrect_forces_method
setting as:These are the steps needed to correct the forces:
The force coming from UVLM is divided into induced drag (parallel to the incoming flow velocity) and lift
(the remaining force).
- If
cd_from_cl == 'on'
. The viscous drag and pitching moment are found at the computed lift coefficient. Then forces and moments are updated
Else, the angle of attack is computed:
The angle of attack is computed based on that lift force and the angle of zero lift computed from the airfoil polar and assuming the potential flow lift curve slope of \(2 \pi\)
The drag force is computed based on the angle of attack and the polars provided by the user
If
correct_lift == 'on'
, the lift coefficient is also corrected with the polar data. Else, only the UVLM results are used.
The pitching moment is added in a similar manner as the viscous drag. However, if
moment_from_polar == 'on'
andcorrect_lift == 'on'
, the total moment (the one used for the FSI) is computed just from polar data, overriding any moment computed in SHARPy. That is, the moment will include the polar pitching moment, and moments due to lift and drag computed from the polar data.This generator takes in the following settings.
Name
Type
Description
Default
correct_lift
bool
Correct lift according to the polars
False
cd_from_cl
bool
Interpolate the C_D for the given C_L, as opposed to getting the C_D from the section AoA.
False
moment_from_polar
bool
If
correct_lift
is selected, it will compute the pitching moment simply from polar derived data, i.e. the polars Cm and the momentsarising from the lift and drag (derived from the polar) contribution. Else, it will add the polar Cm to the moment already computed by SHARPy.False
add_rotation
bool
Add rotation velocity. Probably needed in steady computations
False
rot_vel_g
list(float)
Rotation velocity in G FoR. Only used if add_rotation = True
[0.0, 0.0, 0.0]
centre_rot_g
list(float)
Centre of rotation in G FoR. Only used if add_rotation = True
[0.0, 0.0, 0.0]
skip_surfaces
list(int)
Surfaces on which force correction is skipped.
[]
aoa_cl0
list(float)
Angle of attack for which zero lift is achieved specified in deg for each airfoil.
[]
write_induced_aoa
bool
Write induced aoa of each node to txt file.
False
- check_for_special_cases(aerogrid)[source]¶
Checks if the outboard node is shared by multiple surfaces.
- Parameters
aerogrid – class:`~sharpy.aero.models.AerogridLoader
- compute_aoa_cl0_from_airfoil_data(aerogrid)[source]¶
Computes the angle of attack for which zero lift is achieved for every airfoil
- correct_surface_area(inode, struct2aero_mapping, zeta_ts, area)[source]¶
Corrects the surface area if the structural node is shared by multiple surfaces.
For example, when the wing is split into right and left wing both surfaces share the center node. Necessary for cl calculation as the force on the node is already the sum of the forces generated at the adjacent panels of each surface.
- Parameters
inode (int) – global node id
struct2aero_mapping (list of dicts) – maps the structural (global) nodes to aero surfaces and nodes
zeta_ts (array) – zeta of current aero timestep
- Returns
corrected surface area of other surfaces
- Return type
float
- generate(**params)[source]¶
- Keyword Arguments
aero_kstep (
sharpy.utils.datastructures.AeroTimeStepInfo
) – Current aerodynamic substepstructural_kstep (
sharpy.utils.datastructures.StructTimeStepInfo
) – Current structural substepstruct_forces (np.array) – Array with the aerodynamic forces mapped on the structure in the B frame of reference
- Returns
New corrected structural forces
- Return type
np.array