48 "Riemann boundary condition enforcing entropy and velocity.");
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);
184 NekDouble oneOverGamMinOne = 1.0 / gamMinOne;
185 NekDouble twoOverGamMinOne = 2.0 * oneOverGamMinOne;
189 for (
int pnt = 0; pnt <
m_npts; ++pnt)
195 if (Mach[pnt] < 1.00)
204 rhoL = pow((cL * cL) / (
m_gamma * sL), oneOverGamMinOne);
205 pL = cL * cL * rhoL * gamInv;
219 EBC = pL * twoOverGamMinOne * 0.5;
227 for (j = 0; j < nDimensions; ++j)
236 EBC += 0.5 * rhoL * velBC[j] * velBC[j];
242 for (j = 0; j < nDimensions; ++j)
254 if (Mach[pnt] < 1.00)
270 EBC = pL * twoOverGamMinOne * 0.5;
275 for (j = 0; j < nDimensions; ++j)
278 EBC += 0.5 * rhoL * velBC[j] * velBC[j];
283 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.
Array< OneD, NekDouble > m_VnInf
Reference normal velocity.
Array< OneD, NekDouble > m_pBC
void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
Array< OneD, NekDouble > m_rhoBC
Array< OneD, int > m_bndToTraceMap
EnforceEntropyVelocity(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)
Array< OneD, Array< OneD, NekDouble > > m_bndPhys
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, Array< OneD, NekDouble > > m_velBC
static std::string className
Name of the class.
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)