AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
 
Loading...
Searching...
No Matches
hydro_mol.H
Go to the documentation of this file.
1/**
2 * \file hydro_mol.H
3 * \brief A documented file.
4 *
5 * Here is where detailed documentation for the file can go.
6 *
7 */
8
9/** \addtogroup MOL
10 * @{
11 */
12
13
14
15
16
17#ifndef HYDRO_MOL_H_
18#define HYDRO_MOL_H_
19
20#include <AMReX_MultiFab.H>
21#include <AMReX_BCRec.H>
22
23
24/**
25 * \namespace MOL
26 * The procedures for computing MAC velocities and edge states with MOL does
27 * not involve time derivatives. All slope computations use second-order
28 * limited slopes as described in
29 * <a href="https://amrex-codes.github.io/amrex/hydro_html/MOL.html#sec:slopes">[sec:slopes]</a>.
30 *
31 */
32
33
34namespace MOL {
35
36/**
37 *
38 * \brief Compute upwinded face-centered states by extrapolating cell-centered values in SPACE ONLY.
39 * \param [in] a_bx Current grid patch
40 * \param [in,out] xedge Array4 containing x-edges, starting at component of interest
41 * \param [in,out] yedge Array4 containing y-edges, starting at component of interest
42 * \param [in,out] zedge Array4 containing z-edges, starting at component of interest
43 * \param [in] q Array4 of state, starting at component of interest
44 * \param [in] ncomp Number of components to work on
45 * \param [in] umac x-Face velocities.
46 * \param [in] vmac y-Face velocities.
47 * \param [in] wmac z-Face velocities.
48 * \param [in] domain Problem domain.
49 * \param [in] bcs Vector of boundary conditions
50 * \param [in] d_bcrec_ptr BCRec
51 * \param [in] is_velocity Indicates a component is velocity so boundary conditions can
52 * be properly addressed. The header hydro_constants.H
53 * defines the component position by [XYZ]VEL macro.
54 * \param [in] allow_inflow_on_outflow If true, do not clamp the normal velocity
55 * to be outflowing at a foextrap/hoextrap face, so that an
56 * inflowing MAC velocity there is carried through.
57 *
58 * Compute upwinded FC states by extrapolating CC values in SPACE ONLY.
59 * This is NOT a Godunov type extrapolation: there is NO dependence on time!
60 * The resulting FC states are computed at the CENTROID of the face.
61 *
62 */
63
64void ComputeEdgeState (amrex::Box const& a_bx,
66 amrex::Array4<amrex::Real> const& yedge,
67 amrex::Array4<amrex::Real> const& zedge),
69 int ncomp,
73 amrex::Box const& domain,
75 amrex::BCRec const* d_bcrec_ptr,
76 bool is_velocity,
77 bool allow_inflow_on_outflow = false);
78
79
80/**
81 *
82 * \brief Compute upwinded FC velocities by extrapolating CC values in SPACE ONLY.
83 * \param vel The cell-centered velocity field
84 * \param umac x-component of velocity on centroid of x-face
85 * \param vmac y-component of velocity on centroid of y-face
86 * \param wmac z-component of velocity on centroid of z-face
87 * \param a_geom Geometry object at this level
88 * \param h_bcrec Host version of BCRec
89 * \param d_bcrec Device version of BCRec
90 *
91 * Compute upwinded FC velocities by extrapolating CC values in SPACE ONLY.
92 * This is NOT a Godunov type extrapolation: there is NO dependence on time!
93 * The resulting FC velocities are computed at the CENTROID of the face.
94 *
95 */
96
97
100 amrex::MultiFab& vmac,
101 amrex::MultiFab& wmac ),
102 const amrex::Geometry& a_geom,
103 amrex::Vector<amrex::BCRec> const& h_bcrec,
104 const amrex::BCRec* d_bcrec,
105 bool allow_inflow_on_outflow = false);
106
107/**
108 * \brief For Computing the pre-MAC edge states to be MAC-projected.
109 *
110 * For detailed info on the algorithm, see
111 * <a href="https://amrex-codes.github.io/amrex/hydro_html/MOL.html#pre-mac-mol-extrapveltofacesbox"> MOL</a>.
112 *
113 */
115 amrex::Box const& vbx,
116 amrex::Box const& wbx ),
121 const amrex::Geometry& geom,
122 amrex::Vector<amrex::BCRec> const& h_bcrec,
123 const amrex::BCRec* d_bcrec,
124 bool allow_inflow_on_outflow = false);
125
126
127}
128#endif
129/** @}*/
#define AMREX_D_DECL(a, b, c)
void ExtrapVelToFaces(const amrex::MultiFab &vel, AMREX_D_DECL(amrex::MultiFab &umac, amrex::MultiFab &vmac, amrex::MultiFab &wmac), const amrex::Geometry &a_geom, amrex::Vector< amrex::BCRec > const &h_bcrec, const amrex::BCRec *d_bcrec, bool allow_inflow_on_outflow=false)
Compute upwinded FC velocities by extrapolating CC values in SPACE ONLY.
void ComputeEdgeState(amrex::Box const &a_bx, AMREX_D_DECL(amrex::Array4< amrex::Real > const &xedge, amrex::Array4< amrex::Real > const &yedge, amrex::Array4< amrex::Real > const &zedge), amrex::Array4< amrex::Real const > const &q, int ncomp, 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::Box const &domain, amrex::Vector< amrex::BCRec > const &bcs, amrex::BCRec const *d_bcrec_ptr, bool is_velocity, bool allow_inflow_on_outflow=false)
Compute upwinded face-centered states by extrapolating cell-centered values in SPACE ONLY.
void ExtrapVelToFacesBox(AMREX_D_DECL(amrex::Box const &ubx, amrex::Box const &vbx, amrex::Box const &wbx), AMREX_D_DECL(amrex::Array4< amrex::Real > const &u, amrex::Array4< amrex::Real > const &v, amrex::Array4< amrex::Real > const &w), amrex::Array4< amrex::Real const > const &vcc, const amrex::Geometry &geom, amrex::Vector< amrex::BCRec > const &h_bcrec, const amrex::BCRec *d_bcrec, bool allow_inflow_on_outflow=false)
For Computing the pre-MAC edge states to be MAC-projected.