peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
Loading...
Searching...
No Matches
peclet::voro::fv::CollocatedNS< Real > Struct Template Reference

#include <collocated.hpp>

Public Types

using Exec = peclet::core::ExecSpace
 

Public Member Functions

void setup (const FaceMesh< Real > &mesh, Real viscosity, bool amg=false)
 
template<class Ex >
void setExchange (Ex &ex)
 Install the distributed hooks on the solver and its pressure solver.
 
void setWallVelocity (const DV< Real > &Uw)
 
void applyWallFlux (const DV< Real > &uf) const
 Impose the boundary fluxes on a face field.
 
void toFaces (const DV< Real > &Uc, const DV< Real > &out)
 The constraint interpolation: face flux of the cell field.
 
void cellGrad (const DV< Real > &q, const DV< Real > &out)
 The cell gradient of a scalar q = the transpose of the constraint applied to grad_f q.
 
void tendency (const DV< Real > &Uin, const DV< Real > &ufin, const DV< Real > &out)
 a = tendency of Uin transported by ufin, minus the current pressure gradient (incremental).
 
void project (const DV< Real > &Ustar, const DV< Real > &ufOut, Real dt, const DV< Real > &divOut=DV< Real >{})
 
void initialize (const DV< Real > &Uin)
 Initialise from a cell field: U = Uin projected once (dt = 1, no pressure kept).
 
void step (Real dt)
 
void stepImplicit (Real dt)
 
void stepRK3 (Real dt)
 One SSP-RK3 step, flow's predictor/projection structure at every stage.
 
Real kineticEnergy () const
 ½ Σ V_i |U_i|²
 
Real maxFaceDivergence ()
 max_i |div u_f|_i of the transporting face flux (exactly projected)
 
Real maxCellDivergence ()
 max_i |div (T U)|_i — the residual divergence of the CELL field (the "approximate" of ABC)
 
Real maxDivOf (const DV< Real > &flux)
 

Public Attributes

FaceMesh< Real > m
 
Real nu = 0
 
Real convScale = 1
 
bool incremental = true
 
bool skewCorrected = true
 
DV< Real > U
 
DV< Real > uf
 
DV< Real > p
 
DV< Real > force
 
DV< Real > Uwall
 
DV< Real > ub
 
bool wallQuadratic = true
 
DV< Real > wg
 
std::function< void(const DV< Real > &, int)> exchange
 
std::function< Real(Real)> sum
 
std::function< Real(Real)> max
 
bool implicitDiffusion = false
 
bool rotational
 
PressureSolver< Real > visc
 
Real viscDt = -1
 
DV< Real > rhs3
 
DV< Real > uc
 
DV< Real > wcorr
 
DV< Real > aT
 
DV< Real > divStar
 
DV< Real > a
 
DV< Real > U1
 
DV< Real > U2
 
DV< Real > uf1
 
DV< Real > uf2
 
DV< Real > div
 
DV< Real > gphi
 
DV< Real > gp
 
DV< Real > phi
 
DV< Real > g9
 
PressureSolver< Real > poisson
 

Member Typedef Documentation

◆ Exec

template<class Real >
using peclet::voro::fv::CollocatedNS< Real >::Exec = peclet::core::ExecSpace

Member Function Documentation

◆ applyWallFlux()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::applyWallFlux ( const DV< Real > &  uf) const
inline

Impose the boundary fluxes on a face field.

◆ cellGrad()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::cellGrad ( const DV< Real > &  q,
const DV< Real > &  out 
)
inline

The cell gradient of a scalar q = the transpose of the constraint applied to grad_f q.

◆ initialize()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::initialize ( const DV< Real > &  Uin)
inline

Initialise from a cell field: U = Uin projected once (dt = 1, no pressure kept).

◆ kineticEnergy()

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::kineticEnergy ( ) const
inline

½ Σ V_i |U_i|²

◆ maxCellDivergence()

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::maxCellDivergence ( )
inline

max_i |div (T U)|_i — the residual divergence of the CELL field (the "approximate" of ABC)

◆ maxDivOf()

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::maxDivOf ( const DV< Real > &  flux)
inline

◆ maxFaceDivergence()

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::maxFaceDivergence ( )
inline

max_i |div u_f|_i of the transporting face flux (exactly projected)

