Manages multiple MEEMProblem instances and performs actions such as solving systems of equations,
assembling matrices, and visualizing results.
Post-Processing & Analysis Methods
These methods are used after solving the system to compute physical quantities.
-
compute_hydrodynamic_coefficients(problem, X, m0, modes_to_calculate: ndarray | None = None)[source]
Compute hydrodynamic coefficients (added mass and damping) for each mode defined in the problem.
- Parameters:
problem – Problem object containing the geometry
X – Solution vector from eigenfunction solver
m0 – Mode number (used for omega and excitation terms)
modes_to_calculate – A list of all body indices to calculate forces for.
If None, defaults to problem.modes (which infers from the
problem’s own geometry’s heaving flags).
- Returns:
List of dictionaries, one per mode, with hydrodynamic properties
-
calculate_potentials(problem, solution_vector: ndarray, m0, spatial_res, sharp) → Dict[str, Any][source]
Calculate full spatial potentials phiH, phiP, and total phi on a meshgrid for visualization.
Parameters:
- problem: MEEMProblem instance containing domain and geometry info
- solution_vector: solution vector X from linear system solve
- spatial_res: resolution of spatial grid for R and Z (default=50)
- sharp: whether to refine meshgrid near boundaries (default=True)
Returns:
- Dictionary containing meshgrid arrays R,Z and potentials phiH, phiP, phi
-
calculate_velocities(problem, solution_vector: ndarray, m0, spatial_res, sharp) → Dict[str, Any][source]
Calculate full spatial velocities vr and vz on a meshgrid for visualization.