Pressure solvers

The discrete pressure Poisson equation

\[L p = W M F(u)\]

enforces divergence freeness. There are multiple options for solving this system.

IncompressibleNavierStokes.psolver_cgFunction
psolver_cg(
    setup;
    abstol = zero(eltype(setup.grid.x[1])),
    reltol = sqrt(eps(eltype(setup.grid.x[1]))),
    maxiter = prod(setup.grid.Np),
    preconditioner = create_laplace_diag(setup),
)

Conjugate gradients iterative Poisson solver.

source
IncompressibleNavierStokes.pressureFunction
pressure(u, temp, t, setup; psolver)

Compute pressure from velocity field. This makes the pressure compatible with the velocity field, resulting in same order pressure as velocity.

source
IncompressibleNavierStokes.pressure!Function
pressure!(p, u, temp, t, setup; psolver, F, div)

Compute pressure from velocity field. This makes the pressure compatible with the velocity field, resulting in same order pressure as velocity.

source
IncompressibleNavierStokes.poissonFunction
poisson(psolver, f)

Solve the Poisson equation for the pressure with right hand side f at time t. For periodic and no-slip BC, the sum of f should be zero.

Non-mutating/allocating/out-of-place version.

See also poisson!.

source
IncompressibleNavierStokes.poisson!Function
poisson!(solver, p, f)

Solve the Poisson equation for the pressure with right hand side f at time t. For periodic and no-slip BC, the sum of f should be zero.

Mutating/non-allocating/in-place version.

See also poisson.

source