pyflightstream.fsi.beam (stable)¶
Generated from the docstrings at build time: every one of the 10 names in the __all__ of pyflightstream.fsi.beam has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
PyNite beam model of one blade: static solve and modal frequencies.
Pipeline role: WP3 of DLV-007. Builds the finite element beam of one
blade on the elastic axis from :class:~pyflightstream.fsi.config.FsiConfig,
solves it statically under sectional loads (with P-Delta when axial
tension is present, FSI-R05), and extracts flap and torsion natural
frequencies for the Campbell diagram (Gate 1).
Model and frame: the beam lies along the global X axis (spanwise, root to tip), flap deflection w is global Y, and elastic twist theta is the rotation about X. The structural model is (w, theta) per the coupling plan: only flap translation and torsion carry mass; the remaining degrees of freedom are exactly condensed out of the eigenproblem. Stiffness is encoded with unit elastic moduli (E = G = 1) so the section constants are numerically EI and GJ; the blade root station is clamped.
PyNite (PyPI PyNiteFEA, import name Pynite) is required; it is
installed by the [fsi] extra only.
Advanced¶
pyflightstream.fsi.beam.ModalResult
dataclass
¶
ModalResult(
frequencies_rad_per_s: tuple[float, ...],
kinds: tuple[str, ...],
flap_mass_fractions: tuple[float, ...],
)
Natural frequencies of the (w, theta) beam.
Attributes:
| Name | Type | Description |
|---|---|---|
frequencies_rad_per_s |
tuple of float
|
Undamped natural frequencies omega_n [rad/s], ascending. |
kinds |
tuple of str
|
Per mode, |
flap_mass_fractions |
tuple of float
|
Per mode, fraction of generalized mass in the flap DOFs; 1 for
pure flap, 0 for pure torsion. The lumped mass matrix is
diagonal (the flap-twist inertial coupling of a centre of
gravity off the elastic axis is not modelled, see
:func: |
pyflightstream.fsi.beam.StaticBeamSolution
dataclass
¶
StaticBeamSolution(
station_radii_m: tuple[float, ...],
flap_deflection_m: tuple[float, ...],
elastic_twist_rad: tuple[float, ...],
)
Beam solution sampled at the radial stations.
Attributes:
| Name | Type | Description |
|---|---|---|
station_radii_m |
tuple of float
|
Radial stations [m], as in the configuration. |
flap_deflection_m |
tuple of float
|
Flap deflection w at each station [m], positive along +Y of the rotating blade frame. |
elastic_twist_rad |
tuple of float
|
Elastic twist theta at each station [rad], positive nose up about the spanwise axis. |
pyflightstream.fsi.beam.apply_station_loads
¶
apply_station_loads(
model: FEModel3D,
cfg: FsiConfig,
flap_load_n_per_m: Sequence[float] | None = None,
torsion_moment_n_m_per_m: Sequence[float] | None = None,
axial_load_n_per_m: Sequence[float] | None = None,
) -> None
Apply per-station distributed loads to a built model.
Distributed flap and axial loads become trapezoidal member loads between stations. The distributed torsion moment is lumped to nodal torques over tributary lengths, which reproduces the exact tip twist of a uniform distributed torque on a uniform beam.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
FEModel3D
|
Model from :func: |
required |
cfg
|
FsiConfig
|
Configuration providing the station radii. |
required |
flap_load_n_per_m
|
sequence of float
|
Distributed flap force per unit span at each station [N/m], positive +Y. |
None
|
torsion_moment_n_m_per_m
|
sequence of float
|
Distributed torque about the elastic axis at each station [N m / m], positive nose up. |
None
|
axial_load_n_per_m
|
sequence of float
|
Distributed axial (spanwise) force at each station [N/m], positive toward the tip; the centrifugal tension enters here and stiffens the beam through P-Delta (FSI-R05). |
None
|
Raises:
| Type | Description |
|---|---|
FsiInputError
|
If a load distribution's length is not the configuration's station count. |
Examples:
>>> from pyflightstream.fsi.config import FsiConfig
>>> from pyflightstream.fsi.sections import blade_properties_from_sections
>>> plate = [(0.02, 0.002), (-0.02, 0.002), (-0.02, -0.002), (0.02, -0.002)]
>>> blade = blade_properties_from_sections(
... [0.1, 0.3, 0.5], sections_m=[plate] * 3, chord_m=[0.04] * 3,
... geometric_pitch_deg=[10.0] * 3, material="ti-6al-4v-grade5-annealed",
... geometry_source="a flat 40 x 4 mm plate",
... )
>>> cfg = FsiConfig(blade_count=2, omega_rad_per_s=0.0, blade=blade)
>>> from pyflightstream.fsi import beam
>>> model = beam.build_beam_model(cfg)
>>> beam.apply_station_loads(model, cfg, flap_load_n_per_m=[10.0] * 3)
>>> beam.solve_static(model)
>>> round(float(beam.extract_solution(model, cfg).flap_deflection_m[-1]) * 1e3, 2)
1.32
pyflightstream.fsi.beam.build_beam_model
¶
build_beam_model(cfg: FsiConfig) -> FEModel3D
Build the PyNite model of one blade on the elastic axis.
One node per radial station along global X, one member per bay with bay-averaged EI and GJ (times the stiffness scale factor), root station clamped.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
FsiConfig
|
Validated configuration; only the blade distributions and the stiffness scale factor are used here. |
required |
Returns:
| Type | Description |
|---|---|
FEModel3D
|
Model ready for loading and analysis; the load combination
|
Examples:
>>> from pyflightstream.fsi.config import FsiConfig
>>> from pyflightstream.fsi.sections import blade_properties_from_sections
>>> plate = [(0.02, 0.002), (-0.02, 0.002), (-0.02, -0.002), (0.02, -0.002)]
>>> blade = blade_properties_from_sections(
... [0.1, 0.3, 0.5], sections_m=[plate] * 3, chord_m=[0.04] * 3,
... geometric_pitch_deg=[10.0] * 3, material="ti-6al-4v-grade5-annealed",
... geometry_source="a flat 40 x 4 mm plate",
... )
>>> cfg = FsiConfig(blade_count=2, omega_rad_per_s=0.0, blade=blade)
>>> from pyflightstream.fsi import beam
>>> model = beam.build_beam_model(cfg)
>>> sorted(model.nodes)[:2]
['S000', 'S001']
pyflightstream.fsi.beam.extract_solution
¶
extract_solution(
model: FEModel3D, cfg: FsiConfig
) -> StaticBeamSolution
Read (w, theta) at every station from an analyzed model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
FEModel3D
|
The beam model from :func: |
required |
cfg
|
FsiConfig
|
The configuration providing the station radii. |
required |
Returns:
| Type | Description |
|---|---|
StaticBeamSolution
|
The station radii [m], the flap deflection [m] and the elastic twist [rad] at every station. |
Examples:
>>> from pyflightstream.fsi.config import FsiConfig
>>> from pyflightstream.fsi.sections import blade_properties_from_sections
>>> plate = [(0.02, 0.002), (-0.02, 0.002), (-0.02, -0.002), (0.02, -0.002)]
>>> blade = blade_properties_from_sections(
... [0.1, 0.3, 0.5], sections_m=[plate] * 3, chord_m=[0.04] * 3,
... geometric_pitch_deg=[10.0] * 3, material="ti-6al-4v-grade5-annealed",
... geometry_source="a flat 40 x 4 mm plate",
... )
>>> cfg = FsiConfig(blade_count=2, omega_rad_per_s=0.0, blade=blade)
>>> from pyflightstream.fsi import beam
>>> model = beam.build_beam_model(cfg)
>>> beam.apply_station_loads(model, cfg, flap_load_n_per_m=[10.0] * 3)
>>> beam.solve_static(model)
>>> solution = beam.extract_solution(model, cfg)
>>> solution.station_radii_m, float(solution.flap_deflection_m[0])
((0.1, 0.3, 0.5), 0.0)
pyflightstream.fsi.beam.lumped_station_masses
¶
lumped_station_masses(
cfg: FsiConfig,
) -> tuple[list[float], list[float]]
Lump running mass and torsional inertia to the stations.
Each station receives the tributary half lengths of its adjacent
bays: translational mass mu(r_i) l_i [kg] for the flap DOF and
polar inertia about the elastic axis
(I1(r_i) + I2(r_i) + mu(r_i) d(r_i)^2) l_i [kg m^2] for the twist
DOF, with d the distance from the elastic axis to the centre of
gravity (cg_offset_chordwise_m, cg_offset_normal_m; the
parallel-axis term, zero for a section whose centre of gravity is
on the elastic axis).
The matrix is diagonal: the off-diagonal flap-twist inertial coupling mu(r_i) e_c(r_i) l_i of a chordwise centre of gravity offset is not modelled, so a blade with that offset is treated as if its flap and torsion modes were inertially uncoupled.
Source: standard tributary (lumped) mass matrix for beam finite elements, Cook, Malkus, Plesha, Witt, "Concepts and Applications of Finite Element Analysis", 4th ed., Section 11.4; the parallel axis theorem for the inertia about the elastic axis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
FsiConfig
|
Configuration providing mu(r), I1(r), I2(r), the centre of gravity offsets and the stations. |
required |
Returns:
| Type | Description |
|---|---|
tuple of (list of float, list of float)
|
Per-station flap masses [kg] and twist inertias [kg m^2]. |
pyflightstream.fsi.beam.modal_frequencies
¶
modal_frequencies(
model: FEModel3D,
cfg: FsiConfig,
n_modes: int = 6,
include_geometric_stiffness: bool = False,
twist_stiffness_n_m_per_rad: Sequence[float]
| None = None,
*,
flap_stiffness_n_per_m: Sequence[float] | None = None,
) -> ModalResult
Extract flap and torsion natural frequencies of the blade.
The stiffness matrix comes from PyNite (elastic, plus the
geometric stiffness of the analyzed axial state when requested);
the mass matrix is the lumped (w, theta) matrix of
:func:lumped_station_masses. Massless degrees of freedom are
condensed out exactly, so the eigenproblem is small and free of
artifacts from the fake axial and chordwise stiffness.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
FEModel3D
|
Analyzed model (run :func: |
required |
cfg
|
FsiConfig
|
Configuration providing mass and inertia distributions. |
required |
n_modes
|
int
|
Number of lowest modes to return. |
6
|
include_geometric_stiffness
|
bool
|
Add PyNite's geometric stiffness of the |
False
|
twist_stiffness_n_m_per_rad
|
sequence of float
|
Additional lumped torsional stiffness per station
[N m / rad], added on the twist degrees of freedom. The
centrifugal (propeller moment) torsional stiffening of
:mod: |
None
|
flap_stiffness_n_per_m
|
sequence of float
|
Additional distributed flap stiffness per station [N/m per m
of span], lumped here over the station tributary lengths and
added on the flap degrees of freedom. The in-plane centrifugal
softening of :mod: |
None
|
Returns:
| Type | Description |
|---|---|
ModalResult
|
Ascending frequencies with flap or torsion classification. |
Raises:
| Type | Description |
|---|---|
FsiInputError
|
If |
Examples:
>>> from pyflightstream.fsi.config import FsiConfig
>>> from pyflightstream.fsi.sections import blade_properties_from_sections
>>> plate = [(0.02, 0.002), (-0.02, 0.002), (-0.02, -0.002), (0.02, -0.002)]
>>> blade = blade_properties_from_sections(
... [0.1, 0.3, 0.5], sections_m=[plate] * 3, chord_m=[0.04] * 3,
... geometric_pitch_deg=[10.0] * 3, material="ti-6al-4v-grade5-annealed",
... geometry_source="a flat 40 x 4 mm plate",
... )
>>> cfg = FsiConfig(blade_count=2, omega_rad_per_s=0.0, blade=blade)
>>> from pyflightstream.fsi import beam
>>> model = beam.build_beam_model(cfg)
>>> beam.solve_static(model)
>>> modes = beam.modal_frequencies(model, cfg, n_modes=2)
>>> modes.kinds, [round(f) for f in modes.frequencies_rad_per_s]
(('flap', 'flap'), [115, 595])
pyflightstream.fsi.beam.solve_static
¶
solve_static(
model: FEModel3D, p_delta: bool = False
) -> None
Run the static analysis on the "structural" combination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
FEModel3D
|
Loaded model. |
required |
p_delta
|
bool
|
Use the geometrically nonlinear P-Delta analysis so axial tension stiffens bending with no manual correction terms (FSI-R05). The linear analysis is the right choice only when no axial load is present. |
False
|
Examples:
>>> from pyflightstream.fsi.config import FsiConfig
>>> from pyflightstream.fsi.sections import blade_properties_from_sections
>>> plate = [(0.02, 0.002), (-0.02, 0.002), (-0.02, -0.002), (0.02, -0.002)]
>>> blade = blade_properties_from_sections(
... [0.1, 0.3, 0.5], sections_m=[plate] * 3, chord_m=[0.04] * 3,
... geometric_pitch_deg=[10.0] * 3, material="ti-6al-4v-grade5-annealed",
... geometry_source="a flat 40 x 4 mm plate",
... )
>>> cfg = FsiConfig(blade_count=2, omega_rad_per_s=0.0, blade=blade)
>>> from pyflightstream.fsi import beam
>>> model = beam.build_beam_model(cfg)
>>> beam.apply_station_loads(model, cfg, flap_load_n_per_m=[10.0] * 3)
>>> beam.solve_static(model)
>>> round(float(beam.extract_solution(model, cfg).flap_deflection_m[-1]) * 1e3, 2)
1.32
pyflightstream.fsi.beam.station_name
¶
station_name(i: int) -> str
Return the model node name of radial station i (root is 0).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int
|
The station's index, 0 at the root. |
required |
Returns:
| Type | Description |
|---|---|
str
|
|
pyflightstream.fsi.beam.tributary_lengths
¶
tributary_lengths(radii: Sequence[float]) -> list[float]
Return the half-bay tributary length of every station [m].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radii
|
sequence of float
|
The station radii [m], root to tip. |
required |
Returns:
| Type | Description |
|---|---|
list of float
|
The tributary length of every station [m], half bays at the two ends. |