Solver

Main numerical solver class for the CelerisAi model.

This class manages the entire simulation process, including:

  • Initializing solution states and bottom fields from the Domain class.

  • Controlling boundary conditions from the BoundaryConditions class.

  • Executing the time-stepping scheme (Euler, Adams-Bashforth variants) and 1D/2D flow updates (SWE or Boussinesq).

  • Incorporating breaking models, sediment transport, and the kernels for reconstruction (Pass1), flux computations (Pass2), and final updates (Pass3).

Attributes

domainDomain

Instance of the Domain class containing grid info and topography.

bcBoundaryConditions

Instance managing boundary condition types and wave settings.

dissipation_thresholdfloat

Used for visualization (mark cells above certain foam/dissipation).

thetafloat

Midmod limiter parameter (1.0 more dissipative, 2.0 less dissipative).

timeSchemeint

Time integration scheme:

  • 0 = Euler

  • 1 = 3rd-order predictor

  • 2 = 4th-order predictor/corrector

pred_or_correctorint

Indicates stage in solver loop (1 = predictor, 2 = corrector).

Bcoeffloat

Dispersion parameter for Boussinesq model; default 1/15.

modelstr

Type of model, ‘SWE’ or ‘Bouss’.

useBreakingModelbool

True if wave-breaking model is included.

whiteWaterDecayRatefloat

Turbulence decay rate for foam (visualization).

whiteWaterDispersionfloat

Turbulence dispersion factor.

useSedTransModelbool

True if sediment transport is included.

sedimentobject

Default or custom sediment parameters.

infiltrationRatefloat

For modeling infiltration on dry beaches.

clearConint

If 1, concentration channel is cleared for visualization.

showBreakingint

If greater than 0, shows wave breaking foam areas.

delta_breakingfloat

Eddy viscosity coefficient in breaking zones.

T_star_coeffloat

Timescale factor for fully developed breaking.

dzdt_I_coeffloat

Start-breaking parameter threshold.

dzdt_F_coeffloat

End-breaking parameter threshold.

Notes

The class initializes a large set of Taichi vector fields (state vectors, flux arrays, intermediate arrays for Boussinesq tridiagonal solves, sediment transport arrays, etc.) to manage the numerical solution.