diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index e7cefbae2b..bb31b2529e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -25,8 +25,6 @@ License #include "MovingPhaseModel.H" #include "phaseSystem.H" -#include "phaseCompressibleMomentumTransportModel.H" -#include "phaseThermophysicalTransportModel.H" #include "fixedValueFvPatchFields.H" #include "slipFvPatchFields.H" #include "partialSlipFvPatchFields.H" @@ -37,8 +35,6 @@ License #include "fvcDdt.H" #include "fvcDiv.H" #include "fvcFlux.H" -#include "surfaceInterpolate.H" -#include "fvMatrix.H" // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // @@ -177,7 +173,11 @@ Foam::MovingPhaseModel::MovingPhaseModel ), thermophysicalTransport_ ( - phaseThermophysicalTransportModel::New(turbulence_, this->thermo()) + PhaseThermophysicalTransportModel + < + phaseCompressibleMomentumTransportModel, + typename BasePhaseModel::thermoModel + >::New(turbulence_, this->thermo_) ), continuityError_ ( diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H index 313d3336cb..7ed4af3d32 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H @@ -46,7 +46,7 @@ SourceFiles #include "phaseModel.H" #include "phaseCompressibleMomentumTransportModel.H" -#include "phaseThermophysicalTransportModel.H" +#include "PhaseThermophysicalTransportModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -91,7 +91,14 @@ protected: autoPtr turbulence_; //- Thermophysical transport model - autoPtr thermophysicalTransport_; + autoPtr + < + PhaseThermophysicalTransportModel + < + phaseCompressibleMomentumTransportModel, + typename BasePhaseModel::thermoModel + > + > thermophysicalTransport_; //- Continuity error volScalarField continuityError_; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseThermophysicalTransportModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseThermophysicalTransportModel.H deleted file mode 100644 index b79eae9b03..0000000000 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseThermophysicalTransportModel.H +++ /dev/null @@ -1,53 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 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 . - -Typedef - Foam::phaseThermophysicalTransportModel - -Description - Typedef for phaseThermophysicalTransportModel - -\*---------------------------------------------------------------------------*/ - -#ifndef phaseThermophysicalTransportModel_H -#define phaseThermophysicalTransportModel_H - -#include "PhaseThermophysicalTransportModel.H" -#include "phaseCompressibleMomentumTransportModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - typedef PhaseThermophysicalTransportModel - < - phaseCompressibleMomentumTransportModel, - fluidThermo - > phaseThermophysicalTransportModel; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C index 8c730480c9..76b3a50a7b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C @@ -24,20 +24,12 @@ License \*---------------------------------------------------------------------------*/ #include "ThermoPhaseModel.H" - #include "phaseSystem.H" -#include "fvmDdt.H" -#include "fvmDiv.H" -#include "fvmSup.H" -#include "fvmLaplacian.H" -#include "fvcDdt.H" -#include "fvcDiv.H" - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::ThermoPhaseModel::ThermoPhaseModel +template +Foam::ThermoPhaseModel::ThermoPhaseModel ( const phaseSystem& fluid, const word& phaseName, @@ -45,7 +37,7 @@ Foam::ThermoPhaseModel::ThermoPhaseModel ) : BasePhaseModel(fluid, phaseName, index), - thermo_(ThermoType::New(fluid.mesh(), this->name())) + thermo_(ThermoModel::New(fluid.mesh(), this->name())) { thermo_->validate ( @@ -58,62 +50,62 @@ Foam::ThermoPhaseModel::ThermoPhaseModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -Foam::ThermoPhaseModel::~ThermoPhaseModel() +template +Foam::ThermoPhaseModel::~ThermoPhaseModel() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -bool Foam::ThermoPhaseModel::incompressible() const +template +bool Foam::ThermoPhaseModel::incompressible() const { return thermo_().incompressible(); } -template -bool Foam::ThermoPhaseModel::isochoric() const +template +bool Foam::ThermoPhaseModel::isochoric() const { return thermo_().isochoric(); } -template +template const Foam::rhoThermo& -Foam::ThermoPhaseModel::thermo() const +Foam::ThermoPhaseModel::thermo() const { return thermo_(); } -template +template Foam::rhoThermo& -Foam::ThermoPhaseModel::thermoRef() +Foam::ThermoPhaseModel::thermoRef() { return thermo_(); } -template +template Foam::tmp -Foam::ThermoPhaseModel::rho() const +Foam::ThermoPhaseModel::rho() const { return thermo_->rho(); } -template +template Foam::tmp -Foam::ThermoPhaseModel::mu() const +Foam::ThermoPhaseModel::mu() const { return thermo_->mu(); } -template +template Foam::tmp -Foam::ThermoPhaseModel::mu +Foam::ThermoPhaseModel::mu ( const label patchi ) const @@ -122,17 +114,17 @@ Foam::ThermoPhaseModel::mu } -template +template Foam::tmp -Foam::ThermoPhaseModel::nu() const +Foam::ThermoPhaseModel::nu() const { return thermo_->nu(); } -template +template Foam::tmp -Foam::ThermoPhaseModel::nu +Foam::ThermoPhaseModel::nu ( const label patchi ) const diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H index 92c7f0ad88..62ea437bee 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H @@ -39,8 +39,6 @@ SourceFiles #ifndef ThermoPhaseModel_H #define ThermoPhaseModel_H -#include "phaseModel.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -52,7 +50,7 @@ class rhoThermo; Class ThermoPhaseModel Declaration \*---------------------------------------------------------------------------*/ -template +template class ThermoPhaseModel : public BasePhaseModel @@ -62,11 +60,14 @@ protected: // Protected data //- Thermophysical model - autoPtr thermo_; + autoPtr thermo_; public: + typedef ThermoModel thermoModel; + + // Constructors ThermoPhaseModel diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/Make/files index f9623dcab6..3d61c772fe 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/Make/files @@ -1,3 +1,4 @@ phaseThermophysicalTransportModels.C +rhoReactionPhaseThermophysicalTransportModels.C -LIB = $(FOAM_LIBBIN)/libphaseReactingTherophysicalTransportModels +LIB = $(FOAM_LIBBIN)/libphaseReactingThermophysicalTransportModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/phaseThermophysicalTransportModels.C b/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/phaseThermophysicalTransportModels.C index 6572a21d65..26dfade44b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/phaseThermophysicalTransportModels.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/phaseThermophysicalTransportModels.C @@ -24,10 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "PhaseThermophysicalTransportModel.H" - #include "phaseCompressibleMomentumTransportModel.H" -#include "addToRunTimeSelectionTable.H" #include "makeThermophysicalTransportModel.H" +#include "addToRunTimeSelectionTable.H" #include "laminarThermophysicalTransportModel.H" #include "RASThermophysicalTransportModel.H" @@ -39,7 +38,7 @@ makeThermophysicalTransportModelTypes ( PhaseThermophysicalTransportModel, phaseCompressibleMomentumTransportModel, - fluidThermo + rhoThermo ); @@ -47,7 +46,7 @@ makeThermophysicalTransportModels ( PhaseThermophysicalTransportModel, phaseCompressibleMomentumTransportModel, - fluidThermo + rhoThermo ); @@ -56,7 +55,7 @@ makeThermophysicalTransportModels ( \ PhaseThermophysicalTransportModel, \ phaseCompressibleMomentumTransportModel, \ - fluidThermo, \ + rhoThermo, \ laminar, \ Type \ ) @@ -66,7 +65,7 @@ makeThermophysicalTransportModels ( \ PhaseThermophysicalTransportModel, \ phaseCompressibleMomentumTransportModel, \ - fluidThermo, \ + rhoThermo, \ SType, \ Type \ ) @@ -76,7 +75,7 @@ makeThermophysicalTransportModels ( \ PhaseThermophysicalTransportModel, \ phaseCompressibleMomentumTransportModel, \ - fluidThermo, \ + rhoThermo, \ RAS, \ Type \ ) @@ -86,7 +85,7 @@ makeThermophysicalTransportModels ( \ PhaseThermophysicalTransportModel, \ phaseCompressibleMomentumTransportModel, \ - fluidThermo, \ + rhoThermo, \ LES, \ Type \ ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/rhoReactionPhaseThermophysicalTransportModels.C b/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/rhoReactionPhaseThermophysicalTransportModels.C new file mode 100644 index 0000000000..6a097835e7 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseThermophysicalTransportModels/rhoReactionPhaseThermophysicalTransportModels.C @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2020 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 "PhaseThermophysicalTransportModel.H" +#include "phaseCompressibleMomentumTransportModel.H" +#include "rhoReactionThermo.H" +#include "makeThermophysicalTransportModel.H" +#include "addToRunTimeSelectionTable.H" + +#include "laminarThermophysicalTransportModel.H" +#include "RASThermophysicalTransportModel.H" +#include "LESThermophysicalTransportModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeThermophysicalTransportModelTypes +( + PhaseThermophysicalTransportModel, + phaseCompressibleMomentumTransportModel, + rhoReactionThermo +); + + +makeThermophysicalTransportModels +( + PhaseThermophysicalTransportModel, + phaseCompressibleMomentumTransportModel, + rhoReactionThermo +); + + +#define makeLaminarThermophysicalTransportModel(Type) \ + makeThermophysicalTransportModel \ + ( \ + PhaseThermophysicalTransportModel, \ + phaseCompressibleMomentumTransportModel, \ + rhoReactionThermo, \ + laminar, \ + Type \ + ) + +#define makeRASLESThermophysicalTransportModel(SType, Type) \ + makeTurbulenceThermophysicalTransportModel \ + ( \ + PhaseThermophysicalTransportModel, \ + phaseCompressibleMomentumTransportModel, \ + rhoReactionThermo, \ + SType, \ + Type \ + ) + +#define makeRASThermophysicalTransportModel(Type) \ + makeThermophysicalTransportModel \ + ( \ + PhaseThermophysicalTransportModel, \ + phaseCompressibleMomentumTransportModel, \ + rhoReactionThermo, \ + RAS, \ + Type \ + ) + +#define makeLESThermophysicalTransportModel(Type) \ + makeThermophysicalTransportModel \ + ( \ + PhaseThermophysicalTransportModel, \ + phaseCompressibleMomentumTransportModel, \ + rhoReactionThermo, \ + LES, \ + Type \ + ) + + +// -------------------------------------------------------------------------- // +// Laminar models +// -------------------------------------------------------------------------- // + +#include "Fourier.H" +makeLaminarThermophysicalTransportModel(Fourier); + + +// -------------------------------------------------------------------------- // +// RAS models +// -------------------------------------------------------------------------- // + +#include "eddyDiffusivity.H" +makeRASLESThermophysicalTransportModel(RAS, eddyDiffusivity); + + +// -------------------------------------------------------------------------- // +// LES models +// -------------------------------------------------------------------------- // + +#include "eddyDiffusivity.H" +makeRASLESThermophysicalTransportModel(LES, eddyDiffusivity); + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options index 0005c14230..4ec333889d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options @@ -18,7 +18,7 @@ EXE_LIBS = \ -lreactingEulerianInterfacialModels \ -lreactingEulerianInterfacialCompositionModels \ -lphaseReactingMomentumTransportModels \ - -lphaseReactingTherophysicalTransportModels \ + -lphaseReactingThermophysicalTransportModels \ -lthermophysicalTransportModels \ -lfiniteVolume \ -lfvOptions \ diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options index c0bb663f03..322b913453 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Make/options @@ -18,7 +18,7 @@ EXE_LIBS = \ -lreactingEulerianInterfacialModels \ -lreactingEulerianInterfacialCompositionModels \ -lphaseReactingMomentumTransportModels \ - -lphaseReactingTherophysicalTransportModels \ + -lphaseReactingThermophysicalTransportModels \ -ltwoPhaseReactingMomentumTransportModels \ -lthermophysicalTransportModels \ -lfiniteVolume \