Nektar++
Loading...
Searching...
No Matches
EnforceEntropyPressure.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: EnforceEntropyPressure.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: Modified Riemann invariant boundary condition.
33// Enforce the entropy and pressure at the inflow boundary;
34// Enforce the pressure at the outflow boundary.
35// The input can be either VALUE or FILE.
36//
37///////////////////////////////////////////////////////////////////////////////
38
39#ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_BNDCOND_ENFORCEENTROPYPRESSURE
40#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_BNDCOND_ENFORCEENTROPYPRESSURE
41
42#include "CFSBndCond.h"
43
44namespace Nektar
45{
46
47/**
48 * @brief Outflow characteristic boundary conditions for compressible
49 * flow problems.
50 */
52{
53public:
55
56 /// Creates an instance of this class
60 const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals,
61 const Array<OneD, Array<OneD, NekDouble>> &pGridVelocity,
62 const int pSpaceDim, const int bcRegion, const int cnt)
63 {
66 pSession, pFields, pTraceNormals, pGridVelocity, pSpaceDim,
67 bcRegion, cnt);
68 return p;
69 }
70
71 /// Name of the class
72 static std::string className;
73
74protected:
75 int m_npts;
76 // Reference rho on boundary
78 // Reference Velocity on BC
80 // Reference pressure on boundary
82 /// Reference normal velocity
84 // Mapping from boundary to Trace values
86
87 // Arrays of arrays pointing to the boundary condition physical
88 // space for the specified region.
90
93 const NekDouble &time) override;
94
95private:
99 const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals,
100 const Array<OneD, Array<OneD, NekDouble>> &pGridVelocity,
101 const int pSpaceDim, const int bcRegion, const int cnt);
102
103 ~EnforceEntropyPressure(void) override = default;
104};
105
106} // namespace Nektar
107
108#endif
Encapsulates the user-defined boundary conditions for compressible flow solver.
Definition CFSBndCond.h:72
Outflow characteristic boundary conditions for compressible flow problems.
static std::string className
Name of the class.
void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
Array< OneD, Array< OneD, NekDouble > > m_velBC
static CFSBndCondSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
Creates an instance of this class.
Array< OneD, NekDouble > m_VnInf
Reference normal velocity.
Array< OneD, Array< OneD, NekDouble > > m_bndPhys
~EnforceEntropyPressure(void) override=default
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< CFSBndCond > CFSBndCondSharedPtr
A shared pointer to a boundary condition object.
Definition CFSBndCond.h:52