From ad20aecf0ef6053127b1e70a72f8e8712fb96b67 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 16 Dec 2021 20:51:08 +0000 Subject: [PATCH] surfaceFilmModel: film model selection now handled by fvModel There is no longer any need for the surfaceFilmModel abstract base class and "New" selection method as surface films are now handled within the fvModel framework. This makes the surfaceFilmModel entry in the surfaceFilmProperties dictionary redundant. The surfaceFilm and VoFSurfaceFilm fvModels now instantiate a thermoSingleLayer providing direct access to all the film functions, simplifying the implementation better ensuring consistency between the film and primary region equations. --- .../VoFSurfaceFilm/VoFSurfaceFilm.C | 45 +++--- .../VoFSurfaceFilm/VoFSurfaceFilm.H | 15 +- src/regionModels/surfaceFilmModels/Make/files | 3 - .../fvModels/surfaceFilm/surfaceFilm.C | 54 ++++--- .../fvModels/surfaceFilm/surfaceFilm.H | 13 +- .../surfaceFilmModels/noFilm/noFilm.C | 127 --------------- .../surfaceFilmModels/noFilm/noFilm.H | 138 ---------------- .../surfaceFilmModel/surfaceFilmModel.C | 58 ------- .../surfaceFilmModel/surfaceFilmModel.H | 150 ------------------ .../surfaceFilmModel/surfaceFilmModelNew.C | 105 ------------ .../surfaceFilmRegionModel.C | 3 +- .../surfaceFilmRegionModel.H | 2 - .../thermoSingleLayer/thermoSingleLayer.C | 2 - .../cylinder/constant/surfaceFilmProperties | 4 +- .../hotBoxes/constant/surfaceFilmProperties | 4 +- .../constant/surfaceFilmProperties | 4 +- .../constant/surfaceFilmProperties | 4 +- .../laminar/cylinder/constant/fvModels | 2 - .../cylinder/constant/surfaceFilmProperties | 2 - .../plateFilm/constant/surfaceFilmProperties | 2 - 20 files changed, 64 insertions(+), 673 deletions(-) delete mode 100644 src/regionModels/surfaceFilmModels/noFilm/noFilm.C delete mode 100644 src/regionModels/surfaceFilmModels/noFilm/noFilm.H delete mode 100644 src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C delete mode 100644 src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H delete mode 100644 src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C index 17a3783b6a..b7360d2bcd 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C @@ -58,21 +58,12 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm ) : fvModel(sourceName, modelType, dict, mesh), - phaseName_(dict.lookup("phase")), - thermo_ + surfaceFilm_ ( - mesh.lookupObject - ( - IOobject::groupName(physicalProperties::typeName, phaseName_) - ) - ), - film_ - ( - regionModels::surfaceFilmModel::New - ( - mesh, - mesh.lookupObject("g") - ) + regionModels::surfaceFilmModels::thermoSingleLayer::typeName, + mesh, + mesh.lookupObject("g"), + "surfaceFilm" ), curTimeIndex_(-1) {} @@ -82,7 +73,14 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm Foam::wordList Foam::fv::VoFSurfaceFilm::addSupFields() const { - return wordList({thermo_.rho()().name(), "U", "T"}); + return wordList + ( + { + surfaceFilm_.rhoPrimary().name(), + surfaceFilm_.UPrimary().name(), + surfaceFilm_.TPrimary().name() + } + ); } @@ -93,7 +91,7 @@ void Foam::fv::VoFSurfaceFilm::correct() return; } - film_->evolve(); + surfaceFilm_.evolve(); curTimeIndex_ = mesh().time().timeIndex(); } @@ -111,17 +109,18 @@ void Foam::fv::VoFSurfaceFilm::addSup Info<< type() << ": applying source to " << eqn.psi().name() << endl; } - if (fieldName == thermo_.rho()().name()) + if (fieldName == surfaceFilm_.rhoPrimary().name()) { - eqn += film_->Srho(); + eqn += surfaceFilm_.Srho(); } - else if (fieldName == "T") + else if (fieldName == surfaceFilm_.TPrimary().name()) { - const volScalarField::Internal Cv(thermo_.Cv()); + const volScalarField::Internal Cv(surfaceFilm_.primaryThermo().Cv()); eqn += - film_->Sh()()/Cv - + film_->Srho()*(eqn.psi() - thermo_.he()/Cv); + surfaceFilm_.Sh()()/Cv + + surfaceFilm_.Srho() + *(eqn.psi() - surfaceFilm_.primaryThermo().he()/Cv); } else { @@ -144,7 +143,7 @@ void Foam::fv::VoFSurfaceFilm::addSup Info<< type() << ": applying source to " << eqn.psi().name() << endl; } - eqn += film_->SU(); + eqn += surfaceFilm_.SU(); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H index 154d9fdba7..009c7df9e9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H @@ -46,8 +46,7 @@ SourceFiles #define VoFSurfaceFilm_H #include "fvModel.H" -#include "fluidThermo.H" -#include "surfaceFilmModel.H" +#include "thermoSingleLayer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +56,7 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class VoFSurfaceFilm Declaration + Class VoFSurfaceFilm Declaration \*---------------------------------------------------------------------------*/ class VoFSurfaceFilm @@ -66,14 +65,8 @@ class VoFSurfaceFilm { // Private Data - //- The name of the phase which transfers to the film - word phaseName_; - - //- Reference to the primary region thermo - const fluidThermo& thermo_; - - //- The surface film model pointer - mutable autoPtr film_; + //- The surface film model + regionModels::surfaceFilmModels::thermoSingleLayer surfaceFilm_; //- Current time index (used for updating) mutable label curTimeIndex_; diff --git a/src/regionModels/surfaceFilmModels/Make/files b/src/regionModels/surfaceFilmModels/Make/files index d16ca1e6d1..40fb0fcda9 100644 --- a/src/regionModels/surfaceFilmModels/Make/files +++ b/src/regionModels/surfaceFilmModels/Make/files @@ -1,8 +1,5 @@ # Surface film models -surfaceFilmModel/surfaceFilmModel.C -surfaceFilmModel/surfaceFilmModelNew.C surfaceFilmRegionModel/surfaceFilmRegionModel.C -noFilm/noFilm.C kinematicSingleLayer/kinematicSingleLayer.C thermoSingleLayer/thermoSingleLayer.C diff --git a/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.C b/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.C index f24c8deb67..d5fb864266 100644 --- a/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.C +++ b/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "surfaceFilm.H" +#include "uniformDimensionedFields.H" #include "basicSpecieMixture.H" #include "fvMatrix.H" #include "addToRunTimeSelectionTable.H" @@ -57,17 +58,12 @@ Foam::fv::surfaceFilm::surfaceFilm ) : fvModel(sourceName, modelType, dict, mesh), - primaryThermo_ - ( - mesh.lookupObject(physicalProperties::typeName) - ), surfaceFilm_ ( - regionModels::surfaceFilmModel::New - ( - mesh, - mesh.lookupObject("g") - ) + regionModels::surfaceFilmModels::thermoSingleLayer::typeName, + mesh, + mesh.lookupObject("g"), + "surfaceFilm" ), curTimeIndex_(-1) {} @@ -77,12 +73,19 @@ Foam::fv::surfaceFilm::surfaceFilm Foam::wordList Foam::fv::surfaceFilm::addSupFields() const { - wordList fieldNames({"rho", "U", primaryThermo_.he().name()}); + wordList fieldNames + ( + { + surfaceFilm_.rhoPrimary().name(), + surfaceFilm_.UPrimary().name(), + surfaceFilm_.primaryThermo().he().name() + } + ); - if (isA(primaryThermo_)) + if (isA(surfaceFilm_.primaryThermo())) { const basicSpecieMixture& composition = - refCast(primaryThermo_); + refCast(surfaceFilm_.primaryThermo()); const PtrList& Y = composition.Y(); @@ -106,7 +109,7 @@ void Foam::fv::surfaceFilm::correct() return; } - surfaceFilm_->evolve(); + surfaceFilm_.evolve(); curTimeIndex_ = mesh().time().timeIndex(); } @@ -123,9 +126,9 @@ void Foam::fv::surfaceFilm::addSup Info<< type() << ": applying source to " << eqn.psi().name() << endl; } - if (fieldName == "rho") + if (fieldName == surfaceFilm_.rhoPrimary().name()) { - eqn += surfaceFilm_->Srho(); + eqn += surfaceFilm_.Srho(); } else { @@ -148,26 +151,27 @@ void Foam::fv::surfaceFilm::addSup Info<< type() << ": applying source to " << eqn.psi().name() << endl; } - if (fieldName == "rho") + if (fieldName == surfaceFilm_.rhoPrimary().name()) { - eqn += surfaceFilm_->Srho(); + eqn += surfaceFilm_.Srho(); } - else if (fieldName == primaryThermo_.he().name()) + else if (fieldName == surfaceFilm_.primaryThermo().he().name()) { - eqn += surfaceFilm_->Sh(); + eqn += surfaceFilm_.Sh(); } else if ( - isA(primaryThermo_) - && refCast(primaryThermo_).contains + isA(surfaceFilm_.primaryThermo()) + && refCast(surfaceFilm_.primaryThermo()).contains ( eqn.psi().name() ) ) { - eqn += surfaceFilm_->SYi + eqn += surfaceFilm_.SYi ( - refCast(primaryThermo_).index(eqn.psi()) + refCast(surfaceFilm_.primaryThermo()) + .index(eqn.psi()) ); } else @@ -191,9 +195,9 @@ void Foam::fv::surfaceFilm::addSup Info<< type() << ": applying source to " << eqn.psi().name() << endl; } - if (fieldName == "U") + if (fieldName == surfaceFilm_.UPrimary().name()) { - eqn += surfaceFilm_->SU(); + eqn += surfaceFilm_.SU(); } else { diff --git a/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.H b/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.H index ce77822eb6..e59a37e3bc 100644 --- a/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.H +++ b/src/regionModels/surfaceFilmModels/fvModels/surfaceFilm/surfaceFilm.H @@ -45,9 +45,7 @@ SourceFiles #define surfaceFilm_H #include "fvModel.H" -#include "fluidThermo.H" -#include "uniformDimensionedFields.H" -#include "surfaceFilmModel.H" +#include "thermoSingleLayer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +55,7 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class surfaceFilm Declaration + Class surfaceFilm Declaration \*---------------------------------------------------------------------------*/ class surfaceFilm @@ -66,11 +64,8 @@ class surfaceFilm { // Private Data - //- Reference to the primary region thermo - const fluidThermo& primaryThermo_; - - //- The surfaceFilmModel pointer - autoPtr surfaceFilm_; + //- The surface film model + regionModels::surfaceFilmModels::thermoSingleLayer surfaceFilm_; //- Current time index (used for updating) mutable label curTimeIndex_; diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C deleted file mode 100644 index 597eb224d1..0000000000 --- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C +++ /dev/null @@ -1,127 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "noFilm.H" -#include "addToRunTimeSelectionTable.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ -namespace surfaceFilmModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(noFilm, 0); -addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -noFilm::noFilm -( - const word& modelType, - const fvMesh& mesh, - const dimensionedVector& g, - const word& regionType -) -: - surfaceFilmModel(), - mesh_(mesh) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -noFilm::~noFilm() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -Foam::scalar noFilm::CourantNumber() const -{ - return 0; -} - - -tmp noFilm::Srho() const -{ - return volScalarField::Internal::New - ( - "noFilm::Srho", - mesh_, - dimensionedScalar(dimMass/dimVolume/dimTime, 0) - ); -} - - -tmp noFilm::SYi(const label i) const -{ - return volScalarField::Internal::New - ( - "noFilm::SY(" + Foam::name(i) + ")", - mesh_, - dimensionedScalar(dimMass/dimVolume/dimTime, 0) - ); -} - - -tmp noFilm::SU() const -{ - return volVectorField::Internal::New - ( - IOobject::modelName("SU", typeName), - mesh_, - dimensionedVector(dimMass/dimVolume/dimTime, Zero) - ); -} - - -tmp noFilm::Sh() const -{ - return volScalarField::Internal::New - ( - "noFilm::Sh", - mesh_, - dimensionedScalar(dimEnergy/dimVolume/dimTime, 0) - ); -} - - -void noFilm::evolve() -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace surfaceFilmModels -} // End namespace regionModels -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.H b/src/regionModels/surfaceFilmModels/noFilm/noFilm.H deleted file mode 100644 index c956ec23a0..0000000000 --- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.H +++ /dev/null @@ -1,138 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::regionModels::surfaceFilmModels::noFilm - -Description - Dummy surfaceFilmModel to allow solvers supporting film simulations to be - run without a film region. - -SourceFiles - noFilm.C - -\*---------------------------------------------------------------------------*/ - -#ifndef noFilm_H -#define noFilm_H - -#include "surfaceFilmModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ -namespace surfaceFilmModels -{ - -/*---------------------------------------------------------------------------*\ - Class noFilm Declaration -\*---------------------------------------------------------------------------*/ - -class noFilm -: - public surfaceFilmModel -{ - // Private member data - - //- Reference to the mesh - const fvMesh& mesh_; - - -public: - - //- Runtime type information - TypeName("none"); - - - // Constructors - - //- Construct from components - noFilm - ( - const word& modelType, - const fvMesh& mesh, - const dimensionedVector& g, - const word& regionType - ); - - //- Disallow default bitwise copy construction - noFilm(const noFilm&) = delete; - - - //- Destructor - virtual ~noFilm(); - - - // Member Functions - - // Solution parameters - - //- Courant number evaluation - virtual scalar CourantNumber() const; - - - // Primary region source fields - - //- Return total mass source - Eulerian phase only - virtual tmp Srho() const; - - //- Return mass source for specie i - Eulerian phase only - virtual tmp SYi - ( - const label i - ) const; - - //- Return momentum source - Eulerian phase only - virtual tmp SU() const; - - //- Return enthalpy source - Eulerian phase only - virtual tmp Sh() const; - - - // Evolution - - //- Main driver routing to evolve the region - calls other evolves - virtual void evolve(); - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const noFilm&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace surfaceFilmModels -} // regionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C deleted file mode 100644 index 783ce59220..0000000000 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C +++ /dev/null @@ -1,58 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-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 "surfaceFilmModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(surfaceFilmModel, 0); -defineRunTimeSelectionTable(surfaceFilmModel, mesh); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -surfaceFilmModel::surfaceFilmModel() -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -surfaceFilmModel::~surfaceFilmModel() -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace regionModels -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H deleted file mode 100644 index c3e9672308..0000000000 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H +++ /dev/null @@ -1,150 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-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::surfaceFilmModel - -Description - Base class for surface film models - -SourceFiles - surfaceFilmModelI.H - surfaceFilmModel.C - surfaceFilmModelNew.C - -\*---------------------------------------------------------------------------*/ - -#ifndef surfaceFilmModel_H -#define surfaceFilmModel_H - -#include "runTimeSelectionTables.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ - -/*---------------------------------------------------------------------------*\ - Class surfaceFilmModel Declaration -\*---------------------------------------------------------------------------*/ - -class surfaceFilmModel -{ -public: - - //- Runtime type information - TypeName("surfaceFilmModel"); - - - // Declare runtime constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - surfaceFilmModel, - mesh, - ( - const word& modelType, - const fvMesh& mesh, - const dimensionedVector& g, - const word& regionType - ), - (modelType, mesh, g, regionType) - ); - - - // Constructors - - surfaceFilmModel(); - - //- Disallow default bitwise copy construction - surfaceFilmModel(const surfaceFilmModel&) = delete; - - - // Selectors - - //- Return a reference to the selected surface film model - static autoPtr New - ( - const fvMesh& mesh, - const dimensionedVector& g, - const word& regionType = "surfaceFilm" - ); - - - //- Destructor - virtual ~surfaceFilmModel(); - - - // Member Functions - - // Solution parameters - - //- Courant number evaluation - virtual scalar CourantNumber() const = 0; - - - // Evolution - - //- Main driver routing to evolve the region - calls other evolves - virtual void evolve() = 0; - - - // Primary region source fields - - //- Return total mass source - Eulerian phase only - virtual tmp Srho() const = 0; - - //- Return mass source for specie i - Eulerian phase only - virtual tmp SYi - ( - const label i - ) const = 0; - - //- Return momentum source - Eulerian phase only - virtual tmp SU() const = 0; - - //- Return enthalpy source - Eulerian phase only - virtual tmp Sh() const = 0; - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const surfaceFilmModel&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace regionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C deleted file mode 100644 index 84bde3bca1..0000000000 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C +++ /dev/null @@ -1,105 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "surfaceFilmModel.H" -#include "noFilm.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -autoPtr surfaceFilmModel::New -( - const fvMesh& mesh, - const dimensionedVector& g, - const word& regionType -) -{ - word modelType; - - { - typeIOobject surfaceFilmPropertiesDictHeader - ( - regionType + "Properties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - if (surfaceFilmPropertiesDictHeader.headerOk()) - { - IOdictionary surfaceFilmPropertiesDict - ( - surfaceFilmPropertiesDictHeader - ); - - surfaceFilmPropertiesDict.lookup("surfaceFilmModel") >> modelType; - } - else - { - modelType = surfaceFilmModels::noFilm::typeName; - } - } - - Info<< "Selecting surfaceFilmModel " << modelType << endl; - - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(modelType); - - if (cstrIter == meshConstructorTablePtr_->end()) - { - FatalErrorInFunction - << "Unknown surfaceFilmModel type " << modelType - << nl << nl << "Valid surfaceFilmModel types are:" << nl - << meshConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr - ( - cstrIter() - ( - modelType, - mesh, - g, - regionType - ) - ); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace regionModels -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C b/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C index 978a62fc78..8f76a5c55f 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C +++ b/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.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 @@ -63,7 +63,6 @@ surfaceFilmRegionModel::surfaceFilmRegionModel const word& regionType ) : - surfaceFilmModel(), singleLayerRegion(mesh, regionType, modelType), g_(g) { diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.H b/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.H index 989447acbd..0bc5b00446 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.H +++ b/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.H @@ -35,7 +35,6 @@ SourceFiles #ifndef surfaceFilmRegionModel_H #define surfaceFilmRegionModel_H -#include "surfaceFilmModel.H" #include "singleLayerRegion.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,7 +52,6 @@ namespace surfaceFilmModels class surfaceFilmRegionModel : - public surfaceFilmModel, public singleLayerRegion { // Private data diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 0624cee9ed..29939ac1dc 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -60,8 +60,6 @@ namespace surfaceFilmModels // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(thermoSingleLayer, 0); -addToRunTimeSelectionTable(surfaceFilmRegionModel, thermoSingleLayer, mesh); - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // diff --git a/tutorials/combustion/buoyantReactingFoam/Lagrangian/cylinder/constant/surfaceFilmProperties b/tutorials/combustion/buoyantReactingFoam/Lagrangian/cylinder/constant/surfaceFilmProperties index 273ac55987..7f133f3e6c 100644 --- a/tutorials/combustion/buoyantReactingFoam/Lagrangian/cylinder/constant/surfaceFilmProperties +++ b/tutorials/combustion/buoyantReactingFoam/Lagrangian/cylinder/constant/surfaceFilmProperties @@ -10,12 +10,10 @@ FoamFile format ascii; class dictionary; location "constant"; - object SurfaceFilmProperties; + object surfaceFilmProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -surfaceFilmModel thermoSingleLayer; - regionName wallFilmRegion; viscosity diff --git a/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/constant/surfaceFilmProperties b/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/constant/surfaceFilmProperties index 62cab33568..b3849ee8e8 100644 --- a/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/constant/surfaceFilmProperties +++ b/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/constant/surfaceFilmProperties @@ -10,12 +10,10 @@ FoamFile format ascii; class dictionary; location "constant"; - object SurfaceFilmProperties; + object surfaceFilmProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -surfaceFilmModel thermoSingleLayer; - regionName wallFilmRegion; viscosity diff --git a/tutorials/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel/constant/surfaceFilmProperties b/tutorials/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel/constant/surfaceFilmProperties index 16b532bff9..02a9eb421f 100644 --- a/tutorials/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel/constant/surfaceFilmProperties +++ b/tutorials/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel/constant/surfaceFilmProperties @@ -10,12 +10,10 @@ FoamFile format ascii; class dictionary; location "constant"; - object SurfaceFilmProperties; + object surfaceFilmProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -surfaceFilmModel thermoSingleLayer; - regionName wallFilmRegion; viscosity diff --git a/tutorials/combustion/buoyantReactingFoam/Lagrangian/splashPanel/constant/surfaceFilmProperties b/tutorials/combustion/buoyantReactingFoam/Lagrangian/splashPanel/constant/surfaceFilmProperties index 071f55fcde..c96184dd5c 100644 --- a/tutorials/combustion/buoyantReactingFoam/Lagrangian/splashPanel/constant/surfaceFilmProperties +++ b/tutorials/combustion/buoyantReactingFoam/Lagrangian/splashPanel/constant/surfaceFilmProperties @@ -10,12 +10,10 @@ FoamFile format ascii; class dictionary; location "constant"; - object SurfaceFilmProperties; + object surfaceFilmProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -surfaceFilmModel thermoSingleLayer; - regionName wallFilm; viscosity diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/fvModels b/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/fvModels index 6d2226e350..9e38f36b19 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/fvModels +++ b/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/fvModels @@ -29,8 +29,6 @@ VoFSurfaceFilm type VoFSurfaceFilm; libs ("libVoFSurfaceFilm.so"); - - phase liquid; } // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/surfaceFilmProperties b/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/surfaceFilmProperties index afbeb5f954..7d622c0d82 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/surfaceFilmProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/cylinder/constant/surfaceFilmProperties @@ -14,8 +14,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -surfaceFilmModel thermoSingleLayer; - regionName wallFilmRegion; phase liquid; diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties b/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties index 5e77c5dd8f..518d1e9556 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/plateFilm/constant/surfaceFilmProperties @@ -14,8 +14,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -surfaceFilmModel thermoSingleLayer; - regionName plateRegion; phase liquid;