Loading [MathJax]/extensions/tex2jax.js
Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ArrheniusKinetics.hpp
Go to the documentation of this file.
1 // Copyright (c) 2020 Maikel Nadolski
2 // Copyright (c) 2020 Christian Zenker
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining a copy
5 // of this software and associated documentation files (the "Software"), to deal
6 // in the Software without restriction, including without limitation the rights
7 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 // copies of the Software, and to permit persons to whom the Software is
9 // furnished to do so, subject to the following conditions:
10 //
11 // The above copyright notice and this permission notice shall be included in
12 // all copies or substantial portions of the Software.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 // SOFTWARE.
21 
22 #ifndef FUB_PERFECT_GAS_MIX_ARRHENIUS_KINETICS_HPP
23 #define FUB_PERFECT_GAS_MIX_ARRHENIUS_KINETICS_HPP
24 
26 #include "fub/TimeStepError.hpp"
28 #include "fub/ext/omp.hpp"
29 #include "fub/ext/outcome.hpp"
30 
31 #include <cmath>
32 #include <memory>
33 
35 
37  /* dimensionless thermochemical parameters */
38  /* think of T1 as compressor exit temperature */
39  // default values taken from SEC_C/SEC_C/Input/userdata_Combustion.c
40 
41  // Test
42  double Q{3.0 / 0.4}; // heat of reaction
43  double EA{10.0}; // activation energy
44  double B{0.05 / 1.25}; // coefficient of reaction
45  /* Reference: 0.11/1.25; 0.05/1.25 */
46  double T_switch{1.05}; // switch temperature
47 };
48 
49 /// \ingroup LevelIntegrator
50 template <int R> class ArrheniusKinetics {
51 public:
52  static constexpr int Rank = R;
53  static constexpr std::size_t sRank = static_cast<std::size_t>(Rank);
54 
56 
58 
60  AdvanceLevel(amrex::IntegratorContext& simulation_data, int level,
61  Duration dt,
62  const ::amrex::IntVect& ngrow = ::amrex::IntVect(0));
63 
65 
66 private:
70 };
71 
72 extern template class ArrheniusKinetics<1>;
73 extern template class ArrheniusKinetics<2>;
74 extern template class ArrheniusKinetics<3>;
75 
76 } // namespace fub::perfect_gas_mix
77 
78 #endif
Definition: omp.hpp:42
This class is used by the HypebrolicSplitLevelIntegrator and delegates AMR related tasks to the AMReX...
Definition: AMReX/IntegratorContext.hpp:49
Definition: ArrheniusKinetics.hpp:50
ArrheniusKinetics(const PerfectGasMix< Rank > &eq)
static constexpr std::size_t sRank
Definition: ArrheniusKinetics.hpp:53
static constexpr int Rank
Definition: ArrheniusKinetics.hpp:52
OmpLocal< KineticStateArray< PerfectGasMix< Rank > > > kinetic_state_
Definition: ArrheniusKinetics.hpp:69
Result< void, TimeStepTooLarge > AdvanceLevel(amrex::IntegratorContext &simulation_data, int level, Duration dt, const ::amrex::IntVect &ngrow=::amrex::IntVect(0))
ArrheniusKineticsOptions options
Definition: ArrheniusKinetics.hpp:64
OmpLocal< CompleteArray< PerfectGasMix< Rank > > > state_
Definition: ArrheniusKinetics.hpp:68
OmpLocal< PerfectGasMix< Rank > > equation_
Definition: ArrheniusKinetics.hpp:67
Definition: ArrheniusKinetics.hpp:34
std::chrono::duration< double > Duration
Definition: Duration.hpp:31
boost::outcome_v2::result< T, E > Result
Definition: outcome.hpp:32
Definition: PerfectGasMix.hpp:208
Definition: ArrheniusKinetics.hpp:36
double T_switch
Definition: ArrheniusKinetics.hpp:46
double EA
Definition: ArrheniusKinetics.hpp:43
double Q
Definition: ArrheniusKinetics.hpp:42
double B
Definition: ArrheniusKinetics.hpp:44