48 "Riemann boundary condition enforcing entropy and pressure.");
55 const int pSpaceDim,
const int bcRegion,
const int cnt)
56 :
CFSBndCond(pSession, pFields, pTraceNormals, pGridVelocity, pSpaceDim,
64 m_npts = bndexp->GetTotPoints();
73 for (
int e = 0; e < bndexp->GetNumElmts(); ++e)
75 int nTracePts = bndexp->GetExp(e)->GetTotPoints();
81 for (
int i = 0; i < nTracePts; i++)
91 for (
int i = 0; i <
m_fields.size(); ++i)
120 for (
int j = 0; j <
m_npts; ++j)
139 for (i = 0; i < Fwd.size(); ++i)
142 for (j = 0; j <
m_npts; ++j)
152 for (i = 0; i < nDimensions; ++i)
154 for (j = 0; j <
m_npts; ++j)
167 m_varConv->GetSoundSpeed(FwdBnd, soundSpeed);
180 NekDouble EBC, rR, cstar, pstar, rhostar, ustar;
183 NekDouble twoOverGamMinOne = 2.0 / gamMinOne;
187 for (
int pnt = 0; pnt <
m_npts; ++pnt)
193 if (Mach[pnt] < 1.00)
205 ustar = rR + cstar * twoOverGamMinOne;
231 EBC = pL * twoOverGamMinOne * 0.5;
243 for (j = 0; j < nDimensions; ++j)
252 EBC += 0.5 * rhoL * velBC[j] * velBC[j];
258 for (j = 0; j < nDimensions; ++j)
270 if (Mach[pnt] < 1.00)
278 rhostar = FwdBnd[0][pnt] * pow((pstar /
pressure[pnt]), gamInv);
280 ustar = rR + cstar * twoOverGamMinOne;
296 EBC = pL * twoOverGamMinOne * 0.5;
301 for (j = 0; j < nDimensions; ++j)
304 EBC += 0.5 * rhoL * velBC[j] * velBC[j];
309 for (j = 0; j < nDimensions; ++j)
Encapsulates the user-defined boundary conditions for compressible flow solver.
int m_spacedim
Space dimension.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Trace normals.
NekDouble m_gamma
Parameters of the flow.
int m_bcRegion
Id of the boundary region.
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
static std::string className
Name of the class.
void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
Array< OneD, Array< OneD, NekDouble > > m_velBC
static CFSBndCondSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
Creates an instance of this class.
Array< OneD, NekDouble > m_VnInf
Reference normal velocity.
Array< OneD, NekDouble > m_rhoBC
Array< OneD, NekDouble > m_pBC
Array< OneD, int > m_bndToTraceMap
Array< OneD, Array< OneD, NekDouble > > m_bndPhys
EnforceEntropyPressure(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
CFSBndCondFactory & GetCFSBndCondFactory()
Declaration of the boundary condition factory singleton.
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)