35 #include <boost/core/ignore_unused.hpp>
43 string IsentropicVortex::className =
45 "IsentropicVortex", IsentropicVortex::create,
46 "Euler equations for the isentropic vortex test case.");
48 IsentropicVortex::IsentropicVortex(
75 bool dumpInitialConditions,
78 boost::ignore_unused(domain);
96 for (
int i = 0; i <
m_fields.size(); ++i)
142 boost::ignore_unused(z);
154 NekDouble fac = 1.0 / (16.0 * gamma * M_PI * M_PI);
163 for (
int i = 0; i < nq; ++i)
165 xbar = x[i] - u0 * time - x0;
166 ybar = y[i] - v0 * time - y0;
167 r =
sqrt(xbar * xbar + ybar * ybar);
168 tmp =
beta * exp(1 - r * r);
170 pow(1.0 - (gamma - 1.0) * tmp * tmp * fac, 1.0 / (gamma - 1.0));
171 u[1][i + o] = u[0][i + o] * (u0 - tmp * ybar / (2 * M_PI));
172 u[2][i + o] = u[0][i + o] * (v0 + tmp * xbar / (2 * M_PI));
174 pow(u[0][i + o], gamma) / (gamma - 1.0) +
175 0.5 * (u[1][i + o] * u[1][i + o] + u[2][i + o] * u[2][i + o]) /
virtual ~IsentropicVortex()
Destructor for EulerCFE class.
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)
Isentropic Vortex Test Case.
virtual void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time=0.0)
Get the exact solutions for isentropic vortex and Ringleb flow problems.
virtual void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
Set the initial conditions.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
int m_spacedim
Spatial dimension (>= expansion dim).
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
int m_checksteps
Number of steps between checkpoints.
SOLVER_UTILS_EXPORT int GetTotPoints()
Base class for unsteady solvers.
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
std::vector< std::pair< std::string, std::string > > SummaryList
EquationSystemFactory & GetEquationSystemFactory()
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
The above copyright notice and this permission notice shall be included.
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)