diff --git a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options
index 9ef0e695ab..2a5a5dc86e 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options
@@ -5,6 +5,8 @@ EXE_INC = \
-I../multiphaseThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
@@ -25,6 +27,7 @@ LIB_LIBS = \
-lmultiphaseProperties \
-lphaseFluidThermophysicalTransportModels \
-lphaseFluidMulticomponentThermophysicalTransportModels \
+ -lcompressibleTwoPhaseMixture \
-lfiniteVolume \
-lmeshTools \
-lfileFormats \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/fvModels/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/fvModels/Make/options
index ae9e6b5ce9..a623be4911 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/fvModels/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/fvModels/Make/options
@@ -2,6 +2,8 @@ EXE_INC = \
-I../phaseSystems/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
@@ -18,6 +20,7 @@ LIB_LIBS = \
-lmultiphaseProperties \
-lphaseFluidThermophysicalTransportModels \
-lphaseFluidMulticomponentThermophysicalTransportModels \
+ -lcompressibleTwoPhaseMixture \
-lfiniteVolume \
-lfvModels \
-lmeshTools
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialCompositionModels/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/interfacialCompositionModels/Make/options
index 0a1d1445bc..5556984cae 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/interfacialCompositionModels/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialCompositionModels/Make/options
@@ -6,6 +6,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/files b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/files
index fa1eb1f6f8..34547fec68 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/files
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/files
@@ -85,6 +85,7 @@ wallDampingModels/sine/sineWallDamping.C
phaseTransferModels/phaseTransferModel/phaseTransferModel.C
phaseTransferModels/phaseTransferModel/phaseTransferModelNew.C
+phaseTransferModels/cavitation/cavitation.C
phaseTransferModels/deposition/deposition.C
phaseTransferModels/reactionDriven/reactionDriven.C
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/options
index a1290d84ef..44742e4cd7 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/Make/options
@@ -2,6 +2,10 @@ EXE_INC = \
-I../phaseSystems/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleCavitation/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
@@ -12,4 +16,6 @@ EXE_INC = \
LIB_LIBS = \
-lphaseSystem \
-lfluidThermophysicalModels \
- -lspecie
+ -lsaturationModels \
+ -lspecie \
+ -lcompressibleCavitationModels
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C
new file mode 100644
index 0000000000..44ab933a1d
--- /dev/null
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C
@@ -0,0 +1,122 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 2021-2022 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 "cavitation.H"
+#include "phaseSystem.H"
+#include "addToRunTimeSelectionTable.H"
+#include "fvCFD.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace phaseTransferModels
+{
+ defineTypeNameAndDebug(cavitation, 0);
+ addToRunTimeSelectionTable
+ (
+ phaseTransferModel,
+ cavitation,
+ dictionary
+ );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::phaseTransferModels::cavitation::cavitation
+(
+ const dictionary& dict,
+ const phaseInterface& interface
+)
+:
+ phaseTransferModel(dict, interface),
+ interface_(interface),
+ cavitation_(compressible::cavitationModel::New(dict, interface_))
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+Foam::phaseTransferModels::cavitation::~cavitation()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+bool Foam::phaseTransferModels::cavitation::mixture() const
+{
+ return true;
+}
+
+
+Foam::tmp
+Foam::phaseTransferModels::cavitation::dmdtf() const
+{
+ tmp tResult =
+ volScalarField::New
+ (
+ IOobject::groupName(typedName("dmdtf"), interface_.name()),
+ interface_.mesh(),
+ dimDensity/dimTime,
+ zeroGradientFvPatchField::typeName
+ );
+
+ const Pair> coeffs(cavitation_->mDot12P());
+
+ const volScalarField::Internal& p = interface_.phase1().thermo().p();
+ const volScalarField::Internal pSat1(cavitation_->pSat1());
+ const volScalarField::Internal pSat2(cavitation_->pSat2());
+
+ tResult.ref().ref() = coeffs[0]*(p - pSat1) - coeffs[1]*(p - pSat2);
+ tResult.ref().correctBoundaryConditions();
+
+ return tResult;
+}
+
+
+Foam::tmp
+Foam::phaseTransferModels::cavitation::d2mdtdpf() const
+{
+ tmp tResult =
+ volScalarField::New
+ (
+ IOobject::groupName(typedName("d2mdtdpf"), interface_.name()),
+ interface_.mesh(),
+ dimDensity/dimTime/dimPressure,
+ zeroGradientFvPatchField::typeName
+ );
+
+ const Pair> coeffs(cavitation_->mDot12P());
+
+ tResult.ref().ref() = coeffs[0] - coeffs[1];
+ tResult.ref().correctBoundaryConditions();
+
+ return tResult;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.H b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.H
new file mode 100644
index 0000000000..13f3bda73e
--- /dev/null
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.H
@@ -0,0 +1,134 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 2021-2022 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::phaseTransferModels::cavitation
+
+Description
+ A phase transfer model which represents cavitation.
+
+ Example usage:
+ \verbatim
+ phaseTransfer
+ {
+ vapour_dispersedIn_water
+ {
+ type cavitation;
+
+ model Kunz;
+
+ liquid water;
+
+ pSat 80000;
+
+ UInf 5.33;
+ tInf 0.028142589;
+ Cc 100;
+ Cv 100;
+ }
+ }
+ \endverbatim
+
+SourceFiles
+ cavitation.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef cavitation_H
+#define cavitation_H
+
+#include "phaseTransferModel.H"
+#include "cavitationModel.H"
+#include "phaseModel.H"
+#include "dispersedPhaseInterface.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+class phasePair;
+
+namespace phaseTransferModels
+{
+
+/*---------------------------------------------------------------------------*\
+ Class cavitation Declaration
+\*---------------------------------------------------------------------------*/
+
+class cavitation
+:
+ public phaseTransferModel
+{
+private:
+
+ // Private Data
+
+ //- Interface
+ const phaseInterface interface_;
+
+ //- Cavitation model
+ autoPtr cavitation_;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("cavitation");
+
+
+ // Constructors
+
+ //- Construct from components
+ cavitation
+ (
+ const dictionary& dict,
+ const phaseInterface& interface
+ );
+
+
+ //- Destructor
+ virtual ~cavitation();
+
+
+ // Member Functions
+
+ //- Whether or not there is a mass transfer rate for the mixture
+ virtual bool mixture() const;
+
+ //- The mass transfer rate for the mixture
+ virtual tmp dmdtf() const;
+
+ //- The derivative of mass transfer w.r.t. pressure
+ virtual tmp d2mdtdpf() const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace phaseTransferModels
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C
index e4de173ee4..47e254c24a 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C
@@ -37,6 +37,9 @@ namespace Foam
const Foam::dimensionSet Foam::phaseTransferModel::dimDmdt =
Foam::dimDensity/Foam::dimTime;
+const Foam::dimensionSet Foam::phaseTransferModel::dimD2mdtdp =
+ Foam::dimDensity/Foam::dimTime/Foam::dimPressure;
+
const Foam::hashedWordList Foam::phaseTransferModel::noSpecies_ =
Foam::hashedWordList();
@@ -80,6 +83,12 @@ Foam::tmp Foam::phaseTransferModel::dmdtf() const
}
+Foam::tmp Foam::phaseTransferModel::d2mdtdpf() const
+{
+ return tmp(nullptr);
+}
+
+
const Foam::hashedWordList& Foam::phaseTransferModel::species() const
{
return noSpecies_;
@@ -119,6 +128,20 @@ Foam::blendedPhaseTransferModel::dmdtf() const
}
+Foam::tmp
+Foam::blendedPhaseTransferModel::d2mdtdpf() const
+{
+ return
+ evaluate
+ (
+ &phaseTransferModel::d2mdtdpf,
+ "d2mdtdpf",
+ phaseTransferModel::dimD2mdtdp,
+ true
+ );
+}
+
+
Foam::hashedWordList Foam::blendedPhaseTransferModel::species() const
{
return evaluate(&phaseTransferModel::species);
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H
index 0f428db78c..c7bead966c 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H
+++ b/applications/solvers/modules/fluid/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H
@@ -82,6 +82,9 @@ public:
//- Mass transfer rate dimensions
static const dimensionSet dimDmdt;
+ //- Mass transfer rate derivative w.r.t pressure dimensions
+ static const dimensionSet dimD2mdtdp;
+
//- Does this model require correcting on fixed flux boundaries?
static const bool correctFixedFluxBCs = false;
@@ -120,6 +123,9 @@ public:
//- The mass transfer rate for the mixture
virtual tmp dmdtf() const;
+ //- The mass transfer rate derivative w.r.t pressure for the mixture
+ virtual tmp d2mdtdpf() const;
+
//- The list of individual species that are transferred
virtual const hashedWordList& species() const;
@@ -166,6 +172,9 @@ public:
//- The mass transfer rate for the mixture
tmp dmdtf() const;
+ //- The mass transfer rate derivative w.r.t pressure for the mixture
+ tmp d2mdtdpf() const;
+
//- The list of individual species that are transferred
hashedWordList species() const;
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/Make/options
index 8140d4a51c..ce52b5d3ec 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/Make/options
@@ -7,6 +7,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/Make/options
index 9a27c70295..a164f4cc37 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/Make/options
@@ -6,6 +6,8 @@ EXE_INC = \
-I../interfacialCompositionModels/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseSystems/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseSystems/Make/options
index d56e86b67d..84a716cc56 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseSystems/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseSystems/Make/options
@@ -9,6 +9,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseReactions/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseReactions/Make/options
index f14ec540da..e6310ea9c6 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseReactions/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseReactions/Make/options
@@ -5,6 +5,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseThermophysicalTransportModels/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseThermophysicalTransportModels/Make/options
index fca15d13c1..b12295d68c 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseThermophysicalTransportModels/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseThermophysicalTransportModels/Make/options
@@ -6,6 +6,9 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
+ -I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/Make/options
index 14aa36611e..5c61b906dc 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/Make/options
@@ -4,11 +4,13 @@ EXE_INC = \
-I../multiphaseCompressibleMomentumTransportModels/lnInclude \
-I../multiphaseThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
- -I$(LIB_SRC)/multiphaseModels/multiphaseProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/multiphaseModels/multiphaseProperties/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C
index e27b584173..878cc03ad9 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C
+++ b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C
@@ -182,6 +182,26 @@ Foam::PhaseTransferPhaseSystem::PhaseTransferPhaseSystem
dimensionedScalar(dimDensity/dimTime, 0)
)
);
+
+ d2mdtdpfs_.insert
+ (
+ interface,
+ new volScalarField
+ (
+ IOobject
+ (
+ IOobject::groupName
+ (
+ "phaseTransfer:d2mdtdpf",
+ interface.name()
+ ),
+ this->mesh().time().timeName(),
+ this->mesh()
+ ),
+ this->mesh(),
+ dimensionedScalar(dimDensity/dimTime/dimPressure, 0)
+ )
+ );
}
dmidtfs_.insert(interface, new HashPtrTable());
@@ -281,6 +301,24 @@ Foam::PhaseTransferPhaseSystem::dmdts() const
}
+template
+Foam::PtrList
+Foam::PhaseTransferPhaseSystem::d2mdtdps() const
+{
+ PtrList d2mdtdps(BasePhaseSystem::d2mdtdps());
+
+ forAllConstIter(phaseSystem::dmdtfTable, d2mdtdpfs_, d2mdtdpfIter)
+ {
+ const phaseInterface interface(*this, d2mdtdpfIter.key());
+
+ addField(interface.phase1(), "d2mdtdp", *d2mdtdpfIter(), d2mdtdps);
+ addField(interface.phase2(), "d2mdtdp", - *d2mdtdpfIter(), d2mdtdps);
+ }
+
+ return d2mdtdps;
+}
+
+
template
Foam::autoPtr
Foam::PhaseTransferPhaseSystem::momentumTransfer()
@@ -380,6 +418,7 @@ void Foam::PhaseTransferPhaseSystem::correct()
if (phaseTransferModelIter()->mixture())
{
*dmdtfs_[interface] = Zero;
+ *d2mdtdpfs_[interface] = Zero;
}
const hashedWordList species(phaseTransferModelIter()->species());
@@ -405,6 +444,7 @@ void Foam::PhaseTransferPhaseSystem::correct()
if (phaseTransferModelIter()->mixture())
{
*dmdtfs_[interface] += phaseTransferModelIter()->dmdtf();
+ *d2mdtdpfs_[interface] += phaseTransferModelIter()->d2mdtdpf();
}
const HashPtrTable dmidtf
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H
index c5b5b9c322..aa0620fbcc 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H
+++ b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H
@@ -76,6 +76,9 @@ private:
//- Bulk mass transfer rates
phaseSystem::dmdtfTable dmdtfs_;
+ //- Bulk mass transfer pressure linearisation coefficients
+ phaseSystem::dmdtfTable d2mdtdpfs_;
+
//- Specie mass transfer rates
phaseSystem::dmidtfTable dmidtfs_;
@@ -125,6 +128,10 @@ public:
//- Return the mass transfer rates for each phase
virtual PtrList dmdts() const;
+ //- Return the mass transfer pressure linearisation coefficients for
+ // each phase
+ virtual PtrList d2mdtdps() const;
+
//- Return the momentum transfer matrices for the cell-based algorithm
virtual autoPtr momentumTransfer();
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H
index 6af47ce523..f830acdee3 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H
+++ b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H
@@ -39,6 +39,7 @@ SourceFiles
#define phaseInterface_H
#include "phaseModel.H"
+#include "compressibleTwoPhases.H"
#include "uniformDimensionedFields.H"
#include "runTimeSelectionTables.H"
@@ -54,6 +55,8 @@ class phaseInterfaceKey;
\*---------------------------------------------------------------------------*/
class phaseInterface
+:
+ public compressibleTwoPhases
{
private:
@@ -290,6 +293,24 @@ public:
// Access
+ //- Return the volume fraction of phase 1
+ virtual inline const volScalarField& alpha1() const;
+
+ //- Return the volume fraction of phase 2
+ virtual inline const volScalarField& alpha2() const;
+
+ //- Return the thermo for phase 1
+ virtual inline const rhoThermo& thermo1() const;
+
+ //- Return the thermo for phase 2
+ virtual inline const rhoThermo& thermo2() const;
+
+ //- Return the density of phase 1
+ virtual inline const volScalarField& rho1() const;
+
+ //- Return the density of phase 2
+ virtual inline const volScalarField& rho2() const;
+
//- Return phase 1
inline const phaseModel& phase1() const;
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H
index ae4eeb9ea3..6114ae74ff 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H
+++ b/applications/solvers/modules/fluid/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H
@@ -27,6 +27,42 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+inline const Foam::volScalarField& Foam::phaseInterface::alpha1() const
+{
+ return phase1();
+}
+
+
+inline const Foam::volScalarField& Foam::phaseInterface::alpha2() const
+{
+ return phase2();
+}
+
+
+inline const Foam::rhoThermo& Foam::phaseInterface::thermo1() const
+{
+ return phase1().thermo();
+}
+
+
+inline const Foam::rhoThermo& Foam::phaseInterface::thermo2() const
+{
+ return phase2().thermo();
+}
+
+
+inline const Foam::volScalarField& Foam::phaseInterface::rho1() const
+{
+ return phase1().rho();
+}
+
+
+inline const Foam::volScalarField& Foam::phaseInterface::rho2() const
+{
+ return phase2().rho();
+}
+
+
inline const Foam::phaseModel& Foam::phaseInterface::phase1() const
{
return phase1_;
@@ -41,7 +77,7 @@ inline const Foam::phaseModel& Foam::phaseInterface::phase2() const
inline bool Foam::phaseInterface::contains(const phaseModel& phase) const
{
- return &phase1_ == &phase || & phase2_ == &phase;
+ return &phase1_ == &phase || &phase2_ == &phase;
}
diff --git a/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.C b/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.C
index c8182811b2..da2c5bd7ea 100644
--- a/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.C
+++ b/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.C
@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "cavitationModel.H"
+#include "constantPressure.H"
#include "fvmSup.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -48,16 +49,13 @@ Foam::compressible::cavitationModel::cavitationModel
:
phases_(phases),
liquidIndex_(phases.index(dict.lookup("liquid"))),
- saturationModel_
- (
- saturationPressureModel::New(dict.subDict("saturationPressure"))
- )
+ saturationModel_(saturationPressureModel::New("pSat", dict))
{}
bool Foam::compressible::cavitationModel::read(const dictionary& dict)
{
- saturationModel_.reset(saturationPressureModel::New(dict).ptr());
+ saturationModel_.reset(saturationPressureModel::New("pSat", dict).ptr());
return true;
}