Nektar++
Loading...
Searching...
No Matches
BndCondRiemannInvariantCFEOp.hpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: BndCondRiemannInvariantCFEOp.hpp
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:
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#pragma once
36
37#include <SolverCore/BndCond/BndCondUpdateOp.hpp>
38
39namespace Nektar
40{
41
42/**
43 * @brief Characteristic farfield boundary from the Riemann invariants.
44 *
45 * The classical farfield condition. The two invariants
46 * \f$R^\pm = u_n \pm 2c/(\gamma-1)\f$ are each taken from whichever side
47 * they are carried from - the interior for a characteristic leaving the domain,
48 * the freestream for one entering - and the boundary normal velocity and sound
49 * speed follow from the pair,
50 *
51 * \f[ u_n^{BC} = \tfrac12 (R^+ + R^-), \qquad
52 * c^{BC} = \tfrac{\gamma-1}{4} (R^+ - R^-). \f]
53 *
54 * The remaining thermodynamic freedom is the entropy, and it comes from
55 * whichever side is upstream: the freestream on inflow, the interior on
56 * outflow. Density and pressure follow from it and the sound speed. The
57 * velocity is that side's velocity vector with its normal component corrected
58 * to \f$u_n^{BC}\f$, so the tangential components pass through.
59 *
60 * Supersonic reduces to the obvious thing without a special case: both
61 * invariants come from one side, so the reconstruction returns that side's
62 * state unchanged.
63 *
64 * ### Where the freestream comes from
65 *
66 * From the session *parameters* `rhoInf`, `pInf`, `uInf`, `vInf`, `wInf`, not
67 * from the region's boundary values. That is why this condition does not share
68 * the machinery of the entropy Riemann conditions, which take their prescribed
69 * state from the boundary values instead. The `VALUE` on such a region is
70 * therefore ignored, which is worth knowing before wondering why editing it
71 * changes nothing.
72 *
73 * Ideal gas only, for the same reason as the entropy conditions: the entropy
74 * relation \f$s = p/\rho^\gamma\f$ is the ideal gas one.
75 */
76template <typename TData>
77class BndCondRiemannInvariantCFEOp : public SolverCore::BndCondUpdateOp<TData>
78{
79public:
80 static std::shared_ptr<BndCondRiemannInvariantCFEOp<TData>> Create(
81 const MultiRegions::ExpListSharedPtr &expansionList,
82 const std::vector<std::string> &components,
83 const std::string &execStr = "")
84 {
86 BndCondRiemannInvariantCFEOp>(expansionList, components, execStr);
87 }
88
89 static inline const std::string name = "BndCondRiemannInvariantCFEOp";
90
91protected:
93 const MultiRegions::ExpListSharedPtr &expansionList,
94 const std::vector<std::string> &components)
95 : SolverCore::BndCondUpdateOp<TData>(expansionList, components)
96 {
97 }
98
99 ~BndCondRiemannInvariantCFEOp() override = default;
100};
101
102} // namespace Nektar
Characteristic farfield boundary from the Riemann invariants.
static std::shared_ptr< BndCondRiemannInvariantCFEOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="")
BndCondRiemannInvariantCFEOp(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
~BndCondRiemannInvariantCFEOp() override=default
Common base class of the operator family interfaces: holds the expansion list, component names and da...
Definition Operator.hpp:100
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.