Nektar++
EnforceEntropyVelocity.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: EnforceEntropyVelocity.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 velocity 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_ENFORCEENTROPYVELOCITY
40#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_BNDCOND_ENFORCEENTROPYVELOCITY
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
96 const Array<OneD, const Array<OneD, NekDouble>> &normals);
97
100
102 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
103 const Array<OneD, const Array<OneD, NekDouble>> &normals,
104 const Array<OneD, const Array<OneD, NekDouble>> &vecLocs,
105 Array<OneD, Array<OneD, NekDouble>> &outarray);
106
108 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
109 const Array<OneD, const Array<OneD, NekDouble>> &normals,
110 const Array<OneD, const Array<OneD, NekDouble>> &vecLocs,
111 Array<OneD, Array<OneD, NekDouble>> &outarray);
112
113private:
117 const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals,
118 const Array<OneD, Array<OneD, NekDouble>> &pGridVelocity,
119 const int pSpaceDim, const int bcRegion, const int cnt);
120
121 ~EnforceEntropyVelocity(void) override{};
122};
123
124} // namespace Nektar
125
126#endif
#define SOLVER_UTILS_EXPORT
Encapsulates the user-defined boundary conditions for compressible flow solver.
Definition: CFSBndCond.h:71
Outflow characteristic boundary conditions for compressible flow problems.
void FromToRotation(Array< OneD, const NekDouble > &from, Array< OneD, const NekDouble > &to, NekDouble *mat)
Array< OneD, NekDouble > m_VnInf
Reference normal velocity.
void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
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_rhoBC
void GenerateRotationMatrices(const Array< OneD, const Array< OneD, NekDouble > > &normals)
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)
EnforceEntropyVelocity(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)
Array< OneD, Array< OneD, NekDouble > > m_bndPhys
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, Array< OneD, NekDouble > > m_velBC
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