Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EulerCFE.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File EulerCFE.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Euler equations in conservative variables without artificial diffusion
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_EULERCFE_H
37 #define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_EULERCFE_H
38 
40 
41 namespace Nektar
42 {
44  {
45  eGeneral, ///< No problem defined - Default Inital data
46  eIsentropicVortex, ///< Isentropic Vortex
47  eRinglebFlow, ///< Ringleb Flow
48  SIZE_ProblemType ///< Length of enum list
49  };
50 
51  const char* const ProblemTypeMap[] =
52  {
53  "General",
54  "IsentropicVortex",
55  "RinglebFlow"
56  };
57 
59  {
60  public:
61  friend class MemoryManager<EulerCFE>;
62 
63  /// Creates an instance of this class.
66  {
68  p->InitObject();
69  return p;
70  }
71  /// Name of class.
72  static std::string className;
73 
74  virtual ~EulerCFE();
75 
76  ///< problem type selector
78 
79  protected:
80 
82 
83  virtual void v_InitObject();
84 
85  /// Print a summary of time stepping parameters.
87 
88  void DoOdeRhs(
89  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
90  Array<OneD, Array<OneD, NekDouble> > &outarray,
91  const NekDouble time);
92  void DoOdeProjection(
93  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
94  Array<OneD, Array<OneD, NekDouble> > &outarray,
95  const NekDouble time);
96  virtual void v_SetInitialConditions(
97  NekDouble initialtime = 0.0,
98  bool dumpInitialConditions = true,
99  const int domain = 0);
100 
101  virtual void v_EvaluateExactSolution(
102  unsigned int field,
103  Array<OneD, NekDouble> &outfield,
104  const NekDouble time = 0.0);
105 
106  private:
108  Array<OneD, Array<OneD, NekDouble> > &physarray, NekDouble time);
109  /// Isentropic Vortex Test Case.
111  const Array<OneD, NekDouble> &x,
112  const Array<OneD, NekDouble> &y,
113  const Array<OneD, NekDouble> &z,
115  NekDouble time,
116  const int o = 0);
118  int field,
119  Array<OneD, NekDouble> &outarray,
120  NekDouble time);
122  NekDouble initialtime);
124  int bcRegion,
125  NekDouble time,
126  int cnt, Array<OneD, Array<OneD, NekDouble> > &physarray);
127 
128  /// Ringleb Flow Test Case.
129  void GetExactRinglebFlow(
130  int field,
131  Array<OneD, NekDouble> &outarray);
133  void);
135  int bcRegion,
136  NekDouble time,
137  int cnt,
138  Array<OneD, Array<OneD, NekDouble> > &physarray);
139  };
140 }
141 #endif
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
Definition: EulerCFE.h:64
virtual void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
Set the initial conditions.
Definition: EulerCFE.cpp:113
No problem defined - Default Inital data.
Definition: EulerADCFE.h:46
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
Definition: EulerCFE.cpp:104
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::string className
Name of class.
Definition: EulerCFE.h:72
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
void SetInitialIsentropicVortex(NekDouble initialtime)
Set the initial condition for the isentropic vortex problem.
Definition: EulerCFE.cpp:360
EulerCFE(const LibUtilities::SessionReaderSharedPtr &pSession)
Definition: EulerCFE.cpp:54
Ringleb Flow.
Definition: EulerCFE.h:47
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.
Definition: EulerCFE.cpp:290
void SetInitialRinglebFlow(void)
Set the initial condition for the Ringleb flow problem.
Definition: EulerCFE.cpp:591
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
virtual ~EulerCFE()
problem type selector
Definition: EulerCFE.cpp:97
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection and call the method for imposing the boundary conditions in case of discontinu...
Definition: EulerCFE.cpp:175
void SetBoundaryRinglebFlow(int bcRegion, NekDouble time, int cnt, Array< OneD, Array< OneD, NekDouble > > &physarray)
Set the boundary conditions for the Ringleb flow problem.
Definition: EulerCFE.cpp:835
double NekDouble
Length of enum list.
Definition: EulerADCFE.h:47
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the right-hand side.
Definition: EulerCFE.cpp:144
void GetExactIsentropicVortex(int field, Array< OneD, NekDouble > &outarray, NekDouble time)
Compute the exact solution for the isentropic vortex problem.
Definition: EulerCFE.cpp:334
void GetExactRinglebFlow(int field, Array< OneD, NekDouble > &outarray)
Ringleb Flow Test Case.
Definition: EulerCFE.cpp:440
Isentropic Vortex.
Definition: EulerCFE.h:46
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.
Definition: EulerCFE.cpp:265
ProblemType m_problemType
Definition: EulerCFE.h:77
virtual void v_InitObject()
Initialization object for CompressibleFlowSystem class.
Definition: EulerCFE.cpp:60
ProblemType
Definition: EulerADCFE.h:44
void SetBoundaryConditions(Array< OneD, Array< OneD, NekDouble > > &physarray, NekDouble time)
Set boundary conditions which can be: a) Wall and Symmerty BCs implemented at CompressibleFlowSystem ...
Definition: EulerCFE.cpp:220
void SetBoundaryIsentropicVortex(int bcRegion, NekDouble time, int cnt, Array< OneD, Array< OneD, NekDouble > > &physarray)
Set the boundary conditions for the isentropic vortex problem.
Definition: EulerCFE.cpp:390
const char *const ProblemTypeMap[]
Definition: EulerADCFE.h:50