Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
tfles.h
Go to the documentation of this file.
1
13#ifndef TFLES_H
14#define TFLES_H
15
16#include <Kokkos_Core.hpp>
17#include <toml.hpp>
18
19#include "common.h"
20#include "log.h"
21
32 double delta_L = 0.0; // laminar thermal thickness (m)
33 double s_L = 0.0; // laminar flame speed (m/s)
34 double T_u = 0.0, T_b = 0.0;
35 double n_res = 5.0;
36 double beta = 0.5;
37 bool efficiency = true;
38 bool eddy_viscosity_velocity = false; // u' = C_u nu_t / Delta instead of Colin et al.'s operator
39 double C_u = 28.0;
40
41 static constexpr double C_SENSOR = 0.05; // progress variable at which Omega reaches 1
42 static constexpr double C_K = 1.5; // Kolmogorov constant of the efficiency function
43
45 static ThickenedFlame from_input(const toml::value & table);
46
47 logging::Items summary() const;
48
51 double sensor(const double T) const {
52 const double c = Kokkos::fmin(1.0, Kokkos::fmax(0.0, (T - T_u) / (T_b - T_u)));
53 return Kokkos::fmin(1.0, c * (1.0 - c) / (C_SENSOR * (1.0 - C_SENSOR)));
54 }
55
58 double thickening(const double delta, const double omega) const {
59 const double F_max = Kokkos::fmax(1.0, n_res * delta / delta_L);
60 return 1.0 + (F_max - 1.0) * omega;
61 }
62
70 double wrinkling(const double F, const double u_prime, const double nu) const {
71 if (!efficiency || !(F > 1.0) || !(u_prime > 0.0)) return 1.0;
72 const double pi43 = Kokkos::pow(Kokkos::numbers::pi, 4.0 / 3.0);
73 const double r = u_prime / s_L;
74 const double re = u_prime * F * delta_L / nu;
75 const double f_u = 4.0 * Kokkos::sqrt(27.0 * C_K / 110.0) * (18.0 * C_K / 55.0) * r * r;
76 const double f_d = Kokkos::sqrt(27.0 * C_K * pi43 / 110.0 * (Kokkos::pow(F, 4.0 / 3.0) - 1.0));
77 const double f_re = Kokkos::sqrt(9.0 / 55.0 * Kokkos::exp(-1.5 * C_K * pi43 / re)) * Kokkos::sqrt(re);
78 const double a = 0.6 + 0.2 * Kokkos::exp(-0.1 * r) - 0.2 * Kokkos::exp(-0.01 * F);
79 const double b = 1.4;
80 const double inner = Kokkos::pow(Kokkos::pow(f_u, -a) + Kokkos::pow(f_d, -a), -1.0 / a);
81 const double gamma = Kokkos::pow(Kokkos::pow(inner, -b) + Kokkos::pow(f_re, -b), -1.0 / b);
82 return Kokkos::pow(1.0 + Kokkos::fmin(F - 1.0, gamma * r), beta);
83 }
84};
85
86#endif // TFLES_H
Common header file.
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
Console output: rank-0 info lines, aligned sections and tables, warnings and errors on stderr,...
std::vector< std::pair< std::string, std::string > > Items
Key-value lines of a setup section, in display order.
Definition log.h:27
Thickening F, efficiency E and flame sensor Omega of a cell. The flame is thickened by F where Omega ...
Definition tfles.h:31
static constexpr double C_K
Definition tfles.h:42
double s_L
Definition tfles.h:33
static constexpr double C_SENSOR
Definition tfles.h:41
double T_u
Definition tfles.h:34
KOKKOS_INLINE_FUNCTION double thickening(const double delta, const double omega) const
Thickening of a cell of filter width delta with sensor omega.
Definition tfles.h:58
double delta_L
Definition tfles.h:32
double T_b
Definition tfles.h:34
bool efficiency
Definition tfles.h:37
KOKKOS_INLINE_FUNCTION double sensor(const double T) const
Flame sensor: 1 inside the flame (preheat zone included), 0 in fresh and burnt gas.
Definition tfles.h:51
double C_u
Definition tfles.h:39
static ThickenedFlame from_input(const toml::value &table)
[les.combustion] of an input with one.
Definition tfles.cpp:16
double n_res
Definition tfles.h:35
KOKKOS_INLINE_FUNCTION double wrinkling(const double F, const double u_prime, const double nu) const
Charlette efficiency (1 + min[F - 1, Gamma u' / s_L])^beta for the SGS velocity u_prime at the filter...
Definition tfles.h:70
double beta
Definition tfles.h:36
bool eddy_viscosity_velocity
Definition tfles.h:38
logging::Items summary() const
Definition tfles.cpp:45
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810
uint8_t r
Definition teno_setup.cpp:687
std::vector< double > delta
Definition transport.cpp:285