From 96f07b0137e7128aba23a6b654ad8384f430e70e Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 16 Mar 2021 16:47:07 +0000 Subject: [PATCH] surfaceFilmModels: Removed dependency on the deprecated SLGThermo SLGThermo has been moved to lagrangian, which still depends on it, pending complete removal and replacement with a more rational interface to the carrier phase thermodynamics. --- .../solvers/combustion/fireFoam/Make/options | 2 - .../reactingParticleFoam/Make/options | 2 - .../buoyantReactingParticleFoam/Make/options | 2 - .../engineFoam/Make/options | 2 - .../simpleReactingParticleFoam/Make/options | 2 - .../compressibleInterFoam/Make/options | 2 - .../VoFSurfaceFilm/VoFSurfaceFilm.C | 21 ++-- .../VoFSurfaceFilm/VoFSurfaceFilm.H | 12 +- .../interfacialCompositionModels/Make/options | 1 - src/lagrangian/parcel/Make/files | 3 + src/lagrangian/parcel/Make/options | 2 - .../parcel}/SLGThermo/SLGThermo.C | 2 +- .../parcel}/SLGThermo/SLGThermo.H | 2 +- src/lagrangian/parcelTurbulence/Make/options | 2 - src/radiationModels/Make/options | 2 - .../greyMean/greyMean.H | 4 +- src/regionModels/surfaceFilmModels/Make/files | 3 +- .../surfaceFilmModels/Make/options | 2 - .../wallFunctions/Make/options | 2 - .../liquidFilmThermo/liquidFilmThermo.C | 65 ++++------- .../liquidFilmThermo/liquidFilmThermo.H | 7 +- .../speciePhaseChange/speciePhaseChange.C | 96 ++++++++++++++++ .../speciePhaseChange/speciePhaseChange.H | 107 ++++++++++++++++++ .../standardPhaseChange/standardPhaseChange.C | 11 +- .../standardPhaseChange/standardPhaseChange.H | 6 +- .../waxSolventEvaporation.C | 11 +- .../waxSolventEvaporation.H | 6 +- .../thermoSingleLayer/thermoSingleLayer.C | 31 +++-- .../thermoSingleLayer/thermoSingleLayer.H | 15 ++- .../thermoSingleLayer/thermoSingleLayerI.H | 6 +- src/thermophysicalModels/Allwmake | 1 - src/thermophysicalModels/SLGThermo/Make/files | 3 - .../SLGThermo/Make/options | 9 -- .../liquidProperties/Ar/Ar.C | 3 +- .../liquidProperties/C10H22/C10H22.C | 3 +- .../liquidProperties/C12H26/C12H26.C | 3 +- .../liquidProperties/C13H28/C13H28.C | 3 +- .../liquidProperties/C14H30/C14H30.C | 3 +- .../liquidProperties/C16H34/C16H34.C | 3 +- .../liquidProperties/C2H5OH/C2H5OH.C | 3 +- .../liquidProperties/C2H6/C2H6.C | 3 +- .../liquidProperties/C2H6O/C2H6O.C | 3 +- .../liquidProperties/C3H6O/C3H6O.C | 3 +- .../liquidProperties/C3H8/C3H8.C | 3 +- .../liquidProperties/C4H10O/C4H10O.C | 3 +- .../liquidProperties/C6H14/C6H14.C | 3 +- .../liquidProperties/C6H6/C6H6.C | 3 +- .../liquidProperties/C7H16/C7H16.C | 3 +- .../liquidProperties/C7H8/C7H8.C | 3 +- .../liquidProperties/C8H10/C8H10.C | 3 +- .../liquidProperties/C8H18/C8H18.C | 3 +- .../liquidProperties/C9H20/C9H20.C | 3 +- .../liquidProperties/CH3OH/CH3OH.C | 3 +- .../liquidProperties/CH4N2O/CH4N2O.C | 3 +- .../liquidProperties/H2O/H2O.C | 3 +- .../liquidProperties/IC8H18/IC8H18.C | 3 +- .../liquidProperties/IDEA/IDEA.C | 3 +- .../liquidProperties/MB/MB.C | 3 +- .../liquidProperties/N2/N2.C | 3 +- .../liquidProperties/aC10H7CH3/aC10H7CH3.C | 3 +- .../liquidProperties/bC10H7CH3/bC10H7CH3.C | 3 +- .../liquidProperties/iC3H8O/iC3H8O.C | 3 +- .../liquidProperties/liquidProperties.C | 11 +- .../liquidProperties/liquidProperties.H | 10 +- .../liquidProperties/nC3H8O/nC3H8O.C | 3 +- .../thermophysicalProperties.H | 6 +- .../plateFilm/constant/surfaceFilmProperties | 38 ++++++- .../constant/thermophysicalProperties.liquid | 2 +- 68 files changed, 418 insertions(+), 183 deletions(-) rename src/{thermophysicalModels/SLGThermo => lagrangian/parcel}/SLGThermo/SLGThermo.C (98%) rename src/{thermophysicalModels/SLGThermo => lagrangian/parcel}/SLGThermo/SLGThermo.H (98%) create mode 100644 src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.C create mode 100644 src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.H delete mode 100644 src/thermophysicalModels/SLGThermo/Make/files delete mode 100644 src/thermophysicalModels/SLGThermo/Make/options diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index b26f04c300..602150e9bf 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -13,7 +13,6 @@ EXE_INC = \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ @@ -33,7 +32,6 @@ EXE_LIBS = \ -lspecie \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lchemistryModel \ -lcombustionModels \ -lregionModels \ diff --git a/applications/solvers/lagrangian/reactingParticleFoam/Make/options b/applications/solvers/lagrangian/reactingParticleFoam/Make/options index 2a10542b0e..1f4db9ada2 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParticleFoam/Make/options @@ -13,7 +13,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -36,7 +35,6 @@ EXE_LIBS = \ -lspecie \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lchemistryModel \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options index 43716bc846..17c3321d21 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options @@ -14,7 +14,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -37,7 +36,6 @@ EXE_LIBS = \ -lspecie \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lchemistryModel \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options b/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options index ca337267f3..ca8c37bf7b 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options @@ -14,7 +14,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -38,7 +37,6 @@ EXE_LIBS = \ -lspecie \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lchemistryModel \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options b/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options index 0f28199b9d..b53da01822 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options @@ -13,7 +13,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ @@ -36,7 +35,6 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lthermophysicalProperties \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lchemistryModel \ -lODE \ -lregionModels \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 685f4a03e9..5bbd9133de 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -13,7 +13,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -34,7 +33,6 @@ EXE_LIBS = \ -lmomentumTransportModels \ -lfluidThermoMomentumTransportModels \ -lVoFphaseCompressibleMomentumTransportModels \ - -lSLGThermo \ -lsurfaceFilmModels \ -lsurfaceFilmDerivedFvPatchFields \ -lfiniteVolume \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C index 9104cdbd98..f198202925 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C @@ -58,15 +58,6 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm ) : fvModel(sourceName, modelType, dict, mesh), - phaseName_(dict.lookup("phase")), - thermo_ - ( - mesh.lookupObject - ( - IOobject::groupName(basicThermo::dictName, phaseName_) - ) - ), - slgThermo_(mesh, thermo_), film_ ( regionModels::surfaceFilmModel::New @@ -75,6 +66,14 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm mesh.lookupObject("g") ) ), + phaseName_(dict.lookup("phase")), + thermo_ + ( + mesh.lookupObject + ( + IOobject::groupName(basicThermo::dictName, phaseName_) + ) + ), curTimeIndex_(-1) {} @@ -159,11 +158,7 @@ void Foam::fv::VoFSurfaceFilm::addSup Info<< type() << ": applying source to " << eqn.psi().name() << endl; } - // Temporary hack to handle mass and corresponding momentum loss from - // the primary region until SU() is added to film eqn += film_->SU(); - // eqn += posPart(film_->Srho())*film_->U()); - // eqn += fvm::Sp(negPart(film_->Srho()), eqn.psi()); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H index 7e84ba7ab3..e7cac86af3 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H @@ -48,7 +48,6 @@ SourceFiles #include "fvModel.H" #include "rhoThermo.H" -#include "SLGThermo.H" #include "surfaceFilmModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -68,17 +67,14 @@ class VoFSurfaceFilm { // Private Data + //- The surface film model pointer + mutable autoPtr film_; + //- The name of the phase which transfers to the film word phaseName_; //- Reference to the primary region thermo - const rhoThermo& thermo_; - - //- The SLG thermo required by the surfaceFilmModel - SLGThermo slgThermo_; - - //- The surface film model pointer - mutable autoPtr film_; + const fluidThermo& thermo_; //- Current time index (used for updating) mutable label curTimeIndex_; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCompositionModels/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCompositionModels/Make/options index 061b8032a2..5e268a7105 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCompositionModels/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCompositionModels/Make/options @@ -4,7 +4,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \ diff --git a/src/lagrangian/parcel/Make/files b/src/lagrangian/parcel/Make/files index 3a48c5126d..776de27fa1 100644 --- a/src/lagrangian/parcel/Make/files +++ b/src/lagrangian/parcel/Make/files @@ -6,6 +6,9 @@ CLOUDS=clouds BASECLOUDS=$(CLOUDS)/baseClasses DERIVEDCLOUDS=$(CLOUDS)/derived +# Thermo +SLGThermo/SLGThermo.C + # parcel cloud parcelCloud/parcelCloudBase.C parcelCloud/parcelCloud.C diff --git a/src/lagrangian/parcel/Make/options b/src/lagrangian/parcel/Make/options index e841d9e8c3..fbdde800b2 100644 --- a/src/lagrangian/parcel/Make/options +++ b/src/lagrangian/parcel/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/radiationModels/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -21,7 +20,6 @@ LIB_LIBS = \ -lfluidThermophysicalModels \ -lthermophysicalProperties \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lradiationModels \ -lincompressibleTransportModels \ -lregionModels \ diff --git a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C b/src/lagrangian/parcel/SLGThermo/SLGThermo.C similarity index 98% rename from src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C rename to src/lagrangian/parcel/SLGThermo/SLGThermo.C index 8c6ab6c888..4a92e55b58 100644 --- a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C +++ b/src/lagrangian/parcel/SLGThermo/SLGThermo.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/SLGThermo/SLGThermo/SLGThermo.H b/src/lagrangian/parcel/SLGThermo/SLGThermo.H similarity index 98% rename from src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H rename to src/lagrangian/parcel/SLGThermo/SLGThermo.H index f654d2f669..2ada95600b 100644 --- a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H +++ b/src/lagrangian/parcel/SLGThermo/SLGThermo.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/lagrangian/parcelTurbulence/Make/options b/src/lagrangian/parcelTurbulence/Make/options index d7c8168df6..19b07c97ba 100644 --- a/src/lagrangian/parcelTurbulence/Make/options +++ b/src/lagrangian/parcelTurbulence/Make/options @@ -6,7 +6,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ @@ -25,7 +24,6 @@ LIB_LIBS = \ -lfluidThermophysicalModels \ -lthermophysicalProperties \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lradiationModels \ -lmomentumTransportModels \ -lincompressibleMomentumTransportModels \ diff --git a/src/radiationModels/Make/options b/src/radiationModels/Make/options index d829fd62a7..6b7e5455f9 100644 --- a/src/radiationModels/Make/options +++ b/src/radiationModels/Make/options @@ -2,7 +2,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -12,7 +11,6 @@ LIB_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lsolidThermo \ - -lSLGThermo \ -lthermophysicalProperties \ -lfiniteVolume \ -lmeshTools diff --git a/src/radiationModels/absorptionEmissionModels/greyMean/greyMean.H b/src/radiationModels/absorptionEmissionModels/greyMean/greyMean.H index 29915a088e..ec50a5e99d 100644 --- a/src/radiationModels/absorptionEmissionModels/greyMean/greyMean.H +++ b/src/radiationModels/absorptionEmissionModels/greyMean/greyMean.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 @@ -139,7 +139,7 @@ protected: //- Look-up table of species related to ft mutable autoPtr lookUpTablePtr_; - //- SLG thermo package + //- Thermo package const fluidThermo& thermo_; //- Pointer list of species in the registry involved in the absorption diff --git a/src/regionModels/surfaceFilmModels/Make/files b/src/regionModels/surfaceFilmModels/Make/files index de9a8695c4..413e68da8f 100644 --- a/src/regionModels/surfaceFilmModels/Make/files +++ b/src/regionModels/surfaceFilmModels/Make/files @@ -45,9 +45,10 @@ THERMOMODELS=submodels/thermo $(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModel.C $(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C $(THERMOMODELS)/phaseChangeModel/noPhaseChange/noPhaseChange.C +$(THERMOMODELS)/phaseChangeModel/speciePhaseChange/speciePhaseChange.C $(THERMOMODELS)/phaseChangeModel/standardPhaseChange/standardPhaseChange.C -$(THERMOMODELS)/phaseChangeModel/solidification/solidification.C $(THERMOMODELS)/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C +$(THERMOMODELS)/phaseChangeModel/solidification/solidification.C $(THERMOMODELS)/heatTransferModel/heatTransferModel/heatTransferModel.C $(THERMOMODELS)/heatTransferModel/heatTransferModel/heatTransferModelNew.C diff --git a/src/regionModels/surfaceFilmModels/Make/options b/src/regionModels/surfaceFilmModels/Make/options index e1cbe8a22f..e00db4240c 100644 --- a/src/regionModels/surfaceFilmModels/Make/options +++ b/src/regionModels/surfaceFilmModels/Make/options @@ -3,7 +3,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -14,7 +13,6 @@ LIB_LIBS = \ -lspecie \ -lthermophysicalProperties \ -lreactionThermophysicalModels \ - -lSLGThermo \ -ldistributionModels \ -lregionModels \ -lfiniteVolume \ diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options index 8aa77b4e98..5a31a34d08 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options @@ -3,7 +3,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \ @@ -17,7 +16,6 @@ LIB_LIBS = \ -lspecie \ -lthermophysicalProperties \ -lreactionThermophysicalModels \ - -lSLGThermo \ -lmomentumTransportModels \ -lfluidThermoMomentumTransportModels \ -lthermophysicalTransportModels \ diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index 34624568b7..7c0a17550f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "liquidFilmThermo.H" #include "demandDrivenData.H" #include "thermoSingleLayer.H" -#include "SLGThermo.H" #include "extrapolatedCalculatedFvPatchFields.H" #include "addToRunTimeSelectionTable.H" @@ -69,36 +68,6 @@ const thermoSingleLayer& liquidFilmThermo::thermoFilm() const } -void liquidFilmThermo::initLiquid(const dictionary& dict) -{ - if (liquidPtr_ != nullptr) - { - return; - } - - dict.lookup("liquid") >> name_; - - if (filmModel_.primaryMesh().foundObject("SLGThermo")) - { - // retrieve from film thermo - ownLiquid_ = false; - - const SLGThermo& thermo = - filmModel_.primaryMesh().lookupObject("SLGThermo"); - label id = thermo.liquidId(name_); - liquidPtr_ = &thermo.liquids().properties()[id]; - } - else - { - // new liquid create - ownLiquid_ = true; - - liquidPtr_ = - liquidProperties::New(dict.optionalSubDict(name_ + "Coeffs")).ptr(); - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // liquidFilmThermo::liquidFilmThermo @@ -108,14 +77,29 @@ liquidFilmThermo::liquidFilmThermo ) : thermoModel(typeName, film, dict), - name_("unknown_liquid"), - liquidPtr_(nullptr), - ownLiquid_(false), useReferenceValues_(readBool(coeffDict_.lookup("useReferenceValues"))), pRef_(0.0), TRef_(0.0) { - initLiquid(coeffDict_); + if (dict.found("mixture")) + { + const dictionary& mixtureDict = dict.subDict("mixture"); + + const word name(mixtureDict.first()->keyword()); + + if (mixtureDict.isDict(name)) + { + liquidPtr_ = liquidProperties::New(mixtureDict.subDict(name)); + } + else + { + liquidPtr_ = liquidProperties::New(name); + } + } + else + { + liquidPtr_ = liquidProperties::New(dict.lookup("liquid")); + } if (useReferenceValues_) { @@ -128,19 +112,14 @@ liquidFilmThermo::liquidFilmThermo // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // liquidFilmThermo::~liquidFilmThermo() -{ - if (ownLiquid_) - { - deleteDemandDrivenData(liquidPtr_); - } -} +{} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // const word& liquidFilmThermo::name() const { - return name_; + return liquidPtr_->name(); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.H index 8cc77f749d..5525fa35ab 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.H +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,11 +62,8 @@ protected: // Protected data - //- Liquid name - word name_; - //- Pointer to the liquid properties - const liquidProperties* liquidPtr_; + autoPtr liquidPtr_; //- Flag to indicate that model owns the liquid object bool ownLiquid_; diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.C new file mode 100644 index 0000000000..429d965cc5 --- /dev/null +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.C @@ -0,0 +1,96 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 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 "speciePhaseChange.H" +#include "thermoSingleLayer.H" +#include "fluidThermo.H" +#include "basicSpecieMixture.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(speciePhaseChange, 0); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +speciePhaseChange::speciePhaseChange +( + const word& modelType, + surfaceFilmRegionModel& film, + const dictionary& dict +) +: + phaseChangeModel(modelType, film, dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +speciePhaseChange::~speciePhaseChange() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::label speciePhaseChange::vapId() const +{ + const thermoSingleLayer& film = filmType(); + const thermoModel& thermo = film.thermo(); + + const basicSpecieMixture& primarySpecieThermo = + refCast(film.primaryThermo()); + + return primarySpecieThermo.species()[thermo.name()]; +} + + +Foam::scalar speciePhaseChange::Wvap() const +{ + const thermoSingleLayer& film = filmType(); + + const basicSpecieMixture& primarySpecieThermo = + refCast(film.primaryThermo()); + + return primarySpecieThermo.Wi(vapId()); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace regionModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.H b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.H new file mode 100644 index 0000000000..38c6d8f607 --- /dev/null +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.H @@ -0,0 +1,107 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 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::regionModels::surfaceFilmModels::speciePhaseChange + +Description + Specie phase change model abstract base class + +SourceFiles + speciePhaseChange.C + +\*---------------------------------------------------------------------------*/ + +#ifndef speciePhaseChange_H +#define speciePhaseChange_H + +#include "phaseChangeModel.H" +#include "thermoSingleLayer.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class speciePhaseChange Declaration +\*---------------------------------------------------------------------------*/ + +class speciePhaseChange +: + public phaseChangeModel +{ + +public: + + //- Runtime type information + TypeName("speciePhaseChange"); + + + // Constructors + + //- Construct from surface film model + speciePhaseChange + ( + const word& modelType, + surfaceFilmRegionModel& film, + const dictionary& dict + ); + + //- Disallow default bitwise copy construction + speciePhaseChange(const speciePhaseChange&) = delete; + + + //- Destructor + virtual ~speciePhaseChange(); + + + // Member Functions + + label vapId() const; + + scalar Wvap() const; + + + // Member Operators + + //- Disallow default bitwise assignment + void operator=(const speciePhaseChange&) = delete; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace regionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 38528aaae9..927b4e9482 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.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 @@ -75,7 +75,7 @@ standardPhaseChange::standardPhaseChange const dictionary& dict ) : - phaseChangeModel(typeName, film, dict), + speciePhaseChange(typeName, film, dict), deltaMin_(coeffDict_.lookup("deltaMin")), L_(coeffDict_.lookup("L")), TbFactor_(coeffDict_.lookupOrDefault("TbFactor", 1.1)), @@ -104,9 +104,7 @@ void standardPhaseChange::correctModel const thermoSingleLayer& film = filmType(); // Set local thermo properties - const SLGThermo& slgThermo = film.slgThermo(); const thermoModel& thermo = film.thermo(); - const label vapId = slgThermo.carrierId(thermo.name()); // Retrieve fields from film model const scalarField& delta = film.delta(); @@ -124,7 +122,7 @@ void standardPhaseChange::correctModel ); // Molecular weight of vapour [kg/kmol] - const scalar Wvap = slgThermo.carrier().Wi(vapId); + const scalar Wvap = this->Wvap(); // Molecular weight of liquid [kg/kmol] const scalar Wliq = thermo.W(); @@ -215,8 +213,7 @@ void standardPhaseChange::correctModel else { const thermoSingleLayer& film = filmType(); - const label vapId = film.slgThermo().carrierId(film.thermo().name()); - const scalarField& YInf = film.YPrimary()[vapId]; + const scalarField& YInf = film.YPrimary()[vapId()]; correctModel(dt, availableMass, dMass, dEnergy, YInf); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H index c5154fcd94..569abac041 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.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 @@ -35,7 +35,7 @@ SourceFiles #ifndef standardPhaseChange_H #define standardPhaseChange_H -#include "phaseChangeModel.H" +#include "speciePhaseChange.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace surfaceFilmModels class standardPhaseChange : - public phaseChangeModel + public speciePhaseChange { protected: diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C index 35f064354f..c3b19a669a 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ waxSolventEvaporation::waxSolventEvaporation const dictionary& dict ) : - phaseChangeModel(typeName, film, dict), + speciePhaseChange(typeName, film, dict), Wwax_ ( IOobject @@ -161,9 +161,7 @@ void waxSolventEvaporation::correctModel const surfaceScalarField& phi = film.phi(); // Set local thermo properties - const SLGThermo& slgThermo = film.slgThermo(); const thermoModel& thermo = film.thermo(); - const label vapId = slgThermo.carrierId(thermo.name()); // Retrieve fields from film model const scalarField& pInf = film.pPrimary(); @@ -181,7 +179,7 @@ void waxSolventEvaporation::correctModel ); // Molecular weight of vapour [kg/kmol] - const scalar Wvap = slgThermo.carrier().Wi(vapId); + const scalar Wvap = this->Wvap(); const scalar Wwax = Wwax_.value(); const scalar Wsolvent = Wsolvent_.value(); @@ -392,8 +390,7 @@ void waxSolventEvaporation::correctModel else { const thermoSingleLayer& film = filmType(); - const label vapId = film.slgThermo().carrierId(film.thermo().name()); - const scalarField& YInf = film.YPrimary()[vapId]; + const scalarField& YInf = film.YPrimary()[vapId()]; correctModel(dt, availableMass, dMass, dEnergy, YInf); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.H b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.H index a176637110..c6f78998a9 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.H +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ SourceFiles #ifndef waxSolventEvaporation_H #define waxSolventEvaporation_H -#include "phaseChangeModel.H" +#include "speciePhaseChange.H" #include "uniformDimensionedFields.H" #include "Function1.H" @@ -54,7 +54,7 @@ namespace surfaceFilmModels class waxSolventEvaporation : - public phaseChangeModel + public speciePhaseChange { protected: diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 15d8890b6d..a55cbb9f82 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "thermoSingleLayer.H" +#include "fluidThermo.H" +#include "basicSpecieMixture.H" #include "fvcDdt.H" #include "fvcDiv.H" @@ -38,7 +40,6 @@ License #include "mappedFieldFvPatchField.H" #include "mapDistribute.H" #include "constants.H" -#include "addToRunTimeSelectionTable.H" // Sub-models #include "filmThermoModel.H" @@ -47,6 +48,8 @@ License #include "phaseChangeModel.H" #include "filmRadiationModel.H" +#include "addToRunTimeSelectionTable.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -327,7 +330,15 @@ thermoSingleLayer::thermoSingleLayer ) : kinematicSingleLayer(modelType, mesh, g, regionType, false), - slgThermo_(mesh.lookupObject("SLGThermo")), + phaseName_(coeffs_.lookupOrDefault("phase", word::null)), + + primaryThermo_ + ( + mesh.lookupObject + ( + IOobject::groupName(basicThermo::dictName, phaseName_) + ) + ), Cp_ ( @@ -507,11 +518,14 @@ thermoSingleLayer::thermoSingleLayer Info<< " limiting maximum temperature to " << Tmax_ << endl; } - if (slgThermo_.hasMultiComponentCarrier()) + if (isA(primaryThermo_)) { - YPrimary_.setSize(slgThermo_.carrier().species().size()); + const basicSpecieMixture& primarySpecieThermo = + refCast(primaryThermo_); - forAll(slgThermo_.carrier().species(), i) + YPrimary_.setSize(primarySpecieThermo.species().size()); + + forAll(primarySpecieThermo.species(), i) { YPrimary_.set ( @@ -520,7 +534,7 @@ thermoSingleLayer::thermoSingleLayer ( IOobject ( - slgThermo_.carrier().species()[i], + primarySpecieThermo.species()[i], time().timeName(), regionMesh(), IOobject::NO_READ, @@ -720,7 +734,10 @@ tmp thermoSingleLayer::Srho const label i ) const { - const label vapId = slgThermo_.carrierId(thermo_->name()); + const basicSpecieMixture& primarySpecieThermo = + refCast(primaryThermo_); + + const label vapId = primarySpecieThermo.species()[thermo_->name()]; tmp tSrho ( diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H index b0401a3d3c..d4c0796848 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H @@ -42,12 +42,15 @@ SourceFiles #define thermoSingleLayer_H #include "kinematicSingleLayer.H" -#include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + +// Forward declaration of classes +class fluidThermo; + namespace regionModels { namespace surfaceFilmModels @@ -77,10 +80,12 @@ protected: // Protected data + const word phaseName_; + // Thermo properties - //- Reference to the SLGThermo - const SLGThermo& slgThermo_; + //- Reference to the primary region thermo + const fluidThermo& primaryThermo_; // Fields @@ -252,8 +257,8 @@ public: // Thermo properties - //- Return const reference to the SLGThermo object - inline const SLGThermo& slgThermo() const; + //- Return const reference to the primary region thermo object + inline const fluidThermo& primaryThermo() const; // Fields diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H index de3db9326a..e5c6cd4b91 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.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 @@ -39,9 +39,9 @@ namespace surfaceFilmModels // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const SLGThermo& thermoSingleLayer::slgThermo() const +inline const fluidThermo& thermoSingleLayer::primaryThermo() const { - return slgThermo_; + return primaryThermo_; } diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake index 7d1c34298c..032fb96f57 100755 --- a/src/thermophysicalModels/Allwmake +++ b/src/thermophysicalModels/Allwmake @@ -12,7 +12,6 @@ wmake $targetType reactionThermo wmake $targetType laminarFlameSpeed wmake $targetType chemistryModel wmake $targetType barotropicCompressibilityModel -wmake $targetType SLGThermo wmake $targetType solidThermo diff --git a/src/thermophysicalModels/SLGThermo/Make/files b/src/thermophysicalModels/SLGThermo/Make/files deleted file mode 100644 index 0549b92c68..0000000000 --- a/src/thermophysicalModels/SLGThermo/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -SLGThermo/SLGThermo.C - -LIB = $(FOAM_LIBBIN)/libSLGThermo diff --git a/src/thermophysicalModels/SLGThermo/Make/options b/src/thermophysicalModels/SLGThermo/Make/options deleted file mode 100644 index e3004204f1..0000000000 --- a/src/thermophysicalModels/SLGThermo/Make/options +++ /dev/null @@ -1,9 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -LIB_LIBS = \ - -lfiniteVolume diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/Ar/Ar.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/Ar/Ar.C index 3fe8e48157..b2d25450f3 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/Ar/Ar.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/Ar/Ar.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 @@ -41,6 +41,7 @@ Foam::Ar::Ar() : liquidProperties ( + typeName, 39.948, 150.86, 4.8981e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C10H22/C10H22.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C10H22/C10H22.C index a40d5f6388..e37833b6e3 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C10H22/C10H22.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C10H22/C10H22.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 @@ -41,6 +41,7 @@ Foam::C10H22::C10H22() : liquidProperties ( + typeName, 142.285, 617.70, 2.11e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C12H26/C12H26.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C12H26/C12H26.C index 1d24187ea0..a6b71ee5d9 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C12H26/C12H26.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C12H26/C12H26.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 @@ -41,6 +41,7 @@ Foam::C12H26::C12H26() : liquidProperties ( + typeName, 170.338, 658.0, 1.82e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C13H28/C13H28.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C13H28/C13H28.C index c576cf0c6f..8420b3d012 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C13H28/C13H28.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C13H28/C13H28.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 @@ -41,6 +41,7 @@ Foam::C13H28::C13H28() : liquidProperties ( + typeName, 184.365, 675.80, 1.7225e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C14H30/C14H30.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C14H30/C14H30.C index 833a47fa73..22f846608e 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C14H30/C14H30.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C14H30/C14H30.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 @@ -41,6 +41,7 @@ Foam::C14H30::C14H30() : liquidProperties ( + typeName, 198.392, 692.40, 1.6212e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C16H34/C16H34.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C16H34/C16H34.C index 9f61121b0f..57612551a2 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C16H34/C16H34.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C16H34/C16H34.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 @@ -41,6 +41,7 @@ Foam::C16H34::C16H34() : liquidProperties ( + typeName, 226.446, 720.60, 1.4186e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H5OH/C2H5OH.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H5OH/C2H5OH.C index b966e85b3d..0fd3731e5e 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H5OH/C2H5OH.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H5OH/C2H5OH.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 @@ -41,6 +41,7 @@ Foam::C2H5OH::C2H5OH() : liquidProperties ( + typeName, 46.069, 516.25, 6.3835e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6/C2H6.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6/C2H6.C index aa6bb8bead..1ee54fda61 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6/C2H6.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6/C2H6.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 @@ -41,6 +41,7 @@ Foam::C2H6::C2H6() : liquidProperties ( + typeName, 30.070, 305.32, 4.872e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6O/C2H6O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6O/C2H6O.C index a5ffb47896..3d7199609d 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6O/C2H6O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H6O/C2H6O.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 @@ -41,6 +41,7 @@ Foam::C2H6O::C2H6O() : liquidProperties ( + typeName, 46.069, 400.10, 5.3702e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H6O/C3H6O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H6O/C3H6O.C index a962a5f792..0a39807ec6 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H6O/C3H6O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H6O/C3H6O.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 @@ -41,6 +41,7 @@ Foam::C3H6O::C3H6O() : liquidProperties ( + typeName, 58.08, 508.20, 4.7015e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H8/C3H8.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H8/C3H8.C index 21402f6dab..de1d99cca2 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H8/C3H8.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C3H8/C3H8.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 @@ -41,6 +41,7 @@ Foam::C3H8::C3H8() : liquidProperties ( + typeName, 44.096, 369.83, 4.248e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C4H10O/C4H10O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C4H10O/C4H10O.C index d1f058c95c..3545b4144a 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C4H10O/C4H10O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C4H10O/C4H10O.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 @@ -41,6 +41,7 @@ Foam::C4H10O::C4H10O() : liquidProperties ( + typeName, 74.123, 466.70, 3.6376e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H14/C6H14.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H14/C6H14.C index 32e1b47cc9..8e94b8d8cb 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H14/C6H14.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H14/C6H14.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 @@ -41,6 +41,7 @@ Foam::C6H14::C6H14() : liquidProperties ( + typeName, 86.177, 507.60, 3.025e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H6/C6H6.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H6/C6H6.C index cb8a78068d..b20926e12e 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H6/C6H6.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C6H6/C6H6.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 @@ -41,6 +41,7 @@ Foam::C6H6::C6H6() : liquidProperties ( + typeName, 78.114, 562.16, 4.898e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H16/C7H16.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H16/C7H16.C index 05871e04e3..0da1aa6334 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H16/C7H16.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H16/C7H16.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 @@ -41,6 +41,7 @@ Foam::C7H16::C7H16() : liquidProperties ( + typeName, 100.204, 540.20, 2.74e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H8/C7H8.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H8/C7H8.C index a120506295..8ecc3ca69b 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H8/C7H8.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C7H8/C7H8.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 @@ -41,6 +41,7 @@ Foam::C7H8::C7H8() : liquidProperties ( + typeName, 92.141, 591.79, 4.1086e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H10/C8H10.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H10/C8H10.C index 7eba99b861..d9bd4190fc 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H10/C8H10.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H10/C8H10.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 @@ -41,6 +41,7 @@ Foam::C8H10::C8H10() : liquidProperties ( + typeName, 106.167, 617.17, 3.6094e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H18/C8H18.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H18/C8H18.C index 09674a2f57..3794a64054 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H18/C8H18.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C8H18/C8H18.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 @@ -41,6 +41,7 @@ Foam::C8H18::C8H18() : liquidProperties ( + typeName, 114.231, 568.70, 2.49e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C9H20/C9H20.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C9H20/C9H20.C index d846c4cf51..8935f6567a 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C9H20/C9H20.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/C9H20/C9H20.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 @@ -41,6 +41,7 @@ Foam::C9H20::C9H20() : liquidProperties ( + typeName, 128.258, 594.60, 2.29e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH3OH/CH3OH.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH3OH/CH3OH.C index 7299a0fcff..868b3ffc18 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH3OH/CH3OH.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH3OH/CH3OH.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 @@ -41,6 +41,7 @@ Foam::CH3OH::CH3OH() : liquidProperties ( + typeName, 32.042, 512.58, 8.0959e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH4N2O/CH4N2O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH4N2O/CH4N2O.C index f04aa0c1c0..f800fdabe1 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH4N2O/CH4N2O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/CH4N2O/CH4N2O.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 @@ -41,6 +41,7 @@ Foam::CH4N2O::CH4N2O() : liquidProperties ( + typeName, 60.056, 705.0, 9.050e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/H2O/H2O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/H2O/H2O.C index 5b6e206e16..a80a13b87f 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/H2O/H2O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/H2O/H2O.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 @@ -41,6 +41,7 @@ Foam::H2O::H2O() : liquidProperties ( + typeName, 18.015, 647.13, 2.2055e+7, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IC8H18/IC8H18.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IC8H18/IC8H18.C index 082859ad5f..aea9177b96 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IC8H18/IC8H18.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IC8H18/IC8H18.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 @@ -41,6 +41,7 @@ Foam::IC8H18::IC8H18() : liquidProperties ( + typeName, 114.231, 543.96, 2.5676e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IDEA/IDEA.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IDEA/IDEA.C index d73458193b..4c6405dd32 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IDEA/IDEA.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/IDEA/IDEA.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 @@ -41,6 +41,7 @@ Foam::IDEA::IDEA() : liquidProperties ( + typeName, 142.26, 618.074, 2.11e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/MB/MB.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/MB/MB.C index c30e16af3d..db49d9d01b 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/MB/MB.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/MB/MB.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 @@ -41,6 +41,7 @@ Foam::MB::MB() : liquidProperties ( + typeName, 102.133, 554.5, 3.4734e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/N2/N2.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/N2/N2.C index 1521f802f7..3d74d89d71 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/N2/N2.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/N2/N2.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 @@ -41,6 +41,7 @@ Foam::N2::N2() : liquidProperties ( + typeName, 28.014, 126.10, 3.3944e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/aC10H7CH3/aC10H7CH3.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/aC10H7CH3/aC10H7CH3.C index 8fe5321051..9dd84f7e5e 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/aC10H7CH3/aC10H7CH3.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/aC10H7CH3/aC10H7CH3.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 @@ -41,6 +41,7 @@ Foam::aC10H7CH3::aC10H7CH3() : liquidProperties ( + typeName, 142.2, 772.04, 3.66e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/bC10H7CH3/bC10H7CH3.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/bC10H7CH3/bC10H7CH3.C index b7ee58f8ed..14f505d7bf 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/bC10H7CH3/bC10H7CH3.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/bC10H7CH3/bC10H7CH3.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 @@ -41,6 +41,7 @@ Foam::bC10H7CH3::bC10H7CH3() : liquidProperties ( + typeName, 142.2, 761.0, 3.25e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/iC3H8O/iC3H8O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/iC3H8O/iC3H8O.C index afcfb9de2a..6a11addd26 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/iC3H8O/iC3H8O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/iC3H8O/iC3H8O.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 @@ -41,6 +41,7 @@ Foam::iC3H8O::iC3H8O() : liquidProperties ( + typeName, 60.096, 508.31, 4.7643e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C index ea0ab34a62..e9ec990f20 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.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 @@ -38,6 +38,7 @@ namespace Foam Foam::liquidProperties::liquidProperties ( + const word& name, scalar W, scalar Tc, scalar Pc, @@ -52,6 +53,7 @@ Foam::liquidProperties::liquidProperties ) : thermophysicalProperties(W), + name_(name), Tc_(Tc), Pc_(Pc), Vc_(Vc), @@ -68,6 +70,7 @@ Foam::liquidProperties::liquidProperties Foam::liquidProperties::liquidProperties(const dictionary& dict) : thermophysicalProperties(dict), + name_(dict.dictName()), Tc_(dict.lookup("Tc")), Pc_(dict.lookup("Pc")), Vc_(dict.lookup("Vc")), @@ -142,6 +145,12 @@ Foam::autoPtr Foam::liquidProperties::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +const Foam::word& Foam::liquidProperties::name() const +{ + return name_; +} + + Foam::scalar Foam::liquidProperties::S(scalar p, scalar T) const { NotImplemented; diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.H b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.H index 7ede6101eb..6389f23ed1 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.H +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.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 @@ -56,6 +56,9 @@ class liquidProperties { // Private Data + //- Name of the liquid + const word name_; + //- Critical temperature [K] scalar Tc_; @@ -118,6 +121,7 @@ public: //- Construct from components liquidProperties ( + const word& name, scalar W, scalar Tc, scalar Pc, @@ -163,6 +167,10 @@ public: // Member Functions + //- Return the name of the liquid + virtual const word& name() const; + + // Physical constants which define the specie //- Mass fraction of this specie in mixture diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/nC3H8O/nC3H8O.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/nC3H8O/nC3H8O.C index bde3dddc23..57d9622039 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/nC3H8O/nC3H8O.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/nC3H8O/nC3H8O.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 @@ -41,6 +41,7 @@ Foam::nC3H8O::nC3H8O() : liquidProperties ( + typeName, 60.096, 536.71, 5.1696e+6, diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.H b/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.H index 9725113641..1cbe06f163 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.H +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,6 +114,10 @@ public: // Member Functions + //- Return the name of the liquid + virtual const word& name() const = 0; + + // Physical constants which define the specie //- Molecular weight [kg/kmol] diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties b/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties index fcb5be0100..ac458a3484 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties @@ -19,15 +19,45 @@ surfaceFilmModel thermoSingleLayer; regionName plateRegion; +phase liquid; + thermophysicalProperties { type liquid; - liquid liquid; + mixture + { + liquid + { + type H2O; - useReferenceValues yes; - pRef 1e5; - TRef 300; + // Set Cp constant and the corresponding linear function for h for + // compatibility with the current hard-coded thermodynamics model in + // surfaceFilm + + Cp + { + a 4200; + b 0; + c 0; + d 0; + e 0; + f 0; + } + + h + { + a -1252230; // -Cp*TRef where TRef = 298.15 + b 4200; + c 0; + d 0; + e 0; + f 0; + } + } + } + + useReferenceValues no; } viscosity diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/thermophysicalProperties.liquid b/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/thermophysicalProperties.liquid index 389b16420d..02fff61839 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/thermophysicalProperties.liquid +++ b/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/thermophysicalProperties.liquid @@ -23,7 +23,7 @@ thermoType energy sensibleInternalEnergy; } -"(mixture|liquids)" +mixture { liquid {