diff --git a/applications/solvers/modules/VoFSolver/Make/options b/applications/solvers/modules/VoFSolver/Make/options index ee267fc341..11dc344903 100644 --- a/applications/solvers/modules/VoFSolver/Make/options +++ b/applications/solvers/modules/VoFSolver/Make/options @@ -1,10 +1,6 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/modules/fluidSolver/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \ - -I$(LIB_SRC)/twoPhaseModels/VoF \ - -I$(LIB_SRC)/twoPhaseModels/interfaceCompression/lnInclude \ - -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -13,8 +9,6 @@ LIB_LIBS = \ -lfluidSolver \ -lphysicalProperties \ -linterfaceCompression \ - -linterfaceProperties \ - -ltwoPhaseMixture \ -lfiniteVolume \ -lmeshTools \ -lfvModels \ diff --git a/applications/solvers/modules/VoFSolver/VoFMixture/VoFMixture.H b/applications/solvers/modules/VoFSolver/VoFMixture/VoFMixture.H index c00ec1e455..6b1d54bd62 100644 --- a/applications/solvers/modules/VoFSolver/VoFMixture/VoFMixture.H +++ b/applications/solvers/modules/VoFSolver/VoFMixture/VoFMixture.H @@ -25,7 +25,7 @@ Class Foam::VoFMixture Description - Class to represent a VoF mixture + Two-phase VoF mixture SourceFiles VoFMixture.C diff --git a/applications/solvers/modules/VoFSolver/VoFSolver.C b/applications/solvers/modules/VoFSolver/VoFSolver.C index b5c07f13db..acc0784664 100644 --- a/applications/solvers/modules/VoFSolver/VoFSolver.C +++ b/applications/solvers/modules/VoFSolver/VoFSolver.C @@ -234,10 +234,6 @@ void Foam::solvers::VoFSolver::prePredictor() } -void Foam::solvers::VoFSolver::postCorrector() -{} - - void Foam::solvers::VoFSolver::postSolve() { divU.clear(); diff --git a/applications/solvers/modules/VoFSolver/VoFSolver.H b/applications/solvers/modules/VoFSolver/VoFSolver.H index 20d0eac41f..fa804ee6d7 100644 --- a/applications/solvers/modules/VoFSolver/VoFSolver.H +++ b/applications/solvers/modules/VoFSolver/VoFSolver.H @@ -57,7 +57,6 @@ See also #include "fluidSolver.H" #include "VoFMixture.H" -#include "interfaceProperties.H" #include "buoyancy.H" #include "pressureReference.H" #include "IOMRFZoneList.H" @@ -233,9 +232,6 @@ public: //- Construct and solve the pressure equation in the PISO loop virtual void pressureCorrector() = 0; - //- Correct the momentum transport modelling - virtual void postCorrector(); - //- Called after the PIMPLE loop at the end of the time-step virtual void postSolve(); diff --git a/applications/solvers/modules/compressibleVoF/Make/files b/applications/solvers/modules/compressibleVoF/Make/files index cb4633c8ad..9ed053db6b 100644 --- a/applications/solvers/modules/compressibleVoF/Make/files +++ b/applications/solvers/modules/compressibleVoF/Make/files @@ -1,4 +1,4 @@ -compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C +compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C diff --git a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C index b7d54c842c..0ae33d0812 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C +++ b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,8 @@ Foam::compressibleInterPhaseThermophysicalTransportModel::coeffDict() const Foam::tmp Foam::compressibleInterPhaseThermophysicalTransportModel::kappaEff() const { - const compressibleTwoPhaseMixture& mixture_ = momentumTransport_.mixture_; + const compressibleTwoPhaseVoFMixture& mixture_ = + momentumTransport_.mixture_; if (momentumTransport_.twoPhaseTransport_) { @@ -101,7 +102,8 @@ Foam::compressibleInterPhaseThermophysicalTransportModel::kappaEff const label patchi ) const { - const compressibleTwoPhaseMixture& mixture_ = momentumTransport_.mixture_; + const compressibleTwoPhaseVoFMixture& mixture_ = + momentumTransport_.mixture_; if (momentumTransport_.twoPhaseTransport_) { @@ -145,7 +147,8 @@ Foam::compressibleInterPhaseThermophysicalTransportModel::kappaEff Foam::tmp Foam::compressibleInterPhaseThermophysicalTransportModel::alphaEff() const { - const compressibleTwoPhaseMixture& mixture_ = momentumTransport_.mixture_; + const compressibleTwoPhaseVoFMixture& mixture_ = + momentumTransport_.mixture_; if (momentumTransport_.twoPhaseTransport_) { diff --git a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C index 8c7eb7ba27..c27b15aaa3 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C +++ b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel const surfaceScalarField& alphaPhi1, const surfaceScalarField& alphaRhoPhi1, const surfaceScalarField& alphaRhoPhi2, - const compressibleTwoPhaseMixture& mixture + const compressibleTwoPhaseVoFMixture& mixture ) : twoPhaseTransport_(false), diff --git a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H index e6383dfc91..4015fa5709 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H +++ b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H @@ -44,7 +44,7 @@ SourceFiles #ifndef compressibleInterPhaseTransportModel_H #define compressibleInterPhaseTransportModel_H -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "compressibleMomentumTransportModels.H" #include "phaseCompressibleMomentumTransportModel.H" @@ -67,7 +67,7 @@ class compressibleInterPhaseTransportModel Switch twoPhaseTransport_; //- Two-phase mixture - const compressibleTwoPhaseMixture& mixture_; + const compressibleTwoPhaseVoFMixture& mixture_; //- Mixture volumetric flux const surfaceScalarField& phi_; @@ -107,7 +107,7 @@ public: const surfaceScalarField& alphaPhi1, const surfaceScalarField& alphaRhoPhi1, const surfaceScalarField& alphaRhoPhi2, - const compressibleTwoPhaseMixture& mixture + const compressibleTwoPhaseVoFMixture& mixture ); //- Disallow default bitwise copy construction diff --git a/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C b/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C similarity index 89% rename from applications/solvers/modules/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C rename to applications/solvers/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C index ebbe8e9697..5992fb764e 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C +++ b/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C @@ -23,19 +23,19 @@ License \*---------------------------------------------------------------------------*/ -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(compressibleTwoPhaseMixture, 0); + defineTypeNameAndDebug(compressibleTwoPhaseVoFMixture, 0); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::compressibleTwoPhaseMixture::compressibleTwoPhaseMixture +Foam::compressibleTwoPhaseVoFMixture::compressibleTwoPhaseVoFMixture ( const fvMesh& mesh ) @@ -155,13 +155,13 @@ Foam::compressibleTwoPhaseMixture::compressibleTwoPhaseMixture // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::compressibleTwoPhaseMixture::~compressibleTwoPhaseMixture() +Foam::compressibleTwoPhaseVoFMixture::~compressibleTwoPhaseVoFMixture() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void Foam::compressibleTwoPhaseMixture::correctThermo() +void Foam::compressibleTwoPhaseVoFMixture::correctThermo() { thermo1_->T() = T_; thermo1_->he() = thermo1_->he(p_, T_); @@ -173,7 +173,7 @@ void Foam::compressibleTwoPhaseMixture::correctThermo() } -void Foam::compressibleTwoPhaseMixture::correct() +void Foam::compressibleTwoPhaseVoFMixture::correct() { const volScalarField alphaRho1(alpha1()*thermo1_->rho()); const volScalarField alphaRho2(alpha2()*thermo2_->rho()); @@ -184,13 +184,13 @@ void Foam::compressibleTwoPhaseMixture::correct() } -Foam::tmp Foam::compressibleTwoPhaseMixture::nu() const +Foam::tmp Foam::compressibleTwoPhaseVoFMixture::nu() const { return (alpha1()*thermo1_->mu() + alpha2()*thermo2_->mu())/rho_; } -Foam::tmp Foam::compressibleTwoPhaseMixture::nu +Foam::tmp Foam::compressibleTwoPhaseVoFMixture::nu ( const label patchi ) const @@ -203,7 +203,7 @@ Foam::tmp Foam::compressibleTwoPhaseMixture::nu } -bool Foam::compressibleTwoPhaseMixture::read() +bool Foam::compressibleTwoPhaseVoFMixture::read() { if (twoPhaseVoFMixture::read()) { diff --git a/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H b/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H similarity index 91% rename from applications/solvers/modules/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H rename to applications/solvers/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H index fc4126ee05..f40c0d5a94 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H +++ b/applications/solvers/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::compressibleTwoPhaseMixture + Foam::compressibleTwoPhaseVoFMixture Description Class to represent a mixture of two rhoThermo-based phases SourceFiles - compressibleTwoPhaseMixture.C + compressibleTwoPhaseVoFMixture.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleTwoPhaseMixture_H -#define compressibleTwoPhaseMixture_H +#ifndef compressibleTwoPhaseVoFMixture_H +#define compressibleTwoPhaseVoFMixture_H #include "twoPhaseVoFMixture.H" #include "compressibleTwoPhases.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class compressibleTwoPhaseMixture Declaration + Class compressibleTwoPhaseVoFMixture Declaration \*---------------------------------------------------------------------------*/ -class compressibleTwoPhaseMixture +class compressibleTwoPhaseVoFMixture : public twoPhaseVoFMixture, virtual public compressibleTwoPhases, @@ -85,17 +85,17 @@ class compressibleTwoPhaseMixture public: //- Runtime type information - TypeName("compressibleTwoPhaseMixture"); + TypeName("compressibleTwoPhaseVoFMixture"); // Constructors //- Construct from a mesh - compressibleTwoPhaseMixture(const fvMesh& mesh); + compressibleTwoPhaseVoFMixture(const fvMesh& mesh); //- Destructor - virtual ~compressibleTwoPhaseMixture(); + virtual ~compressibleTwoPhaseVoFMixture(); // Member Functions diff --git a/applications/solvers/modules/compressibleVoF/compressibleVoF.C b/applications/solvers/modules/compressibleVoF/compressibleVoF.C index 0db13294ce..391202602c 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleVoF.C +++ b/applications/solvers/modules/compressibleVoF/compressibleVoF.C @@ -47,10 +47,13 @@ Foam::solvers::compressibleVoF::compressibleVoF(fvMesh& mesh) twoPhaseVoFSolver ( mesh, - autoPtr(new compressibleTwoPhaseMixture(mesh)) + autoPtr(new compressibleTwoPhaseVoFMixture(mesh)) ), - mixture(refCast(twoPhaseVoFSolver::mixture)), + mixture + ( + refCast(twoPhaseVoFSolver::mixture) + ), p(mixture.p()), diff --git a/applications/solvers/modules/compressibleVoF/compressibleVoF.H b/applications/solvers/modules/compressibleVoF/compressibleVoF.H index 4bbdb51e3c..38acf9dbb0 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleVoF.H +++ b/applications/solvers/modules/compressibleVoF/compressibleVoF.H @@ -59,7 +59,7 @@ See also #define compressibleVoF_H #include "twoPhaseVoFSolver.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "compressibleInterPhaseTransportModel.H" #include "compressibleInterPhaseThermophysicalTransportModel.H" #include "buoyancy.H" @@ -87,7 +87,7 @@ protected: // Phase properties //- The compressible two-phase mixture - compressibleTwoPhaseMixture& mixture; + compressibleTwoPhaseVoFMixture& mixture; // Thermophysical properties diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.C index 2cc5c3984a..61a7f21207 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFCavitation.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "fvmSup.H" #include "addToRunTimeSelectionTable.H" @@ -63,7 +63,7 @@ Foam::fv::compressible::VoFCavitation::VoFCavitation mixture_ ( - mesh.lookupObjectRef + mesh.lookupObjectRef ( "phaseProperties" ) diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.H b/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.H index ad1c30a3b7..8432d4d1ee 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.H +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFCavitation/VoFCavitation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,7 +86,7 @@ SourceFiles namespace Foam { -class compressibleTwoPhaseMixture; +class compressibleTwoPhaseVoFMixture; namespace fv { @@ -104,7 +104,7 @@ class VoFCavitation // Private Data //- Reference to the mixture properties - const compressibleTwoPhaseMixture& mixture_; + const compressibleTwoPhaseVoFMixture& mixture_; autoPtr cavitation_; diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFClouds/VoFClouds.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFClouds/VoFClouds.C index 0f4a8991be..687a7d9938 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFClouds/VoFClouds.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFClouds/VoFClouds.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFClouds.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "fvmSup.H" #include "uniformDimensionedFields.H" #include "addToRunTimeSelectionTable.H" diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C index 834f765fbd..64fd4b8487 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFSolidificationMeltingSource.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "fvcDdt.H" #include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" @@ -61,9 +61,9 @@ void Foam::fv::VoFSolidificationMeltingSource::readCoeffs() Foam::word Foam::fv::VoFSolidificationMeltingSource::alphaSolidName() const { - const compressibleTwoPhaseMixture& thermo + const compressibleTwoPhaseVoFMixture& thermo ( - mesh().lookupObject + mesh().lookupObject ( "phaseProperties" ) @@ -95,7 +95,7 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource thermo_ ( - mesh().lookupObject + mesh().lookupObject ( "phaseProperties" ) @@ -185,9 +185,9 @@ void Foam::fv::VoFSolidificationMeltingSource::correct() alphaSolid_.oldTime(); - const compressibleTwoPhaseMixture& thermo + const compressibleTwoPhaseVoFMixture& thermo ( - mesh().lookupObject + mesh().lookupObject ( "phaseProperties" ) diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H b/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H index deaa07b63f..9b77cbbe1b 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -89,7 +89,7 @@ SourceFiles namespace Foam { -class compressibleTwoPhaseMixture; +class compressibleTwoPhaseVoFMixture; namespace fv { @@ -123,7 +123,7 @@ class VoFSolidificationMeltingSource scalar q_; //- VoF thermo - const compressibleTwoPhaseMixture& thermo_; + const compressibleTwoPhaseVoFMixture& thermo_; //- Solid phase fraction mutable volScalarField alphaSolid_; diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C index 3f8582df40..a754e247a4 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFPatchTransfer.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "thermoSurfaceFilm.H" #include "addToRunTimeSelectionTable.H" @@ -153,9 +153,9 @@ void VoFPatchTransfer::correct const polyBoundaryMesh& pbm = film.mesh().boundaryMesh(); - const compressibleTwoPhaseMixture& thermo + const compressibleTwoPhaseVoFMixture& thermo ( - film.primaryMesh().lookupObject + film.primaryMesh().lookupObject ( "phaseProperties" ) diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C index ccadc1f3e9..6a1ffe271b 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFSurfaceFilm.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "fvmSup.H" #include "uniformDimensionedFields.H" #include "addToRunTimeSelectionTable.H" diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C index 3f0e1efe0a..a7f351b5b7 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFTurbulenceDamping.H" -#include "compressibleTwoPhaseMixture.H" +#include "compressibleTwoPhaseVoFMixture.H" #include "compressibleMomentumTransportModel.H" #include "fvMatrix.H" #include "addToRunTimeSelectionTable.H" @@ -65,7 +65,7 @@ Foam::fv::compressible::VoFTurbulenceDamping::VoFTurbulenceDamping delta_("delta", dimLength, dict), mixture_ ( - mesh.lookupObject + mesh.lookupObject ( "phaseProperties" ) diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H b/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H index 83a30f1f78..d2e81c6528 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,7 @@ SourceFiles namespace Foam { -class compressibleTwoPhaseMixture; +class compressibleTwoPhaseVoFMixture; class compressibleMomentumTransportModel; namespace fv @@ -110,7 +110,7 @@ class VoFTurbulenceDamping dimensionedScalar delta_; //- Reference to the mixture properties - const compressibleTwoPhaseMixture& mixture_; + const compressibleTwoPhaseVoFMixture& mixture_; //- Reference to the mixture momentumTransport model const compressibleMomentumTransportModel& momentumTransport_; diff --git a/applications/solvers/modules/incompressibleVoF/Make/files b/applications/solvers/modules/incompressibleVoF/Make/files index 311fa9bf4a..806141f3e2 100644 --- a/applications/solvers/modules/incompressibleVoF/Make/files +++ b/applications/solvers/modules/incompressibleVoF/Make/files @@ -1,4 +1,4 @@ -incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C +incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.C incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.C alphaSuSp.C pressureCorrector.C diff --git a/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.C b/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.C index cdf68f8d0c..eae94a1039 100644 --- a/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.C +++ b/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFCavitation.H" -#include "incompressibleTwoPhaseMixture.H" +#include "incompressibleTwoPhaseVoFMixture.H" #include "fvcDdt.H" #include "fvcDiv.H" #include "fvmSup.H" @@ -62,7 +62,7 @@ Foam::fv::VoFCavitation::VoFCavitation mixture_ ( - mesh.lookupObjectRef + mesh.lookupObjectRef ( "phaseProperties" ) diff --git a/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.H b/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.H index 8989bd0c55..bab531ce4d 100644 --- a/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.H +++ b/applications/solvers/modules/incompressibleVoF/fvModels/VoFCavitation/VoFCavitation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,7 +86,7 @@ SourceFiles namespace Foam { -class incompressibleTwoPhaseMixture; +class incompressibleTwoPhaseVoFMixture; namespace fv { @@ -102,7 +102,7 @@ class VoFCavitation // Private Data //- Reference to the mixture properties - const incompressibleTwoPhaseMixture& mixture_; + const incompressibleTwoPhaseVoFMixture& mixture_; autoPtr cavitation_; diff --git a/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C b/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C index 2f606eb35a..47c8ab21cd 100644 --- a/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C +++ b/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "VoFTurbulenceDamping.H" -#include "incompressibleTwoPhaseMixture.H" +#include "incompressibleTwoPhaseVoFMixture.H" #include "incompressibleMomentumTransportModel.H" #include "fvMatrix.H" #include "addToRunTimeSelectionTable.H" @@ -62,7 +62,7 @@ Foam::fv::VoFTurbulenceDamping::VoFTurbulenceDamping delta_("delta", dimLength, dict), mixture_ ( - mesh.lookupObject + mesh.lookupObject ( "phaseProperties" ) diff --git a/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H b/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H index 612c515949..1e94222934 100644 --- a/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H +++ b/applications/solvers/modules/incompressibleVoF/fvModels/VoFTurbulenceDamping/VoFTurbulenceDamping.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,7 @@ SourceFiles namespace Foam { -class incompressibleTwoPhaseMixture; +class incompressibleTwoPhaseVoFMixture; class incompressibleMomentumTransportModel; namespace fv @@ -108,7 +108,7 @@ class VoFTurbulenceDamping dimensionedScalar delta_; //- Reference to the mixture properties - const incompressibleTwoPhaseMixture& mixture_; + const incompressibleTwoPhaseVoFMixture& mixture_; //- Reference to the mixture turbulence model const incompressibleMomentumTransportModel& turbulence_; diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.C b/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.C index 72ade6824b..3d763f8e73 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.C +++ b/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ incompressibleInterPhaseTransportModel const volVectorField& U, const surfaceScalarField& phi, const surfaceScalarField& alphaPhi1, - const incompressibleTwoPhaseMixture& mixture + const incompressibleTwoPhaseVoFMixture& mixture ) : twoPhaseTransport_(false), diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.H b/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.H index 69b9759e4b..588e6c01b9 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.H +++ b/applications/solvers/modules/incompressibleVoF/incompressibleInterPhaseTransportModel/incompressibleInterPhaseTransportModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,7 @@ SourceFiles #ifndef incompressibleInterPhaseTransportModel_H #define incompressibleInterPhaseTransportModel_H -#include "incompressibleTwoPhaseMixture.H" +#include "incompressibleTwoPhaseVoFMixture.H" #include "incompressibleMomentumTransportModels.H" #include "phaseIncompressibleMomentumTransportModel.H" @@ -64,7 +64,7 @@ class incompressibleInterPhaseTransportModel Switch twoPhaseTransport_; //- Two-phase mixture - const incompressibleTwoPhaseMixture& mixture_; + const incompressibleTwoPhaseVoFMixture& mixture_; //- Mixture volumetric flux const surfaceScalarField& phi_; @@ -95,7 +95,7 @@ public: const volVectorField& U, const surfaceScalarField& phi, const surfaceScalarField& alphaPhi1, - const incompressibleTwoPhaseMixture& mixture + const incompressibleTwoPhaseVoFMixture& mixture ); //- Disallow default bitwise copy construction diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C b/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.C similarity index 90% rename from applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C rename to applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.C index 314a10455c..d1877812c6 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C +++ b/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "incompressibleTwoPhaseMixture.H" +#include "incompressibleTwoPhaseVoFMixture.H" #include "surfaceInterpolate.H" #include "addToRunTimeSelectionTable.H" @@ -31,13 +31,13 @@ License namespace Foam { - defineTypeNameAndDebug(incompressibleTwoPhaseMixture, 0); + defineTypeNameAndDebug(incompressibleTwoPhaseVoFMixture, 0); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture +Foam::incompressibleTwoPhaseVoFMixture::incompressibleTwoPhaseVoFMixture ( const fvMesh& mesh ) @@ -84,7 +84,7 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // Foam::tmp -Foam::incompressibleTwoPhaseMixture::mu() const +Foam::incompressibleTwoPhaseVoFMixture::mu() const { const volScalarField limitedAlpha1 ( @@ -101,7 +101,7 @@ Foam::incompressibleTwoPhaseMixture::mu() const Foam::tmp -Foam::incompressibleTwoPhaseMixture::muf() const +Foam::incompressibleTwoPhaseVoFMixture::muf() const { const surfaceScalarField alpha1f ( @@ -118,7 +118,7 @@ Foam::incompressibleTwoPhaseMixture::muf() const Foam::tmp -Foam::incompressibleTwoPhaseMixture::nuf() const +Foam::incompressibleTwoPhaseVoFMixture::nuf() const { const surfaceScalarField alpha1f ( @@ -136,7 +136,7 @@ Foam::incompressibleTwoPhaseMixture::nuf() const } -bool Foam::incompressibleTwoPhaseMixture::read() +bool Foam::incompressibleTwoPhaseVoFMixture::read() { if (twoPhaseVoFMixture::read()) { @@ -152,7 +152,7 @@ bool Foam::incompressibleTwoPhaseMixture::read() } -void Foam::incompressibleTwoPhaseMixture::correct() +void Foam::incompressibleTwoPhaseVoFMixture::correct() { rho_ = alpha1()*rho1_ + alpha2()*rho2_; diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H b/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.H similarity index 90% rename from applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H rename to applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.H index 0ec92345e1..d195791671 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H +++ b/applications/solvers/modules/incompressibleVoF/incompressibleTwoPhaseVoFMixture/incompressibleTwoPhaseVoFMixture.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::incompressibleTwoPhaseMixture + Foam::incompressibleTwoPhaseVoFMixture Description Class to represent a mixture of two constant density phases SourceFiles - incompressibleTwoPhaseMixture.C + incompressibleTwoPhaseVoFMixture.C \*---------------------------------------------------------------------------*/ -#ifndef incompressibleTwoPhaseMixture_H -#define incompressibleTwoPhaseMixture_H +#ifndef incompressibleTwoPhaseVoFMixture_H +#define incompressibleTwoPhaseVoFMixture_H #include "twoPhaseVoFMixture.H" #include "incompressibleTwoPhases.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class incompressibleTwoPhaseMixture Declaration + Class incompressibleTwoPhaseVoFMixture Declaration \*---------------------------------------------------------------------------*/ -class incompressibleTwoPhaseMixture +class incompressibleTwoPhaseVoFMixture : public twoPhaseVoFMixture, virtual public incompressibleTwoPhases, @@ -77,17 +77,17 @@ class incompressibleTwoPhaseMixture public: - TypeName("incompressibleTwoPhaseMixture"); + TypeName("incompressibleTwoPhaseVoFMixture"); // Constructors //- Construct from a mesh - incompressibleTwoPhaseMixture(const fvMesh& mesh); + incompressibleTwoPhaseVoFMixture(const fvMesh& mesh); //- Destructor - virtual ~incompressibleTwoPhaseMixture() + virtual ~incompressibleTwoPhaseVoFMixture() {} diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C index f080ab9bbf..84982d6c65 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C +++ b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C @@ -48,10 +48,13 @@ Foam::solvers::incompressibleVoF::incompressibleVoF(fvMesh& mesh) twoPhaseVoFSolver ( mesh, - autoPtr(new incompressibleTwoPhaseMixture(mesh)) + autoPtr(new incompressibleTwoPhaseVoFMixture(mesh)) ), - mixture(refCast(twoPhaseVoFSolver::mixture)), + mixture + ( + refCast(twoPhaseVoFSolver::mixture) + ), p ( @@ -152,6 +155,11 @@ void Foam::solvers::incompressibleVoF::prePredictor() // Calculate the mass-flux from the accumulated alphaPhi1 rhoPhi = (alphaPhi1*(rho1 - rho2) + phi*rho2); + + if (pimple.predictTransport()) + { + momentumTransport.predict(); + } } @@ -159,4 +167,13 @@ void Foam::solvers::incompressibleVoF::thermophysicalPredictor() {} +void Foam::solvers::incompressibleVoF::postCorrector() +{ + if (pimple.correctTransport()) + { + momentumTransport.correct(); + } +} + + // ************************************************************************* // diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.H b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.H index 5a51f3d5bd..054cc4b0d5 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.H +++ b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.H @@ -59,7 +59,7 @@ See also #define incompressibleVoF_H #include "twoPhaseVoFSolver.H" -#include "incompressibleTwoPhaseMixture.H" +#include "incompressibleTwoPhaseVoFMixture.H" #include "incompressibleInterPhaseTransportModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -83,7 +83,7 @@ protected: // Phase properties //- The compressible two-phase mixture - incompressibleTwoPhaseMixture& mixture; + incompressibleTwoPhaseVoFMixture& mixture; // Thermophysical properties @@ -165,6 +165,9 @@ public: //- Construct and solve the pressure equation in the PISO loop virtual void pressureCorrector(); + //- Correct the momentum and thermophysical transport modelling + virtual void postCorrector(); + // Member Operators diff --git a/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C b/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C index 59d71cc23a..ae34b5e64f 100644 --- a/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C +++ b/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C @@ -65,7 +65,7 @@ void Foam::solvers::twoPhaseVoFSolver::correctCoNum() void Foam::solvers::twoPhaseVoFSolver::correctInterface() { - return interface.correct(); + interface.correct(); } diff --git a/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.H b/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.H index c5eb2463b2..0eea7a50f5 100644 --- a/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.H +++ b/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.H @@ -58,9 +58,6 @@ See also #include "VoFSolver.H" #include "twoPhaseVoFMixture.H" #include "interfaceProperties.H" -#include "buoyancy.H" -#include "pressureReference.H" -#include "IOMRFZoneList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/multiphaseInterFoam/incompressibleMultiphaseMixture/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/incompressibleMultiphaseMixture/multiphaseMixture/multiphaseMixture.C deleted file mode 100644 index cc0a3d5168..0000000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/incompressibleMultiphaseMixture/multiphaseMixture/multiphaseMixture.C +++ /dev/null @@ -1,256 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 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 "multiphaseMixture.H" -#include "alphaContactAngleFvPatchScalarField.H" -#include "correctContactAngle.H" -#include "surfaceInterpolate.H" -#include "fvcGrad.H" -#include "fvcSnGrad.H" -#include "fvcDiv.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::multiphaseMixture::calcAlphas() -{ - scalar level = 0.0; - alphas_ == 0.0; - - forAll(phases_, phasei) - { - alphas_ += level*phases_[phasei]; - level += 1.0; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::multiphaseMixture::multiphaseMixture(const fvMesh& mesh) -: - IOdictionary - ( - IOobject - ( - "phaseProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ), - - phases_(PtrListDictionary(10)), - // phases_(lookup("phases"), phase::iNew(mesh)), - - mesh_(mesh), - - alphas_ - ( - IOobject - ( - "alphas", - mesh_.time().name(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh_, - dimensionedScalar(dimless, 0) - ), - - sigmas_(lookup("sigmas")), - dimSigma_(1, 0, -2, 0, 0), - - deltaN_ - ( - "deltaN", - 1e-8/pow(average(mesh_.V()), 1.0/3.0) - ) -{ - calcAlphas(); - alphas_.write(); -} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -Foam::tmp -Foam::multiphaseMixture::surfaceTensionForce(const volVectorField& U) const -{ - tmp tstf - ( - surfaceScalarField::New - ( - "surfaceTensionForce", - mesh_, - dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0) - ) - ); - - surfaceScalarField& stf = tstf.ref(); - - forAll(phases_, phasei) - { - const incompressiblePhase& alpha1 = phases_[phasei]; - - for (label phasej = phasei+1; phasejcorrect(); - } -} - - -Foam::tmp Foam::multiphaseMixture::nHatfv -( - const volScalarField& alpha1, - const volScalarField& alpha2 -) const -{ - /* - // Cell gradient of alpha - volVectorField gradAlpha = - alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2); - - // Interpolated face-gradient of alpha - surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha); - */ - - surfaceVectorField gradAlphaf - ( - fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1)) - - fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2)) - ); - - // Face unit interface normal - return gradAlphaf/(mag(gradAlphaf) + deltaN_); -} - - -Foam::tmp Foam::multiphaseMixture::nHatf -( - const volScalarField& alpha1, - const volScalarField& alpha2 -) const -{ - // Face unit interface normal flux - return nHatfv(alpha1, alpha2) & mesh_.Sf(); -} - - -Foam::tmp Foam::multiphaseMixture::K -( - const phase& alpha1, - const phase& alpha2, - const volVectorField& U -) const -{ - tmp tnHatfv = nHatfv(alpha1, alpha2); - - correctContactAngle - ( - alpha1, - alpha2, - U.boundaryField(), - deltaN_, - tnHatfv.ref().boundaryFieldRef() - ); - - // Simple expression for curvature - return -fvc::div(tnHatfv & mesh_.Sf()); -} - - -Foam::tmp -Foam::multiphaseMixture::nearInterface() const -{ - tmp tnearInt - ( - volScalarField::New - ( - "nearInterface", - mesh_, - dimensionedScalar(dimless, 0) - ) - ); - - forAll(phases_, phasei) - { - tnearInt.ref() = max - ( - tnearInt(), - pos0(phases_[phasei] - 0.01)*pos0(0.99 - phases_[phasei]) - ); - } - - return tnearInt; -} - - -bool Foam::multiphaseMixture::read() -{ - if (regIOobject::read()) - { - lookup("sigmas") >> sigmas_; - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseInterFoam/incompressibleMultiphaseMixture/multiphaseMixture/multiphaseMixture.H b/applications/solvers/multiphase/multiphaseInterFoam/incompressibleMultiphaseMixture/multiphaseMixture/multiphaseMixture.H deleted file mode 100644 index 4531021376..0000000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/incompressibleMultiphaseMixture/multiphaseMixture/multiphaseMixture.H +++ /dev/null @@ -1,222 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 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::multiphaseMixture - -Description - Incompressible multiphase mixture with built in solution for the - phase fractions with interface compression for interface-capturing. - - Derived from viscosity so that it can be used in conjunction - with the incompressible turbulence models. - - Surface tension and contact-angle is handled for the interface - between each phase-pair. - -SourceFiles - multiphaseMixture.C - -\*---------------------------------------------------------------------------*/ - -#ifndef multiphaseMixture_H -#define multiphaseMixture_H - -#include "viscosity.H" -#include "IOdictionary.H" -#include "phase.H" -#include "UPtrListDictionary.H" -#include "volFields.H" -#include "surfaceFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class multiphaseMixture Declaration -\*---------------------------------------------------------------------------*/ - -class multiphaseMixture -: - public IOdictionary -{ -public: - - class interfacePair - : - public Pair - { - public: - - class hash - : - public Hash - { - public: - - hash() - {} - - label operator()(const interfacePair& key) const - { - return word::hash()(key.first()) + word::hash()(key.second()); - } - }; - - - // Constructors - - interfacePair() - {} - - interfacePair(const word& alpha1Name, const word& alpha2Name) - : - Pair(alpha1Name, alpha2Name) - {} - - interfacePair(const phase& alpha1, const phase& alpha2) - : - Pair(alpha1.name(), alpha2.name()) - {} - - - // Friend Operators - - friend bool operator== - ( - const interfacePair& a, - const interfacePair& b - ) - { - return - ( - ((a.first() == b.first()) && (a.second() == b.second())) - || ((a.first() == b.second()) && (a.second() == b.first())) - ); - } - - friend bool operator!= - ( - const interfacePair& a, - const interfacePair& b - ) - { - return (!(a == b)); - } - }; - - -private: - - // Private Data - - //- Dictionary of phases - UPtrListDictionary phases_; - - const fvMesh& mesh_; - - volScalarField alphas_; - - typedef HashTable - sigmaTable; - - sigmaTable sigmas_; - dimensionSet dimSigma_; - - //- Stabilisation for normalisation of the interface normal - const dimensionedScalar deltaN_; - - - // Private Member Functions - - void calcAlphas(); - - tmp nHatfv - ( - const volScalarField& alpha1, - const volScalarField& alpha2 - ) const; - - tmp nHatf - ( - const volScalarField& alpha1, - const volScalarField& alpha2 - ) const; - - tmp K - ( - const phase& alpha1, - const phase& alpha2, - const volVectorField& U - ) const; - - -public: - - // Constructors - - //- Construct from fvMesh - multiphaseMixture(const fvMesh& mesh); - - - //- Destructor - virtual ~multiphaseMixture() - {} - - - // Member Functions - - //- Return the phases - const UPtrListDictionary& phases() const - { - return phases_; - } - - tmp surfaceTensionForce - ( - const volVectorField& U - ) const; - - //- Indicator of the proximity of the interface - // Field values are 1 near and 0 away for the interface. - tmp nearInterface() const; - - //- Correct the mixture properties - void correct(); - - //- Read base phaseProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* //