Nektar++
IdealGasEoS.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: IdealGasEoS.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 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Ideal gas equation of state
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_MISC_IDEALGASEOS
36 #define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_MISC_IDEALGASEOS
37 
38 #include "EquationOfState.h"
39 
40 
41 namespace Nektar
42 {
43 
44 /**
45 * @brief Ideal gas equation of state:
46  * p = rho * R * T
47 */
49 {
50  public:
51 
52  friend class MemoryManager<IdealGasEoS>;
53 
54  /// Creates an instance of this class
57  {
59  AllocateSharedPtr(pSession);
60  return p;
61  }
62 
63  ///Name of the class
64  static std::string className;
65 
66  protected:
67 
69  const NekDouble &rho, const NekDouble &e);
70 
71  virtual NekDouble v_GetPressure(
72  const NekDouble &rho, const NekDouble &e);
73 
74  virtual NekDouble v_GetSoundSpeed(
75  const NekDouble &rho, const NekDouble &e);
76 
77  virtual NekDouble v_GetEntropy(
78  const NekDouble &rho, const NekDouble &e);
79 
80  virtual NekDouble v_GetDPDrho_e(
81  const NekDouble &rho, const NekDouble &e);
82 
83  virtual NekDouble v_GetDPDe_rho(
84  const NekDouble &rho, const NekDouble &e);
85 
86  virtual NekDouble v_GetEFromRhoP(
87  const NekDouble &rho, const NekDouble &p);
88 
89  virtual NekDouble v_GetRhoFromPT(
90  const NekDouble &rho, const NekDouble &p);
91 
92  private:
94 
95  virtual ~IdealGasEoS(void){};
96 };
97 
98 }
99 
100 #endif
virtual NekDouble v_GetSoundSpeed(const NekDouble &rho, const NekDouble &e)
Definition: IdealGasEoS.cpp:68
virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e)
Definition: IdealGasEoS.cpp:89
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e)
Definition: IdealGasEoS.cpp:82
Encapsulates equations of state allowing us to obtain thermodynamic properties: most relations are in...
virtual NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e)
Definition: IdealGasEoS.cpp:75
virtual ~IdealGasEoS(void)
Definition: IdealGasEoS.h:95
static EquationOfStateSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
Definition: IdealGasEoS.h:55
Ideal gas equation of state: p = rho * R * T.
Definition: IdealGasEoS.h:48
virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p)
virtual NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e)
Definition: IdealGasEoS.cpp:55
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
double NekDouble
std::shared_ptr< EquationOfState > EquationOfStateSharedPtr
A shared pointer to an equation of state object.
virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p)
Definition: IdealGasEoS.cpp:96
IdealGasEoS(const LibUtilities::SessionReaderSharedPtr &pSession)
Definition: IdealGasEoS.cpp:49
virtual NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e)
Definition: IdealGasEoS.cpp:62
static std::string className
Name of the class.
Definition: IdealGasEoS.h:64
std::shared_ptr< SessionReader > SessionReaderSharedPtr