From dcad66f7d32a270dcfdb4b4f93bdc1b51e0d2a97 Mon Sep 17 00:00:00 2001 From: Andrew Heather <a.heather@opencfd.co.uk> Date: Mon, 14 May 2018 13:21:22 +0100 Subject: [PATCH] INT: Additional integration updates/clean-up --- .../lagrangian/simpleCoalParcelFoam/YEqn.H | 6 +-- .../simpleCoalParcelFoam/createFields.H | 17 +++--- .../simpleCoalParcelFoam.C | 3 +- .../sprayFoam/engineFoam/startSummary.H | 11 ++++ .../twoPhaseMixtureEThermo.C | 7 +++ .../twoPhaseMixtureEThermo.H | 3 ++ .../combustionModelTemplates.C | 25 ++++----- .../diffusionMulticomponent.C | 52 +++++++++++-------- .../diffusionMulticomponent.H | 11 ++-- .../diffusionMulticomponents.C | 32 +++++++----- .../eddyDissipationDiffusionModel.C | 36 ++++++------- .../eddyDissipationDiffusionModel.H | 10 ++-- .../eddyDissipationDiffusionModels.C | 28 +++++----- .../eddyDissipationModelBase.C | 44 ++++++++-------- .../eddyDissipationModelBase.H | 10 ++-- .../reactionsSensitivityAnalysisObjects.C | 21 ++++++-- .../rhoReactionThermo/rhoReactionThermos.C | 4 +- .../constant/combustionProperties | 8 +-- .../RAS}/oscillatingInletPeriodicAMI2D/0/U | 0 .../oscillatingInletPeriodicAMI2D/0/epsilon | 0 .../RAS}/oscillatingInletPeriodicAMI2D/0/k | 0 .../RAS}/oscillatingInletPeriodicAMI2D/0/nut | 0 .../RAS}/oscillatingInletPeriodicAMI2D/0/p | 0 .../oscillatingInletPeriodicAMI2D/README.txt | 0 .../constant/dynamicMeshDict | 0 .../constant/transportProperties | 0 .../constant/turbulenceProperties | 0 .../system/blockMeshDict | 0 .../system/controlDict | 2 +- .../system/fvSchemes | 0 .../system/fvSolution | 0 .../system/ensightWrite | 0 32 files changed, 186 insertions(+), 144 deletions(-) create mode 100644 applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/0/U (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/0/epsilon (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/0/k (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/0/nut (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/0/p (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/README.txt (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/constant/dynamicMeshDict (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/constant/transportProperties (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/constant/turbulenceProperties (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/system/blockMeshDict (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/system/controlDict (97%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/system/fvSchemes (100%) rename tutorials/incompressible/{pimpleDyMFoam => pimpleFoam/RAS}/oscillatingInletPeriodicAMI2D/system/fvSolution (100%) rename tutorials/incompressible/{pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam => pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam}/system/ensightWrite (100%) diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H index 1510f8e391e..c81ac66c8bc 100644 --- a/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H @@ -10,8 +10,8 @@ tmp<fv::convectionScheme<scalar>> mvConvection ); { - combustion->correct(); - Qdot = combustion->Qdot(); + reaction->correct(); + Qdot = reaction->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) @@ -26,7 +26,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection - fvm::laplacian(turbulence->muEff(), Yi) == parcels.SYi(i, Yi) - + combustion->R(Yi) + + reaction->R(Yi) + fvOptions(rho, Yi) ); diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H index 6c758048c7a..3c0985f95dc 100644 --- a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H @@ -1,13 +1,9 @@ #include "readGravitationalAcceleration.H" -Info<< "Creating combustion model\n" << endl; -autoPtr<combustionModels::rhoCombustionModel> combustion -( - combustionModels::rhoCombustionModel::New(mesh) -); - -rhoReactionThermo& thermo = combustion->thermo(); +Info<< "Reading thermophysical properties\n" << endl; +autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh)); +rhoReactionThermo& thermo = pThermo(); thermo.validate(args.executable(), "h", "e"); SLGThermo slgThermo(mesh, thermo); @@ -91,8 +87,11 @@ autoPtr<compressible::turbulenceModel> turbulence ) ); -// Set the turbulence into the combustion model -combustion->setTurbulence(turbulence()); +Info<< "Creating reaction model\n" << endl; +autoPtr<CombustionModel<rhoReactionThermo>> reaction +( + CombustionModel<rhoReactionThermo>::New(thermo, turbulence()) +); Info<< "Creating multi-variate interpolation scheme\n" << endl; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C index e15156250e3..80da3612fa7 100644 --- a/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C @@ -36,7 +36,8 @@ Description #include "fvCFD.H" #include "turbulentFluidThermoModel.H" #include "coalCloud.H" -#include "rhoCombustionModel.H" +#include "rhoReactionThermo.H" +#include "CombustionModel.H" #include "radiationModel.H" #include "IOporosityModelList.H" #include "fvOptions.H" diff --git a/applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H b/applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H new file mode 100644 index 00000000000..3ee56bcfa8d --- /dev/null +++ b/applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H @@ -0,0 +1,11 @@ +Info<< "Total cylinder mass: " << fvc::domainIntegrate(rho).value() << endl; +//Info<< "Total fuel mass: " +// << fvc::domainIntegrate(rho*compostion.ft()).value() << endl; + +OFstream logSummaryFile +( + runTime.path()/("logSummary." + runTime.timeName() + ".dat") +); + +logSummaryFile + << "# CA" << " p" << " T" << " u'" << endl; diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C index b75091650a6..94280fcd35d 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C @@ -147,6 +147,13 @@ void Foam::twoPhaseMixtureEThermo::correct() } +Foam::word Foam::twoPhaseMixtureEThermo::thermoName() const +{ + NotImplemented; + return word::null; +} + + Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::he ( const volScalarField& p, diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H index a63db6f0ff2..5e5937d21fd 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H @@ -278,6 +278,9 @@ public: //- Correct the thermo fields virtual void correct(); + //- Return the name of the thermo physics + virtual word thermoName() const; + //- Read properties virtual bool read(); diff --git a/src/combustionModels/combustionModel/combustionModelTemplates.C b/src/combustionModels/combustionModel/combustionModelTemplates.C index a9682776ce3..953578277cf 100644 --- a/src/combustionModels/combustionModel/combustionModelTemplates.C +++ b/src/combustionModels/combustionModel/combustionModelTemplates.C @@ -35,15 +35,12 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New { IOobject combIO ( - IOobject - ( - thermo.phasePropertyName(combustionProperties), - thermo.db().time().constant(), - thermo.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ) + thermo.phasePropertyName(combustionProperties), + thermo.db().time().constant(), + thermo.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE, + false ); word combModelName("none"); @@ -83,13 +80,11 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New combModelName + '<' + CombustionModel::reactionThermo::typeName + ',' + thermo.thermoName() + '>'; - typename cstrTableType::iterator compCstrIter = - cstrTable->find(compCombModelName); + auto compCstrIter = cstrTable->cfind(compCombModelName); - typename cstrTableType::iterator thermoCstrIter = - cstrTable->find(thermoCombModelName); + auto thermoCstrIter = cstrTable->cfind(thermoCombModelName); - if (compCstrIter == cstrTable->end() && thermoCstrIter == cstrTable->end()) + if (!compCstrIter.found() && !thermoCstrIter.found()) { FatalErrorInFunction << "Unknown " << combustionModel::typeName << " type " @@ -170,7 +165,7 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New return autoPtr<CombustionModel> ( - thermoCstrIter != cstrTable->end() + thermoCstrIter.found() ? thermoCstrIter()(combModelName, thermo, turb, combustionProperties) : compCstrIter()(combModelName, thermo, turb, combustionProperties) ); diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C index 1c541431099..fc9bb95df90 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C @@ -31,9 +31,9 @@ License // * * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * // -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> void Foam::combustionModels:: -diffusionMulticomponent<CombThermoType, ThermoType>::init() +diffusionMulticomponent<ReactionThermo, ThermoType>::init() { // Load default values this->coeffs().readIfPresent("Ci", Ci_); @@ -121,25 +121,31 @@ diffusionMulticomponent<CombThermoType, ThermoType>::init() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> -Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>:: +template<class ReactionThermo, class ThermoType> +Foam::combustionModels::diffusionMulticomponent<ReactionThermo, ThermoType>:: diffusionMulticomponent ( const word& modelType, - const fvMesh& mesh, - const word& combustionProperties, - const word& phaseName + ReactionThermo& thermo, + const compressibleTurbulenceModel& turb, + const word& combustionProperties ) : - CombThermoType(modelType, mesh, combustionProperties, phaseName), + ChemistryCombustion<ReactionThermo> + ( + modelType, + thermo, + turb, + combustionProperties + ), reactions_ ( - dynamic_cast<const reactingMixture<ThermoType>&>(this->thermo()) + dynamic_cast<const reactingMixture<ThermoType>&>(thermo) ), specieThermo_ ( - dynamic_cast<const reactingMixture<ThermoType>&> - (this->thermo()).speciesData() + dynamic_cast<const reactingMixture<ThermoType>&>(thermo). + speciesData() ), RijPtr_(reactions_.size()), Ci_(reactions_.size(), 1.0), @@ -162,17 +168,17 @@ diffusionMulticomponent // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> Foam::tmp<Foam::volScalarField> Foam::combustionModels:: -diffusionMulticomponent<CombThermoType, ThermoType>::tc() const +diffusionMulticomponent<ReactionThermo, ThermoType>::tc() const { return this->chemistryPtr_->tc(); } -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> void Foam::combustionModels:: -diffusionMulticomponent<CombThermoType, ThermoType>::correct() +diffusionMulticomponent<ReactionThermo, ThermoType>::correct() { if (this->active()) { @@ -359,9 +365,9 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct() } -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> Foam::tmp<Foam::fvScalarMatrix> -Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>::R +Foam::combustionModels::diffusionMulticomponent<ReactionThermo, ThermoType>::R ( volScalarField& Y ) const @@ -382,10 +388,10 @@ Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>::R } -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> Foam::tmp<Foam::volScalarField> -Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>:: -Qdot() const +Foam::combustionModels:: +diffusionMulticomponent<ReactionThermo, ThermoType>::Qdot() const { tmp<volScalarField> tQdot ( @@ -416,11 +422,11 @@ Qdot() const } -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> bool Foam::combustionModels:: -diffusionMulticomponent<CombThermoType, ThermoType>::read() +diffusionMulticomponent<ReactionThermo, ThermoType>::read() { - if (CombThermoType::read()) + if (ChemistryCombustion<ReactionThermo>::read()) { this->coeffs().readIfPresent("Ci", Ci_); this->coeffs().readIfPresent("sigma", sigma_); diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H index 14bfd7b89f1..40258d9ff13 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H @@ -72,6 +72,7 @@ SourceFiles #ifndef diffusionMulticomponent_H #define diffusionMulticomponent_H +#include "ChemistryCombustion.H" #include "scalarList.H" #include "tmp.H" #include "Reaction.H" @@ -87,10 +88,10 @@ namespace combustionModels Class diffusionMulticomponent Declaration \*---------------------------------------------------------------------------*/ -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> class diffusionMulticomponent : - public CombThermoType + public ChemistryCombustion<ReactionThermo> { // Private data @@ -170,9 +171,9 @@ public: diffusionMulticomponent ( const word& modelType, - const fvMesh& mesh, - const word& combustionProperties, - const word& phaseName + ReactionThermo& thermo, + const compressibleTurbulenceModel& turb, + const word& combustionProperties ); diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponents.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponents.C index 3aa6b794019..cc518e20546 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponents.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponents.C @@ -25,37 +25,45 @@ License #include "makeCombustionTypes.H" +#include "psiReactionThermo.H" +#include "rhoReactionThermo.H" #include "thermoPhysicsTypes.H" -#include "psiChemistryCombustion.H" -#include "rhoChemistryCombustion.H" + #include "diffusionMulticomponent.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Combustion models based on sensibleEnthalpy +namespace Foam +{ makeCombustionTypesThermo ( diffusionMulticomponent, - psiChemistryCombustion, - gasHThermoPhysics, - psiCombustionModel + psiReactionThermo, + gasHThermoPhysics ); makeCombustionTypesThermo ( diffusionMulticomponent, - rhoChemistryCombustion, - gasHThermoPhysics, - rhoCombustionModel + psiReactionThermo, + constGasHThermoPhysics ); makeCombustionTypesThermo ( diffusionMulticomponent, - rhoChemistryCombustion, - incompressibleGasHThermoPhysics, - rhoCombustionModel + rhoReactionThermo, + gasHThermoPhysics ); +makeCombustionTypesThermo +( + diffusionMulticomponent, + rhoReactionThermo, + constGasHThermoPhysics +); + +} + // ************************************************************************* // diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index 55d57a41703..b86638dbe07 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -31,22 +31,22 @@ namespace combustionModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> -eddyDissipationDiffusionModel<CombThermoType, ThermoType>:: +template<class ReactionThermo, class ThermoType> +eddyDissipationDiffusionModel<ReactionThermo, ThermoType>:: eddyDissipationDiffusionModel ( const word& modelType, - const fvMesh& mesh, - const word& combustionProperties, - const word& phaseName + ReactionThermo& thermo, + const compressibleTurbulenceModel& turb, + const word& combustionProperties ) : - eddyDissipationModelBase<CombThermoType, ThermoType> + eddyDissipationModelBase<ReactionThermo, ThermoType> ( modelType, - mesh, - combustionProperties, - phaseName + thermo, + turb, + combustionProperties ), Cd_(readScalar(this->coeffs().lookup("Cd"))) {} @@ -54,8 +54,8 @@ eddyDissipationDiffusionModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> -eddyDissipationDiffusionModel<CombThermoType, ThermoType>:: +template<class ReactionThermo, class ThermoType> +eddyDissipationDiffusionModel<ReactionThermo, ThermoType>:: ~eddyDissipationDiffusionModel() {} @@ -63,17 +63,17 @@ eddyDissipationDiffusionModel<CombThermoType, ThermoType>:: // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> Foam::tmp<Foam::volScalarField> -eddyDissipationDiffusionModel<CombThermoType, ThermoType>::timeScale() +eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::timeScale() { return (max(this->rtTurb(), this->rtDiff())); } -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> Foam::tmp<Foam::volScalarField> -eddyDissipationDiffusionModel<CombThermoType, ThermoType>::rtDiff() const +eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::rtDiff() const { tmp<volScalarField> tdelta ( @@ -102,10 +102,10 @@ eddyDissipationDiffusionModel<CombThermoType, ThermoType>::rtDiff() const } -template<class CombThermoType, class ThermoType> -bool eddyDissipationDiffusionModel<CombThermoType, ThermoType>::read() +template<class ReactionThermo, class ThermoType> +bool eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::read() { - if (eddyDissipationModelBase<CombThermoType, ThermoType>::read()) + if (eddyDissipationModelBase<ReactionThermo, ThermoType>::read()) { this->coeffs().lookup("Cd") >> Cd_; return true; diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.H b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.H index 44246287880..f139f93a059 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.H +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.H @@ -55,10 +55,10 @@ namespace combustionModels Class eddyDissipationDiffusionModel Declaration \*---------------------------------------------------------------------------*/ -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> class eddyDissipationDiffusionModel : - public eddyDissipationModelBase<CombThermoType, ThermoType> + public eddyDissipationModelBase<ReactionThermo, ThermoType> { // Private data @@ -87,9 +87,9 @@ public: eddyDissipationDiffusionModel ( const word& modelType, - const fvMesh& mesh, - const word& combustionProperties, - const word& phaseName + ReactionThermo& thermo, + const compressibleTurbulenceModel& turb, + const word& combustionProperties ); diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModels.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModels.C index 70c2c837914..03e5b5d1bc1 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModels.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModels.C @@ -26,8 +26,8 @@ License #include "makeCombustionTypes.H" #include "thermoPhysicsTypes.H" -#include "psiThermoCombustion.H" -#include "rhoThermoCombustion.H" +#include "psiReactionThermo.H" +#include "rhoReactionThermo.H" #include "eddyDissipationDiffusionModel.H" #include "eddyDissipationModelBase.H" @@ -35,37 +35,37 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + makeCombustionTypesThermo ( eddyDissipationDiffusionModel, - psiThermoCombustion, - gasHThermoPhysics, - psiCombustionModel + psiReactionThermo, + gasHThermoPhysics ); makeCombustionTypesThermo ( eddyDissipationDiffusionModel, - psiThermoCombustion, - constGasHThermoPhysics, - psiCombustionModel + psiReactionThermo, + constGasHThermoPhysics ); makeCombustionTypesThermo ( eddyDissipationDiffusionModel, - rhoThermoCombustion, - gasHThermoPhysics, - rhoCombustionModel + rhoReactionThermo, + gasHThermoPhysics ); makeCombustionTypesThermo ( eddyDissipationDiffusionModel, - rhoThermoCombustion, - constGasHThermoPhysics, - rhoCombustionModel + rhoReactionThermo, + constGasHThermoPhysics ); +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C index 23b3b4e780e..45eeff19725 100644 --- a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C +++ b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C @@ -32,21 +32,21 @@ namespace combustionModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> -eddyDissipationModelBase<CombThermoType, ThermoType>::eddyDissipationModelBase +template<class ReactionThermo, class ThermoType> +eddyDissipationModelBase<ReactionThermo, ThermoType>::eddyDissipationModelBase ( const word& modelType, - const fvMesh& mesh, - const word& combustionProperties, - const word& phaseName + ReactionThermo& thermo, + const compressibleTurbulenceModel& turb, + const word& combustionProperties ) : - singleStepCombustion<CombThermoType, ThermoType> + singleStepCombustion<ReactionThermo, ThermoType> ( modelType, - mesh, - combustionProperties, - phaseName + thermo, + turb, + combustionProperties ), CEDC_(readScalar(this->coeffs().lookup("CEDC"))) {} @@ -54,17 +54,17 @@ eddyDissipationModelBase<CombThermoType, ThermoType>::eddyDissipationModelBase // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> -eddyDissipationModelBase<CombThermoType, ThermoType>:: +template<class ReactionThermo, class ThermoType> +eddyDissipationModelBase<ReactionThermo, ThermoType>:: ~eddyDissipationModelBase() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> Foam::tmp<Foam::volScalarField> -eddyDissipationModelBase<CombThermoType, ThermoType>::rtTurb() const +eddyDissipationModelBase<ReactionThermo, ThermoType>::rtTurb() const { return CEDC_*this->turbulence().epsilon() @@ -76,8 +76,8 @@ eddyDissipationModelBase<CombThermoType, ThermoType>::rtTurb() const } -template<class CombThermoType, class ThermoType> -void eddyDissipationModelBase<CombThermoType, ThermoType>::correct() +template<class ReactionThermo, class ThermoType> +void eddyDissipationModelBase<ReactionThermo, ThermoType>::correct() { this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); @@ -87,15 +87,13 @@ void eddyDissipationModelBase<CombThermoType, ThermoType>::correct() const label fuelI = this->singleMixturePtr_->fuelIndex(); - const volScalarField& YFuel = - this->thermoPtr_->composition().Y()[fuelI]; + const volScalarField& YFuel = this->thermo_.composition().Y()[fuelI]; const dimensionedScalar s = this->singleMixturePtr_->s(); - if (this->thermoPtr_->composition().contains("O2")) + if (this->thermo_.composition().contains("O2")) { - const volScalarField& YO2 = - this->thermoPtr_->composition().Y("O2"); + const volScalarField& YO2 = this->thermo_.composition().Y("O2"); this->wFuel_ == this->rho() @@ -113,10 +111,10 @@ void eddyDissipationModelBase<CombThermoType, ThermoType>::correct() } -template<class CombThermoType, class ThermoType> -bool eddyDissipationModelBase<CombThermoType, ThermoType>::read() +template<class ReactionThermo, class ThermoType> +bool eddyDissipationModelBase<ReactionThermo, ThermoType>::read() { - if (singleStepCombustion<CombThermoType, ThermoType>::read()) + if (singleStepCombustion<ReactionThermo, ThermoType>::read()) { this->coeffs().lookup("CEDC") >> CEDC_; return true; diff --git a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.H b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.H index 6803551d851..721c8358469 100644 --- a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.H +++ b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.H @@ -51,10 +51,10 @@ namespace combustionModels Class eddyDissipationModelBase Declaration \*---------------------------------------------------------------------------*/ -template<class CombThermoType, class ThermoType> +template<class ReactionThermo, class ThermoType> class eddyDissipationModelBase : - public singleStepCombustion<CombThermoType, ThermoType> + public singleStepCombustion<ReactionThermo, ThermoType> { // Private data @@ -79,9 +79,9 @@ public: eddyDissipationModelBase ( const word& modelType, - const fvMesh& mesh, - const word& combustionProperties, - const word& phaseName + ReactionThermo& thermo, + const compressibleTurbulenceModel& turb, + const word& combustionProperties ); diff --git a/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C index cc34b0f1196..886e2a8e49a 100644 --- a/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C +++ b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C @@ -24,8 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "reactionsSensitivityAnalysis.H" -#include "psiChemistryModel.H" -#include "rhoChemistryModel.H" +#include "BasicChemistryModel.H" +#include "psiReactionThermo.H" +#include "rhoReactionThermo.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -33,7 +34,13 @@ License namespace Foam { // Psi-based chemistry -typedef functionObjects::reactionsSensitivityAnalysis<psiChemistryModel> +typedef functionObjects::reactionsSensitivityAnalysis + < + BasicChemistryModel + < + psiReactionThermo + > + > psiReactionsSensitivityAnalysisFunctionObject; defineTemplateTypeNameAndDebugWithName @@ -44,7 +51,13 @@ defineTemplateTypeNameAndDebugWithName ); // Rho-based chemistry -typedef functionObjects::reactionsSensitivityAnalysis<rhoChemistryModel> +typedef functionObjects::reactionsSensitivityAnalysis + < + BasicChemistryModel + < + rhoReactionThermo + > + > rhoReactionsSensitivityAnalysisFunctionObject; defineTemplateTypeNameAndDebugWithName diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index ab360048a7c..087cd5c537b 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C @@ -275,7 +275,7 @@ makeThermoPhysicsReactionThermos icoPoly8TranspJanafEThermoPhysics ); -makeReactionMixtureThermos +makeThermoPhysicsReactionThermos ( rhoThermo, rhoReactionThermo, @@ -511,7 +511,7 @@ makeThermoPhysicsReactionThermos icoPoly8TranspJanafHThermoPhysics ); -makeReactionMixtureThermos +makeThermoPhysicsReactionThermos ( rhoThermo, rhoReactionThermo, diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/constant/combustionProperties b/tutorials/combustion/fireFoam/LES/compartmentFire/constant/combustionProperties index d9ca794ff1b..9d024ca2bf9 100644 --- a/tutorials/combustion/fireFoam/LES/compartmentFire/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/LES/compartmentFire/constant/combustionProperties @@ -15,11 +15,11 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel eddyDissipationDiffusionModel<psiThermoCombustion,gasHThermoPhysics>; +combustionModel EDM; active on; -eddyDissipationDiffusionModelCoeffs +EDMCoeffs { semiImplicit false; CEDC 4; @@ -28,8 +28,8 @@ eddyDissipationDiffusionModelCoeffs infinitelyFastChemistryCoeffs { - semiImplicit no; - C 5.0; + semiImplicit no; + C 5.0; } // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/U b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/U similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/U rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/U diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/epsilon b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/epsilon similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/epsilon rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/epsilon diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/k b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/k similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/k rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/k diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/nut b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/nut similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/nut rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/nut diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/p b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/p similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/0/p rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/0/p diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/README.txt b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/README.txt similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/README.txt rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/README.txt diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/constant/dynamicMeshDict b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/constant/dynamicMeshDict similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/constant/dynamicMeshDict rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/constant/dynamicMeshDict diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/constant/transportProperties b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/constant/transportProperties similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/constant/transportProperties rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/constant/transportProperties diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/constant/turbulenceProperties similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/constant/turbulenceProperties rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/constant/turbulenceProperties diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/blockMeshDict b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/blockMeshDict similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/blockMeshDict rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/blockMeshDict diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/controlDict b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/controlDict similarity index 97% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/controlDict rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/controlDict index 3cda572842f..e4555f37d57 100644 --- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application pimpleDyMFoam; +application pimpleFoam; startFrom latestTime; diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/fvSchemes b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/fvSchemes similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/fvSchemes rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/fvSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/fvSolution b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/fvSolution similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/oscillatingInletPeriodicAMI2D/system/fvSolution rename to tutorials/incompressible/pimpleFoam/RAS/oscillatingInletPeriodicAMI2D/system/fvSolution diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/ensightWrite b/tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam/system/ensightWrite similarity index 100% rename from tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/ensightWrite rename to tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam/system/ensightWrite -- GitLab