Commit 85af98e6 authored by Douglas Serson's avatar Douglas Serson

Move ringleb flow and isentropic vortex to separate classes

parent a5c73a7f
......@@ -245,6 +245,8 @@ Under this section it is possible to set the solver information.
\begin{itemize}
\item \inltt{NavierStokesCFE} (Compressible Navier-Stokes equations);
\item \inltt{EulerCFE} (Compressible Euler equations).
\item \inltt{IsentropicVortex} (Isentropic vortex test case).
\item \inltt{RinglebFlow} (Ringleb flow test case).
\end{itemize}
\item \inltt{Projection} is the type of projection we want to use:
\begin{itemize}
......@@ -290,14 +292,6 @@ we want to use for the advection operator:
\item \inltt{LaxFriedrichs};
\item \inltt{Roe}.
\end{itemize}
\item \inltt{ProblemType} is the problem type we want to solve.
This tag is supported for solving ad hoc problems such as the
isentropic vortex or the Ringleb flow.
\begin{itemize}
\item \inltt{General};
\item \inltt{IsentropicVortex};
\item \inltt{RinglebFlow};\\[0.2em]
\end{itemize}
\item \inltt{ViscosityType} is the viscosity type we want to use:
\begin{itemize}
\item \inltt{Constant} (Constant viscosity);
......
......@@ -19,7 +19,9 @@ IF( NEKTAR_SOLVER_COMPRESSIBLE_FLOW )
./EquationSystems/CompressibleFlowSystem.cpp
./EquationSystems/EulerCFE.cpp
./EquationSystems/EulerADCFE.cpp
./EquationSystems/IsentropicVortex.cpp
./EquationSystems/NavierStokesCFE.cpp
./EquationSystems/RinglebFlow.cpp
./Filters/FilterEnergy.cpp
./RiemannSolvers/AverageSolver.cpp
./RiemannSolvers/AUSM0Solver.cpp
......
......@@ -40,20 +40,6 @@
namespace Nektar
{
enum ProblemType
{
eGeneral, ///< No problem defined - Default Inital data
eIsentropicVortex, ///< Isentropic Vortex
eRinglebFlow, ///< Ringleb Flow
SIZE_ProblemType ///< Length of enum list
};
const char* const ProblemTypeMap[] =
{
"General",
"IsentropicVortex",
"RinglebFlow"
};
class EulerCFE : public CompressibleFlowSystem
{
......@@ -73,18 +59,12 @@ namespace Nektar
virtual ~EulerCFE();
///< problem type selector
ProblemType m_problemType;
protected:
EulerCFE(const LibUtilities::SessionReaderSharedPtr& pSession);
virtual void v_InitObject();
/// Print a summary of time stepping parameters.
virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
void DoOdeRhs(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
......@@ -97,46 +77,6 @@ namespace Nektar
NekDouble initialtime = 0.0,
bool dumpInitialConditions = true,
const int domain = 0);
virtual void v_EvaluateExactSolution(
unsigned int field,
Array<OneD, NekDouble> &outfield,
const NekDouble time = 0.0);
private:
/// Isentropic Vortex Test Case.
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 GetExactIsentropicVortex(
int field,
Array<OneD, NekDouble> &outarray,
NekDouble time);
void SetInitialIsentropicVortex(
NekDouble initialtime);
void SetBoundaryIsentropicVortex(
int bcRegion,
NekDouble time,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
/// Ringleb Flow Test Case.
void GetExactRinglebFlow(
int field,
Array<OneD, NekDouble> &outarray);
void SetInitialRinglebFlow(
void);
void SetBoundaryRinglebFlow(
int bcRegion,
NekDouble time,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
};
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// File IsentropicVortex.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Euler equations for isentropic vortex
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_ISENVORTEX_H
#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_ISENVORTEX_H
#include <CompressibleFlowSolver/EquationSystems/EulerCFE.h>
namespace Nektar
{
class IsentropicVortex : public EulerCFE
{
public:
friend class MemoryManager<IsentropicVortex>;
/// Creates an instance of this class.
static SolverUtils::EquationSystemSharedPtr create(
const LibUtilities::SessionReaderSharedPtr& pSession)
{
SolverUtils::EquationSystemSharedPtr p = MemoryManager<IsentropicVortex>::AllocateSharedPtr(pSession);
p->InitObject();
return p;
}
/// Name of class.
static std::string className;
virtual ~IsentropicVortex();
protected:
IsentropicVortex(const LibUtilities::SessionReaderSharedPtr& pSession);
virtual void v_InitObject();
/// Print a summary of time stepping parameters.
virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
void DoOdeRhs(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
const NekDouble time);
void DoOdeProjection(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
const NekDouble time);
virtual void v_SetInitialConditions(
NekDouble initialtime = 0.0,
bool dumpInitialConditions = true,
const int domain = 0);
virtual void v_EvaluateExactSolution(
unsigned int field,
Array<OneD, NekDouble> &outfield,
const NekDouble time = 0.0);
virtual void v_SetBoundaryConditions(
Array<OneD, Array<OneD, NekDouble> > &physarray,
NekDouble time);
private:
/// Isentropic Vortex Test Case.
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 GetExactIsentropicVortex(
int field,
Array<OneD, NekDouble> &outarray,
NekDouble time);
void SetInitialIsentropicVortex(
NekDouble initialtime);
void SetBoundaryIsentropicVortex(
int bcRegion,
NekDouble time,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
};
}
#endif
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////
//
// File RinglebFlow.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Euler equations for Ringleb flow
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_RINGLEBFLOW_H
#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_RINGLEBFLOW_H
#include <CompressibleFlowSolver/EquationSystems/EulerCFE.h>
namespace Nektar
{
class RinglebFlow : public EulerCFE
{
public:
friend class MemoryManager<RinglebFlow>;
/// Creates an instance of this class.
static SolverUtils::EquationSystemSharedPtr create(
const LibUtilities::SessionReaderSharedPtr& pSession)
{
SolverUtils::EquationSystemSharedPtr p = MemoryManager<RinglebFlow>::AllocateSharedPtr(pSession);
p->InitObject();
return p;
}
/// Name of class.
static std::string className;
virtual ~RinglebFlow();
protected:
RinglebFlow(const LibUtilities::SessionReaderSharedPtr& pSession);
virtual void v_InitObject();
/// Print a summary of time stepping parameters.
virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
void DoOdeRhs(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
const NekDouble time);
void DoOdeProjection(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, Array<OneD, NekDouble> > &outarray,
const NekDouble time);
virtual void v_EvaluateExactSolution(
unsigned int field,
Array<OneD, NekDouble> &outfield,
const NekDouble time = 0.0);
virtual void v_SetBoundaryConditions(
Array<OneD, Array<OneD, NekDouble> > &physarray,
NekDouble time);
private:
/// Ringleb Flow Test Case.
void GetExactRinglebFlow(
int field,
Array<OneD, NekDouble> &outarray);
void SetInitialRinglebFlow(
void);
void SetBoundaryRinglebFlow(
int bcRegion,
NekDouble time,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &Fwd,
Array<OneD, Array<OneD, NekDouble> > &physarray);
};
}
#endif
......@@ -1134,13 +1134,12 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="HOMOGENEOUS" VALUE="1D" />
<I PROPERTY="AdvectionType" VALUE="FRDG3DHomogeneous1D" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
<I PROPERTY="USEFFT" VALUE="FFTW" />
</SOLVERINFO>
......
......@@ -1134,13 +1134,12 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="HOMOGENEOUS" VALUE="1D" />
<I PROPERTY="AdvectionType" VALUE="FRHU3DHomogeneous1D" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
<I PROPERTY="USEFFT" VALUE="FFTW" />
</SOLVERINFO>
......
......@@ -1134,13 +1134,12 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="HOMOGENEOUS" VALUE="1D" />
<I PROPERTY="AdvectionType" VALUE="FRSD3DHomogeneous1D" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
<I PROPERTY="USEFFT" VALUE="FFTW" />
</SOLVERINFO>
......
......@@ -1133,12 +1133,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -1133,12 +1133,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -1133,12 +1133,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -1133,12 +1133,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -1134,13 +1134,12 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="HOMOGENEOUS" VALUE="1D" />
<I PROPERTY="AdvectionType" VALUE="WeakDG3DHomogeneous1D" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
<I PROPERTY="USEFFT" VALUE="FFTW" />
</SOLVERINFO>
......
......@@ -63,12 +63,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="FRDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -63,12 +63,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="FRHU" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -63,12 +63,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="FRSD" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -907,12 +907,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="IsentropicVortex" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="IsentropicVortex" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -347,12 +347,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="RinglebFlow" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="RinglebFlow" />
</SOLVERINFO>
<VARIABLES>
......
......@@ -346,12 +346,11 @@
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="EQType" VALUE="RinglebFlow" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="ExactToro" />
<I PROPERTY="ProblemType" VALUE="RinglebFlow" />
</SOLVERINFO>
<VARIABLES>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment