1 #ifndef ABLATELIBRARY_TCHEM_SOURCECALCULATOR_HPP
2 #define ABLATELIBRARY_TCHEM_SOURCECALCULATOR_HPP
4 #include <TChem_KineticModelGasConstData.hpp>
5 #include "eos/chemistryModel.hpp"
7 namespace tChemLib = TChem;
9 namespace ablate::eos {
13 namespace ablate::eos::tChem {
27 double dtMin = 1.0E-12;
28 double dtMax = 1.0E-1;
29 double dtDefault = 1E-4;
30 double dtEstimateFactor = 1.5;
31 double relToleranceTime = 1.0E-4;
32 double absToleranceTime = 1.0E-8;
33 double relToleranceNewton = 1.0E-6;
34 double absToleranceNewton = 1.0E-10;
36 int maxNumNewtonIterations = 100;
37 int numTimeIterationsPerInterval = 100000;
38 int jacobianInterval = 1;
42 ReactorType reactorType = ReactorType::ConstantPressure;
45 double thresholdTemperature = 0.0;
47 void Set(
const std::shared_ptr<ablate::parameters::Parameters>&);
80 std::shared_ptr<eos::TChem> eos;
81 const size_t numberSpecies;
90 real_type_2d_view stateDevice;
91 real_type_2d_view_host stateHost;
94 real_type_2d_view endStateDevice;
97 time_advance_type_1d_view timeAdvanceDevice;
98 time_advance_type timeAdvanceDefault{};
101 real_type_1d_view internalEnergyRefDevice;
102 real_type_1d_view_host internalEnergyRefHost;
103 real_type_2d_view perSpeciesScratchDevice;
106 real_type_2d_view_host sourceTermsHost;
107 real_type_2d_view sourceTermsDevice;
110 real_type_2d_view tolTimeDevice;
111 real_type_1d_view tolNewtonDevice;
112 real_type_2d_view facDevice;
115 real_type_1d_view timeViewDevice;
116 real_type_1d_view dtViewDevice;
119 static inline constexpr
bool solveTla =
false;
120 static inline constexpr real_type thetaTla = 0;
123 tChemLib::KineticModelConstData<typename Tines::UseThisDevice<exec_space>::type> kineticModelGasConstDataDevice;
124 kmd_type_1d_view_host kineticModelDataClone;
125 Kokkos::View<KineticModelGasConstData<typename Tines::UseThisDevice<exec_space>::type>*,
typename Tines::UseThisDevice<exec_space>::type> kineticModelGasConstDataDevices;
Definition: chemistryModel.hpp:30
Definition: sourceCalculator.hpp:18
void ComputeSource(const ablate::domain::Range &cellRange, PetscReal time, PetscReal dt, Vec globalSolution) override
Definition: sourceCalculator.cpp:120
void AddSource(const ablate::domain::Range &cellRange, Vec localXVec, Vec localFVec) override
Definition: sourceCalculator.cpp:404
SourceCalculator(const std::vector< domain::Field > &fields, std::shared_ptr< TChem > tChemEos, ChemistryConstraints constraints, const ablate::domain::Range &cellRange)
Definition: sourceCalculator.cpp:31
ReactorType
Definition: sourceCalculator.hpp:23
Definition: loggable.hpp:9
hold a struct that can be used for chemistry constraints
Definition: sourceCalculator.hpp:26