44 RegisterCreatorFunction(
"PressureOutflowFile",
45 PressureOutflowFileBC::create,
46 "Pressure outflow (file) boundary condition.");
48 PressureOutflowFileBC::PressureOutflowFileBC(
55 :
CFSBndCond(pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt)
57 int nvariables =
m_fields.num_elements();
63 GetBndCondExpansions()[
m_bcRegion]->GetNpoints();
65 for (
int i = 0; i < nvariables; ++i)
86 int nTracePts =
m_fields[0]->GetTrace()->GetNpoints();
87 int nVariables = physarray.num_elements();
94 NekDouble gammaMinusOneInv = 1.0 / gammaMinusOne;
100 for (i = 0; i < nDimensions; ++i)
102 Vmath::Vdiv(nTracePts, Fwd[i+1], 1, Fwd[0], 1, Vel, 1);
109 m_varConv->GetAbsoluteVelocity(Fwd, absVel);
116 m_varConv->GetSoundSpeed(Fwd, pressure, soundSpeed);
120 Vmath::Vdiv(nTracePts, Vn, 1, soundSpeed, 1, Mach, 1);
124 int e, id1, id2,
npts, pnt;
132 GetExp(e)->GetTotPoints();
138 for (i = 0; i <
npts; i++)
143 if (Mach[pnt] < 0.99)
147 for (j = 1; j < nVariables-1; ++j)
149 Ek += 0.5 * (Fwd[j][pnt] * Fwd[j][pnt]) / Fwd[0][pnt];
155 for (j = 0; j < nVariables-1; ++j)
158 UpdatePhys())[id1+i] = Fwd[j][pnt];
162 UpdatePhys())[id1+i] = rhoeb;
167 for (j = 0; j < nVariables; ++j)
171 UpdatePhys())[id1+i] = Fwd[j][pnt];
int m_spacedim
Space dimension.
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.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
CFSBndCondFactory & GetCFSBndCondFactory()
Declaration of the boundary condition factory singleton.
Array< OneD, NekDouble > m_pressureStorage
Encapsulates the user-defined boundary conditions for compressible flow solver.
NekDouble m_gamma
Parameters of the flow.
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Trace normals.
virtual void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)
int m_bcRegion
Id of the boundary region.