diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C index ae637ef88f..e9ff0b4c4e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C @@ -867,7 +867,14 @@ Foam::scalar Foam::chemistryModel::solve Rphiq[Rphiq.size()-2] = p; Rphiq[Rphiq.size()-1] = deltaT[celli]; - tabulation_.add(phiq, Rphiq, celli, rho0, deltaT[celli]); + tabulation_.add + ( + phiq, + Rphiq, + mechRed_.nActiveSpecies(), + celli, + deltaT[celli] + ); } // When operations are done and if mechanism reduction is active, diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H index 0c09e576cd..d18c1ef10c 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H @@ -330,9 +330,8 @@ public: // Mechanism reduction access functions - //- Return access to the mechanism reduction method - // Needed by ISAT - inline const chemistryReductionMethod& mechRed() const; + //- Return true if mechanism reduction is active + inline bool reduction() const; //- Allow the reduction method to reset the number of species inline void setNSpecie(const label newNs); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H index 61e5c58b93..2c1523c387 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,10 +119,9 @@ Foam::chemistryModel::Y() const template -inline const Foam::chemistryReductionMethod& -Foam::chemistryModel::mechRed() const +inline bool Foam::chemistryModel::reduction() const { - return mechRed_; + return mechRedActive_; } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C index 460506337a..9a9e518d62 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C @@ -43,6 +43,7 @@ Foam::chemistryTabulationMethods::ISAT::ISAT coeffsDict_(chemistryProperties.subDict("tabulation")), chemistry_(chemistry), log_(coeffsDict_.lookupOrDefault("log", false)), + reduction_(chemistry_.reduction()), chemisTree_(*this, coeffsDict_), scaleFactor_(chemistry.nEqns() + 1, 1), runTime_(chemistry.time()), @@ -198,7 +199,6 @@ void Foam::chemistryTabulationMethods::ISAT::calcNewC ) { const label nEqns = chemistry_.nEqns(); // Species, T, p - const bool mechRedActive = chemistry_.mechRed().active(); const List