Nektar++
EnforceEntropyTotalEnthalpy.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: EnforceEntropyTotalEnthalpy.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 total enthalpy at the inflow boundary;
34// Enforce the Riemann invariant at the outflow boundary.
35// The input can be either VALUE or FILE.
36//
37///////////////////////////////////////////////////////////////////////////////
38
39#ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_BNDCOND_ENFORCEENTROPYTOTALENTHALPY
40#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_BNDCOND_ENFORCEENTROPYTOTALENTHALPY
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 int pSpaceDim, const int bcRegion, const int cnt)
62 {
65 pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt);
66 return p;
67 }
68
69 /// Name of the class
70 static std::string className;
71
72protected:
73 int m_npts;
74 // Reference rho on boundary
76 // Reference Velocity on BC
78 // Reference pressure on boundary
80 /// Reference normal velocity
82 // Mapping from boundary to Trace values
84
85 // Arrays of arrays pointing to the boundary condition physical
86 // space for the specified region.
88
91 const NekDouble &time) override;
92
94 const Array<OneD, const Array<OneD, NekDouble>> &normals);
95
98
100 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
101 const Array<OneD, const Array<OneD, NekDouble>> &normals,
102 const Array<OneD, const Array<OneD, NekDouble>> &vecLocs,
103 Array<OneD, Array<OneD, NekDouble>> &outarray);
104
106 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
107 const Array<OneD, const Array<OneD, NekDouble>> &normals,
108 const Array<OneD, const Array<OneD, NekDouble>> &vecLocs,
109 Array<OneD, Array<OneD, NekDouble>> &outarray);
110
111private:
115 const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals,
116 const int pSpaceDim, const int bcRegion, const int cnt);
117
119};
120
121} // namespace Nektar
122
123#endif
#define SOLVER_UTILS_EXPORT
Encapsulates the user-defined boundary conditions for compressible flow solver.
Definition: CFSBndCond.h:70
Outflow characteristic boundary conditions for compressible flow problems.
Array< OneD, Array< OneD, NekDouble > > m_bndPhys
void GenerateRotationMatrices(const Array< OneD, const Array< OneD, NekDouble > > &normals)
SOLVER_UTILS_EXPORT void rotateFromNormal(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
Array< OneD, NekDouble > m_VnInf
Reference normal velocity.
EnforceEntropyTotalEnthalpy(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt)
void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
static CFSBndCondSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt)
Creates an instance of this class.
void FromToRotation(Array< OneD, const NekDouble > &from, Array< OneD, const NekDouble > &to, NekDouble *mat)
Array< OneD, Array< OneD, NekDouble > > m_velBC
SOLVER_UTILS_EXPORT void rotateToNormal(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
static std::string className
Name of the class.
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:51
double NekDouble