vorlap.structs module

Data structures for the VorLap package.

class vorlap.structs.AirfoilFFT(name: str, Re: ndarray, AOA: ndarray, Thickness: float, CL_ST: ndarray, CD_ST: ndarray, CM_ST: ndarray, CF_ST: ndarray, CL_Amp: ndarray, CD_Amp: ndarray, CM_Amp: ndarray, CF_Amp: ndarray, CL_Pha: ndarray, CD_Pha: ndarray, CM_Pha: ndarray, CF_Pha: ndarray)[source]

Bases: object

Hold multidimensional FFT data for unsteady aerodynamic forces and moments as a function of Reynolds number and angle of attack.

name

Airfoil identifier name.

Type:

str

Re

Reynolds number axis (1D).

Type:

np.ndarray

AOA

Angle of attack axis in degrees (1D).

Type:

np.ndarray

Thickness

Relative airfoil thickness.

Type:

float

CL_ST

Strouhal numbers for lift coefficient [Re × AOA × freq].

Type:

np.ndarray

CD_ST

Strouhal numbers for drag coefficient.

Type:

np.ndarray

CM_ST

Strouhal numbers for moment coefficient.

Type:

np.ndarray

CF_ST

Strouhal numbers for total force coefficient magnitude.

Type:

np.ndarray

CL_Amp

FFT amplitudes of CL [Re × AOA × freq].

Type:

np.ndarray

CD_Amp

FFT amplitudes of CD.

Type:

np.ndarray

CM_Amp

FFT amplitudes of CM.

Type:

np.ndarray

CF_Amp

FFT amplitudes of CF.

Type:

np.ndarray

CL_Pha

FFT phases of CL (radians).

Type:

np.ndarray

CD_Pha

FFT phases of CD.

Type:

np.ndarray

CM_Pha

FFT phases of CM.

Type:

np.ndarray

CF_Pha

FFT phases of CF.

Type:

np.ndarray

_interpolators_cached

Whether interpolators are pre-computed.

Type:

bool

_cl_st_interps

Pre-computed ST interpolators for CL.

Type:

List

_cl_amp_interps

Pre-computed amplitude interpolators for CL.

Type:

List

_cl_pha_interps

Pre-computed phase interpolators for CL.

Type:

List

_cd_st_interps

Pre-computed ST interpolators for CD.

Type:

List

_cd_amp_interps

Pre-computed amplitude interpolators for CD.

Type:

List

_cd_pha_interps

Pre-computed phase interpolators for CD.

Type:

List

_cf_st_interps

Pre-computed ST interpolators for CF.

Type:

List

_cf_amp_interps

Pre-computed amplitude interpolators for CF.

Type:

List

_cf_pha_interps

Pre-computed phase interpolators for CF.

Type:

List

Note

  • The frequency axis is implicit in the third dimension and must be consistent across all arrays.

  • All arrays must share shape [length(Re), length(AOA), length(freq)].

  • Phases are in radians, and FFT data assumes periodic unsteady oscillations (e.g., vortex shedding).

__init__(name: str, Re: ndarray, AOA: ndarray, Thickness: float, CL_ST: ndarray, CD_ST: ndarray, CM_ST: ndarray, CF_ST: ndarray, CL_Amp: ndarray, CD_Amp: ndarray, CM_Amp: ndarray, CF_Amp: ndarray, CL_Pha: ndarray, CD_Pha: ndarray, CM_Pha: ndarray, CF_Pha: ndarray)[source]

Initialize AirfoilFFT with the provided data.

Parameters:
  • name – Airfoil identifier name.

  • Re – Reynolds number axis (1D).

  • AOA – Angle of attack axis in degrees (1D).

  • Thickness – Relative airfoil thickness.

  • CL_ST – Strouhal numbers for lift coefficient [Re × AOA × freq].

  • CD_ST – Strouhal numbers for drag coefficient.

  • CM_ST – Strouhal numbers for moment coefficient.

  • CF_ST – Strouhal numbers for total force coefficient magnitude.

  • CL_Amp – FFT amplitudes of CL [Re × AOA × freq].

  • CD_Amp – FFT amplitudes of CD.

  • CM_Amp – FFT amplitudes of CM.

  • CF_Amp – FFT amplitudes of CF.

  • CL_Pha – FFT phases of CL (radians).

  • CD_Pha – FFT phases of CD.

  • CM_Pha – FFT phases of CM.

  • CF_Pha – FFT phases of CF.

class vorlap.structs.Component(id: str, translation: ndarray, rotation: ndarray, pitch: ndarray, shape_xyz: ndarray, shape_xyz_global: ndarray, chord: ndarray, twist: ndarray, thickness: ndarray, offset: ndarray, airfoil_ids: List[str], chord_vector: ndarray, normal_vector: ndarray)[source]

Bases: object

Represent a single physical component in the full rotating structure.

Each component includes a global transformation and local shape definition, segmented for per-section force calculations.

id

Identifier name for the component.

Type:

str

translation

Translation vector applied to the entire component.

Type:

np.ndarray

rotation

Euler angle rotation vector [deg] around X, Y, Z axes.

Type:

np.ndarray

pitch

Pitch angle for the segment [deg], vectorized to avoid mutability.

Type:

np.ndarray

shape_xyz

Nx3 matrix of local segment positions (untransformed).

Type:

np.ndarray

shape_xyz_global

Nx3 matrix of global segment positions (transformed).

Type:

np.ndarray

chord

Chord length per segment.

Type:

np.ndarray

twist

Twist angle per segment [deg].

Type:

np.ndarray

thickness

Relative thickness per segment (scales airfoil height), fraction of chord.

Type:

np.ndarray

offset

