Finite Volume Solver
prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
include
fub
equations
perfect_gas_mix
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
25
#include "
fub/AMReX/IntegratorContext.hpp
"
26
#include "
fub/TimeStepError.hpp
"
27
#include "
fub/equations/PerfectGasMix.hpp
"
28
#include "
fub/ext/omp.hpp
"
29
#include "
fub/ext/outcome.hpp
"
30
31
#include <cmath>
32
#include <memory>
33
34
namespace
fub::perfect_gas_mix
{
35
36
struct
ArrheniusKineticsOptions
{
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
55
ArrheniusKinetics
(
const
PerfectGasMix<Rank>
& eq);
56
57
Duration
ComputeStableDt
(
int
level);
58
59
Result<void, TimeStepTooLarge>
60
AdvanceLevel
(
amrex::IntegratorContext
& simulation_data,
int
level,
61
Duration
dt,
62
const ::amrex::IntVect& ngrow = ::amrex::IntVect(0));
63
64
ArrheniusKineticsOptions
options
;
65
66
private
:
67
OmpLocal<PerfectGasMix<Rank>
>
equation_
;
68
OmpLocal<CompleteArray<PerfectGasMix<Rank>
>>
state_
;
69
OmpLocal<KineticStateArray<PerfectGasMix<Rank>
>>
kinetic_state_
;
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
IntegratorContext.hpp
PerfectGasMix.hpp
TimeStepError.hpp
fub::OmpLocal
Definition:
omp.hpp:42
fub::amrex::IntegratorContext
This class is used by the HypebrolicSplitLevelIntegrator and delegates AMR related tasks to the AMReX...
Definition:
AMReX/IntegratorContext.hpp:49
fub::perfect_gas_mix::ArrheniusKinetics
Definition:
ArrheniusKinetics.hpp:50
fub::perfect_gas_mix::ArrheniusKinetics::ArrheniusKinetics
ArrheniusKinetics(const PerfectGasMix< Rank > &eq)
fub::perfect_gas_mix::ArrheniusKinetics::ComputeStableDt
Duration ComputeStableDt(int level)
fub::perfect_gas_mix::ArrheniusKinetics::sRank
static constexpr std::size_t sRank
Definition:
ArrheniusKinetics.hpp:53
fub::perfect_gas_mix::ArrheniusKinetics::Rank
static constexpr int Rank
Definition:
ArrheniusKinetics.hpp:52
fub::perfect_gas_mix::ArrheniusKinetics::kinetic_state_
OmpLocal< KineticStateArray< PerfectGasMix< Rank > > > kinetic_state_
Definition:
ArrheniusKinetics.hpp:69
fub::perfect_gas_mix::ArrheniusKinetics::AdvanceLevel
Result< void, TimeStepTooLarge > AdvanceLevel(amrex::IntegratorContext &simulation_data, int level, Duration dt, const ::amrex::IntVect &ngrow=::amrex::IntVect(0))
fub::perfect_gas_mix::ArrheniusKinetics::options
ArrheniusKineticsOptions options
Definition:
ArrheniusKinetics.hpp:64
fub::perfect_gas_mix::ArrheniusKinetics::state_
OmpLocal< CompleteArray< PerfectGasMix< Rank > > > state_
Definition:
ArrheniusKinetics.hpp:68
fub::perfect_gas_mix::ArrheniusKinetics::equation_
OmpLocal< PerfectGasMix< Rank > > equation_
Definition:
ArrheniusKinetics.hpp:67
fub::perfect_gas_mix
Definition:
ArrheniusKinetics.hpp:34
fub::Duration
std::chrono::duration< double > Duration
Definition:
Duration.hpp:31
fub::Result
boost::outcome_v2::result< T, E > Result
Definition:
outcome.hpp:32
omp.hpp
outcome.hpp
fub::PerfectGasMix
Definition:
PerfectGasMix.hpp:208
fub::perfect_gas_mix::ArrheniusKineticsOptions
Definition:
ArrheniusKinetics.hpp:36
fub::perfect_gas_mix::ArrheniusKineticsOptions::T_switch
double T_switch
Definition:
ArrheniusKinetics.hpp:46
fub::perfect_gas_mix::ArrheniusKineticsOptions::EA
double EA
Definition:
ArrheniusKinetics.hpp:43
fub::perfect_gas_mix::ArrheniusKineticsOptions::Q
double Q
Definition:
ArrheniusKinetics.hpp:42
fub::perfect_gas_mix::ArrheniusKineticsOptions::B
double B
Definition:
ArrheniusKinetics.hpp:44
Generated on Fri Feb 12 2021 07:45:54 for Finite Volume Solver by
1.9.1