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(
77 bool dumpInitialConditions,
80 boost::ignore_unused(domain);
98 for(
int i = 0; i <
m_fields.num_elements(); ++i)
148 boost::ignore_unused(z);
150 int nq = x.num_elements();
160 NekDouble fac = 1.0/(16.0*gamma*M_PI*M_PI);
169 for (
int i = 0; i < nq; ++i)
171 xbar = x[i] - u0*time - x0;
172 ybar = y[i] - v0*time - y0;
173 r = sqrt(xbar*xbar + ybar*ybar);
174 tmp = beta*exp(1-r*r);
175 u[0][i+o] = pow(1.0 - (gamma-1.0)*tmp*tmp*fac, 1.0/(gamma-1.0));
176 u[1][i+o] = u[0][i+o]*(u0 - tmp*ybar/(2*M_PI));
177 u[2][i+o] = u[0][i+o]*(v0 + tmp*xbar/(2*M_PI));
178 u[
m_spacedim+1][i+o] = pow(u[0][i+o], gamma)/(gamma-1.0) +
179 0.5*(u[1][i+o]*u[1][i+o] + u[2][i+o]*u[2][i+o]) / u[0][i+o];
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
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.
std::vector< std::pair< std::string, std::string > > SummaryList
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
virtual ~IsentropicVortex()
Destructor for EulerCFE class.
int m_checksteps
Number of steps between checkpoints.
SOLVER_UTILS_EXPORT int GetTotPoints()
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
virtual void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
Set the initial conditions.
Base class for unsteady solvers.
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
int m_spacedim
Spatial dimension (>= expansion dim).
EquationSystemFactory & GetEquationSystemFactory()
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
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.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
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)
std::shared_ptr< SessionReader > SessionReaderSharedPtr