Mathematical Equations¶
Conceptual Overview¶
The multi_equations module is the mathematical heart of the OpenFLASH package. It contains the Python implementations of the core analytical functions required for the Matched Eigenfunction Expansion Method (MEEM), including radial and vertical eigenfunctions, their derivatives, coupling integrals, and terms for constructing the final linear system.
Warning
Most functions in this module are low-level mathematical components used internally by the MEEMEngine. The average user will typically only need to interact with the User-Facing Utility Functions listed below. The other sections are provided for developers and researchers interested in the underlying mathematical theory.
User-Facing Utility Functions¶
These are high-level helper functions that you may need to use when setting up a simulation.
Core Mathematical Components¶
This section details the core mathematical building blocks of the MEEM formulation. These functions are primarily called by the MEEMEngine during the matrix assembly process.
Wavenumber Computations¶
These functions determine the wavenumbers for the exterior fluid domain.
Coupling Integrals¶
These functions compute the integrals that couple the vertical eigenfunctions at the boundaries between adjacent fluid regions.
Radial Eigenfunctions¶
These functions define the radial variation of the potential in each type of fluid domain. They include the functions themselves, their derivatives, and optimized vectorized versions used for post-processing.
Interior Regions (Bessel I)
- openflash.multi_equations.R_1n_vectorized(n, r, i, h, d, a)[source]¶
Vectorized version of the R_1n radial eigenfunction.
This function calculates the radial component of the potential for the first type of basis function in an inner region, handling array inputs for modes ‘n’ and radii ‘r’ efficiently.
- Parameters:
n (np.ndarray) – Array of mode numbers.
r (np.ndarray) – Array of radial coordinates.
i (int) – The region index.
h (float) – The total water depth.
d (list) – A list of the depths for each region.
a (list) – A list of the cylinder radii.
- Returns:
The calculated values of the R_1n function for each input.
- Return type:
np.ndarray
- openflash.multi_equations.diff_R_1n_vectorized(n, r, i, h, d, a)[source]¶
Vectorized derivative of the diff_R_1n radial function.
Intermediate Regions (Bessel K)
- openflash.multi_equations.R_2n_vectorized(n, r, i, a, h, d)[source]¶
Vectorized version of the R_2n radial eigenfunction.
Calculates the radial component for the second type of basis function in an intermediate region, handling array inputs for ‘n’ and ‘r’.
- openflash.multi_equations.diff_R_2n_vectorized(n, r, i, h, d, a)[source]¶
Vectorized derivative of the R_2n radial function.
Exterior Region (Hankel & Bessel K)
Vertical Eigenfunctions¶
These functions define the vertical variation of the potential in each type of fluid domain.
Interior & Intermediate Regions
- openflash.multi_equations.Z_n_i_vectorized(n, z, i, h, d)[source]¶
Vectorized version of the i-region vertical eigenfunction Z_n_i.
- openflash.multi_equations.diff_Z_n_i_vectorized(n, z, i, h, d)[source]¶
Vectorized derivative of the Z_n_i vertical function.
Exterior Region
Particular Solution & Hydrodynamic Terms¶
These functions are related to the non-homogeneous parts of the solution and the final calculation of physical coefficients.