StaticTrim

class sharpy.solvers.statictrim.StaticTrim[source]

The StaticTrim solver determines the longitudinal state of trim (equilibrium) for an aeroelastic system in static conditions. It wraps around the desired solver to yield the state of trim of the system, in most cases the StaticCoupled solver.

It calculates the required angle of attack, elevator deflection and thrust required to achieve longitudinal equilibrium. The output angles are shown in degrees.

The results from the trimming iteration can be saved to a text file by using the save_info option.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print info to screen

True

solver

str

Solver to run in trim routine

solver_settings

dict

Solver settings dictionary

{}

max_iter

int

Maximum number of iterations of trim routine

100

fz_tolerance

float

Tolerance in vertical force

0.01

fx_tolerance

float

Tolerance in horizontal force

0.01

m_tolerance

float

Tolerance in pitching moment

0.01

tail_cs_index

['int', 'list(int)']

Index of control surfaces that move to achieve trim

0

thrust_nodes

list(int)

Nodes at which thrust is applied

[0]

initial_alpha

float

Initial angle of attack

0.0

initial_deflection

float

Initial control surface deflection

0.0

initial_thrust

float

Initial thrust setting

0.0

initial_angle_eps

float

Initial change of control surface deflection

0.05

initial_thrust_eps

float

Initial thrust setting change

2.0

relaxation_factor

float

Relaxation factor

0.2

save_info

bool

Save trim results to text file

False

trim_algorithm()[source]

Trim algorithm method

The trim condition is found iteratively.

Returns:

array of trim values for angle of attack, control surface deflection and thrust.

Return type:

np.array