torchmdo.lifting_line
Lifting-line model of an aircraft wing
- class torchmdo.lifting_line.LiftingLineWing(spanwise_loc, chords, alpha_sections, alpha_0s, span, wing_area)[source]
Lifting-line model of an aircraft wing. This is used to compute the lift distribution and induced drag over a straight wing. Note that only the specifications for half of the wing should be provided unless otherwise noted.
- Parameters:
spanwise_loc (
Tensor) – shape (n_elem,) spanwise locations of the n_elem wing segments. The root is considered to be zero and the node is the half-wing span. We assume symmetrical loading so this should just be points from one half of wing. You should also not place a node at the root, i.e. the tensor should not contain a zero. This will raise an error.chords (
Tensor) – shape (n_elem,) chord of each wing segment.alpha_sections (
Tensor) – shape (n_elem,) AoA (in rad) of each wing segment assuming zero aircraft AoA.alpha_0s (
Tensor) – shape (n_elem,) zero lift AoA (in rad) of each wing segment assuming zero aircraft AoA.span (
Tensor) – full span of the aircraft (i.e. both halves of the wing).wing_area (
Tensor) – full wing area of the aircraft (i.e. both halves of the wing).
- alpha_effective(Cl)[source]
Compute effective angle of attack at each spanwise reference.
- Parameters:
Cl (
Tensor) – Target wing lift coefficient (\(C_L\)).- Return type:
Tensor
- alpha_induced(Cl)[source]
compute induced angle of attack at each spanwise reference.
- Parameters:
Cl (
Tensor) – Target wing lift coefficient (\(C_L\)).- Return type:
Tensor
- alpha_induced_fun(spanwise_loc, Cl)[source]
Induced angle of attack (AoA) at a given spanwise locations.
- Parameters:
spanwise_loc (
Tensor) – the spanwise locations to evaluate the induced AoA.Cl (
Tensor) – Target wing lift coefficient (\(C_L\)).
Notes
To compute effective angle of attack and local section lift (assuming thin airfoil theory):
>>> alpha_effective = alpha_section + alpha_aircraft - alpha_induced >>> cl = 2.*torch.pi*(alpha_effective - alpha_0)
- Return type:
Tensor
- induced_drag(Cl)[source]
Compute the wing induced drag coefficient (\(C_D\)), span efficiency factor, and induced drag factor.
- Parameters:
Cl (
Tensor) – Target wing lift coefficient (\(C_L\)).- Return type:
Tuple[Tensor,Tensor,Tensor]- Returns:
[induced_drag_coefficient, span_efficiency_factor, induced_drag_factor]