45 "Isentropic vortex boundary condition.");
52 const int pSpaceDim,
const int bcRegion,
const int cnt)
53 :
CFSBndCond(pSession, pFields, pTraceNormals, pGridVelocity, pSpaceDim,
62 int nvariables = physarray.size();
66 int npoints, id1, id2, e_max;
70 for (
int e = 0; e < e_max; ++e)
90 for (
int i = 0; i < nvariables; ++i)
116 NekDouble fac = 1.0 / (16.0 * gamma * M_PI * M_PI);
125 for (
int i = 0; i < nq; ++i)
127 xbar = x[i] - u0 * time - x0;
128 ybar = y[i] - v0 * time - y0;
129 r =
sqrt(xbar * xbar + ybar * ybar);
130 tmp =
beta * exp(1 - r * r);
132 pow(1.0 - (gamma - 1.0) * tmp * tmp * fac, 1.0 / (gamma - 1.0));
133 u[1][i + o] = u[0][i + o] * (u0 - tmp * ybar / (2 * M_PI));
134 u[2][i + o] = u[0][i + o] * (v0 + tmp * xbar / (2 * M_PI));
136 pow(u[0][i + o], gamma) / (gamma - 1.0) +
137 0.5 * (u[1][i + o] * u[1][i + o] + u[2][i + o] * u[2][i + o]) /
Encapsulates the user-defined boundary conditions for compressible flow solver.
int m_spacedim
Space dimension.
NekDouble m_gamma
Parameters of the flow.
int m_bcRegion
Id of the boundary region.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
static std::string className
Name of the class.
IsentropicVortexBC(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)
void EvaluateIsentropicVortex(const Array< OneD, NekDouble > &x, const Array< OneD, NekDouble > &y, const Array< OneD, NekDouble > &z, Array< OneD, Array< OneD, NekDouble > > &u, NekDouble time, const int o=0)
void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
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.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
std::vector< double > z(NPUPPER)
CFSBndCondFactory & GetCFSBndCondFactory()
Declaration of the boundary condition factory singleton.
void Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)