The solver implements the velocity-correction scheme (VCS) of Karniadakis, Israeli and
Orszag [44] for continuous Galerkin (Projection=Galerkin) discretisations. Each time
step solves a pressure Poisson problem followed by one Helmholtz (semi-implicit)
or linear advection–diffusion–reaction (ADR, linear-implicit) problem per velocity
component. All element, boundary and linear-system work is done by redesign operators,
so the same solver code runs on every execution space (Serial, AVX, Device for
CUDA or HIP) and with every element-operator implementation (StdMat, SumFac,
and SumFacTOP on Device only). There are no backend-specific branches in the
solver.
The main pieces are listed below; paths are relative to solvers/IncNavierStokesSolverRedesign/ or library/SolverCore/.
EquationSystems/VelocityCorrectionScheme.{h,cpp}: the equation system,
registered as
VelocityCorrectionScheme. It derives from SolverCore::UnsteadySystem and
provides the two time-integrator callbacks EvaluateAdvection_SetPressureBCs
(explicit part) and SolveUnsteadyStokesSystem (implicit part).
BoundaryConditions/HOPressureBndCond/: the HOPressureBndCondOp, a
Neumann boundary-condition operator added to the pressure Poisson solve
(Section 29.3.1).
BoundaryConditions/HOutflowBndCond/: the HOutflowBndCondOp, which
holds the boundary data shared by a pressure Dirichlet and a velocity Neumann
condition and presents them to the linear systems through two adapters
(Section 29.3.2).
TimeOps/IMEX and TimeOps/IMEXdirk in SolverCore: the IMEX multistep
scheme and the IMEX DIRK scheme used for its start-up.
GlobalLinSysOps/LinearSystems in SolverCore: PoissonSolveOp (pressure),
HelmSolveOp (semi-implicit velocity), LinearADRSolveOp (linear-implicit velocity)
and FwdTransOp (projections); GlobalLinSysOps/LinearSolvers: the iterative
solvers (ConjGrad, GMRES and others); PreconOps: the Diagonal and Null
preconditioners.
Filters in SolverCore: Checkpoint, AverageFields, HistoryPoints and
Mean. Checkpoints are written only by the Checkpoint filter; IO_CheckSteps and
IO_CheckTime are ignored with a warning.
Filters and Utilities: the Energy, AeroForces and ReynoldsStresses
filters and their operators EnergyOp, AeroForcesOp and ReynoldsStressOp
(Section 29.6).
The variables must be ordered as velocity components, optional passive scalars,
and pressure last. The pressure has its own ContField, which shares the velocity
expansion when the session gives both the same expansion. The pressure is excluded
from time integration: the time operator advances the velocity (and scalar) fields
only.
The velocity and pressure may differ in order but must share their quadrature points, element
by element, and therefore their phys block layout: velocity and pressure fields are combined
point by point (the divergence forcing, the pressure correction, the weak-form inner product
and the higher-order pressure and outflow conditions). A lower-order pressure is declared with
a raised quadrature, for instance MODIFIED with NUMMODES=P + 1 for the velocity and
MODIFIEDQUADPLUS1 with NUMMODES=P for the pressure, which give the same points in every
direction. ExpList::SameQuadratureLayout checks this at set-up in either pressure form: for
the volume expansions in VelocityCorrectionScheme::v_InitialiseOperators, and for
each boundary region in the HOPBC and HOutflow operators.