Skip to content

Pressure solvers

The discrete pressure Poisson equation

Lp=WMF(u)

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

IncompressibleNavierStokes.default_psolver Method
julia
default_psolver(
    setup
) -> Union{IncompressibleNavierStokes.var"#psolve!#101"{Bool}, IncompressibleNavierStokes.var"#psolve!#124"}

Get default Poisson solver from setup.

source

IncompressibleNavierStokes.poisson! Method
julia
poisson!(psolver, f) -> Any

Solve the Poisson equation for the pressure (in-place version).

source

IncompressibleNavierStokes.poisson Method
julia
poisson(psolver, f) -> Any

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.

Differentiable version.

source

IncompressibleNavierStokes.pressure! Method
julia
pressure!(p, u, temp, t, setup; psolver, F)

Compute pressure from velocity field (in-place version).

source

IncompressibleNavierStokes.pressure Method
julia
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.

Differentiable version.

source

IncompressibleNavierStokes.project! Method
julia
project!(u, setup; psolver, p)

Project velocity field onto divergence-free space (in-place version).

source

IncompressibleNavierStokes.project Method
julia
project(u, setup; psolver)

Project velocity field onto divergence-free space (differentiable version).

source

IncompressibleNavierStokes.psolver_cg Method
julia
psolver_cg(
    setup;
    abstol,
    reltol,
    maxiter,
    preconditioner
) -> IncompressibleNavierStokes.var"#psolve!#111"{_A, _B, _C, IncompressibleNavierStokes.var"#laplace_diag#109"{ndrange, workgroupsize}} where {_A, _B, _C, ndrange, workgroupsize}

Conjugate gradients iterative Poisson solver.

source

IncompressibleNavierStokes.psolver_cg_matrix Method
julia
psolver_cg_matrix(
    setup;
    kwargs...
) -> IncompressibleNavierStokes.var"#psolve!#105"{Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}}

Conjugate gradients iterative Poisson solver. The kwargs are passed to the cg! function from IterativeSolvers.jl.

source

IncompressibleNavierStokes.psolver_direct Method
julia
psolver_direct(
    setup
) -> IncompressibleNavierStokes.var"#psolve!#101"{Bool}

Create direct Poisson solver using an appropriate matrix decomposition.

source

IncompressibleNavierStokes.psolver_spectral Method
julia
psolver_spectral(
    setup
) -> IncompressibleNavierStokes.var"#psolve!#124"

Create spectral Poisson solver from setup.

source