AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
Loading...
Searching...
No Matches
BDS Namespace Reference

Functions

void ComputeEdgeState (amrex::Box const &bx, int ncomp, amrex::Array4< amrex::Real const > const &q, AMREX_D_DECL(amrex::Array4< amrex::Real > const &xedge, amrex::Array4< amrex::Real > const &yedge, amrex::Array4< amrex::Real > const &zedge), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac), amrex::Array4< amrex::Real const > const &divu, amrex::Array4< amrex::Real const > const &fq, amrex::Geometry geom, amrex::Real l_dt, amrex::Vector< amrex::BCRec > const &h_bcrec, amrex::BCRec const *pbc, int const *iconserv, bool is_velocity, bool allow_inflow_on_outflow=false)
void ComputeSlopes (amrex::Box const &bx, const amrex::Geometry &geom, int icomp, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real > const &slopes, amrex::Vector< amrex::BCRec > const &h_bcrec)
void ComputeConc (amrex::Box const &bx, const amrex::Geometry &geom, int icomp, amrex::Array4< amrex::Real const > const &s, AMREX_D_DECL(amrex::Array4< amrex::Real > const &sedgex, amrex::Array4< amrex::Real > const &sedgey, amrex::Array4< amrex::Real > const &sedgez), amrex::Array4< amrex::Real const > const &slopes, AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac), amrex::Array4< amrex::Real const > const &divu, amrex::Array4< amrex::Real const > const &force, int const *iconserv, amrex::Real dt, amrex::Vector< amrex::BCRec > const &h_bcrec, amrex::BCRec const *pbc, bool is_velocity, bool allow_inflow_on_outflow=false)

Detailed Description

Collection of routines for the BDS (Bell-Dawson-Shubin) algorithm.

Function Documentation

◆ ComputeConc()

void BDS::ComputeConc ( amrex::Box const & bx,
const amrex::Geometry & geom,
int icomp,
amrex::Array4< amrex::Real const > const & s,
AMREX_D_DECL(amrex::Array4< amrex::Real > const &sedgex, amrex::Array4< amrex::Real > const &sedgey, amrex::Array4< amrex::Real > const &sedgez) ,
amrex::Array4< amrex::Real const > const & slopes,
AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac) ,
amrex::Array4< amrex::Real const > const & divu,
amrex::Array4< amrex::Real const > const & force,
int const * iconserv,
amrex::Real dt,
amrex::Vector< amrex::BCRec > const & h_bcrec,
amrex::BCRec const * pbc,
bool is_velocity,
bool allow_inflow_on_outflow = false )

Compute Conc for BDS algorithm.

Parameters
[in]bxCurrent grid patch
[in]geomLevel geometry.
[in]icompComponent of the Array4s.
[in]sArray4 of state.
[in,out]sedgexArray4 containing x-edges.
[in,out]sedgeyArray4 containing y-edges.
[in,out]sedgezArray4 containing z-edges.
[in]slopesArray4 containing slope information.
[in]umacArray4 for u-face velocity.
[in]vmacArray4 for v-face velocity.
[in]wmacArray4 for z-face velocity.
[in]forceArray4 for forces.
[in]iconservIf true, use conservative form, otherwise use convective.
[in]dtTime step.
[in]h_bcrecBoundary conditions (host).
[in]pbcBoundary conditions (device).
[in]is_velocityIndicates a component is velocity so boundary conditions can be properly addressed. The header hydro_constants.H defines the component position by [XYZ]VEL macro.
[in]allow_inflow_on_outflowIf true, do not clamp the normal velocity to be outflowing at a foextrap/hoextrap face, so that an inflowing MAC velocity there is carried through.

◆ ComputeEdgeState()

void BDS::ComputeEdgeState ( amrex::Box const & bx,
int ncomp,
amrex::Array4< amrex::Real const > const & q,
AMREX_D_DECL(amrex::Array4< amrex::Real > const &xedge, amrex::Array4< amrex::Real > const &yedge, amrex::Array4< amrex::Real > const &zedge) ,
AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac) ,
amrex::Array4< amrex::Real const > const & divu,
amrex::Array4< amrex::Real const > const & fq,
amrex::Geometry geom,
amrex::Real l_dt,
amrex::Vector< amrex::BCRec > const & h_bcrec,
amrex::BCRec const * pbc,
int const * iconserv,
bool is_velocity,
bool allow_inflow_on_outflow = false )

Uses the Bell-Dawson-Shubin (BDS) algorithm, a higher order Godunov method for scalar conservation laws in three dimensions, to compute edge states.

Parameters
[in]bxCurrent grid patch
[in]ncompNumber of components to work on
[in]qArray4 of state, starting at component of interest
[in,out]xedgeArray4 containing x-edges, starting at component of interest
[in,out]yedgeArray4 containing y-edges, starting at component of interest
[in,out]zedgeArray4 containing z-edges, starting at component of interest
[in]umacx-Face velocities.
[in]vmacy-Face velocities.
[in]wmacz-Face velocities.
[in]divuVelocity divergence. Read whenever iconserv is set for a component, and not checked for null there, so it must be a valid Array4 unless every component is convective.
[in]fqArray4 for forces, starting at component of interest
[in]geomLevel geometry.
[in]l_dtTime step.
[in]h_bcrecBoundary conditions (host).
[in]pbcBoundary conditions (device).
[in]iconservIf true, use conservative form, otherwise use convective.
[in]is_velocityIndicates a component is velocity so boundary conditions can be properly addressed. The header hydro_constants.H defines the component position by [XYZ]VEL macro.
[in]allow_inflow_on_outflowIf true, do not clamp the normal velocity to be outflowing at a foextrap/hoextrap face, so that an inflowing MAC velocity there is carried through.
Note
Ghost-cell requirements: q needs 3 filled ghost cells including corners, because of the bicubic stencil used for the slopes; the MAC velocities need 1; and divu needs 1.

◆ ComputeSlopes()

void BDS::ComputeSlopes ( amrex::Box const & bx,
const amrex::Geometry & geom,
int icomp,
amrex::Array4< amrex::Real const > const & s,
amrex::Array4< amrex::Real > const & slopes,
amrex::Vector< amrex::BCRec > const & h_bcrec )

Compute bilinear slopes for BDS algorithm.

Parameters
[in]bxCurrent grid patch
[in]geomLevel geometry.
[in]icompComponent of the state Array4.
[in]sArray4<const> of state vector.
[out]slopesArray4 to store slope information.
[in]h_bcrecBoundary conditions (host).