Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
cutcell/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_CUTCELL_MASSFLOW_BOUNDARY_HPP
22 #define FUB_AMREX_CUTCELL_MASSFLOW_BOUNDARY_HPP
23 
25 
26 #include "fub/Direction.hpp"
28 
29 #include <AMReX.H>
30 
31 namespace fub::amrex::cutcell {
32 /// \ingroup BoundaryCondition
33 ///
37 
38  std::string channel_name{"MassflowBoundary"};
40  double required_massflow = 0.0;
41  double surface_area = 0.0;
43  int side = 0;
44 };
45 
46 /// \ingroup BoundaryCondition
47 ///
49 public:
51  const MassflowBoundaryOptions& options);
52 
53  void FillBoundary(::amrex::MultiFab& mf, const GriddingAlgorithm& gridding,
54  int level);
55 
56  void FillBoundary(::amrex::MultiFab& mf, const GriddingAlgorithm& gridding,
57  int level, Direction dir) {
58  if (dir == options_.dir) {
59  FillBoundary(mf, gridding, level);
60  }
61  }
62 
63  void FillBoundary(::amrex::MultiFab& mf, const ::amrex::MultiFab& alphas,
64  const ::amrex::Geometry& geom,
66 
67 private:
70 };
71 
72 } // namespace fub::amrex::cutcell
73 
74 #endif // !FUB_AMREX_CUTCELL_ISENTROPIC_PRESSURE_BOUNDARY_HPP
This class modifies and initializes a cutcell::PatchLevel in a cutcell::PatchHierarchy.
Definition: AMReX/cutcell/GriddingAlgorithm.hpp:56
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:48
void FillBoundary(::amrex::MultiFab &mf, const ::amrex::MultiFab &alphas, const ::amrex::Geometry &geom, const Complete< IdealGasMix< AMREX_SPACEDIM >> &state)
void FillBoundary(::amrex::MultiFab &mf, const GriddingAlgorithm &gridding, int level, Direction dir)
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:56
MassflowBoundaryOptions options_
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:69
MassflowBoundary(const IdealGasMix< AMREX_SPACEDIM > &eq, const MassflowBoundaryOptions &options)
void FillBoundary(::amrex::MultiFab &mf, const GriddingAlgorithm &gridding, int level)
IdealGasMix< AMREX_SPACEDIM > equation_
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:68
Definition: FillCutCellData.hpp:30
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: cutcell/boundary_condition/MassflowBoundary.hpp:34
double required_massflow
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:40
double surface_area
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:41
std::string channel_name
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:38
::amrex::Box coarse_inner_box
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:39
int side
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:43
MassflowBoundaryOptions(const ProgramOptions &options)
Direction dir
Definition: cutcell/boundary_condition/MassflowBoundary.hpp:42