◆ project()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::project ( const DV< Real > &  Ustar,
const DV< Real > &  ufOut,
Real  dt,
const DV< Real > &  divOut = DV<Real>{} 
)
inline

Approximate projection of the predictor Ustar (in place): T Ustar → exact face projection → cell correction with the transpose gradient; ufOut = the divergence-free face flux; P += φ.

◆ setExchange()

template<class Real >
template<class Ex >
void peclet::voro::fv::CollocatedNS< Real >::setExchange ( Ex &  ex)
inline

Install the distributed hooks on the solver and its pressure solver.

◆ setup()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::setup ( const FaceMesh< Real > &  mesh,
Real  viscosity,
bool  amg = false 
)
inline

◆ setWallVelocity()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::setWallVelocity ( const DV< Real > &  Uw)
inline

Prescribe the boundary-face velocity (3 × nBoundary; empty = no-slip): boundary fluxes u_f = U_wall·n; the viscous wall flux and the convective wall value read U_wall.

◆ step()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::step ( Real  dt)
inline

◆ stepImplicit()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::stepImplicit ( Real  dt)
inline

flow's semi-implicit step: U* from (V/Δt − ν V L + wall) U* = V[U/Δt + conv + F − G Pⁿ + lagged wall correction] + ν Σ_wall (A/h_A) U_wall, then the approximate projection; P += φ [− ν div u*].

◆ stepRK3()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::stepRK3 ( Real  dt)
inline

One SSP-RK3 step, flow's predictor/projection structure at every stage.

◆ tendency()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::tendency ( const DV< Real > &  Uin,
const DV< Real > &  ufin,
const DV< Real > &  out 
)
inline

a = tendency of Uin transported by ufin, minus the current pressure gradient (incremental).

◆ toFaces()

template<class Real >
void peclet::voro::fv::CollocatedNS< Real >::toFaces ( const DV< Real > &  Uc,
const DV< Real > &  out 
)
inline

The constraint interpolation: face flux of the cell field.

Member Data Documentation

◆ a

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::a

◆ aT

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::aT

◆ convScale

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::convScale = 1

◆ div

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::div

◆ divStar

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::divStar

◆ exchange

template<class Real >
std::function<void(const DV<Real>&, int)> peclet::voro::fv::CollocatedNS< Real >::exchange

◆ force

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::force

◆ g9

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::g9

◆ gp

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::gp

◆ gphi

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::gphi

◆ implicitDiffusion

template<class Real >
bool peclet::voro::fv::CollocatedNS< Real >::implicitDiffusion = false

◆ incremental

template<class Real >
bool peclet::voro::fv::CollocatedNS< Real >::incremental = true

◆ m

template<class Real >
FaceMesh<Real> peclet::voro::fv::CollocatedNS< Real >::m

◆ max

template<class Real >
std::function<Real(Real)> peclet::voro::fv::CollocatedNS< Real >::max

◆ nu

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::nu = 0

◆ p

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::p

◆ phi

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::phi

◆ poisson

template<class Real >
PressureSolver<Real> peclet::voro::fv::CollocatedNS< Real >::poisson

◆ rhs3

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::rhs3

◆ rotational

template<class Real >
bool peclet::voro::fv::CollocatedNS< Real >::rotational
Initial value:
=
true

◆ skewCorrected

template<class Real >
bool peclet::voro::fv::CollocatedNS< Real >::skewCorrected = true

◆ sum

template<class Real >
std::function<Real(Real)> peclet::voro::fv::CollocatedNS< Real >::sum

◆ U

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::U

◆ U1

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::U1

◆ U2

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::U2

◆ ub

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::ub

◆ uc

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::uc

◆ uf

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::uf

◆ uf1

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::uf1

◆ uf2

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::uf2

◆ Uwall

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::Uwall

◆ visc

template<class Real >
PressureSolver<Real> peclet::voro::fv::CollocatedNS< Real >::visc

◆ viscDt

template<class Real >
Real peclet::voro::fv::CollocatedNS< Real >::viscDt = -1

◆ wallQuadratic

template<class Real >
bool peclet::voro::fv::CollocatedNS< Real >::wallQuadratic = true

◆ wcorr

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::wcorr

◆ wg

template<class Real >
DV<Real> peclet::voro::fv::CollocatedNS< Real >::wg

The documentation for this struct was generated from the following file: