35#include <boost/core/ignore_unused.hpp> 
   47        "Pressure outflow non-reflective boundary condition.");
 
   53    const int pSpaceDim, 
const int bcRegion, 
const int cnt)
 
   54    : 
CFSBndCond(pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt)
 
   71    boost::ignore_unused(time);
 
   74    int nTracePts   = 
m_fields[0]->GetTrace()->GetNpoints();
 
   75    int nVariables  = physarray.size();
 
   84    for (i = 0; i < nDimensions; ++i)
 
   86        Vmath::Vdiv(nTracePts, Fwd[i + 1], 1, Fwd[0], 1, Vel, 1);
 
   93    m_varConv->GetAbsoluteVelocity(Fwd, absVel);
 
   97    m_varConv->GetSoundSpeed(Fwd, soundSpeed);
 
  101    Vmath::Vdiv(nTracePts, Vn, 1, soundSpeed, 1, Mach, 1);
 
  105    int e, id1, id2, npts, pnt;
 
  128        for (i = 0; i < npts; i++)
 
  133            if (Mach[pnt] < 0.99)
 
  137                for (j = 1; j < nVariables - 1; ++j)
 
  139                    Ek += 0.5 * (Fwd[j][pnt] * Fwd[j][pnt]) / Fwd[0][pnt];
 
  142                rhoeb = Fwd[0][pnt] * Ei[i] + Ek;
 
  145                for (j = 0; j < nVariables - 1; ++j)
 
  149                         ->UpdatePhys())[id1 + i] = Fwd[j][pnt];
 
  154                     ->UpdatePhys())[id1 + i] =
 
  155                    2.0 * rhoeb - Fwd[nVariables - 1][pnt];
 
  160                for (j = 0; j < nVariables; ++j)
 
  165                         ->UpdatePhys())[id1 + i] = Fwd[j][pnt];
 
Encapsulates the user-defined boundary conditions for compressible flow solver.
int m_spacedim
Space dimension.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Trace normals.
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.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
PressureOutflowNonReflectiveBC(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt)
virtual void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
Array< OneD, NekDouble > m_pressureStorage
static std::string className
Name of the class.
static CFSBndCondSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt)
Creates an instance of this class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
The above copyright notice and this permission notice shall be included.
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 Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
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)