Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
APE.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File APE.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2015 Kilian Lackhove
10 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
11 // Department of Aeronautics, Imperial College London (UK), and Scientific
12 // Computing and Imaging Institute, University of Utah (USA).
13 //
14 // License for the specific language governing rights and limitations under
15 // Permission is hereby granted, free of charge, to any person obtaining a
16 // copy of this software and associated documentation files (the "Software"),
17 // to deal in the Software without restriction, including without limitation
18 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 // and/or sell copies of the Software, and to permit persons to whom the
20 // Software is furnished to do so, subject to the following conditions:
21 //
22 // The above copyright notice and this permission notice shall be included
23 // in all copies or substantial portions of the Software.
24 //
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 // DEALINGS IN THE SOFTWARE.
32 //
33 // Description: APE1/APE4 (Acoustic Perturbation Equations)
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef NEKTAR_SOLVERS_APESOLVER_EQUATIONSYSTEMS_APE_H
38 #define NEKTAR_SOLVERS_APESOLVER_EQUATIONSYSTEMS_APE_H
39 
44 
45 using namespace Nektar::SolverUtils;
46 
47 namespace Nektar
48 {
49 
50 class APE : public UnsteadySystem
51 {
52  public:
53 
54  friend class MemoryManager<APE>;
55 
56  /// Creates an instance of this class
59  {
61  p->InitObject();
62  return p;
63  }
64  /// Name of class
65  static std::string className;
66 
67  /// Destructor
68  virtual ~APE();
69 
70  NekDouble GetCFLEstimate();
71 
72 
73  protected:
74 
76  std::vector<SolverUtils::ForcingSharedPtr> m_forcing;
80  /// Isentropic coefficient, Ratio of specific heats (APE)
84  std::vector<std::string> m_bfNames;
85  /// dump cfl estimate
87 
88  /// Initialises UnsteadySystem class members.
90 
91  virtual void v_InitObject();
92 
93  void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble> > &inarray,
94  Array<OneD, Array<OneD, NekDouble> > &outarray,
95  const NekDouble time);
96 
97  void DoOdeProjection(const Array<OneD, const Array<OneD, NekDouble> > &inarray,
98  Array<OneD, Array<OneD, NekDouble> > &outarray,
99  const NekDouble time);
100 
101  void GetFluxVector(
102  const Array<OneD, Array<OneD, NekDouble> > &physfield,
104 
105  virtual bool v_PreIntegrate(int step);
106 
107  virtual bool v_PostIntegrate(int step);
108 
109  void GetStdVelocity(Array< OneD, NekDouble >& stdV);
110 
111  virtual void v_ExtraFldOutput(std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
112  std::vector<std::string> &variables);
113 
114  const Array<OneD, const Array<OneD, NekDouble> > &GetNormals();
115 
116  const Array<OneD, const Array<OneD, NekDouble> > &GetVecLocs();
117 
118  const Array<OneD, const Array<OneD, NekDouble> > &GetBasefield();
119 
120  NekDouble GetGamma();
121 
122  private:
123 
124  void SetBoundaryConditions(Array<OneD, Array<OneD, NekDouble> > &physarray, NekDouble time);
125 
126  void WallBC(int bcRegion, int cnt, Array<OneD, Array<OneD, NekDouble> > &Fwd, Array<OneD, Array<OneD, NekDouble> > &physarray);
127 };
128 }
129 
130 #endif
131 
SolverUtils::AdvectionSharedPtr m_advection
Definition: APE.h:75
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
MultiRegions::ExpListSharedPtr m_bfField
Definition: APE.h:83
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
Array< OneD, Array< OneD, NekDouble > > m_vecLocs
Definition: APE.h:79
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
Definition: APE.h:57
boost::shared_ptr< Advection > AdvectionSharedPtr
A shared pointer to an Advection object.
Definition: Advection.h:165
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
Definition: APE.h:76
boost::shared_ptr< RiemannSolver > RiemannSolverSharedPtr
A shared pointer to an EquationSystem object.
Wall boundary conditions for compressible flow problems.
Definition: WallBC.h:48
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
Array< OneD, Array< OneD, NekDouble > > m_traceBasefield
Definition: APE.h:78
Base class for unsteady solvers.
int m_cflsteps
dump cfl estimate
Definition: APE.h:86
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
static std::string className
Name of class.
Definition: APE.h:65
double NekDouble
NekDouble m_gamma
Isentropic coefficient, Ratio of specific heats (APE)
Definition: APE.h:81
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
Definition: APE.h:77
Array< OneD, Array< OneD, NekDouble > > m_bf
Definition: APE.h:82
std::vector< std::string > m_bfNames
Definition: APE.h:84