Offset values per segment.

Type:

np.ndarray

airfoil_ids

Airfoil data identifier for each segment (defaults to “default” if missing).

Type:

List[str]

chord_vector

Chord vector for each segment.

Type:

np.ndarray

normal_vector

Normal vector for each segment.

Type:

np.ndarray

__init__(id: str, translation: ndarray, rotation: ndarray, pitch: ndarray, shape_xyz: ndarray, shape_xyz_global: ndarray, chord: ndarray, twist: ndarray, thickness: ndarray, offset: ndarray, airfoil_ids: List[str], chord_vector: ndarray, normal_vector: ndarray)[source]

Initialize Component with the provided data.

Parameters:
  • id – Identifier name for the component.

  • translation – Translation vector applied to the entire component.

  • rotation – Euler angle rotation vector [deg] around X, Y, Z axes.

  • pitch – Pitch angle for the segment [deg], vectorized to avoid mutability.

  • shape_xyz – Nx3 matrix of local segment positions (untransformed).

  • shape_xyz_global – Nx3 matrix of global segment positions (transformed).

  • chord – Chord length per segment.

  • twist – Twist angle per segment [deg].

  • thickness – Relative thickness per segment (scales airfoil height), fraction of chord.

  • offset – Offset values per segment.

  • airfoil_ids – Airfoil data identifier for each segment (defaults to “default” if missing).

  • chord_vector – Chord vector for each segment.

  • normal_vector – Normal vector for each segment.

class vorlap.structs.VIV_Params(fluid_density: float = 1.225, fluid_dynamicviscosity: float = 1.81e-05, rotation_axis: ndarray = array([0., 0., 1.]), rotation_axis_offset: ndarray = array([0., 0., 0.]), inflow_vec: ndarray = array([1., 0., 0.]), plot_cycle: List[str] | None = None, azimuths: ndarray | None = None, inflow_speeds: ndarray | None = None, output_time: ndarray | None = None, freq_min: float = 0.0, freq_max: float = inf, airfoil_folder: str | None = None, n_harmonic: int = 5, amplitude_coeff_cutoff: float = 0.01, n_freq_depth: int = 3, output_azimuth_vinf: Tuple[float, float] = (5.0, 2.0))[source]

Bases: object

Encapsulate all top-level user-defined configuration inputs required for vortex-induced vibration analysis.

fluid_density

Air density [kg/m³].

Type:

float

fluid_dynamicviscosity

Dynamic viscosity of air [Pa·s].

Type:

float

rotation_axis

Axis of rotation as a 3-element vector.

Type:

np.ndarray

rotation_axis_offset

Origin of the rotation axis (used in torque calculations and visualization).

Type:

np.ndarray

inflow_vec

Direction of inflow velocity (typically [1, 0, 0] for +X).

Type:

np.ndarray

plot_cycle

List of hex colors used to differentiate components in visualization.

Type:

List[str]

azimuths

Azimuthal angles [deg] swept by the rotor or structure.

Type:

np.ndarray

inflow_speeds

Freestream inflow speeds [m/s].

Type:

np.ndarray

output_time

Output time points [s].

Type:

np.ndarray

freq_min

Minimum frequency [Hz] to consider in overlap comparison.

Type:

float

freq_max

Maximum frequency [Hz] to consider in overlap comparison.

Type:

float

airfoil_folder

Path to the airfoil folder.

Type:

str

n_harmonic

Number of harmonics to check against.

Type:

int

amplitude_coeff_cutoff

Lower threshold on what amplitudes are of interest.

Type:

float

n_freq_depth

How deep to go in the Strouhal number spectrum.

Type:

int

output_azimuth_vinf

Used to limit the case where the relatively expensive output signal reconstruction is done.

Type:

Tuple[float, float]

__init__(fluid_density: float = 1.225, fluid_dynamicviscosity: float = 1.81e-05, rotation_axis: ndarray = array([0., 0., 1.]), rotation_axis_offset: ndarray = array([0., 0., 0.]), inflow_vec: ndarray = array([1., 0., 0.]), plot_cycle: List[str] | None = None, azimuths: ndarray | None = None, inflow_speeds: ndarray | None = None, output_time: ndarray | None = None, freq_min: float = 0.0, freq_max: float = inf, airfoil_folder: str | None = None, n_harmonic: int = 5, amplitude_coeff_cutoff: float = 0.01, n_freq_depth: int = 3, output_azimuth_vinf: Tuple[float, float] = (5.0, 2.0))[source]

Initialize VIV_Params with the provided data.

Parameters:
  • fluid_density – Air density [kg/m³].

  • fluid_dynamicviscosity – Dynamic viscosity of air [Pa·s].

  • rotation_axis – Axis of rotation as a 3-element vector.

  • rotation_axis_offset – Origin of the rotation axis (used in torque calculations and visualization).

  • inflow_vec – Direction of inflow velocity (typically [1, 0, 0] for +X).

  • plot_cycle – List of hex colors used to differentiate components in visualization.

  • azimuths – Azimuthal angles [deg] swept by the rotor or structure.

  • inflow_speeds – Freestream inflow speeds [m/s].

  • output_time – Output time points [s].

  • freq_min – Minimum frequency [Hz] to consider in overlap comparison.

  • freq_max – Maximum frequency [Hz] to consider in overlap comparison.

  • airfoil_folder – Path to the airfoil folder.

  • n_harmonic – Number of harmonics to check against.

  • amplitude_coeff_cutoff – Lower threshold on what amplitudes are of interest.

  • n_freq_depth – How deep to go in the Strouhal number spectrum.

  • output_azimuth_vinf – Used to limit the case where the relatively expensive output signal reconstruction is done.