diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options
index 2a75a610c1..2738cef53e 100644
--- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options
+++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options
@@ -7,4 +7,6 @@ EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-ldynamicMesh \
- -lfieldFunctionObjects
+ -lfieldFunctionObjects \
+ -lincompressibleMultiphaseSystems \
+ -lreactingMultiphaseSystem
diff --git a/src/functionObjects/Allwmake b/src/functionObjects/Allwmake
index 9c4009e728..700e799fc4 100755
--- a/src/functionObjects/Allwmake
+++ b/src/functionObjects/Allwmake
@@ -9,6 +9,7 @@ wmake $targetType forces
wmake $targetType initialisation
wmake $targetType utilities
wmake $targetType solvers
+wmake $targetType phaseSystems
./randomProcesses/Allwmake $targetType
diff --git a/src/functionObjects/field/Make/files b/src/functionObjects/field/Make/files
index b7c2550efb..3fd56b2f79 100644
--- a/src/functionObjects/field/Make/files
+++ b/src/functionObjects/field/Make/files
@@ -33,6 +33,8 @@ heatTransferCoeff/heatTransferCoeffModels/heatTransferCoeffModel/heatTransferCoe
heatTransferCoeff/heatTransferCoeffModels/fixedReferenceTemperature/fixedReferenceTemperature.C
heatTransferCoeff/heatTransferCoeffModels/localReferenceTemperature/localReferenceTemperature.C
heatTransferCoeff/heatTransferCoeffModels/ReynoldsAnalogy/ReynoldsAnalogy.C
+heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.C
+heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.C
limitFields/limitFields.C
diff --git a/src/functionObjects/field/Make/options b/src/functionObjects/field/Make/options
index cc5819e29c..c5df9e3b47 100644
--- a/src/functionObjects/field/Make/options
+++ b/src/functionObjects/field/Make/options
@@ -21,7 +21,9 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
- -I$(LIB_SRC)/fvAgglomerationMethods/pairPatchAgglomeration/lnInclude
+ -I$(LIB_SRC)/fvAgglomerationMethods/pairPatchAgglomeration/lnInclude \
+ -I$(LIB_SRC)/phaseSystemModels/multiphaseInter/phasesSystem/lnInclude \
+ -I$(LIB_SRC)/phaseSystemModels/reactingEuler/multiphaseSystem/lnInclude
LIB_LIBS = \
-lfiniteVolume \
@@ -43,4 +45,6 @@ LIB_LIBS = \
-lturbulenceModelSchemes \
-lchemistryModel \
-lreactionThermophysicalModels \
- -lpairPatchAgglomeration
+ -lpairPatchAgglomeration \
+ -lincompressibleMultiphaseSystems \
+ -lreactingMultiphaseSystem
diff --git a/src/functionObjects/field/heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.C b/src/functionObjects/field/heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.C
new file mode 100644
index 0000000000..108b4d473a
--- /dev/null
+++ b/src/functionObjects/field/heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.C
@@ -0,0 +1,173 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2022 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 "multiphaseInterHtcModel.H"
+#include "multiphaseInterSystem.H"
+#include "addToRunTimeSelectionTable.H"
+#include "dictionary.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+ defineTypeNameAndDebug(multiphaseInterHtcModel, 0);
+ addToRunTimeSelectionTable
+ (
+ functionObject,
+ multiphaseInterHtcModel,
+ dictionary
+ );
+}
+}
+
+
+// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
+
+Foam::tmp>
+Foam::functionObjects::multiphaseInterHtcModel::q() const
+{
+ const fvMesh& mesh = htcModelPtr_->mesh();
+
+ const auto& T = mesh.lookupObject(htcModelPtr_->TName());
+
+ const volScalarField::Boundary& Tbf = T.boundaryField();
+
+ auto tq = tmp>::New(Tbf.size());
+ auto& q = tq.ref();
+
+ forAll(q, patchi)
+ {
+ q.set(patchi, new Field(Tbf[patchi].size(), Zero));
+ }
+
+ const auto* fluidPtr =
+ mesh.cfindObject("phaseProperties");
+
+ if (!fluidPtr)
+ {
+ FatalErrorInFunction
+ << "Unable to find a valid phaseSystem to evaluate q" << nl
+ << exit(FatalError);
+ }
+
+ const multiphaseInterSystem& fluid = *fluidPtr;
+
+ for (const label patchi : htcModelPtr_->patchSet())
+ {
+ q[patchi] += fluid.kappaEff(patchi)()*Tbf[patchi].snGrad();
+ }
+
+ // Add radiative heat flux contribution if present
+
+ const auto* qrPtr =
+ mesh.cfindObject(htcModelPtr_->qrName());
+
+ if (qrPtr)
+ {
+ const volScalarField::Boundary& qrbf = qrPtr->boundaryField();
+
+ for (const label patchi : htcModelPtr_->patchSet())
+ {
+ q[patchi] += qrbf[patchi];
+ }
+ }
+
+ return tq;
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+bool Foam::functionObjects::multiphaseInterHtcModel::calc()
+{
+ auto& htc =
+ htcModelPtr_->mesh().lookupObjectRef(resultName_);
+
+ htcModelPtr_->calc(htc, q());
+
+ return true;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::functionObjects::multiphaseInterHtcModel::multiphaseInterHtcModel
+(
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+)
+:
+ fieldExpression(name, runTime, dict),
+ htcModelPtr_(nullptr)
+{
+ read(dict);
+
+ setResultName(typeName, "htc:" + htcModelPtr_->type());
+
+ auto* htcPtr =
+ new volScalarField
+ (
+ IOobject
+ (
+ resultName_,
+ mesh_.time().timeName(),
+ mesh_,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ mesh_,
+ dimensionedScalar(dimPower/dimArea/dimTemperature, Zero)
+ );
+
+ mesh_.objectRegistry::store(htcPtr);
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+bool Foam::functionObjects::multiphaseInterHtcModel::read
+(
+ const dictionary& dict
+)
+{
+ if (!fieldExpression::read(dict))
+ {
+ return false;
+ }
+
+ htcModelPtr_ = heatTransferCoeffModel::New(dict, mesh_, fieldName_);
+
+ htcModelPtr_->read(dict);
+
+ return true;
+}
+
+
+// ************************************************************************* //
diff --git a/src/functionObjects/field/heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.H b/src/functionObjects/field/heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.H
new file mode 100644
index 0000000000..1e8645b8b9
--- /dev/null
+++ b/src/functionObjects/field/heatTransferCoeff/multiphaseInterHtcModel/multiphaseInterHtcModel.H
@@ -0,0 +1,122 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2022 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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::functionObjects::multiphaseInterHtcModel
+
+Description
+ A heat transfer coefficient for multiphase inter solvers
+ (i.e. icoReactingMultiphaseFoam).
+
+SourceFiles
+ multiphaseInterHtcModel.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Foam_functionObjects_multiphaseInterHtcModel_H
+#define Foam_functionObjects_multiphaseInterHtcModel_H
+
+#include "HashSet.H"
+#include "volFields.H"
+#include "fieldExpression.H"
+#include "runTimeSelectionTables.H"
+#include "heatTransferCoeffModel.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+
+/*---------------------------------------------------------------------------*\
+ Class multiphaseInterHtcModel Declaration
+\*---------------------------------------------------------------------------*/
+
+class multiphaseInterHtcModel
+:
+ public fieldExpression
+{
+ // Private Data
+
+ //- Heat transfer coefficient model
+ autoPtr htcModelPtr_;
+
+
+protected:
+
+ // Protected Member Functions
+
+ //- Calculate the heat transfer coefficient field
+ // \return true on success
+ virtual bool calc();
+
+ //- Calculate heat flux
+ tmp> q() const;
+
+ //- No copy construct
+ multiphaseInterHtcModel(const multiphaseInterHtcModel&) = delete;
+
+ //- No copy assignment
+ void operator=(const multiphaseInterHtcModel&) = delete;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("multiphaseInterHtcModel");
+
+
+ // Constructors
+
+ //- Construct from components
+ multiphaseInterHtcModel
+ (
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+ );
+
+
+ //- Destructor
+ virtual ~multiphaseInterHtcModel() = default;
+
+
+ // Member Functions
+
+ //- Read the heatTransferCoeff data
+ virtual bool read(const dictionary& dict);
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace functionObjects
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/reactingEulerHtcModel/reactingEulerHtcModel.C b/src/functionObjects/field/heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.C
similarity index 99%
rename from src/phaseSystemModels/reactingEuler/functionObjects/reactingEulerHtcModel/reactingEulerHtcModel.C
rename to src/functionObjects/field/heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.C
index be169e7fb2..9360972ded 100644
--- a/src/phaseSystemModels/reactingEuler/functionObjects/reactingEulerHtcModel/reactingEulerHtcModel.C
+++ b/src/functionObjects/field/heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.C
@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
- Copyright (C) 2020 OpenCFD Ltd.
+ Copyright (C) 2020-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/reactingEulerHtcModel/reactingEulerHtcModel.H b/src/functionObjects/field/heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.H
similarity index 94%
rename from src/phaseSystemModels/reactingEuler/functionObjects/reactingEulerHtcModel/reactingEulerHtcModel.H
rename to src/functionObjects/field/heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.H
index 7c1536bf7d..72fd176724 100644
--- a/src/phaseSystemModels/reactingEuler/functionObjects/reactingEulerHtcModel/reactingEulerHtcModel.H
+++ b/src/functionObjects/field/heatTransferCoeff/reactingEulerHtcModel/reactingEulerHtcModel.H
@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
- Copyright (C) 2020 OpenCFD Ltd.
+ Copyright (C) 2020-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -24,7 +24,7 @@ License
along with OpenFOAM. If not, see .
Class
- Foam::reactingEulerHtcModel
+ Foam::functionObjects::reactingEulerHtcModel
Description
A heat transfer coefficient for reactingEuler solvers
@@ -34,8 +34,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
-#ifndef reactingEulerHtcModel_H
-#define reactingEulerHtcModel_H
+#ifndef Foam_functionObjects_reactingEulerHtcModel_H
+#define Foam_functionObjects_reactingEulerHtcModel_H
#include "HashSet.H"
#include "volFields.H"
diff --git a/src/functionObjects/phaseSystems/Make/files b/src/functionObjects/phaseSystems/Make/files
new file mode 100644
index 0000000000..b925df49e1
--- /dev/null
+++ b/src/functionObjects/phaseSystems/Make/files
@@ -0,0 +1,4 @@
+sizeDistribution/sizeDistribution.C
+phaseForces/phaseForces.C
+
+LIB = $(FOAM_LIBBIN)/libphaseFunctionObjects
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/Make/options b/src/functionObjects/phaseSystems/Make/options
similarity index 100%
rename from src/phaseSystemModels/reactingEuler/functionObjects/Make/options
rename to src/functionObjects/phaseSystems/Make/options
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/phaseForces/phaseForces.C b/src/functionObjects/phaseSystems/phaseForces/phaseForces.C
similarity index 100%
rename from src/phaseSystemModels/reactingEuler/functionObjects/phaseForces/phaseForces.C
rename to src/functionObjects/phaseSystems/phaseForces/phaseForces.C
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/phaseForces/phaseForces.H b/src/functionObjects/phaseSystems/phaseForces/phaseForces.H
similarity index 100%
rename from src/phaseSystemModels/reactingEuler/functionObjects/phaseForces/phaseForces.H
rename to src/functionObjects/phaseSystems/phaseForces/phaseForces.H
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/sizeDistribution/sizeDistribution.C b/src/functionObjects/phaseSystems/sizeDistribution/sizeDistribution.C
similarity index 100%
rename from src/phaseSystemModels/reactingEuler/functionObjects/sizeDistribution/sizeDistribution.C
rename to src/functionObjects/phaseSystems/sizeDistribution/sizeDistribution.C
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/sizeDistribution/sizeDistribution.H b/src/functionObjects/phaseSystems/sizeDistribution/sizeDistribution.H
similarity index 100%
rename from src/phaseSystemModels/reactingEuler/functionObjects/sizeDistribution/sizeDistribution.H
rename to src/functionObjects/phaseSystems/sizeDistribution/sizeDistribution.H
diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
index fd2727be90..a9fac35aa3 100644
--- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
@@ -137,7 +137,7 @@ private:
public:
//- Runtime type information
- TypeName("alphaContactAngle");
+ TypeName("multiphaseEuler::alphaContactAngle");
// Constructors
diff --git a/src/phaseSystemModels/reactingEuler/Allwclean b/src/phaseSystemModels/reactingEuler/Allwclean
index 79ef7c0453..1d596fd883 100755
--- a/src/phaseSystemModels/reactingEuler/Allwclean
+++ b/src/phaseSystemModels/reactingEuler/Allwclean
@@ -5,7 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
# echo "cleaning ${PWD##*/}"
wclean libso multiphaseSystem
-wclean libso functionObjects
wclean libso twoPhaseSystem
wclean libso twoPhaseCompressibleTurbulenceModels
diff --git a/src/phaseSystemModels/reactingEuler/Allwmake b/src/phaseSystemModels/reactingEuler/Allwmake
index ca9165e4a9..db30d6a122 100755
--- a/src/phaseSystemModels/reactingEuler/Allwmake
+++ b/src/phaseSystemModels/reactingEuler/Allwmake
@@ -6,7 +6,6 @@ cd "${0%/*}" || exit # Run from this directory
# echo "making ${PWD##*/}"
wmake $targetType multiphaseSystem
-wmake $targetType functionObjects
wmake $targetType twoPhaseSystem
wmake $targetType twoPhaseCompressibleTurbulenceModels
diff --git a/src/phaseSystemModels/reactingEuler/functionObjects/Make/files b/src/phaseSystemModels/reactingEuler/functionObjects/Make/files
deleted file mode 100644
index 567c9619ea..0000000000
--- a/src/phaseSystemModels/reactingEuler/functionObjects/Make/files
+++ /dev/null
@@ -1,5 +0,0 @@
-sizeDistribution/sizeDistribution.C
-phaseForces/phaseForces.C
-reactingEulerHtcModel/reactingEulerHtcModel.C
-
-LIB = $(FOAM_LIBBIN)/libreactingEulerFoamFunctionObjects
diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
index ddb517d6b6..a28a4e5f54 100644
--- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation
- Copyright (C) 2021 OpenCFD Ltd.
+ Copyright (C) 2021-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -174,7 +174,7 @@ private:
public:
//- Runtime type information
- TypeName("alphaContactAngle");
+ TypeName("reactingMultiphaseEuler::alphaContactAngle");
// Constructors
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.orig/alpha.air b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.orig/alpha.air
index bf6831fe12..9c831802be 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.orig/alpha.air
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.orig/alpha.air
@@ -22,7 +22,7 @@ boundaryField
{
leftWall
{
- type alphaContactAngle;
+ type multiphaseEuler::alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0
@@ -37,7 +37,7 @@ boundaryField
rightWall
{
- type alphaContactAngle;
+ type multiphaseEuler::alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0
@@ -52,7 +52,7 @@ boundaryField
lowerWall
{
- type alphaContactAngle;
+ type multiphaseEuler::alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0