1 #ifndef ABLATELIBRARY_MIXTUREFRACTIONCALCULATOR_HPP
2 #define ABLATELIBRARY_MIXTUREFRACTIONCALCULATOR_HPP
8 #include "eos/tChem.hpp"
9 #include "mathFunctions/fieldFunction.hpp"
21 const std::shared_ptr<ablate::eos::ChemistryModel> eos;
24 const std::vector<std::string> trackingElements;
27 double zMixFuel, zMixOxidizer;
30 std::vector<double> zMixCoefficients;
38 static std::map<std::string, double> ToMassFractionMap(
const std::shared_ptr<ablate::eos::EOS>& eos,
const std::shared_ptr<ablate::mathFunctions::FieldFunction>& massFractions);
48 MixtureFractionCalculator(
const std::shared_ptr<ablate::eos::EOS>& eos, std::map<std::string, double> massFractionsFuel, std::map<std::string, double> massFractionsOxidizer,
49 const std::vector<std::string>& trackingElements = {});
59 MixtureFractionCalculator(
const std::shared_ptr<ablate::eos::EOS>& eos,
const std::shared_ptr<ablate::mathFunctions::FieldFunction>& massFractionsFuel,
60 const std::shared_ptr<ablate::mathFunctions::FieldFunction>& massFractionsOxidizer,
const std::vector<std::string>& trackingElements = {});
70 for (std::size_t s = 0; s < zMixCoefficients.size(); s++) {
71 zMix += zMixCoefficients[s] * yi[s];
73 return (zMix - zMixOxidizer) / (zMixFuel - zMixOxidizer);
80 std::shared_ptr<ablate::eos::ChemistryModel>
GetEos() {
return eos; }
Definition: mixtureFractionCalculator.hpp:18
MixtureFractionCalculator(const std::shared_ptr< ablate::eos::EOS > &eos, std::map< std::string, double > massFractionsFuel, std::map< std::string, double > massFractionsOxidizer, const std::vector< std::string > &trackingElements={})
Definition: mixtureFractionCalculator.cpp:4
std::shared_ptr< ablate::eos::ChemistryModel > GetEos()
Definition: mixtureFractionCalculator.hpp:80
T Calculate(T *yi) const
Definition: mixtureFractionCalculator.hpp:68
Definition: boundarySolverMonitor.hpp:16