zoomy_core.fvm.solver_splitting_numpy module

zoomy_core.fvm.solver_splitting_numpy module#

Pressure-splitting solver: IMEX + Poisson constraint (numpy backend).

Extends IMEXSolver with a pressure Poisson correction step (Chorin projection). Uses face-based divergence and gradient, and GMRES for the Poisson solve.

Solver hierarchy:
SplittingSolver(IMEXSolver)
-> step(dt):

[explicit flux] -> viscous diffusion -> pressure_correction -> update_state

class zoomy_core.fvm.solver_splitting_numpy.SplittingSolver(**kwargs)#

Bases: IMEXSolver

IMEX solver with pressure Poisson correction (Chorin projection).

The model state Q holds velocity components. Pressure is a separate field solved at each timestep via the incompressibility constraint.

Subclasses for free-surface flow override _velocity_indices to point at the actual velocity slots (e.g. [2, 3, ...] past the bathymetry/depth pair) — by default we assume INS-style layout where the velocity components are at indices 0..dim-1.

pressure_gmres_tol = 1e-06#
pressure_gmres_maxiter = 200#
viscosity = 0.01#
setup_simulation(mesh, model, write_output=False)#

Build all operators including Poisson infrastructure.

NOTE: this solver is marked inactive in the audit — it has no active tests. The NSM auto-LSQ-degree derivation may not be sufficient for its implicit pressure-Poisson stage; a proper fix mirrors ChorinSplitVAMSolver and exposes the pressure block as a sibling SystemModel passed via NumericalSystemModel.from_system_model(..., additional_systems=[sm_press]).

step(dt)#

One splitting timestep: flux -> viscous diffusion -> pressure correction.

Ghost-cell-free: BCs are evaluated inline inside each substep at boundary faces (via self._bc_objects[i_bf].face_value(...)). No separate ghost-cell fill between substeps.

run_simulation()#

Time loop for splitting solver.

solve(mesh, model, write_output=False)#

Convenience: setup_simulation + run_simulation.

name = 'SplittingSolver'#
class zoomy_core.fvm.solver_splitting_numpy.FSFSplittingSolver(**kwargs)#

Bases: SplittingSolver

Splitting solver for free-surface flows (SWE, SME, VAM).

Combines: - Positive Rusanov for explicit flux (requires h/b) - Implicit source stepping - Pressure Poisson correction

Requires model variables ‘b’ and ‘h’ at state indices 0 and 1. Velocity components (subject to viscous diffusion + Chorin pressure projection) start at index 2 and span dim slots.

name = 'FSFSplittingSolver'#