42 string IsentropicVortex::className =
44 "IsentropicVortex", IsentropicVortex::create,
45 "Euler equations for the isentropic vortex test case.");
47 IsentropicVortex::IsentropicVortex(
74 bool dumpInitialConditions,
95 for(
int i = 0; i <
m_fields.num_elements(); ++i)
145 int nq = x.num_elements();
155 NekDouble fac = 1.0/(16.0*gamma*M_PI*M_PI);
164 for (
int i = 0; i < nq; ++i)
166 xbar = x[i] - u0*time - x0;
167 ybar = y[i] - v0*time - y0;
168 r = sqrt(xbar*xbar + ybar*ybar);
169 tmp = beta*exp(1-r*r);
170 u[0][i+o] = 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));
173 u[
m_spacedim+1][i+o] = pow(u[0][i+o], gamma)/(gamma-1.0) +
174 0.5*(u[1][i+o]*u[1][i+o] + u[2][i+o]*u[2][i+o]) / u[0][i+o];
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.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
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.
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.
void Zero(int n, T *x, const int incx)
Zero vector.
void InitializeSteadyState()
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.