Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
boundary_condition/MassflowBoundary.hpp
Go to the documentation of this file.
1 // Copyright (c) 2019 Maikel Nadolski
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 
21 #ifndef FUB_AMREX_MASSFLOW_BOUNDARY_HPP
22 #define FUB_AMREX_MASSFLOW_BOUNDARY_HPP
23 
25 #include "fub/Direction.hpp"
27 
28 #include <AMReX.H>
29 
30 namespace fub::amrex {
31 /// \ingroup BoundaryCondition
32 ///
36 
37  void Print(SeverityLogger& log) const;
38 
39  std::string channel_name{"MassflowBoundary"};
41  double required_massflow = 0.0;
42  double surface_area = 0.0;
44  int side = 0;
45 };
46 
47 /// \ingroup BoundaryCondition
48 ///
49 /// \brief This boundary models an inflow boundary with constant mean mass flow.
50 template <int Rank> class MassflowBoundary {
51 public:
53  const MassflowBoundaryOptions& options);
54 
55  void FillBoundary(::amrex::MultiFab& mf, const GriddingAlgorithm& grid,
56  int level);
57 
58  void FillBoundary(::amrex::MultiFab& mf, const GriddingAlgorithm& grid,
59  int level, Direction dir);
60 
61  void FillBoundary(::amrex::MultiFab& mf, const ::amrex::Geometry& geom,
62  const Complete<IdealGasMix<Rank>>& state);
63 
65  const Complete<IdealGasMix<Rank>>& inner);
66 
67 private:
70 };
71 
72 extern template class MassflowBoundary<1>;
73 extern template class MassflowBoundary<2>;
74 extern template class MassflowBoundary<3>;
75 
76 } // namespace fub::amrex
77 
78 #endif // !FUB_AMREX_MASSFLOW_BOUNDARY_HPP
This class modifies and initializes a PatchLevel in a PatchHierarchy.
Definition: AMReX/GriddingAlgorithm.hpp:60
This boundary models an inflow boundary with constant mean mass flow.
Definition: boundary_condition/MassflowBoundary.hpp:50
MassflowBoundary(const IdealGasMix< Rank > &eq, const MassflowBoundaryOptions &options)
void FillBoundary(::amrex::MultiFab &mf, const GriddingAlgorithm &grid, int level)
void FillBoundary(::amrex::MultiFab &mf, const ::amrex::Geometry &geom, const Complete< IdealGasMix< Rank >> &state)
IdealGasMix< Rank > equation_
Definition: boundary_condition/MassflowBoundary.hpp:68
void ComputeBoundaryState(Complete< IdealGasMix< Rank >> &boundary, const Complete< IdealGasMix< Rank >> &inner)
void FillBoundary(::amrex::MultiFab &mf, const GriddingAlgorithm &grid, int level, Direction dir)
MassflowBoundaryOptions options_
Definition: boundary_condition/MassflowBoundary.hpp:69
The amrex namespace.
Definition: AverageState.hpp:33
boost::log::sources::severity_logger< boost::log::trivial::severity_level > SeverityLogger
Definition: Log.hpp:46
Direction
This is a type safe type to denote a dimensional split direction.
Definition: Direction.hpp:30
IndexBox< Rank > Box(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:486
std::map< std::string, pybind11::object > ProgramOptions
Definition: ProgramOptions.hpp:40
This type has a constructor which takes an equation and might allocate any dynamically sized member v...
Definition: State.hpp:335
Definition: boundary_condition/MassflowBoundary.hpp:33
int side
Definition: boundary_condition/MassflowBoundary.hpp:44
MassflowBoundaryOptions(const ProgramOptions &options)
::amrex::Box coarse_inner_box
Definition: boundary_condition/MassflowBoundary.hpp:40
Direction dir
Definition: boundary_condition/MassflowBoundary.hpp:43
void Print(SeverityLogger &log) const
double required_massflow
Definition: boundary_condition/MassflowBoundary.hpp:41
double surface_area
Definition: boundary_condition/MassflowBoundary.hpp:42
std::string channel_name
Definition: boundary_condition/MassflowBoundary.hpp:39