From 8fd9f5758c2d24f2159252da0fedaf3751b263a2 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 13 Sep 2021 12:17:40 +0100 Subject: [PATCH] chemistryModel: new general chemistry solver created by merging standardChemistryModel and TDACChemistryModel To simplify maintenance and further development of chemistry solution the standardChemistryModel and TDACChemistryModel have been merged into the single chemistryModel class. Now the TDAC mechanism reduction and tabulation components can be individually selected or set to "none" or the corresponding entries in the chemistryProperties dictionary omitted to switch them off thus reproducing the behaviour of the standardChemistryModel. For example the following chemistryProperties includes TDAC: #includeEtc "caseDicts/solvers/chemistry/TDAC/chemistryProperties.cfg" chemistryType { solver ode; } chemistry on; initialChemicalTimeStep 1e-7; odeCoeffs { solver seulex; absTol 1e-8; relTol 1e-1; } reduction { tolerance 1e-4; } tabulation { tolerance 3e-3; } #include "reactionsGRI" and to run without TDAC the following is sufficient: chemistryType { solver ode; } chemistry on; initialChemicalTimeStep 1e-7; odeCoeffs { solver seulex; absTol 1e-8; relTol 1e-1; } #include "reactionsGRI" or the "reduction" and "tabulation" entries can be disabled explicitly: #includeEtc "caseDicts/solvers/chemistry/TDAC/chemistryProperties.cfg" chemistryType { solver ode; } chemistry on; initialChemicalTimeStep 1e-7; odeCoeffs { solver seulex; absTol 1e-8; relTol 1e-1; } reduction { method none; tolerance 1e-4; } tabulation { method none; tolerance 3e-3; } #include "reactionsGRI" --- .../dynamicCode/basicChemistryModel | 3 +- .../dynamicCode/basicChemistryModelTemplate.C | 6 +- .../chemistryModel/Make/files | 24 +- .../basicChemistryModel/basicChemistryModel.C | 2 +- .../basicChemistryModel/basicChemistryModel.H | 2 +- .../basicChemistryModelI.H | 2 +- .../basicChemistryModelNew.C | 13 +- .../TDACChemistryModel.C => chemistryModel.C} | 30 +- .../TDACChemistryModel.H => chemistryModel.H} | 36 +- ...DACChemistryModelI.H => chemistryModelI.H} | 38 +- .../reduction/DAC/DAC.C | 2 +- .../reduction/DAC/DAC.H | 2 +- .../DAC/DACChemistryReductionMethods.C | 0 .../reduction/DRG/DRG.C | 2 +- .../reduction/DRG/DRG.H | 2 +- .../DRG/DRGChemistryReductionMethods.C | 0 .../reduction/DRGEP/DRGEP.C | 2 +- .../reduction/DRGEP/DRGEP.H | 2 +- .../DRGEP/DRGEPChemistryReductionMethods.C | 0 .../reduction/DRGEP/SortableListDRGEP.C | 2 +- .../reduction/DRGEP/SortableListDRGEP.H | 2 +- .../reduction/EFA/EFA.C | 2 +- .../reduction/EFA/EFA.H | 2 +- .../EFA/EFAChemistryReductionMethods.C | 0 .../reduction/EFA/SortableListEFA.C | 2 +- .../reduction/EFA/SortableListEFA.H | 2 +- .../reduction/PFA/PFA.C | 2 +- .../reduction/PFA/PFA.H | 2 +- .../PFA/PFAChemistryReductionMethods.C | 0 .../chemistryReduction/chemistryReduction.C | 4 +- .../chemistryReduction/chemistryReduction.H | 4 +- .../chemistryReduction/chemistryReductionI.H | 0 .../chemistryReductionMethod.C | 4 +- .../chemistryReductionMethod.H | 8 +- .../chemistryReductionMethodI.H | 0 .../chemistryReductionMethodNew.C | 2 +- .../chemistryReductionMethods.C | 0 .../reduction/makeChemistryReductionMethod.H | 2 +- .../noChemistryReduction.C | 2 +- .../noChemistryReduction.H | 2 +- .../noChemistryReductionMethods.C | 0 .../standardChemistryModel.C | 563 ------------------ .../standardChemistryModel.H | 300 ---------- .../standardChemistryModelI.H | 114 ---- .../tabulation/ISAT/ISAT.C | 2 +- .../tabulation/ISAT/ISAT.H | 6 +- .../ISAT/ISATChemistryTabulationMethods.C | 0 .../tabulation/ISAT/binaryNode/binaryNode.C | 0 .../tabulation/ISAT/binaryNode/binaryNode.H | 0 .../tabulation/ISAT/binaryTree/binaryTree.C | 0 .../tabulation/ISAT/binaryTree/binaryTree.H | 0 .../ISAT/chemPointISAT/chemPointISAT.C | 0 .../ISAT/chemPointISAT/chemPointISAT.H | 6 +- .../chemistryTabulationMethod.C | 4 +- .../chemistryTabulationMethod.H | 8 +- .../chemistryTabulationMethodNew.C | 2 +- .../chemistryTabulationMethods.C | 0 .../makeChemistryTabulationMethod.H | 2 +- .../noChemistryTabulation.C | 2 +- .../noChemistryTabulation.H | 2 +- .../noChemistryTabulationMethods.C | 0 .../EulerImplicitChemistrySolvers.C | 4 +- .../chemistrySolver/chemistrySolvers.C | 4 +- .../chemistrySolver/makeChemistrySolver.H | 15 +- .../noChemistrySolver/noChemistrySolvers.C | 4 +- .../chemistrySolver/ode/odeChemistrySolvers.C | 4 +- .../ic8h18_TDAC/constant/chemistryProperties | 1 - .../DLR_A_LTS/constant/chemistryProperties | 1 - .../constant/chemistryProperties.orig | 1 - .../constant/chemistryProperties | 1 - .../constant/chemistryProperties | 1 - .../system/controlDict | 1 - 72 files changed, 126 insertions(+), 1134 deletions(-) rename src/thermophysicalModels/chemistryModel/{chemistryModel => }/basicChemistryModel/basicChemistryModel.C (97%) rename src/thermophysicalModels/chemistryModel/{chemistryModel => }/basicChemistryModel/basicChemistryModel.H (98%) rename src/thermophysicalModels/chemistryModel/{chemistryModel => }/basicChemistryModel/basicChemistryModelI.H (96%) rename src/thermophysicalModels/chemistryModel/{chemistryModel => }/basicChemistryModel/basicChemistryModelNew.C (94%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel/TDACChemistryModel.C => chemistryModel.C} (96%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel/TDACChemistryModel.H => chemistryModel.H} (93%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel/TDACChemistryModelI.H => chemistryModelI.H} (73%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DAC/DAC.C (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DAC/DAC.H (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DAC/DACChemistryReductionMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRG/DRG.C (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRG/DRG.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRG/DRGChemistryReductionMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRGEP/DRGEP.C (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRGEP/DRGEP.H (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRGEP/DRGEPChemistryReductionMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRGEP/SortableListDRGEP.C (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/DRGEP/SortableListDRGEP.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/EFA/EFA.C (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/EFA/EFA.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/EFA/EFAChemistryReductionMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/EFA/SortableListEFA.C (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/EFA/SortableListEFA.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/PFA/PFA.C (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/PFA/PFA.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/PFA/PFAChemistryReductionMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReduction/chemistryReduction.C (97%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReduction/chemistryReduction.H (97%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReduction/chemistryReductionI.H (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReductionMethod/chemistryReductionMethod.C (95%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReductionMethod/chemistryReductionMethod.H (95%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReductionMethod/chemistryReductionMethodI.H (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/chemistryReductionMethod/chemistryReductionMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/makeChemistryReductionMethod.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/noChemistryReduction/noChemistryReduction.C (97%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/noChemistryReduction/noChemistryReduction.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/reduction/noChemistryReduction/noChemistryReductionMethods.C (100%) delete mode 100644 src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.C delete mode 100644 src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.H delete mode 100644 src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModelI.H rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/ISAT.C (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/ISAT.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/ISATChemistryTabulationMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/binaryNode/binaryNode.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/binaryNode/binaryNode.H (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/binaryTree/binaryTree.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/binaryTree/binaryTree.H (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/chemPointISAT/chemPointISAT.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/ISAT/chemPointISAT/chemPointISAT.H (99%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C (95%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H (95%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/makeChemistryTabulationMethod.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/noChemistryTabulation/noChemistryTabulation.C (97%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/noChemistryTabulation/noChemistryTabulation.H (98%) rename src/thermophysicalModels/chemistryModel/chemistryModel/{TDACChemistryModel => }/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C (100%) diff --git a/etc/codeTemplates/dynamicCode/basicChemistryModel b/etc/codeTemplates/dynamicCode/basicChemistryModel index 137435c634..5ac1bd243d 100644 --- a/etc/codeTemplates/dynamicCode/basicChemistryModel +++ b/etc/codeTemplates/dynamicCode/basicChemistryModel @@ -27,8 +27,7 @@ solverRenamed method ( - standard - TDAC + chemistryModel ); codeOptions diff --git a/etc/codeTemplates/dynamicCode/basicChemistryModelTemplate.C b/etc/codeTemplates/dynamicCode/basicChemistryModelTemplate.C index bf1c0d7d6d..6703dbf0e3 100644 --- a/etc/codeTemplates/dynamicCode/basicChemistryModelTemplate.C +++ b/etc/codeTemplates/dynamicCode/basicChemistryModelTemplate.C @@ -86,17 +86,15 @@ namespace Foam makeChemistrySolver(${solver}, ${method}ChemistryModel, ThermoPhysics); } -#define standardChemistryModelCppTest 0 -#define TDACChemistryModelCppTest 1 +#define chemistryModelCppTest 0 -#if ${method}ChemistryModelCppTest == TDACChemistryModelCppTest +#if ${method}ChemistryModelCppTest == chemistryModelCppTest #include "makeChemistryReductionMethod.H" #include "makeChemistryTabulationMethod.H" namespace Foam { - defineChemistrySolver(standardChemistryModel, ThermoPhysics); defineChemistryReductionMethod(nullArg, ThermoPhysics); defineChemistryTabulationMethod(nullArg, ThermoPhysics); } diff --git a/src/thermophysicalModels/chemistryModel/Make/files b/src/thermophysicalModels/chemistryModel/Make/files index 0c5572848e..45137142ec 100644 --- a/src/thermophysicalModels/chemistryModel/Make/files +++ b/src/thermophysicalModels/chemistryModel/Make/files @@ -1,22 +1,22 @@ -chemistryModel/basicChemistryModel/basicChemistryModel.C -chemistryModel/basicChemistryModel/basicChemistryModelNew.C +basicChemistryModel/basicChemistryModel.C +basicChemistryModel/basicChemistryModelNew.C chemistrySolver/chemistrySolver/chemistrySolvers.C chemistrySolver/noChemistrySolver/noChemistrySolvers.C chemistrySolver/EulerImplicit/EulerImplicitChemistrySolvers.C chemistrySolver/ode/odeChemistrySolvers.C -chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethods.C -chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReductionMethods.C -chemistryModel/TDACChemistryModel/reduction/DAC/DACChemistryReductionMethods.C -chemistryModel/TDACChemistryModel/reduction/DRG/DRGChemistryReductionMethods.C -chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEPChemistryReductionMethods.C -chemistryModel/TDACChemistryModel/reduction/EFA/EFAChemistryReductionMethods.C -chemistryModel/TDACChemistryModel/reduction/PFA/PFAChemistryReductionMethods.C +chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethods.C +chemistryModel/reduction/noChemistryReduction/noChemistryReductionMethods.C +chemistryModel/reduction/DAC/DACChemistryReductionMethods.C +chemistryModel/reduction/DRG/DRGChemistryReductionMethods.C +chemistryModel/reduction/DRGEP/DRGEPChemistryReductionMethods.C +chemistryModel/reduction/EFA/EFAChemistryReductionMethods.C +chemistryModel/reduction/PFA/PFAChemistryReductionMethods.C -chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C -chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C -chemistryModel/TDACChemistryModel/tabulation/ISAT/ISATChemistryTabulationMethods.C +chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C +chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C +chemistryModel/tabulation/ISAT/ISATChemistryTabulationMethods.C reactions/makeReactions.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.C similarity index 97% rename from src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C rename to src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.C index cd020a27d7..12a9b113bf 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H rename to src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H index ac07f902bc..c87cb1e9ff 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelI.H b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModelI.H similarity index 96% rename from src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelI.H rename to src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModelI.H index 99942e61c5..8248952d7f 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModelNew.C similarity index 94% rename from src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelNew.C rename to src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModelNew.C index 08990ff2b1..7c93c9740b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModelNew.C @@ -53,12 +53,11 @@ Foam::autoPtr Foam::basicChemistryModel::New << "Template parameter based chemistry solver selection is no " << "longer supported. Please create a chemistryType dictionary" << "instead." << endl << endl << "For example, the entry:" << endl - << " chemistrySolver ode," << "sensibleInternalEnergy>>>>" << endl << endl << "becomes:" << endl << " chemistryType" << endl << " {" << endl - << " solver ode;" << endl << " method standard;" - << endl << " }" << exit(FatalError); + << " solver ode;" << endl << " }" << exit(FatalError); } const dictionary& chemistryTypeDict = @@ -72,13 +71,7 @@ Foam::autoPtr Foam::basicChemistryModel::New const word methodName ( - chemistryTypeDict.lookupOrDefault - ( - "method", - chemistryTypeDict.lookupOrDefault("TDAC", false) - ? "TDAC" - : "standard" - ) + chemistryTypeDict.lookupOrDefault("method", "chemistryModel") ); dictionary chemistryTypeDictNew; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C similarity index 96% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C index 747b1c3a58..d6214b1291 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "TDACChemistryModel.H" +#include "chemistryModel.H" #include "UniformField.H" #include "localEulerDdtScheme.H" #include "clockTime.H" @@ -31,7 +31,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::TDACChemistryModel::TDACChemistryModel +Foam::chemistryModel::chemistryModel ( const fluidReactionThermo& thermo ) @@ -93,7 +93,7 @@ Foam::TDACChemistryModel::TDACChemistryModel ); } - Info<< "TDACChemistryModel: Number of species = " << nSpecie_ + Info<< "chemistryModel: Number of species = " << nSpecie_ << " and reactions = " << nReaction_ << endl; // When the mechanism reduction method is used, the 'active' flag for every @@ -131,14 +131,14 @@ Foam::TDACChemistryModel::TDACChemistryModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::TDACChemistryModel::~TDACChemistryModel() +Foam::chemistryModel::~chemistryModel() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void Foam::TDACChemistryModel::omega +void Foam::chemistryModel::omega ( const scalar p, const scalar T, @@ -183,7 +183,7 @@ void Foam::TDACChemistryModel::omega template -void Foam::TDACChemistryModel::derivatives +void Foam::chemistryModel::derivatives ( const scalar time, const scalarField& c, @@ -236,7 +236,7 @@ void Foam::TDACChemistryModel::derivatives template -void Foam::TDACChemistryModel::jacobian +void Foam::chemistryModel::jacobian ( const scalar t, const scalarField& c, @@ -363,7 +363,7 @@ void Foam::TDACChemistryModel::jacobian template Foam::tmp -Foam::TDACChemistryModel::tc() const +Foam::chemistryModel::tc() const { tmp ttc ( @@ -452,7 +452,7 @@ Foam::TDACChemistryModel::tc() const template Foam::tmp -Foam::TDACChemistryModel::Qdot() const +Foam::chemistryModel::Qdot() const { tmp tQdot ( @@ -486,7 +486,7 @@ Foam::TDACChemistryModel::Qdot() const template Foam::tmp> -Foam::TDACChemistryModel::calculateRR +Foam::chemistryModel::calculateRR ( const label ri, const label si @@ -553,7 +553,7 @@ Foam::TDACChemistryModel::calculateRR template -void Foam::TDACChemistryModel::calculate() +void Foam::chemistryModel::calculate() { if (!this->chemistry_) { @@ -592,7 +592,7 @@ void Foam::TDACChemistryModel::calculate() template template -Foam::scalar Foam::TDACChemistryModel::solve +Foam::scalar Foam::chemistryModel::solve ( const DeltaTType& deltaT ) @@ -621,6 +621,8 @@ Foam::scalar Foam::TDACChemistryModel::solve const scalarField& T = this->thermo().T().oldTime(); const scalarField& p = this->thermo().p().oldTime(); + reactionEvaluationScope scope(*this); + scalarField c0(nSpecie_); // Composition vector (Yi, T, p, deltaT) @@ -789,7 +791,7 @@ Foam::scalar Foam::TDACChemistryModel::solve template -Foam::scalar Foam::TDACChemistryModel::solve +Foam::scalar Foam::chemistryModel::solve ( const scalar deltaT ) @@ -804,7 +806,7 @@ Foam::scalar Foam::TDACChemistryModel::solve template -Foam::scalar Foam::TDACChemistryModel::solve +Foam::scalar Foam::chemistryModel::solve ( const scalarField& deltaT ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H similarity index 93% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H index 73ab962952..5ca6de3029 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H @@ -22,10 +22,12 @@ License along with OpenFOAM. If not, see . Class - Foam::TDACChemistryModel + Foam::chemistryModel Description - Extends standardChemistryModel by adding the TDAC method. + Extends base chemistry model by adding a thermo package, and ODE functions. + Introduces chemistry equation system and evaluation of chemical source terms + with optional support for TDAC mechanism reduction and tabulation. References: \verbatim @@ -56,13 +58,13 @@ Description \endverbatim SourceFiles - TDACChemistryModelI.H - TDACChemistryModel.C + chemistryModelI.H + chemistryModel.C \*---------------------------------------------------------------------------*/ -#ifndef TDACChemistryModel_H -#define TDACChemistryModel_H +#ifndef chemistryModel_H +#define chemistryModel_H #include "basicChemistryModel.H" #include "ReactionList.H" @@ -80,11 +82,11 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class TDACChemistryModel Declaration + Class chemistryModel Declaration \*---------------------------------------------------------------------------*/ template -class TDACChemistryModel +class chemistryModel : public basicChemistryModel, public ODESystem @@ -96,13 +98,13 @@ class TDACChemistryModel // destruction. class reactionEvaluationScope { - const TDACChemistryModel& chemistry_; + const chemistryModel& chemistry_; public: reactionEvaluationScope ( - const TDACChemistryModel& chemistry + const chemistryModel& chemistry ) : chemistry_(chemistry) @@ -203,20 +205,20 @@ class TDACChemistryModel public: //- Runtime type information - TypeName("TDAC"); + TypeName("chemistryModel"); // Constructors //- Construct from thermo - TDACChemistryModel(const fluidReactionThermo& thermo); + chemistryModel(const fluidReactionThermo& thermo); //- Disallow default bitwise copy construction - TDACChemistryModel(const TDACChemistryModel&) = delete; + chemistryModel(const chemistryModel&) = delete; //- Destructor - virtual ~TDACChemistryModel(); + virtual ~chemistryModel(); // Member Functions @@ -360,7 +362,7 @@ public: // Member Operators //- Disallow default bitwise assignment - void operator=(const TDACChemistryModel&) = delete; + void operator=(const chemistryModel&) = delete; }; @@ -370,12 +372,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "TDACChemistryModelI.H" +#include "chemistryModelI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "TDACChemistryModel.C" + #include "chemistryModel.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H similarity index 73% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModelI.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H index 85e1ea2b91..883c02b838 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H @@ -29,7 +29,7 @@ License template inline Foam::autoPtr -Foam::TDACChemistryModel::logFile(const word& name) const +Foam::chemistryModel::logFile(const word& name) const { mkDir(this->mesh().time().path()/"TDAC"/this->group()); return autoPtr @@ -42,7 +42,7 @@ Foam::TDACChemistryModel::logFile(const word& name) const } template -inline Foam::label Foam::TDACChemistryModel::nEqns() const +inline Foam::label Foam::chemistryModel::nEqns() const { // nEqns = number of species + temperature + pressure return nSpecie_ + 2; @@ -51,7 +51,7 @@ inline Foam::label Foam::TDACChemistryModel::nEqns() const template inline Foam::PtrList>& -Foam::TDACChemistryModel::RR() +Foam::chemistryModel::RR() { return RR_; } @@ -59,7 +59,7 @@ Foam::TDACChemistryModel::RR() template inline const Foam::multiComponentMixture& -Foam::TDACChemistryModel::mixture() const +Foam::chemistryModel::mixture() const { return mixture_; } @@ -67,7 +67,7 @@ Foam::TDACChemistryModel::mixture() const template inline const Foam::PtrList>& -Foam::TDACChemistryModel::reactions() const +Foam::chemistryModel::reactions() const { return reactions_; } @@ -75,35 +75,35 @@ Foam::TDACChemistryModel::reactions() const template inline const Foam::PtrList& -Foam::TDACChemistryModel::specieThermos() const +Foam::chemistryModel::specieThermos() const { return specieThermos_; } template -inline Foam::label Foam::TDACChemistryModel::nSpecie() const +inline Foam::label Foam::chemistryModel::nSpecie() const { return nSpecie_; } template -inline Foam::label Foam::TDACChemistryModel::nReaction() const +inline Foam::label Foam::chemistryModel::nReaction() const { return nReaction_; } template -inline Foam::scalar Foam::TDACChemistryModel::Treact() const +inline Foam::scalar Foam::chemistryModel::Treact() const { return Treact_; } template -inline Foam::scalar& Foam::TDACChemistryModel::Treact() +inline Foam::scalar& Foam::chemistryModel::Treact() { return Treact_; } @@ -111,14 +111,14 @@ inline Foam::scalar& Foam::TDACChemistryModel::Treact() template inline const Foam::DimensionedField& -Foam::TDACChemistryModel::RR(const label i) const +Foam::chemistryModel::RR(const label i) const { return RR_[i]; } template Foam::DimensionedField& -Foam::TDACChemistryModel::RR(const label i) +Foam::chemistryModel::RR(const label i) { return RR_[i]; } @@ -126,7 +126,7 @@ Foam::TDACChemistryModel::RR(const label i) template inline const Foam::PtrList& -Foam::TDACChemistryModel::Y() +Foam::chemistryModel::Y() { return this->Y_; } @@ -134,35 +134,35 @@ Foam::TDACChemistryModel::Y() template inline const Foam::chemistryReductionMethod& -Foam::TDACChemistryModel::mechRed() const +Foam::chemistryModel::mechRed() const { return mechRed_; } template -inline void Foam::TDACChemistryModel::setActive(const label i) +inline void Foam::chemistryModel::setActive(const label i) { this->thermo().composition().setActive(i); } template -inline bool Foam::TDACChemistryModel::active(const label i) const +inline bool Foam::chemistryModel::active(const label i) const { return this->thermo().composition().active(i); } template -inline void Foam::TDACChemistryModel::setNSpecie(const label newNs) +inline void Foam::chemistryModel::setNSpecie(const label newNs) { this->nSpecie_ = newNs; } template -inline Foam::label Foam::TDACChemistryModel::sToc +inline Foam::label Foam::chemistryModel::sToc ( const label si ) const @@ -179,7 +179,7 @@ inline Foam::label Foam::TDACChemistryModel::sToc template -inline Foam::label Foam::TDACChemistryModel::cTos +inline Foam::label Foam::chemistryModel::cTos ( const label ci ) const diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DAC.C similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DAC.C index 658d10cd52..b740b219ec 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DAC.C @@ -31,7 +31,7 @@ template Foam::chemistryReductionMethods::DAC::DAC ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryReduction(dict, chemistry), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DAC.H similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DAC.H index 78761eaea0..f42f5ecf73 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DAC.H @@ -136,7 +136,7 @@ public: DAC ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DACChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DACChemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DACChemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DAC/DACChemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRG.C similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRG.C index a85a51d073..8a5be3d1e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRG.C @@ -31,7 +31,7 @@ template Foam::chemistryReductionMethods::DRG::DRG ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryReduction(dict, chemistry), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRG.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRG.H index ff6d136112..5a63f82d02 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRG.H @@ -70,7 +70,7 @@ public: DRG ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRGChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRGChemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRGChemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRG/DRGChemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEP.C similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEP.C index b7b17ac83e..8b89f04647 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEP.C @@ -32,7 +32,7 @@ template Foam::chemistryReductionMethods::DRGEP::DRGEP ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryReduction(dict, chemistry), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEP.H similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEP.H index 038afbc3b1..03c838c761 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEP.H @@ -141,7 +141,7 @@ public: DRGEP ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEPChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEPChemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEPChemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/DRGEPChemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/SortableListDRGEP.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/SortableListDRGEP.C similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/SortableListDRGEP.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/SortableListDRGEP.C index 930cd42c1b..d54ab9f11b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/SortableListDRGEP.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/SortableListDRGEP.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/SortableListDRGEP.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/SortableListDRGEP.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/SortableListDRGEP.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/SortableListDRGEP.H index 1ceb17af07..be90c07b11 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/SortableListDRGEP.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/DRGEP/SortableListDRGEP.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFA.C similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFA.C index 500aece297..1ae37fc1b1 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFA.C @@ -32,7 +32,7 @@ template Foam::chemistryReductionMethods::EFA::EFA ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryReduction(dict, chemistry), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFA.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFA.H index e4204fb797..c8379e80cd 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFA.H @@ -69,7 +69,7 @@ public: EFA ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFAChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFAChemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFAChemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/EFAChemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/SortableListEFA.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/SortableListEFA.C similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/SortableListEFA.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/SortableListEFA.C index 844a1b6a94..23dcd47a74 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/SortableListEFA.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/SortableListEFA.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/SortableListEFA.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/SortableListEFA.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/SortableListEFA.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/SortableListEFA.H index cb175e7641..13cb176952 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/SortableListEFA.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/EFA/SortableListEFA.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFA.C similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFA.C index 437c2793a7..b48d130ab2 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFA.C @@ -31,7 +31,7 @@ template Foam::chemistryReductionMethods::PFA::PFA ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryReduction(dict, chemistry), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFA.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFA.H index f4c74f90df..56ebbb0229 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFA.H @@ -71,7 +71,7 @@ public: PFA ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFAChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFAChemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFAChemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/PFA/PFAChemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReduction.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReduction.C similarity index 97% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReduction.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReduction.C index ff297108bb..728864342f 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReduction.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReduction.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "chemistryReduction.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -32,7 +32,7 @@ template Foam::chemistryReduction::chemistryReduction ( const Foam::IOdictionary& dict, - Foam::TDACChemistryModel& chemistry + Foam::chemistryModel& chemistry ) : chemistryReductionMethod(dict, chemistry), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReduction.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReduction.H similarity index 97% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReduction.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReduction.H index cc55872a6d..cebf1682a2 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReduction.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReduction.H @@ -61,7 +61,7 @@ protected: //- Dictionary that store the algorithm data const dictionary coeffsDict_; - TDACChemistryModel& chemistry_; + chemistryModel& chemistry_; //- List of active species (active = true) List activeSpecies_; @@ -100,7 +100,7 @@ public: chemistryReduction ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReductionI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReductionI.H similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReduction/chemistryReductionI.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReduction/chemistryReductionI.H diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C similarity index 95% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C index d399ade581..055f1542f9 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "chemistryReductionMethod.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -32,7 +32,7 @@ template Foam::chemistryReductionMethod::chemistryReductionMethod ( const Foam::IOdictionary& dict, - Foam::TDACChemistryModel& chemistry + Foam::chemistryModel& chemistry ) : nSpecie_(chemistry.nSpecie()), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.H similarity index 95% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.H index 054b05b688..cc7f8f2ad5 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.H @@ -44,7 +44,7 @@ namespace Foam { template -class TDACChemistryModel; +class chemistryModel; /*---------------------------------------------------------------------------*\ Class chemistrySolver Declaration @@ -83,7 +83,7 @@ public: dictionary, ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ), (dict, chemistry) ); @@ -95,7 +95,7 @@ public: chemistryReductionMethod ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); @@ -104,7 +104,7 @@ public: static autoPtr> New ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodI.H similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodI.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodI.H diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C index 7aa52f5de7..77f899c496 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C @@ -34,7 +34,7 @@ Foam::autoPtr> Foam::chemistryReductionMethod::New ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) { if (dict.found("reduction")) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethod.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/makeChemistryReductionMethod.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethod.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/makeChemistryReductionMethod.H index 9aaa5fa731..55c2aaeefa 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethod.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/makeChemistryReductionMethod.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReduction.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReduction.C similarity index 97% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReduction.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReduction.C index fd1013d70b..98d8852d67 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReduction.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReduction.C @@ -31,7 +31,7 @@ template Foam::chemistryReductionMethods::none::none ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryReductionMethod(dict, chemistry) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReduction.H b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReduction.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReduction.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReduction.H index 5079cc5f40..05a39ce8d0 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReduction.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReduction.H @@ -67,7 +67,7 @@ public: none ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReductionMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/noChemistryReduction/noChemistryReductionMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/reduction/noChemistryReduction/noChemistryReductionMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.C deleted file mode 100644 index 4c4f6fd206..0000000000 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.C +++ /dev/null @@ -1,563 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "standardChemistryModel.H" -#include "UniformField.H" -#include "extrapolatedCalculatedFvPatchFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::standardChemistryModel::standardChemistryModel -( - const fluidReactionThermo& thermo -) -: - basicChemistryModel(thermo), - ODESystem(), - Y_(this->thermo().composition().Y()), - mixture_(refCast>(this->thermo())), - specieThermos_(mixture_.specieThermos()), - reactions_(mixture_.species(), specieThermos_, this->mesh(), *this), - nSpecie_(Y_.size()), - nReaction_(reactions_.size()), - Treact_(basicChemistryModel::template lookupOrDefault("Treact", 0)), - RR_(nSpecie_), - c_(nSpecie_), - dcdt_(nSpecie_) -{ - // Create the fields for the chemistry sources - forAll(RR_, fieldi) - { - RR_.set - ( - fieldi, - new volScalarField::Internal - ( - IOobject - ( - "RR." + Y_[fieldi].name(), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermo.T().mesh(), - dimensionedScalar(dimMass/dimVolume/dimTime, 0) - ) - ); - } - - Info<< "standardChemistryModel: Number of species = " << nSpecie_ - << " and reactions = " << nReaction_ << endl; -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::standardChemistryModel::~standardChemistryModel() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::standardChemistryModel::omega -( - const scalar p, - const scalar T, - const scalarField& c, - const label li, - scalarField& dcdt -) const -{ - dcdt = Zero; - - forAll(reactions_, i) - { - const Reaction& R = reactions_[i]; - - R.omega(p, T, c, li, dcdt); - } -} - - -template -void Foam::standardChemistryModel::derivatives -( - const scalar t, - const scalarField& c, - const label li, - scalarField& dcdt -) const -{ - const scalar T = c[nSpecie_]; - const scalar p = c[nSpecie_ + 1]; - - forAll(c_, i) - { - c_[i] = max(c[i], 0); - } - - dcdt = Zero; - - // Evaluate contributions from reactions - omega(p, T, c_, li, dcdt); - - // Evaluate the effect on the thermodynamic system ... - - // c*Cp - scalar ccp = 0; - for (label i = 0; i < nSpecie_; i++) - { - ccp += c_[i]*specieThermos_[i].cp(p, T); - } - - // dT/dt - scalar& dTdt = dcdt[nSpecie_]; - for (label i = 0; i < nSpecie_; i++) - { - dTdt -= dcdt[i]*specieThermos_[i].ha(p, T); - } - dTdt /= ccp; - - // dp/dt = 0 (pressure is assumed constant) -} - - -template -void Foam::standardChemistryModel::jacobian -( - const scalar t, - const scalarField& c, - const label li, - scalarField& dcdt, - scalarSquareMatrix& J -) const -{ - const scalar T = c[nSpecie_]; - const scalar p = c[nSpecie_ + 1]; - - forAll(c_, i) - { - c_[i] = max(c[i], 0); - } - - dcdt = Zero; - J = Zero; - - // Evaluate contributions from reactions - forAll(reactions_, ri) - { - const Reaction& R = reactions_[ri]; - scalar omegaI, kfwd, kbwd; - const labelList null; - R.dwdc(p, T, c_, li, J, dcdt, omegaI, kfwd, kbwd, false, null); - R.dwdT(p, T, c_, li, omegaI, kfwd, kbwd, J, false, null, nSpecie_); - } - - // Evaluate the effect on the thermodynamic system ... - - // c*Cp - scalar ccp = 0, dccpdT = 0; - for (label i = 0; i < nSpecie_; i++) - { - ccp += c_[i]*specieThermos_[i].cp(p, T); - dccpdT += c_[i]*specieThermos_[i].dcpdT(p, T); - } - - // dT/dt - scalar& dTdt = dcdt[nSpecie_]; - for (label i = 0; i < nSpecie_; i++) - { - dTdt -= dcdt[i]*specieThermos_[i].ha(p, T); - } - dTdt /= ccp; - - // dp/dt = 0 (pressure is assumed constant) - - // d(dTdt)/dc - for (label i = 0; i < nSpecie_; i++) - { - scalar& d2Tdtdci = J(nSpecie_, i); - for (label j = 0; j < nSpecie_; j++) - { - const scalar d2cjdtdci = J(j, i); - d2Tdtdci -= d2cjdtdci*specieThermos_[j].ha(p, T); - } - d2Tdtdci -= specieThermos_[i].cp(p, T)*dTdt; - d2Tdtdci /= ccp; - } - - // d(dTdt)/dT - scalar& d2TdtdT = J(nSpecie_, nSpecie_); - for (label i = 0; i < nSpecie_; i++) - { - const scalar d2cidtdT = J(i, nSpecie_); - d2TdtdT -= - dcdt[i]*specieThermos_[i].cp(p, T) - + d2cidtdT*specieThermos_[i].ha(p, T); - } - d2TdtdT -= dTdt*dccpdT; - d2TdtdT /= ccp; - - // d(dpdt)/dc = 0 (pressure is assumed constant) - - // d(dpdt)/dT = 0 (pressure is assumed constant) -} - - -template -Foam::tmp -Foam::standardChemistryModel::tc() const -{ - tmp ttc - ( - volScalarField::New - ( - "tc", - this->mesh(), - dimensionedScalar(dimTime, small), - extrapolatedCalculatedFvPatchScalarField::typeName - ) - ); - scalarField& tc = ttc.ref(); - - tmp trho(this->thermo().rho()); - const scalarField& rho = trho(); - - const scalarField& T = this->thermo().T(); - const scalarField& p = this->thermo().p(); - - if (this->chemistry_) - { - reactionEvaluationScope scope(*this); - - forAll(rho, celli) - { - const scalar rhoi = rho[celli]; - const scalar Ti = T[celli]; - const scalar pi = p[celli]; - - for (label i=0; i& R = reactions_[i]; - scalar omegaf, omegar; - R.omega(pi, Ti, c_, celli, omegaf, omegar); - - scalar wf = 0; - forAll(R.rhs(), s) - { - wf += R.rhs()[s].stoichCoeff*omegaf; - } - sumW += wf; - sumWRateByCTot += sqr(wf); - - scalar wr = 0; - forAll(R.lhs(), s) - { - wr += R.lhs()[s].stoichCoeff*omegar; - } - sumW += wr; - sumWRateByCTot += sqr(wr); - } - - tc[celli] = - sumWRateByCTot == 0 ? vGreat : sumW/sumWRateByCTot*sum(c_); - } - } - - ttc.ref().correctBoundaryConditions(); - - return ttc; -} - - -template -Foam::tmp -Foam::standardChemistryModel::Qdot() const -{ - tmp tQdot - ( - volScalarField::New - ( - "Qdot", - this->mesh_, - dimensionedScalar(dimEnergy/dimVolume/dimTime, 0) - ) - ); - - if (this->chemistry_) - { - reactionEvaluationScope scope(*this); - - scalarField& Qdot = tQdot.ref(); - - forAll(Y_, i) - { - forAll(Qdot, celli) - { - const scalar hi = specieThermos_[i].Hf(); - Qdot[celli] -= hi*RR_[i][celli]; - } - } - } - - return tQdot; -} - - -template -Foam::tmp> -Foam::standardChemistryModel::calculateRR -( - const label ri, - const label si -) const -{ - tmp tRR - ( - volScalarField::Internal::New - ( - "RR", - this->mesh(), - dimensionedScalar(dimMass/dimVolume/dimTime, 0) - ) - ); - - volScalarField::Internal& RR = tRR.ref(); - - tmp trho(this->thermo().rho()); - const scalarField& rho = trho(); - - const scalarField& T = this->thermo().T(); - const scalarField& p = this->thermo().p(); - - reactionEvaluationScope scope(*this); - - scalar omegaf, omegar; - - forAll(rho, celli) - { - const scalar rhoi = rho[celli]; - const scalar Ti = T[celli]; - const scalar pi = p[celli]; - - for (label i=0; i& R = reactions_[ri]; - const scalar omegaI = R.omega(pi, Ti, c_, celli, omegaf, omegar); - - forAll(R.lhs(), s) - { - if (si == R.lhs()[s].index) - { - RR[celli] -= R.lhs()[s].stoichCoeff*omegaI; - } - } - - forAll(R.rhs(), s) - { - if (si == R.rhs()[s].index) - { - RR[celli] += R.rhs()[s].stoichCoeff*omegaI; - } - } - - RR[celli] *= specieThermos_[si].W(); - } - - return tRR; -} - - -template -void Foam::standardChemistryModel::calculate() -{ - if (!this->chemistry_) - { - return; - } - - tmp trho(this->thermo().rho()); - const scalarField& rho = trho(); - - const scalarField& T = this->thermo().T(); - const scalarField& p = this->thermo().p(); - - reactionEvaluationScope scope(*this); - - forAll(rho, celli) - { - const scalar rhoi = rho[celli]; - const scalar Ti = T[celli]; - const scalar pi = p[celli]; - - for (label i=0; i -template -Foam::scalar Foam::standardChemistryModel::solve -( - const DeltaTType& deltaT -) -{ - basicChemistryModel::correct(); - - scalar deltaTMin = great; - - if (!this->chemistry_) - { - return deltaTMin; - } - - tmp trho(this->thermo().rho0()); - const scalarField& rho = trho(); - - const scalarField& T = this->thermo().T().oldTime(); - const scalarField& p = this->thermo().p().oldTime(); - - reactionEvaluationScope scope(*this); - - scalarField c0(nSpecie_); - - forAll(rho, celli) - { - scalar Ti = T[celli]; - - if (Ti > Treact_) - { - const scalar rhoi = rho[celli]; - scalar pi = p[celli]; - - for (label i=0; i small) - { - scalar dt = timeLeft; - this->solve(pi, Ti, c_, celli, dt, this->deltaTChem_[celli]); - timeLeft -= dt; - } - - deltaTMin = min(this->deltaTChem_[celli], deltaTMin); - - this->deltaTChem_[celli] = - min(this->deltaTChem_[celli], this->deltaTChemMax_); - - for (label i=0; i -Foam::scalar Foam::standardChemistryModel::solve -( - const scalar deltaT -) -{ - // Don't allow the time-step to change more than a factor of 2 - return min - ( - this->solve>(UniformField(deltaT)), - 2*deltaT - ); -} - - -template -Foam::scalar Foam::standardChemistryModel::solve -( - const scalarField& deltaT -) -{ - return this->solve(deltaT); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.H deleted file mode 100644 index 3ed14bebd8..0000000000 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModel.H +++ /dev/null @@ -1,300 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::standardChemistryModel - -Description - Extends base chemistry model by adding a thermo package, and ODE functions. - Introduces chemistry equation system and evaluation of chemical source - terms. - -SourceFiles - standardChemistryModelI.H - standardChemistryModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef standardChemistryModel_H -#define standardChemistryModel_H - -#include "basicChemistryModel.H" -#include "ReactionList.H" -#include "ODESystem.H" -#include "volFields.H" -#include "multiComponentMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of classes -class fvMesh; - -/*---------------------------------------------------------------------------*\ - Class standardChemistryModel Declaration -\*---------------------------------------------------------------------------*/ - -template -class standardChemistryModel -: - public basicChemistryModel, - public ODESystem -{ - // Private Member Functions - - //- Solve the reaction system for the given time step - // of given type and return the characteristic time - template - scalar solve(const DeltaTType& deltaT); - - -protected: - - // Protected classes - - //- Class to define scope of reaction evaluation. Runs pre-evaluate - // hook on all reactions on construction and post-evaluate on - // destruction. - class reactionEvaluationScope - { - const standardChemistryModel& chemistry_; - - public: - - reactionEvaluationScope - ( - const standardChemistryModel& chemistry - ) - : - chemistry_(chemistry) - { - forAll(chemistry_.reactions_, i) - { - chemistry_.reactions_[i].preEvaluate(); - } - } - - ~reactionEvaluationScope() - { - forAll(chemistry_.reactions_, i) - { - chemistry_.reactions_[i].postEvaluate(); - } - } - }; - - - // Protected data - - //- Reference to the field of specie mass fractions - const PtrList& Y_; - - //- Reference to the multi component mixture - const multiComponentMixture& mixture_; - - //- Thermodynamic data of the species - const PtrList& specieThermos_; - - //- Reactions - const ReactionList reactions_; - - //- Number of species - label nSpecie_; - - //- Number of reactions - label nReaction_; - - //- Temperature below which the reaction rates are assumed 0 - scalar Treact_; - - //- List of reaction rate per specie [kg/m^3/s] - PtrList RR_; - - //- Temporary concentration field - mutable scalarField c_; - - //- Temporary rate-of-change of concentration field - mutable scalarField dcdt_; - - - // Protected Member Functions - - //- Write access to chemical source terms - // (e.g. for multi-chemistry model) - inline PtrList& RR(); - - -public: - - //- Runtime type information - TypeName("standard"); - - - // Constructors - - //- Construct from thermo - standardChemistryModel(const fluidReactionThermo& thermo); - - //- Disallow default bitwise copy construction - standardChemistryModel(const standardChemistryModel&) = delete; - - - //- Destructor - virtual ~standardChemistryModel(); - - - // Member Functions - - //- Return reference to the mixture - inline const multiComponentMixture& mixture() const; - - //- The reactions - inline const PtrList>& reactions() const; - - //- Thermodynamic data of the species - inline const PtrList& specieThermos() const; - - //- The number of species - virtual inline label nSpecie() const; - - //- The number of reactions - virtual inline label nReaction() const; - - //- Temperature below which the reaction rates are assumed 0 - inline scalar Treact() const; - - //- Temperature below which the reaction rates are assumed 0 - inline scalar& Treact(); - - //- dc/dt = omega, rate of change in concentration, for each species - virtual void omega - ( - const scalar p, - const scalar T, - const scalarField& c, - const label li, - scalarField& dcdt - ) const; - - //- Calculates the reaction rates - virtual void calculate(); - - - // Chemistry model functions (overriding abstract functions in - // basicChemistryModel.H) - - //- Return const access to the chemical source terms for specie, i - inline const volScalarField::Internal& RR - ( - const label i - ) const; - - //- Return non const access to chemical source terms [kg/m^3/s] - virtual volScalarField::Internal& RR - ( - const label i - ); - - //- Return reaction rate of the speciei in reactionI - virtual tmp calculateRR - ( - const label reactionI, - const label speciei - ) const; - - //- Solve the reaction system for the given time step - // and return the characteristic time - virtual scalar solve(const scalar deltaT); - - //- Solve the reaction system for the given time step - // and return the characteristic time - virtual scalar solve(const scalarField& deltaT); - - //- Return the chemical time scale - virtual tmp tc() const; - - //- Return the heat release rate [kg/m/s^3] - virtual tmp Qdot() const; - - - // ODE functions (overriding abstract functions in ODE.H) - - //- Number of ODE's to solve - inline virtual label nEqns() const; - - virtual void derivatives - ( - const scalar t, - const scalarField& c, - const label li, - scalarField& dcdt - ) const; - - virtual void jacobian - ( - const scalar t, - const scalarField& c, - const label li, - scalarField& dcdt, - scalarSquareMatrix& J - ) const; - - virtual void solve - ( - scalar& p, - scalar& T, - scalarField& c, - const label li, - scalar& deltaT, - scalar& subDeltaT - ) const = 0; - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const standardChemistryModel&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "standardChemistryModelI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "standardChemistryModel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModelI.H deleted file mode 100644 index 728710d00f..0000000000 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/standardChemistryModel/standardChemistryModelI.H +++ /dev/null @@ -1,114 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "volFields.H" -#include "zeroGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -inline Foam::label Foam::standardChemistryModel::nEqns() const -{ - // nEqns = number of species + temperature + pressure - return nSpecie_ + 2; -} - - -template -inline Foam::PtrList>& -Foam::standardChemistryModel::RR() -{ - return RR_; -} - - -template -inline const Foam::multiComponentMixture& -Foam::standardChemistryModel::mixture() const -{ - return mixture_; -} - - -template -inline const Foam::PtrList>& -Foam::standardChemistryModel::reactions() const -{ - return reactions_; -} - - -template -inline const Foam::PtrList& -Foam::standardChemistryModel::specieThermos() const -{ - return specieThermos_; -} - - -template -inline Foam::label Foam::standardChemistryModel::nSpecie() const -{ - return nSpecie_; -} - - -template -inline Foam::label Foam::standardChemistryModel::nReaction() const -{ - return nReaction_; -} - - -template -inline Foam::scalar Foam::standardChemistryModel::Treact() const -{ - return Treact_; -} - - -template -inline Foam::scalar& Foam::standardChemistryModel::Treact() -{ - return Treact_; -} - - -template -inline const Foam::DimensionedField& -Foam::standardChemistryModel::RR(const label i) const -{ - return RR_[i]; -} - -template -Foam::DimensionedField& -Foam::standardChemistryModel::RR(const label i) -{ - return RR_[i]; -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C index 4e7778c5c9..af81a394c7 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.C @@ -32,7 +32,7 @@ template Foam::chemistryTabulationMethods::ISAT::ISAT ( const dictionary& chemistryProperties, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryTabulationMethod diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.H index a7a6d5d15b..067818e160 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISAT.H @@ -63,7 +63,7 @@ class ISAT const dictionary coeffsDict_; - TDACChemistryModel& chemistry_; + chemistryModel& chemistry_; //- Switch to select performance logging Switch log_; @@ -214,7 +214,7 @@ public: ISAT ( const dictionary& chemistryProperties, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); //- Disallow default bitwise copy construction @@ -233,7 +233,7 @@ public: return true; } - TDACChemistryModel& chemistry() + chemistryModel& chemistry() { return chemistry_; } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISATChemistryTabulationMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISATChemistryTabulationMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISATChemistryTabulationMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/ISATChemistryTabulationMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryNode/binaryNode.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryNode/binaryNode.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryNode/binaryNode.H similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryNode/binaryNode.H diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryTree/binaryTree.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryTree/binaryTree.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryTree/binaryTree.H similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/binaryTree/binaryTree.H diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H similarity index 99% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H index 513a741fbc..fd6a30be05 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H @@ -133,7 +133,7 @@ template class binaryNode; template -class TDACChemistryModel; +class chemistryModel; namespace chemistryTabulationMethods { @@ -275,8 +275,8 @@ public: // Member Functions - //- Access to the TDACChemistryModel - inline TDACChemistryModel& chemistry() + //- Access to the chemistryModel + inline chemistryModel& chemistry() { return table_.chemistry(); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C similarity index 95% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C index 8e64853621..1247f7e335 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "chemistryTabulationMethod.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -32,7 +32,7 @@ template Foam::chemistryTabulationMethod::chemistryTabulationMethod ( const dictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H similarity index 95% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H index 38606df9ba..8a64b950c8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.H @@ -47,7 +47,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -class TDACChemistryModel; +class chemistryModel; /*---------------------------------------------------------------------------*\ Class chemistryTabulationMethod Declaration @@ -71,7 +71,7 @@ public: dictionary, ( const dictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ), (dict, chemistry) ); @@ -83,7 +83,7 @@ public: chemistryTabulationMethod ( const dictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); @@ -92,7 +92,7 @@ public: static autoPtr New ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C index 4033a63f82..24b69385c8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C @@ -34,7 +34,7 @@ Foam::autoPtr> Foam::chemistryTabulationMethod::New ( const IOdictionary& dict, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) { if (dict.found("tabulation")) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethod.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/makeChemistryTabulationMethod.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethod.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/makeChemistryTabulationMethod.H index 82fa631056..65e02219c7 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethod.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/makeChemistryTabulationMethod.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.C similarity index 97% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.C index 9d2cfb4a26..712082a966 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.C @@ -31,7 +31,7 @@ template Foam::chemistryTabulationMethods::none::none ( const dictionary& chemistryProperties, - TDACChemistryModel& chemistry + chemistryModel& chemistry ) : chemistryTabulationMethod diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.H b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.H similarity index 98% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.H rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.H index 3b0ece2cbe..17c1475cce 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulation.H @@ -65,7 +65,7 @@ public: none ( const dictionary& chemistryProperties, - TDACChemistryModel& chemistry + chemistryModel& chemistry ); //- Disallow default bitwise copy construction diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/tabulation/noChemistryTabulation/noChemistryTabulationMethods.C diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicitChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicitChemistrySolvers.C index 162f84b35f..8301e36b56 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicitChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicitChemistrySolvers.C @@ -24,9 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "EulerImplicit.H" - -#include "standardChemistryModel.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" #include "forGases.H" #include "forLiquids.H" diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolvers.C index 302797263b..daf6b7be0e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolvers.C @@ -24,9 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "chemistrySolver.H" - -#include "standardChemistryModel.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" #include "forGases.H" #include "forLiquids.H" diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/makeChemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/makeChemistrySolver.H index dffe8ec2f0..8d5177ab5c 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/makeChemistrySolver.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/makeChemistrySolver.H @@ -75,12 +75,7 @@ License #define defineChemistrySolvers(nullArg, ThermoPhysics) \ defineChemistrySolver \ ( \ - standardChemistryModel, \ - ThermoPhysics \ - ); \ - defineChemistrySolver \ - ( \ - TDACChemistryModel, \ + chemistryModel, \ ThermoPhysics \ ) @@ -88,13 +83,7 @@ License makeChemistrySolver \ ( \ Solver, \ - standardChemistryModel, \ - ThermoPhysics \ - ); \ - makeChemistrySolver \ - ( \ - Solver, \ - TDACChemistryModel, \ + chemistryModel, \ ThermoPhysics \ ) diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolvers.C index 28f2ee8b7a..a342cfe5ea 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolvers.C @@ -24,9 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "noChemistrySolver.H" - -#include "standardChemistryModel.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" #include "forGases.H" #include "forLiquids.H" diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/odeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/odeChemistrySolvers.C index 9f236449f2..b99c8b86a7 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/odeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/odeChemistrySolvers.C @@ -24,9 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "ode.H" - -#include "standardChemistryModel.H" -#include "TDACChemistryModel.H" +#include "chemistryModel.H" #include "forGases.H" #include "forLiquids.H" diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/constant/chemistryProperties b/tutorials/combustion/chemFoam/ic8h18_TDAC/constant/chemistryProperties index 94db99a31d..d741c5f20f 100644 --- a/tutorials/combustion/chemFoam/ic8h18_TDAC/constant/chemistryProperties +++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/constant/chemistryProperties @@ -19,7 +19,6 @@ FoamFile chemistryType { solver ode; - method TDAC; } chemistry on; diff --git a/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/constant/chemistryProperties b/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/constant/chemistryProperties index ccde069111..176a235fd9 100644 --- a/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/constant/chemistryProperties +++ b/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/constant/chemistryProperties @@ -19,7 +19,6 @@ FoamFile chemistryType { solver ode; - method TDAC; } chemistry on; diff --git a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/constant/chemistryProperties.orig b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/constant/chemistryProperties.orig index ccde069111..176a235fd9 100644 --- a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/constant/chemistryProperties.orig +++ b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/constant/chemistryProperties.orig @@ -19,7 +19,6 @@ FoamFile chemistryType { solver ode; - method TDAC; } chemistry on; diff --git a/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/chemistryProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/chemistryProperties index 98f935e131..959b3fd63c 100644 --- a/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/chemistryProperties +++ b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/chemistryProperties @@ -19,7 +19,6 @@ FoamFile chemistryType { solver ode; - method TDAC; } chemistry on; diff --git a/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC/constant/chemistryProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC/constant/chemistryProperties index 98f935e131..959b3fd63c 100644 --- a/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC/constant/chemistryProperties +++ b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC/constant/chemistryProperties @@ -19,7 +19,6 @@ FoamFile chemistryType { solver ode; - method TDAC; } chemistry on; diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/system/controlDict b/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/system/controlDict index 429afdc7d9..74392cc51a 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/system/controlDict +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/system/controlDict @@ -83,7 +83,6 @@ functions #includeFunc writeObjects ( d.particles, - a.particles, phaseTransfer:dmidtf.TiO2.particlesAndVapor, phaseTransfer:dmidtf.TiO2_s.particlesAndVapor )