API Reference
Package
VorLap public package interface.
AirfoilFFT
Holds multidimensional FFT data for unsteady aerodynamic forces and moments as a function of Reynolds number and angle of attack.
| Attributes: |
|
|---|
Notes
- 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: np.ndarray, AOA: np.ndarray, Thickness: float, CL_ST: np.ndarray, CD_ST: np.ndarray, CM_ST: np.ndarray, CF_ST: np.ndarray, CL_Amp: np.ndarray, CD_Amp: np.ndarray, CM_Amp: np.ndarray, CF_Amp: np.ndarray, CL_Pha: np.ndarray, CD_Pha: np.ndarray, CM_Pha: np.ndarray, CF_Pha: np.ndarray)
Initialize AirfoilFFT with the provided data.
Component
Represents 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.
| Attributes: |
|
|---|
__init__(id: str, translation: np.ndarray, rotation: np.ndarray, pitch: np.ndarray, shape_xyz: np.ndarray, shape_xyz_global: np.ndarray, chord: np.ndarray, twist: np.ndarray, thickness: np.ndarray, offset: np.ndarray, airfoil_ids: List[str], chord_vector: np.ndarray, normal_vector: np.ndarray)
Initialize Component with the provided data.
InflowTimeSeries
Time-varying inflow profile used for nonstationary force reconstruction.
| Attributes: |
|
|---|
VIV_Params
Encapsulates all top-level user-defined configuration inputs required for vortex-induced vibration analysis.
| Attributes: |
|
|---|
__init__(fluid_density: float = 1.225, fluid_dynamicviscosity: float = 1.81e-05, rotation_axis: np.ndarray = np.array([0.0, 0.0, 1.0]), rotation_axis_offset: np.ndarray = np.array([0.0, 0.0, 0.0]), inflow_vec: np.ndarray = np.array([1.0, 0.0, 0.0]), plot_cycle: Optional[List[str]] = None, azimuths: Optional[np.ndarray] = None, inflow_speeds: Optional[np.ndarray] = None, output_time: Optional[np.ndarray] = None, freq_min: float = 0.0, freq_max: float = float('inf'), airfoil_folder: Optional[str] = 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))
Initialize VIV_Params with the provided data.
calc_structure_vectors_andplot(components: List[Component], viv_params: VIV_Params, show_plot: bool = True, return_fig: bool = False, components_black: bool = False, save_path: Optional[str] = None) -> Optional[go.Figure]
Calculates structure vectors and creates a plot.
| Parameters: |
|
|---|
| Returns: |
|
|---|
compute_thrust_torque_spectrum(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, natfreqs: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Compute force, moment, overlap metrics, and node-level reconstructed loads.
This variant uses the baseline per-field interpolation backend.
compute_thrust_torque_spectrum_optimized(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, natfreqs: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Compute force, moment, overlap metrics, and node-level reconstructed loads.
This variant uses the optimized vectorized interpolation backend.
compute_time_varying_force_history(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, inflow_profile: Union[InflowTimeSeries, Dict[str, np.ndarray]], azimuth_deg: Optional[float] = None, smoothing_cycles: float = 0.25, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Baseline nonstationary force-history computation.
This variant uses per-sample interpolation and is primarily intended as a reference for the optimized implementation.
compute_time_varying_force_history_optimized(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, inflow_profile: Union[InflowTimeSeries, Dict[str, np.ndarray]], azimuth_deg: Optional[float] = None, smoothing_cycles: float = 0.25, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Compute nonstationary node/global forces for time-varying inflow speed and direction.
| Returns: |
|
|---|
convert_qblade_to_vorlap_inputs(sim_path: str, default_airfoil_id: str = 'default', include_struts: bool = True, include_tower: bool = True, tower_airfoil_id: str = 'cylinder') -> Tuple[List[Component], VIV_Params, List[str]]
Convert a QBlade .sim setup into equivalent VorLap components and baseline parameters.
This supports the "existing LOADINGFILE path" workflow where VorLap reconstructs non-mean nodal loads and exports them for QBlade external-loading ingestion.
| Returns: |
|
|---|
| Parameters: |
|
|---|
interpolate_fft_spectrum(afft: AirfoilFFT, Re_val: float, AOA_val: float, field: str, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray]
Interpolates the FFT amplitude and phase spectra for a given Reynolds number Re_val
and angle of attack AOA_val using bilinear interpolation over the stored Re × AOA grid.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- The interpolation is performed independently at each frequency index in the spectrum.
- Assumes consistent frequency axis across the full 3D data structure.
- Returns values suitable for reconstructing time-domain or frequency-domain force estimates.
interpolate_fft_spectrum_batch(afft: AirfoilFFT, Re_vals: np.ndarray, AOA_vals: np.ndarray, field: str, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray]
Batch interpolation for multiple Re/AOA points simultaneously.
| Parameters: |
|
|---|
| Returns: |
|
|---|
interpolate_fft_spectrum_optimized(afft: AirfoilFFT, Re_val: float, AOA_val: float, fields: List[str], n_freq_depth: Optional[int] = None) -> Dict[str, Tuple[np.ndarray, np.ndarray, np.ndarray]]
Vectorized, fast bilinear + flat extrapolation for multiple fields at once. Matches your return structure: { 'CL': (ST, Amp, Pha), ... } with arrays length n_freq_depth.
load_airfoil_coords(afpath: str = '') -> np.ndarray
Loads an airfoil shape from a 2-column text file (x, z), normalized to unit chord length. If no file is specified, or if loading fails, returns a built-in 200-point Clark Y airfoil shape.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- If loading from file, x-coordinates are normalized to span [0, 1].
- The default fallback airfoil is a symmetric approximation of the Clark Y shape.
- This airfoil is primarily used for visualization, not aerodynamic calculations.
load_airfoil_fft(path: str) -> AirfoilFFT
Loads a processed airfoil unsteady FFT dataset from an HDF5 file.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Expected HDF5 File Format
The file must contain the following datasets:
- Airfoilname :: String — Name of the airfoil (e.g., "NACA0012")
- Re :: Vector{Float64} — Reynolds number values (assumed constant across all entries)
- Thickness :: Vector{Float64} — Thickness ratio(s) used
- AOA :: Vector{Float64} — Angle of attack values in degrees
- CL_ST, CD_ST, CM_ST, CF_ST :: 3D Arrays [Re x AOA x freq] — Strouhal numbers for each force/moment
- CL_Amp, CD_Amp, CM_Amp, CF_Amp :: 3D Arrays [Re x AOA x freq] — FFT amplitudes for lift, drag, moment, and combined force
- CL_Pha, CD_Pha, CM_Pha, CF_Pha :: 3D Arrays [Re x AOA x freq] — FFT phases in radians for each quantity
Assumptions
- All arrays must share dimensions [Re, AOA, NFreq], where the frequency dimension is sorted by the amplitude
- Phase data is in radians.
- Struhaul data represents unsteady aerodynamics due to vortex shedding.
- No ragged or missing data is allowed.
load_components_from_csv(dir_path: str) -> List[Component]
Loads all component geometry and metadata from CSV files in the given directory.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Expected CSV Format
- First data row contains:
id,translation_x,translation_y,translation_z,rotation_x,rotation_y,rotation_z - Second header row: column names for vectors — must include
x,y,z,chord,twist,thickness, and optionalairfoil_id - Remaining rows: vector data for each blade segment or shape point
Notes
- If
airfoil_idis missing,"default"will be used for all segments in that component - All transformations are centered at the origin and adjusted by top-level translation/rotation
- All components are assumed to have the span oriented in the z-direction
load_inflow_time_series(path: str) -> InflowTimeSeries
Load a time-varying inflow profile from CSV.
Required columns
timeinflow_speed
| Parameters: |
|
|---|
| Returns: |
|
|---|
load_qblade_blade_definition(bld_path: str) -> Dict[str, object]
Load blade and strut geometry tables from a QBlade .bld definition file.
| Returns: |
|
|---|
load_qblade_simulation_definition(sim_path: str) -> Dict[str, object]
Load key fields from a QBlade .sim file.
Returns a dictionary with parsed and path-resolved entries used by VorLap.
load_qblade_turbine_definition(trb_path: str) -> Dict[str, object]
Load key fields from a QBlade .trb turbine definition file.
lookup_fft_spectrum_nearest(afft, Re_val: float, AOA_val: float, fields: List[str], n_freq_depth: Optional[int] = None) -> Dict[str, Tuple[np.ndarray, np.ndarray, np.ndarray]]
Nearest-neighbor lookup (no interpolation). Matches your return structure: { 'CL': (ST, Amp, Pha), ... }.
reconstruct_nonstationary_signal(freqs: np.ndarray, amps: np.ndarray, phases: np.ndarray, tvec: np.ndarray, smoothing_cycles: float = 0.0) -> np.ndarray
Reconstruct a nonstationary harmonic signal with phase continuity.
This is an oscillator-bank reconstruction where instantaneous phase is
integrated from frequency (dphi/dt = 2*pi*f(t)) to avoid discontinuities
when inflow conditions vary in time. The provided phase is used as the
initial phase for each harmonic; subsequent phase evolution comes from
frequency integration.
| Parameters: |
|
|---|
| Returns: |
|
|---|
reconstruct_signal(freqs: np.ndarray, amps: np.ndarray, phases: np.ndarray, tvec: np.ndarray) -> np.ndarray
Reconstruct a time-domain signal from frequency, peak amplitude, and phase (radians).
Assumptions / conventions (matching the Julia version):
- DC term(s): entries where freqs == 0 carry the mean value in amps; all such entries are summed.
- For f > 0, amps are peak amplitudes (not RMS) and phases follow a cosine convention: cos(ωt + φ).
- Negative frequencies, if present, are ignored (assumed redundant w.r.t. positive freqs + phases).
| Parameters: |
|
|---|
| Returns: |
|
|---|
resample_airfoil(xy: np.ndarray, npoints: int = 200) -> np.ndarray
Resamples the given airfoil shape by:
1. Identifying leading (min x) and trailing (max x) edges.
2. Splitting into upper and lower surfaces.
3. Interpolating both surfaces using npoints uniformly spaced x-values.
4. Recombining to produce a smooth resampled airfoil shape.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotate_vector(vec: np.ndarray, axis: np.ndarray, angle_deg: float) -> np.ndarray
Rotates a 3D vector vec around a given axis by angle_deg degrees using Rodrigues' rotation formula.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotationMatrix(euler: np.ndarray) -> np.ndarray
Computes a 3×3 rotation matrix from Euler angles using the ZYX convention (yaw–pitch–roll), where: - Z: yaw (heading) - Y: pitch (elevation) - X: roll (bank)
The angles are provided in degrees and applied in Z–Y–X order (extrinsic frame), meaning: 1. Rotate about global Z axis (yaw) 2. Then about the global Y axis (pitch) 3. Then about the global X axis (roll)
| Parameters: |
|
|---|
| Returns: |
|
|---|
Example
euler = np.array([30.0, 15.0, 60.0]) # roll, pitch, yaw in degrees
R = rotationMatrix(euler)
v_local = np.array([1.0, 0.0, 0.0])
v_global = R @ v_local
write_components_to_csv(dir_path: str, components: List[Component]) -> List[str]
Write VorLap components to per-component CSV files compatible with load_components_from_csv.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_force_time_series(filename: str, output_time: np.ndarray, global_force_vector_nodes: np.ndarray) -> None
Writes force time series data to a CSV file.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_qblade_loading_file(filename: str, time: np.ndarray, global_force_vector_nodes: np.ndarray, node_ids: List[str], local: bool = False, node_torque_vector_nodes: Optional[np.ndarray] = None) -> None
Write a QBlade external loading file compatible with LOADINGFILE.
File format per node block
NODE_ID [LOCAL] t Fx Fy Fz Mx My Mz ...
QBlade linearly interpolates between time rows during simulation.
vorlap.computations
Utility functions for the VorLap package.
compute_thrust_torque_spectrum(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, natfreqs: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Compute force, moment, overlap metrics, and node-level reconstructed loads.
This variant uses the baseline per-field interpolation backend.
compute_thrust_torque_spectrum_optimized(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, natfreqs: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Compute force, moment, overlap metrics, and node-level reconstructed loads.
This variant uses the optimized vectorized interpolation backend.
compute_time_varying_force_history(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, inflow_profile: Union[InflowTimeSeries, Dict[str, np.ndarray]], azimuth_deg: Optional[float] = None, smoothing_cycles: float = 0.25, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Baseline nonstationary force-history computation.
This variant uses per-sample interpolation and is primarily intended as a reference for the optimized implementation.
compute_time_varying_force_history_optimized(components: List[Component], affts: Dict[str, AirfoilFFT], viv_params: VIV_Params, inflow_profile: Union[InflowTimeSeries, Dict[str, np.ndarray]], azimuth_deg: Optional[float] = None, smoothing_cycles: float = 0.25, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Compute nonstationary node/global forces for time-varying inflow speed and direction.
| Returns: |
|
|---|
interpolate_fft_spectrum(afft, Re_val, AOA_val, field, n_freq_depth=None)
This is a wrapper function to avoid circular imports. The actual implementation is in fileio.py.
reconstruct_nonstationary_signal(freqs: np.ndarray, amps: np.ndarray, phases: np.ndarray, tvec: np.ndarray, smoothing_cycles: float = 0.0) -> np.ndarray
Reconstruct a nonstationary harmonic signal with phase continuity.
This is an oscillator-bank reconstruction where instantaneous phase is
integrated from frequency (dphi/dt = 2*pi*f(t)) to avoid discontinuities
when inflow conditions vary in time. The provided phase is used as the
initial phase for each harmonic; subsequent phase evolution comes from
frequency integration.
| Parameters: |
|
|---|
| Returns: |
|
|---|
reconstruct_signal(freqs: np.ndarray, amps: np.ndarray, phases: np.ndarray, tvec: np.ndarray) -> np.ndarray
Reconstruct a time-domain signal from frequency, peak amplitude, and phase (radians).
Assumptions / conventions (matching the Julia version):
- DC term(s): entries where freqs == 0 carry the mean value in amps; all such entries are summed.
- For f > 0, amps are peak amplitudes (not RMS) and phases follow a cosine convention: cos(ωt + φ).
- Negative frequencies, if present, are ignored (assumed redundant w.r.t. positive freqs + phases).
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotate_vector(vec: np.ndarray, axis: np.ndarray, angle_deg: float) -> np.ndarray
Rotates a 3D vector vec around a given axis by angle_deg degrees using Rodrigues' rotation formula.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotationMatrix(euler: np.ndarray) -> np.ndarray
Computes a 3×3 rotation matrix from Euler angles using the ZYX convention (yaw–pitch–roll), where: - Z: yaw (heading) - Y: pitch (elevation) - X: roll (bank)
The angles are provided in degrees and applied in Z–Y–X order (extrinsic frame), meaning: 1. Rotate about global Z axis (yaw) 2. Then about the global Y axis (pitch) 3. Then about the global X axis (roll)
| Parameters: |
|
|---|
| Returns: |
|
|---|
Example
euler = np.array([30.0, 15.0, 60.0]) # roll, pitch, yaw in degrees
R = rotationMatrix(euler)
v_local = np.array([1.0, 0.0, 0.0])
v_global = R @ v_local
vorlap.interpolation
interpolate_fft_spectrum(afft: AirfoilFFT, Re_val: float, AOA_val: float, field: str, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray]
Interpolates the FFT amplitude and phase spectra for a given Reynolds number Re_val
and angle of attack AOA_val using bilinear interpolation over the stored Re × AOA grid.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- The interpolation is performed independently at each frequency index in the spectrum.
- Assumes consistent frequency axis across the full 3D data structure.
- Returns values suitable for reconstructing time-domain or frequency-domain force estimates.
interpolate_fft_spectrum_batch(afft: AirfoilFFT, Re_vals: np.ndarray, AOA_vals: np.ndarray, field: str, n_freq_depth: Optional[int] = None) -> Tuple[np.ndarray, np.ndarray, np.ndarray]
Batch interpolation for multiple Re/AOA points simultaneously.
| Parameters: |
|
|---|
| Returns: |
|
|---|
interpolate_fft_spectrum_optimized(afft: AirfoilFFT, Re_val: float, AOA_val: float, fields: List[str], n_freq_depth: Optional[int] = None) -> Dict[str, Tuple[np.ndarray, np.ndarray, np.ndarray]]
Vectorized, fast bilinear + flat extrapolation for multiple fields at once. Matches your return structure: { 'CL': (ST, Amp, Pha), ... } with arrays length n_freq_depth.
lookup_fft_spectrum_nearest(afft, Re_val: float, AOA_val: float, fields: List[str], n_freq_depth: Optional[int] = None) -> Dict[str, Tuple[np.ndarray, np.ndarray, np.ndarray]]
Nearest-neighbor lookup (no interpolation). Matches your return structure: { 'CL': (ST, Amp, Pha), ... }.
resample_airfoil(xy: np.ndarray, npoints: int = 200) -> np.ndarray
Resamples the given airfoil shape by:
1. Identifying leading (min x) and trailing (max x) edges.
2. Splitting into upper and lower surfaces.
3. Interpolating both surfaces using npoints uniformly spaced x-values.
4. Recombining to produce a smooth resampled airfoil shape.
| Parameters: |
|
|---|
| Returns: |
|
|---|
vorlap.fileio
File input/output operations for the VorLap package.
convert_qblade_to_vorlap_inputs(sim_path: str, default_airfoil_id: str = 'default', include_struts: bool = True, include_tower: bool = True, tower_airfoil_id: str = 'cylinder') -> Tuple[List[Component], VIV_Params, List[str]]
Convert a QBlade .sim setup into equivalent VorLap components and baseline parameters.
This supports the "existing LOADINGFILE path" workflow where VorLap reconstructs non-mean nodal loads and exports them for QBlade external-loading ingestion.
| Returns: |
|
|---|
| Parameters: |
|
|---|
load_airfoil_coords(afpath: str = '') -> np.ndarray
Loads an airfoil shape from a 2-column text file (x, z), normalized to unit chord length. If no file is specified, or if loading fails, returns a built-in 200-point Clark Y airfoil shape.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- If loading from file, x-coordinates are normalized to span [0, 1].
- The default fallback airfoil is a symmetric approximation of the Clark Y shape.
- This airfoil is primarily used for visualization, not aerodynamic calculations.
load_airfoil_fft(path: str) -> AirfoilFFT
Loads a processed airfoil unsteady FFT dataset from an HDF5 file.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Expected HDF5 File Format
The file must contain the following datasets:
- Airfoilname :: String — Name of the airfoil (e.g., "NACA0012")
- Re :: Vector{Float64} — Reynolds number values (assumed constant across all entries)
- Thickness :: Vector{Float64} — Thickness ratio(s) used
- AOA :: Vector{Float64} — Angle of attack values in degrees
- CL_ST, CD_ST, CM_ST, CF_ST :: 3D Arrays [Re x AOA x freq] — Strouhal numbers for each force/moment
- CL_Amp, CD_Amp, CM_Amp, CF_Amp :: 3D Arrays [Re x AOA x freq] — FFT amplitudes for lift, drag, moment, and combined force
- CL_Pha, CD_Pha, CM_Pha, CF_Pha :: 3D Arrays [Re x AOA x freq] — FFT phases in radians for each quantity
Assumptions
- All arrays must share dimensions [Re, AOA, NFreq], where the frequency dimension is sorted by the amplitude
- Phase data is in radians.
- Struhaul data represents unsteady aerodynamics due to vortex shedding.
- No ragged or missing data is allowed.
load_components_from_csv(dir_path: str) -> List[Component]
Loads all component geometry and metadata from CSV files in the given directory.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Expected CSV Format
- First data row contains:
id,translation_x,translation_y,translation_z,rotation_x,rotation_y,rotation_z - Second header row: column names for vectors — must include
x,y,z,chord,twist,thickness, and optionalairfoil_id - Remaining rows: vector data for each blade segment or shape point
Notes
- If
airfoil_idis missing,"default"will be used for all segments in that component - All transformations are centered at the origin and adjusted by top-level translation/rotation
- All components are assumed to have the span oriented in the z-direction
load_inflow_time_series(path: str) -> InflowTimeSeries
Load a time-varying inflow profile from CSV.
Required columns
timeinflow_speed
| Parameters: |
|
|---|
| Returns: |
|
|---|
load_qblade_blade_definition(bld_path: str) -> Dict[str, object]
Load blade and strut geometry tables from a QBlade .bld definition file.
| Returns: |
|
|---|
load_qblade_simulation_definition(sim_path: str) -> Dict[str, object]
Load key fields from a QBlade .sim file.
Returns a dictionary with parsed and path-resolved entries used by VorLap.
load_qblade_turbine_definition(trb_path: str) -> Dict[str, object]
Load key fields from a QBlade .trb turbine definition file.
write_components_to_csv(dir_path: str, components: List[Component]) -> List[str]
Write VorLap components to per-component CSV files compatible with load_components_from_csv.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_force_time_series(filename: str, output_time: np.ndarray, global_force_vector_nodes: np.ndarray) -> None
Writes force time series data to a CSV file.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_qblade_loading_file(filename: str, time: np.ndarray, global_force_vector_nodes: np.ndarray, node_ids: List[str], local: bool = False, node_torque_vector_nodes: Optional[np.ndarray] = None) -> None
Write a QBlade external loading file compatible with LOADINGFILE.
File format per node block
NODE_ID [LOCAL] t Fx Fy Fz Mx My Mz ...
QBlade linearly interpolates between time rows during simulation.
vorlap.structs
Data structures for the VorLap package.
AirfoilFFT
Holds multidimensional FFT data for unsteady aerodynamic forces and moments as a function of Reynolds number and angle of attack.
| Attributes: |
|
|---|
Notes
- 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: np.ndarray, AOA: np.ndarray, Thickness: float, CL_ST: np.ndarray, CD_ST: np.ndarray, CM_ST: np.ndarray, CF_ST: np.ndarray, CL_Amp: np.ndarray, CD_Amp: np.ndarray, CM_Amp: np.ndarray, CF_Amp: np.ndarray, CL_Pha: np.ndarray, CD_Pha: np.ndarray, CM_Pha: np.ndarray, CF_Pha: np.ndarray)
Initialize AirfoilFFT with the provided data.
Component
Represents 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.
| Attributes: |
|
|---|
__init__(id: str, translation: np.ndarray, rotation: np.ndarray, pitch: np.ndarray, shape_xyz: np.ndarray, shape_xyz_global: np.ndarray, chord: np.ndarray, twist: np.ndarray, thickness: np.ndarray, offset: np.ndarray, airfoil_ids: List[str], chord_vector: np.ndarray, normal_vector: np.ndarray)
Initialize Component with the provided data.
InflowTimeSeries
Time-varying inflow profile used for nonstationary force reconstruction.
| Attributes: |
|
|---|
VIV_Params
Encapsulates all top-level user-defined configuration inputs required for vortex-induced vibration analysis.
| Attributes: |
|
|---|
__init__(fluid_density: float = 1.225, fluid_dynamicviscosity: float = 1.81e-05, rotation_axis: np.ndarray = np.array([0.0, 0.0, 1.0]), rotation_axis_offset: np.ndarray = np.array([0.0, 0.0, 0.0]), inflow_vec: np.ndarray = np.array([1.0, 0.0, 0.0]), plot_cycle: Optional[List[str]] = None, azimuths: Optional[np.ndarray] = None, inflow_speeds: Optional[np.ndarray] = None, output_time: Optional[np.ndarray] = None, freq_min: float = 0.0, freq_max: float = float('inf'), airfoil_folder: Optional[str] = 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))
Initialize VIV_Params with the provided data.
vorlap.graphics
calc_structure_vectors_andplot(components: List[Component], viv_params: VIV_Params, show_plot: bool = True, return_fig: bool = False, components_black: bool = False, save_path: Optional[str] = None) -> Optional[go.Figure]
Calculates structure vectors and creates a plot.
| Parameters: |
|
|---|
| Returns: |
|
|---|