diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/files b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/files
index bbd8bf2b5c..faa83428bd 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/files
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/files
@@ -1,5 +1,4 @@
phaseModel/phaseModel.C
-alphaContactAngle/alphaContactAngleFvPatchScalarField.C
compressibleMultiphaseMixture.C
LIB = $(FOAM_LIBBIN)/libcompressibleMultiphaseMixture
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/options b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/options
index 040016896f..5dca2a4b02 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/options
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/Make/options
@@ -1,11 +1,13 @@
EXE_INC = \
-I$(LIB_SRC)/physicalProperties/lnInclude \
+ -I$(LIB_SRC)/multiphaseModels/multiphaseProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lfluidThermophysicalModels \
+ -lmultiphaseProperties \
-lspecie \
-lfiniteVolume \
-lmeshTools
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
deleted file mode 100644
index 3460747dcd..0000000000
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ /dev/null
@@ -1,145 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#include "alphaContactAngleFvPatchScalarField.H"
-#include "addToRunTimeSelectionTable.H"
-#include "fvPatchFieldMapper.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
-(
- Istream& is
-)
-:
- theta0_(readScalar(is)),
- uTheta_(readScalar(is)),
- thetaA_(readScalar(is)),
- thetaR_(readScalar(is))
-{}
-
-
-Istream& operator>>
-(
- Istream& is,
- alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
-)
-{
- is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
- return is;
-}
-
-
-Ostream& operator<<
-(
- Ostream& os,
- const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
-)
-{
- os << tp.theta0_ << token::SPACE
- << tp.uTheta_ << token::SPACE
- << tp.thetaA_ << token::SPACE
- << tp.thetaR_;
-
- return os;
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const fvPatch& p,
- const DimensionedField& iF
-)
-:
- zeroGradientFvPatchScalarField(p, iF)
-{}
-
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const fvPatch& p,
- const DimensionedField& iF,
- const dictionary& dict
-)
-:
- zeroGradientFvPatchScalarField(p, iF),
- thetaProps_(dict.lookup("thetaProperties"))
-{
- evaluate();
-}
-
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const alphaContactAngleFvPatchScalarField& gcpsf,
- const fvPatch& p,
- const DimensionedField& iF,
- const fvPatchFieldMapper& mapper
-)
-:
- zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
- thetaProps_(gcpsf.thetaProps_)
-{}
-
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const alphaContactAngleFvPatchScalarField& gcpsf,
- const DimensionedField& iF
-)
-:
- zeroGradientFvPatchScalarField(gcpsf, iF),
- thetaProps_(gcpsf.thetaProps_)
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-
-void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
-{
- fvPatchScalarField::write(os);
- writeEntry(os, "thetaProperties", thetaProps_);
- writeEntry(os, "value", *this);
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-makePatchTypeField
-(
- fvPatchScalarField,
- alphaContactAngleFvPatchScalarField
-);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
deleted file mode 100644
index f4b2590f27..0000000000
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ /dev/null
@@ -1,206 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Class
- Foam::alphaContactAngleFvPatchScalarField
-
-Description
- Contact-angle boundary condition for multi-phase interface-capturing
- simulations. Used in conjunction with multiphaseMixture.
-
-SourceFiles
- alphaContactAngleFvPatchScalarField.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef alphaContactAngleFvPatchScalarField_H
-#define alphaContactAngleFvPatchScalarField_H
-
-#include "zeroGradientFvPatchFields.H"
-#include "compressibleMultiphaseMixture.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
- Class alphaContactAngleFvPatch Declaration
-\*---------------------------------------------------------------------------*/
-
-class alphaContactAngleFvPatchScalarField
-:
- public zeroGradientFvPatchScalarField
-{
-public:
-
- class interfaceThetaProps
- {
- //- Equilibrium contact angle
- scalar theta0_;
-
- //- Dynamic contact angle velocity scale
- scalar uTheta_;
-
- //- Limiting advancing contact angle
- scalar thetaA_;
-
- //- Limiting receding contact angle
- scalar thetaR_;
-
-
- public:
-
- // Constructors
- interfaceThetaProps()
- {}
-
- interfaceThetaProps(Istream&);
-
-
- // Member Functions
-
- //- Return the equilibrium contact angle theta0
- scalar theta0(bool matched=true) const
- {
- if (matched) return theta0_;
- else return 180.0 - theta0_;
- }
-
- //- Return the dynamic contact angle velocity scale
- scalar uTheta() const
- {
- return uTheta_;
- }
-
- //- Return the limiting advancing contact angle
- scalar thetaA(bool matched=true) const
- {
- if (matched) return thetaA_;
- else return 180.0 - thetaA_;
- }
-
- //- Return the limiting receding contact angle
- scalar thetaR(bool matched=true) const
- {
- if (matched) return thetaR_;
- else return 180.0 - thetaR_;
- }
-
-
- // IO functions
-
- friend Istream& operator>>(Istream&, interfaceThetaProps&);
- friend Ostream& operator<<(Ostream&, const interfaceThetaProps&);
- };
-
- typedef HashTable
- <
- interfaceThetaProps,
- compressibleMultiphaseMixture::interfacePair,
- compressibleMultiphaseMixture::interfacePair::hash
- > thetaPropsTable;
-
-
-private:
-
- // Private Data
-
- thetaPropsTable thetaProps_;
-
-
-public:
-
- //- Runtime type information
- TypeName("alphaContactAngle");
-
-
- // Constructors
-
- //- Construct from patch and internal field
- alphaContactAngleFvPatchScalarField
- (
- const fvPatch&,
- const DimensionedField&
- );
-
- //- Construct from patch, internal field and dictionary
- alphaContactAngleFvPatchScalarField
- (
- const fvPatch&,
- const DimensionedField&,
- const dictionary&
- );
-
- //- Construct by mapping given alphaContactAngleFvPatchScalarField
- // onto a new patch
- alphaContactAngleFvPatchScalarField
- (
- const alphaContactAngleFvPatchScalarField&,
- const fvPatch&,
- const DimensionedField&,
- const fvPatchFieldMapper&
- );
-
- //- Construct as copy setting internal field reference
- alphaContactAngleFvPatchScalarField
- (
- const alphaContactAngleFvPatchScalarField&,
- const DimensionedField&
- );
-
- //- Construct and return a clone setting internal field reference
- virtual tmp clone
- (
- const DimensionedField& iF
- ) const
- {
- return tmp
- (
- new alphaContactAngleFvPatchScalarField(*this, iF)
- );
- }
-
-
- // Member Functions
-
- //- Return the contact angle properties
- const thetaPropsTable& thetaProps() const
- {
- return thetaProps_;
- }
-
- //- Write
- virtual void write(Ostream&) const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.C
index 5efcbb17f6..fcad65430e 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.C
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -25,7 +25,7 @@ License
#include "compressibleMultiphaseMixture.H"
#include "alphaContactAngleFvPatchScalarField.H"
-#include "unitConversion.H"
+#include "correctContactAngle.H"
#include "Time.H"
#include "subCycle.H"
#include "MULES.H"
@@ -401,138 +401,6 @@ Foam::tmp Foam::compressibleMultiphaseMixture::nHatf
}
-// Correction for the boundary condition on the unit normal nHat on
-// walls to produce the correct contact angle.
-
-// The dynamic contact angle is calculated from the component of the
-// velocity on the direction of the interface, parallel to the wall.
-
-void Foam::compressibleMultiphaseMixture::correctContactAngle
-(
- const phaseModel& alpha1,
- const phaseModel& alpha2,
- surfaceVectorField::Boundary& nHatb
-) const
-{
- const volScalarField::Boundary& a1bf = alpha1.boundaryField();
- const volScalarField::Boundary& a2bf = alpha2.boundaryField();
-
- const fvBoundaryMesh& boundary = mesh_.boundary();
-
- forAll(boundary, patchi)
- {
- if
- (
- isA(a1bf[patchi])
- || isA(a2bf[patchi])
- )
- {
- if
- (
- isA(a1bf[patchi])
- && isA(a2bf[patchi])
- )
- {
- FatalErrorInFunction
- << "alphaContactAngle boundary condition "
- "specified on patch " << boundary[patchi].name()
- << " for both " << alpha1.name() << " and " << alpha2.name()
- << nl << "which may be inconsistent."
- << exit(FatalError);
- }
-
- const alphaContactAngleFvPatchScalarField& acap =
- isA(a1bf[patchi])
- ? refCast(a1bf[patchi])
- : refCast(a2bf[patchi])
- ;
-
- vectorField& nHatPatch = nHatb[patchi];
-
- vectorField AfHatPatch
- (
- mesh_.Sf().boundaryField()[patchi]
- /mesh_.magSf().boundaryField()[patchi]
- );
-
- alphaContactAngleFvPatchScalarField::thetaPropsTable::
- const_iterator tp =
- acap.thetaProps().find(interfacePair(alpha1, alpha2));
-
- if (tp == acap.thetaProps().end())
- {
- FatalErrorInFunction
- << "Cannot find interface " << interfacePair(alpha1, alpha2)
- << "\n in table of theta properties for patch "
- << acap.patch().name()
- << exit(FatalError);
- }
-
- const bool matched = (tp.key().first() == alpha1.name());
-
- const scalar theta0 = degToRad(tp().theta0(matched));
-
- scalarField theta(boundary[patchi].size(), theta0);
-
- const scalar uTheta = tp().uTheta();
-
- // Calculate the dynamic contact angle if required
- if (uTheta > small)
- {
- const scalar thetaA = degToRad(tp().thetaA(matched));
- const scalar thetaR = degToRad(tp().thetaR(matched));
-
- // Calculated the component of the velocity parallel to the wall
- vectorField Uwall
- (
- U_.boundaryField()[patchi].patchInternalField()
- - U_.boundaryField()[patchi]
- );
- Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
-
- // Find the direction of the interface parallel to the wall
- vectorField nWall
- (
- nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
- );
-
- // Normalise nWall
- nWall /= (mag(nWall) + small);
-
- // Calculate Uwall resolved normal to the interface parallel to
- // the interface
- const scalarField uwall(nWall & Uwall);
-
- theta += (thetaA - thetaR)*tanh(uwall/uTheta);
- }
-
-
- // Reset nHatPatch to correspond to the contact angle
-
- const scalarField a12(nHatPatch & AfHatPatch);
-
- const scalarField b1(cos(theta));
-
- scalarField b2(nHatPatch.size());
-
- forAll(b2, facei)
- {
- b2[facei] = cos(acos(a12[facei]) - theta[facei]);
- }
-
- const scalarField det(1.0 - a12*a12);
-
- const scalarField a((b1 - a12*b2)/det);
- const scalarField b((b2 - a12*b1)/det);
-
- nHatPatch = a*AfHatPatch + b*nHatPatch;
-
- nHatPatch /= (mag(nHatPatch) + deltaN_.value());
- }
- }
-}
-
-
Foam::tmp Foam::compressibleMultiphaseMixture::K
(
const phaseModel& alpha1,
@@ -541,7 +409,14 @@ Foam::tmp Foam::compressibleMultiphaseMixture::K
{
tmp tnHatfv = nHatfv(alpha1, alpha2);
- correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
+ correctContactAngle
+ (
+ alpha1,
+ alpha2,
+ U_.boundaryField(),
+ deltaN_,
+ tnHatfv.ref().boundaryFieldRef()
+ );
// Simple expression for curvature
return -fvc::div(tnHatfv & mesh_.Sf());
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.H
index 06824f8cf6..4943936016 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.H
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseMixture/compressibleMultiphaseMixture.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -171,13 +171,6 @@ private:
const volScalarField& alpha2
) const;
- void correctContactAngle
- (
- const phaseModel& alpha1,
- const phaseModel& alpha2,
- surfaceVectorField::Boundary& nHatb
- ) const;
-
tmp K
(
const phaseModel& alpha1,
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options
index 3d9cfa163c..3daee21182 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options
@@ -19,6 +19,7 @@ EXE_LIBS = \
-leulerianInterfacialCompositionModels \
-lmultiphaseMomentumTransportModels \
-lmultiphaseReactions \
+ -lmultiphaseProperties \
-lphaseFluidThermophysicalTransportModels \
-lphaseFluidReactionThermophysicalTransportModels \
-lfiniteVolume \
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/files b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/files
index fb683afa60..a49952c3f9 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/files
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/files
@@ -105,6 +105,4 @@ BlendedInterfacialModel/blendingMethods/hyperbolic/hyperbolic.C
BlendedInterfacialModel/blendingMethods/continuous/continuous.C
BlendedInterfacialModel/blendingMethods/segregatedBlendingMethod/segregatedBlendingMethod.C
-alphaContactAngle/alphaContactAngleFvPatchScalarField.C
-
LIB = $(FOAM_LIBBIN)/libphaseSystem
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/options
index 8678dbb2a1..7f9c1221b2 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/options
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/Make/options
@@ -3,6 +3,7 @@ EXE_INC = \
-I../interfacialCompositionModels/lnInclude \
-I../multiphaseCompressibleMomentumTransportModels/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/reactionThermo/lnInclude \
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C
index f12fabe566..d5189d2ac0 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C
@@ -34,7 +34,7 @@ License
#include "CorrectPhi.H"
#include "fvcMeshPhi.H"
#include "alphaContactAngleFvPatchScalarField.H"
-#include "unitConversion.H"
+#include "correctContactAngle.H"
#include "dragModel.H"
#include "movingWallVelocityFvPatchVectorField.H"
#include "pimpleControl.H"
@@ -184,136 +184,6 @@ Foam::tmp Foam::phaseSystem::nHatf
}
-void Foam::phaseSystem::correctContactAngle
-(
- const phaseModel& phase1,
- const phaseModel& phase2,
- surfaceVectorField::Boundary& nHatbf
-) const
-{
- const volScalarField& a1 = phase1;
- const volScalarField& a2 = phase2;
-
- const volScalarField::Boundary& a1bf = a1.boundaryField();
- const volScalarField::Boundary& a2bf = a2.boundaryField();
-
- const fvBoundaryMesh& boundary = mesh_.boundary();
-
- forAll(boundary, patchi)
- {
- const fvPatchScalarField& a1p = a1bf[patchi];
- const fvPatchScalarField& a2p = a2bf[patchi];
-
- const bool a1pIsCa = isA(a1p);
- const bool a2pIsCa = isA(a2p);
-
- if (a1pIsCa || a2pIsCa)
- {
- if (a1pIsCa != a2pIsCa)
- {
- FatalErrorInFunction
- << alphaContactAngleFvPatchScalarField::typeName
- << " boundary condition specified on patch "
- << boundary[patchi].name() << " for "
- << (a1pIsCa ? a1.name() : a2.name()) << " but not for "
- << (a2pIsCa ? a1.name() : a2.name())
- << exit(FatalError);
- }
-
- const alphaContactAngleFvPatchScalarField& a1ca =
- refCast(a1p);
- const alphaContactAngleFvPatchScalarField& a2ca =
- refCast(a2p);
-
- const bool a1caHasProps = a1ca.thetaProps().found(phase2.name());
- const bool a2caHasProps = a2ca.thetaProps().found(phase1.name());
-
- if (!a1caHasProps && !a2caHasProps)
- {
- FatalErrorInFunction
- << "Neither "
- << alphaContactAngleFvPatchScalarField::typeName
- << " boundary condition specified on patch "
- << boundary[patchi].name()
- << " for " << a1.name() << " and " << a2.name()
- << " contains properties for the other phase"
- << exit(FatalError);
- }
-
- if
- (
- a1caHasProps && a2caHasProps
- && a1ca.thetaProps()[phase2.name()]
- != a2ca.thetaProps()[phase1.name()].reversed()
- )
- {
- FatalErrorInFunction
- << "The "
- << alphaContactAngleFvPatchScalarField::typeName
- << " boundary conditions specified on patch "
- << boundary[patchi].name()
- << " for " << a1.name() << " and " << a2.name()
- << " contain inconsistent properties"
- << exit(FatalError);
- }
-
- const alphaContactAngleFvPatchScalarField::contactAngleProperties
- tp = a1caHasProps
- ? a1ca.thetaProps()[phase2.name()]
- : a2ca.thetaProps()[phase1.name()].reversed();
-
- const vectorField np(mesh_.boundary()[patchi].nf());
-
- vectorField& nHatp = nHatbf[patchi];
-
- // Calculate the contact angle
- scalarField theta(np.size(), degToRad(tp.theta0()));
-
- // Calculate the dynamic contact angle if required
- if (tp.dynamic())
- {
- const scalar uTheta = tp.uTheta();
- const scalar thetaA = degToRad(tp.thetaA());
- const scalar thetaR = degToRad(tp.thetaR());
-
- // Calculated the component of the velocity parallel to the wall
- vectorField Uwall
- (
- phase1.U()().boundaryField()[patchi].patchInternalField()
- - phase1.U()().boundaryField()[patchi]
- );
- Uwall -= (np & Uwall)*np;
-
- // Find the direction of the interface parallel to the wall
- vectorField nWall(nHatp - (np & nHatp)*np);
- nWall /= (mag(nWall) + small);
-
- // Calculate Uwall resolved normal to the interface parallel to
- // the interface
- const scalarField uwall(nWall & Uwall);
-
- theta += (thetaA - thetaR)*tanh(uwall/uTheta);
- }
-
- // Reset nHatp to correspond to the contact angle
- const scalarField a12(nHatp & np);
- const scalarField b1(cos(theta));
- scalarField b2(nHatp.size());
- forAll(b2, facei)
- {
- b2[facei] = cos(acos(a12[facei]) - theta[facei]);
- }
- const scalarField det(1 - a12*a12);
- const scalarField a((b1 - a12*b2)/det);
- const scalarField b((b2 - a12*b1)/det);
-
- nHatp = a*np + b*nHatp;
- nHatp /= (mag(nHatp) + deltaN_.value());
- }
- }
-}
-
-
Foam::tmp Foam::phaseSystem::K
(
const phaseModel& phase1,
@@ -322,7 +192,14 @@ Foam::tmp Foam::phaseSystem::K
{
tmp tnHatfv = nHatfv(phase1, phase2);
- correctContactAngle(phase1, phase2, tnHatfv.ref().boundaryFieldRef());
+ correctContactAngle
+ (
+ phase1,
+ phase2,
+ phase1.U()().boundaryField(),
+ deltaN_,
+ tnHatfv.ref().boundaryFieldRef()
+ );
// Simple expression for curvature
return -fvc::div(tnHatfv & mesh_.Sf());
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H
index 59db74c6b1..776382b714 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H
@@ -211,19 +211,6 @@ protected:
const volScalarField& alpha2
) const;
- //- Correction for the boundary condition on the unit normal nHat on
- // walls to produce the correct contact angle.
- //
- // The dynamic contact angle is calculated from the component of
- // the velocity on the direction of the interface, parallel to the
- // wall. Used for interface compression.
- void correctContactAngle
- (
- const phaseModel& alpha1,
- const phaseModel& alpha2,
- surfaceVectorField::Boundary& nHatb
- ) const;
-
//- Curvature of interface between two phases
// Used for interface compression
tmp K
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/files b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/files
index 5912ebaf0e..d2410d4b49 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/files
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/files
@@ -1,5 +1,4 @@
phase/phase.C
-alphaContactAngle/alphaContactAngleFvPatchScalarField.C
multiphaseMixture.C
LIB = $(FOAM_LIBBIN)/libmultiphaseInterFoam
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/options
index ee0bc13126..bfbd7774fa 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/options
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/Make/options
@@ -1,6 +1,7 @@
EXE_INC = \
-IalphaContactAngle \
-I$(LIB_SRC)/physicalProperties/lnInclude \
+ -I$(LIB_SRC)/multiphaseModels/multiphaseProperties/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
@@ -8,5 +9,6 @@ EXE_INC = \
LIB_LIBS = \
-linterfaceProperties \
-lphysicalProperties \
+ -lmultiphaseProperties \
-lfiniteVolume \
-lmeshTools
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
deleted file mode 100644
index 7216f1a4f8..0000000000
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ /dev/null
@@ -1,145 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#include "alphaContactAngleFvPatchScalarField.H"
-#include "addToRunTimeSelectionTable.H"
-#include "fvPatchFieldMapper.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
-(
- Istream& is
-)
-:
- theta0_(readScalar(is)),
- uTheta_(readScalar(is)),
- thetaA_(readScalar(is)),
- thetaR_(readScalar(is))
-{}
-
-
-Istream& operator>>
-(
- Istream& is,
- alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
-)
-{
- is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
- return is;
-}
-
-
-Ostream& operator<<
-(
- Ostream& os,
- const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
-)
-{
- os << tp.theta0_ << token::SPACE
- << tp.uTheta_ << token::SPACE
- << tp.thetaA_ << token::SPACE
- << tp.thetaR_;
-
- return os;
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const fvPatch& p,
- const DimensionedField& iF
-)
-:
- zeroGradientFvPatchScalarField(p, iF)
-{}
-
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const fvPatch& p,
- const DimensionedField& iF,
- const dictionary& dict
-)
-:
- zeroGradientFvPatchScalarField(p, iF),
- thetaProps_(dict.lookup("thetaProperties"))
-{
- evaluate();
-}
-
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const alphaContactAngleFvPatchScalarField& gcpsf,
- const fvPatch& p,
- const DimensionedField& iF,
- const fvPatchFieldMapper& mapper
-)
-:
- zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
- thetaProps_(gcpsf.thetaProps_)
-{}
-
-
-alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
- const alphaContactAngleFvPatchScalarField& gcpsf,
- const DimensionedField& iF
-)
-:
- zeroGradientFvPatchScalarField(gcpsf, iF),
- thetaProps_(gcpsf.thetaProps_)
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-
-void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
-{
- fvPatchScalarField::write(os);
- writeEntry(os, "thetaProperties", thetaProps_);
- writeEntry(os, "value", *this);
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-makePatchTypeField
-(
- fvPatchScalarField,
- alphaContactAngleFvPatchScalarField
-);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
deleted file mode 100644
index 942d44535e..0000000000
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ /dev/null
@@ -1,206 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2011-2020 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::alphaContactAngleFvPatchScalarField
-
-Description
- Contact-angle boundary condition for multi-phase interface-capturing
- simulations. Used in conjunction with multiphaseMixture.
-
-SourceFiles
- alphaContactAngleFvPatchScalarField.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef alphaContactAngleFvPatchScalarField_H
-#define alphaContactAngleFvPatchScalarField_H
-
-#include "zeroGradientFvPatchFields.H"
-#include "multiphaseMixture.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
- Class alphaContactAngleFvPatch Declaration
-\*---------------------------------------------------------------------------*/
-
-class alphaContactAngleFvPatchScalarField
-:
- public zeroGradientFvPatchScalarField
-{
-public:
-
- class interfaceThetaProps
- {
- //- Equilibrium contact angle
- scalar theta0_;
-
- //- Dynamic contact angle velocity scale
- scalar uTheta_;
-
- //- Limiting advancing contact angle
- scalar thetaA_;
-
- //- Limiting receding contact angle
- scalar thetaR_;
-
-
- public:
-
- // Constructors
- interfaceThetaProps()
- {}
-
- interfaceThetaProps(Istream&);
-
-
- // Member Functions
-
- //- Return the equilibrium contact angle theta0
- scalar theta0(bool matched=true) const
- {
- if (matched) return theta0_;
- else return 180.0 - theta0_;
- }
-
- //- Return the dynamic contact angle velocity scale
- scalar uTheta() const
- {
- return uTheta_;
- }
-
- //- Return the limiting advancing contact angle
- scalar thetaA(bool matched=true) const
- {
- if (matched) return thetaA_;
- else return 180.0 - thetaA_;
- }
-
- //- Return the limiting receding contact angle
- scalar thetaR(bool matched=true) const
- {
- if (matched) return thetaR_;
- else return 180.0 - thetaR_;
- }
-
-
- // IO functions
-
- friend Istream& operator>>(Istream&, interfaceThetaProps&);
- friend Ostream& operator<<(Ostream&, const interfaceThetaProps&);
- };
-
- typedef HashTable
- <
- interfaceThetaProps,
- multiphaseMixture::interfacePair,
- multiphaseMixture::interfacePair::hash
- > thetaPropsTable;
-
-
-private:
-
- // Private Data
-
- thetaPropsTable thetaProps_;
-
-
-public:
-
- //- Runtime type information
- TypeName("alphaContactAngle");
-
-
- // Constructors
-
- //- Construct from patch and internal field
- alphaContactAngleFvPatchScalarField
- (
- const fvPatch&,
- const DimensionedField&
- );
-
- //- Construct from patch, internal field and dictionary
- alphaContactAngleFvPatchScalarField
- (
- const fvPatch&,
- const DimensionedField&,
- const dictionary&
- );
-
- //- Construct by mapping given alphaContactAngleFvPatchScalarField
- // onto a new patch
- alphaContactAngleFvPatchScalarField
- (
- const alphaContactAngleFvPatchScalarField&,
- const fvPatch&,
- const DimensionedField&,
- const fvPatchFieldMapper&
- );
-
- //- Construct as copy setting internal field reference
- alphaContactAngleFvPatchScalarField
- (
- const alphaContactAngleFvPatchScalarField&,
- const DimensionedField&
- );
-
- //- Construct and return a clone setting internal field reference
- virtual tmp clone
- (
- const DimensionedField& iF
- ) const
- {
- return tmp
- (
- new alphaContactAngleFvPatchScalarField(*this, iF)
- );
- }
-
-
- // Member Functions
-
- //- Return the contact angle properties
- const thetaPropsTable& thetaProps() const
- {
- return thetaProps_;
- }
-
- //- Write
- virtual void write(Ostream&) const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
index a52ca5b29b..fd981e55b8 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -25,7 +25,7 @@ License
#include "multiphaseMixture.H"
#include "alphaContactAngleFvPatchScalarField.H"
-#include "unitConversion.H"
+#include "correctContactAngle.H"
#include "Time.H"
#include "subCycle.H"
#include "MULES.H"
@@ -391,132 +391,6 @@ Foam::tmp Foam::multiphaseMixture::nHatf
}
-void Foam::multiphaseMixture::correctContactAngle
-(
- const phase& alpha1,
- const phase& alpha2,
- surfaceVectorField::Boundary& nHatb
-) const
-{
- const volScalarField::Boundary& a1bf = alpha1.boundaryField();
- const volScalarField::Boundary& a2bf = alpha2.boundaryField();
-
- const fvBoundaryMesh& boundary = mesh_.boundary();
-
- forAll(boundary, patchi)
- {
- if
- (
- isA(a1bf[patchi])
- || isA(a2bf[patchi])
- )
- {
- if
- (
- isA(a1bf[patchi])
- && isA(a2bf[patchi])
- )
- {
- FatalErrorInFunction
- << "alphaContactAngle boundary condition "
- "specified on patch " << boundary[patchi].name()
- << " for both " << alpha1.name() << " and " << alpha2.name()
- << nl << "which may be inconsistent."
- << exit(FatalError);
- }
-
- const alphaContactAngleFvPatchScalarField& acap =
- isA(a1bf[patchi])
- ? refCast(a1bf[patchi])
- : refCast(a2bf[patchi])
- ;
-
- vectorField& nHatPatch = nHatb[patchi];
-
- const vectorField AfHatPatch
- (
- mesh_.Sf().boundaryField()[patchi]
- /mesh_.magSf().boundaryField()[patchi]
- );
-
- alphaContactAngleFvPatchScalarField::thetaPropsTable::
- const_iterator tp =
- acap.thetaProps().find(interfacePair(alpha1, alpha2));
-
- if (tp == acap.thetaProps().end())
- {
- FatalErrorInFunction
- << "Cannot find interface " << interfacePair(alpha1, alpha2)
- << "\n in table of theta properties for patch "
- << acap.patch().name()
- << exit(FatalError);
- }
-
- const bool matched = (tp.key().first() == alpha1.name());
-
- const scalar theta0 = degToRad(tp().theta0(matched));
-
- scalarField theta(boundary[patchi].size(), theta0);
-
- const scalar uTheta = tp().uTheta();
-
- // Calculate the dynamic contact angle if required
- if (uTheta > small)
- {
- const scalar thetaA = degToRad(tp().thetaA(matched));
- const scalar thetaR = degToRad(tp().thetaR(matched));
-
- // Calculated the component of the velocity parallel to the wall
- vectorField Uwall
- (
- U_.boundaryField()[patchi].patchInternalField()
- - U_.boundaryField()[patchi]
- );
- Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
-
- // Find the direction of the interface parallel to the wall
- vectorField nWall
- (
- nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
- );
-
- // Normalise nWall
- nWall /= (mag(nWall) + small);
-
- // Calculate Uwall resolved normal to the interface parallel to
- // the interface
- const scalarField uwall(nWall & Uwall);
-
- theta += (thetaA - thetaR)*tanh(uwall/uTheta);
- }
-
-
- // Reset nHatPatch to correspond to the contact angle
-
- const scalarField a12(nHatPatch & AfHatPatch);
-
- const scalarField b1(cos(theta));
-
- scalarField b2(nHatPatch.size());
-
- forAll(b2, facei)
- {
- b2[facei] = cos(acos(a12[facei]) - theta[facei]);
- }
-
- const scalarField det(1.0 - a12*a12);
-
- const scalarField a((b1 - a12*b2)/det);
- const scalarField b((b2 - a12*b1)/det);
-
- nHatPatch = a*AfHatPatch + b*nHatPatch;
-
- nHatPatch /= (mag(nHatPatch) + deltaN_.value());
- }
- }
-}
-
-
Foam::tmp Foam::multiphaseMixture::K
(
const phase& alpha1,
@@ -525,7 +399,14 @@ Foam::tmp Foam::multiphaseMixture::K
{
tmp tnHatfv = nHatfv(alpha1, alpha2);
- correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
+ correctContactAngle
+ (
+ alpha1,
+ alpha2,
+ U_.boundaryField(),
+ deltaN_,
+ tnHatfv.ref().boundaryFieldRef()
+ );
// Simple expression for curvature
return -fvc::div(tnHatfv & mesh_.Sf());
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H
index 2e50e2c08e..120eb5f03d 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -173,18 +173,6 @@ private:
const volScalarField& alpha2
) const;
- //- Correction for the boundary condition on the unit normal nHat on
- // walls to produce the correct contact angle.
- //
- // The dynamic contact angle is calculated from the component of the
- // velocity on the direction of the interface, parallel to the wall.
- void correctContactAngle
- (
- const phase& alpha1,
- const phase& alpha2,
- surfaceVectorField::Boundary& nHatb
- ) const;
-
tmp K(const phase& alpha1, const phase& alpha2) const;
diff --git a/src/Allwmake b/src/Allwmake
index aa6a860e35..7a393240ea 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -59,6 +59,7 @@ wmake $targetType physicalProperties
thermophysicalModels/Allwmake $targetType $*
twoPhaseModels/Allwmake $targetType $*
+multiphaseModels/Allwmake $targetType $*
MomentumTransportModels/Allwmake $targetType $*
ThermophysicalTransportModels/Allwmake $targetType $*
wmake $targetType radiationModels
diff --git a/src/multiphaseModels/Allwmake b/src/multiphaseModels/Allwmake
new file mode 100755
index 0000000000..2f30a6db5d
--- /dev/null
+++ b/src/multiphaseModels/Allwmake
@@ -0,0 +1,9 @@
+#!/bin/sh
+cd ${0%/*} || exit 1 # Run from this directory
+
+# Parse arguments for library compilation
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+
+wmake $targetType multiphaseProperties
+
+#------------------------------------------------------------------------------
diff --git a/src/multiphaseModels/multiphaseProperties/Make/files b/src/multiphaseModels/multiphaseProperties/Make/files
new file mode 100644
index 0000000000..cd0a11242b
--- /dev/null
+++ b/src/multiphaseModels/multiphaseProperties/Make/files
@@ -0,0 +1,4 @@
+alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+correctContactAngle/correctContactAngle.C
+
+LIB = $(FOAM_LIBBIN)/libmultiphaseProperties
diff --git a/src/multiphaseModels/multiphaseProperties/Make/options b/src/multiphaseModels/multiphaseProperties/Make/options
new file mode 100644
index 0000000000..71b7873964
--- /dev/null
+++ b/src/multiphaseModels/multiphaseProperties/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+ -I$(LIB_SRC)/finiteVolume/lnInclude
+
+LIB_LIBS = \
+ -lfiniteVolume
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/src/multiphaseModels/multiphaseProperties/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
similarity index 100%
rename from applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
rename to src/multiphaseModels/multiphaseProperties/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/multiphaseModels/multiphaseProperties/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
similarity index 99%
rename from applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
rename to src/multiphaseModels/multiphaseProperties/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
index f4da42e990..f9749c4766 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ b/src/multiphaseModels/multiphaseProperties/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
@@ -26,7 +26,7 @@ Class
Description
Contact-angle boundary condition for multi-phase interface-capturing
- simulations. Used in conjunction with phaseSystem.
+ simulations.
SourceFiles
alphaContactAngleFvPatchScalarField.C
diff --git a/src/multiphaseModels/multiphaseProperties/correctContactAngle/correctContactAngle.C b/src/multiphaseModels/multiphaseProperties/correctContactAngle/correctContactAngle.C
new file mode 100644
index 0000000000..3bc404ed50
--- /dev/null
+++ b/src/multiphaseModels/multiphaseProperties/correctContactAngle/correctContactAngle.C
@@ -0,0 +1,159 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 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 "correctContactAngle.H"
+#include "unitConversion.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+void Foam::correctContactAngle
+(
+ const volScalarField& a1,
+ const volScalarField& a2,
+ const volVectorField::Boundary& Ubf,
+ const dimensionedScalar& deltaN,
+ surfaceVectorField::Boundary& nHatbf
+)
+{
+ const volScalarField::Boundary& a1bf = a1.boundaryField();
+ const volScalarField::Boundary& a2bf = a2.boundaryField();
+
+ const fvBoundaryMesh& boundary = a1.mesh().boundary();
+
+ forAll(boundary, patchi)
+ {
+ const fvPatchScalarField& a1p = a1bf[patchi];
+ const fvPatchScalarField& a2p = a2bf[patchi];
+
+ const bool a1pIsCa = isA(a1p);
+ const bool a2pIsCa = isA(a2p);
+
+ if (a1pIsCa || a2pIsCa)
+ {
+ if (a1pIsCa != a2pIsCa)
+ {
+ FatalErrorInFunction
+ << alphaContactAngleFvPatchScalarField::typeName
+ << " boundary condition specified on patch "
+ << boundary[patchi].name() << " for "
+ << (a1pIsCa ? a1.name() : a2.name()) << " but not for "
+ << (a2pIsCa ? a1.name() : a2.name())
+ << exit(FatalError);
+ }
+
+ const alphaContactAngleFvPatchScalarField& a1ca =
+ refCast(a1p);
+ const alphaContactAngleFvPatchScalarField& a2ca =
+ refCast(a2p);
+
+ const bool a1caHasProps = a1ca.thetaProps().found(a2.group());
+ const bool a2caHasProps = a2ca.thetaProps().found(a1.group());
+
+ if (!a1caHasProps && !a2caHasProps)
+ {
+ FatalErrorInFunction
+ << "Neither "
+ << alphaContactAngleFvPatchScalarField::typeName
+ << " boundary condition specified on patch "
+ << boundary[patchi].name()
+ << " for " << a1.name() << " and " << a2.name()
+ << " contains properties for the other phase"
+ << exit(FatalError);
+ }
+
+ if
+ (
+ a1caHasProps && a2caHasProps
+ && a1ca.thetaProps()[a2.group()]
+ != a2ca.thetaProps()[a1.group()].reversed()
+ )
+ {
+ FatalErrorInFunction
+ << "The "
+ << alphaContactAngleFvPatchScalarField::typeName
+ << " boundary conditions specified on patch "
+ << boundary[patchi].name()
+ << " for " << a1.name() << " and " << a2.name()
+ << " contain inconsistent properties"
+ << exit(FatalError);
+ }
+
+ const alphaContactAngleFvPatchScalarField::contactAngleProperties
+ tp = a1caHasProps
+ ? a1ca.thetaProps()[a2.group()]
+ : a2ca.thetaProps()[a1.group()].reversed();
+
+ const vectorField np(a1.mesh().boundary()[patchi].nf());
+
+ vectorField& nHatp = nHatbf[patchi];
+
+ // Calculate the contact angle
+ scalarField theta(np.size(), degToRad(tp.theta0()));
+
+ // Calculate the dynamic contact angle if required
+ if (tp.dynamic())
+ {
+ const scalar uTheta = tp.uTheta();
+ const scalar thetaA = degToRad(tp.thetaA());
+ const scalar thetaR = degToRad(tp.thetaR());
+
+ // Calculated the component of the velocity parallel to the wall
+ vectorField Uwall
+ (
+ Ubf[patchi].patchInternalField() - Ubf[patchi]
+ );
+ Uwall -= (np & Uwall)*np;
+
+ // Find the direction of the interface parallel to the wall
+ vectorField nWall(nHatp - (np & nHatp)*np);
+ nWall /= (mag(nWall) + small);
+
+ // Calculate Uwall resolved normal to the interface parallel to
+ // the interface
+ const scalarField uwall(nWall & Uwall);
+
+ theta += (thetaA - thetaR)*tanh(uwall/uTheta);
+ }
+
+ // Reset nHatp to correspond to the contact angle
+ const scalarField a12(nHatp & np);
+ const scalarField b1(cos(theta));
+ scalarField b2(nHatp.size());
+ forAll(b2, facei)
+ {
+ b2[facei] = cos(acos(a12[facei]) - theta[facei]);
+ }
+ const scalarField det(1 - a12*a12);
+ const scalarField a((b1 - a12*b2)/det);
+ const scalarField b((b2 - a12*b1)/det);
+
+ nHatp = a*np + b*nHatp;
+ nHatp /= (mag(nHatp) + deltaN.value());
+ }
+ }
+}
+
+
+// ************************************************************************* //
diff --git a/src/multiphaseModels/multiphaseProperties/correctContactAngle/correctContactAngle.H b/src/multiphaseModels/multiphaseProperties/correctContactAngle/correctContactAngle.H
new file mode 100644
index 0000000000..ba63c942d9
--- /dev/null
+++ b/src/multiphaseModels/multiphaseProperties/correctContactAngle/correctContactAngle.H
@@ -0,0 +1,65 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 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::correctContactAngle
+
+Description
+ Correction for the boundary condition on the unit normal nHat on
+ walls to produce the correct contact angle. The dynamic contact angle is
+ calculated from the component of the velocity on the direction of the
+ interface, parallel to the wall.
+
+SourceFiles
+ correctContactAngle.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef correctContactAngle_H
+#define correctContactAngle_H
+
+#include "alphaContactAngleFvPatchScalarField.H"
+#include "surfaceFields.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+//- Correct the contact angle for the two volume fraction fields
+void correctContactAngle
+(
+ const volScalarField& alpha1,
+ const volScalarField& alpha2,
+ const volVectorField::Boundary& Ubf,
+ const dimensionedScalar& deltaN,
+ surfaceVectorField::Boundary& nHatbf
+);
+
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig
index 30f6025155..d8e07cbd20 100644
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig
@@ -23,43 +23,34 @@ boundaryField
leftWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
rightWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 1;
}
lowerWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
atmosphere
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig
index 1128cce360..9a15e94d1c 100644
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig
index ec23852b3c..657c29c086 100644
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig
index 542d52f791..523cb66377 100644
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.air.orig b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.air.orig
index 30f6025155..d8e07cbd20 100644
--- a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.air.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.air.orig
@@ -23,43 +23,34 @@ boundaryField
leftWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
rightWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 1;
}
lowerWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
atmosphere
diff --git a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.mercury.orig b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.mercury.orig
index 1128cce360..9a15e94d1c 100644
--- a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.mercury.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.mercury.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.oil.orig b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.oil.orig
index ec23852b3c..657c29c086 100644
--- a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.oil.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.oil.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.water.orig b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.water.orig
index 542d52f791..523cb66377 100644
--- a/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.water.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/RAS/damBreak4phase/0/alpha.water.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig
index 30f6025155..d8e07cbd20 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.air.orig
@@ -23,43 +23,34 @@ boundaryField
leftWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
rightWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 1;
}
lowerWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
atmosphere
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig
index 1128cce360..9a15e94d1c 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.mercury.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig
index ec23852b3c..657c29c086 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.oil.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig
index 542d52f791..523cb66377 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0/alpha.water.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.air.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.air.orig
index 30f6025155..d8e07cbd20 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.air.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.air.orig
@@ -23,43 +23,34 @@ boundaryField
leftWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
rightWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 1;
}
lowerWall
{
type alphaContactAngle;
- thetaProperties
- (
- ( water air ) 90 0 0 0
- ( oil air ) 90 0 0 0
- ( mercury air ) 90 0 0 0
- ( water oil ) 90 0 0 0
- ( water mercury ) 90 0 0 0
- ( oil mercury ) 90 0 0 0
- );
+ contactAngleProperties
+ {
+ oil { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
value uniform 0;
}
atmosphere
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.mercury.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.mercury.orig
index 1128cce360..9a15e94d1c 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.mercury.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.mercury.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ water { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.oil.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.oil.orig
index ec23852b3c..657c29c086 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.oil.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.oil.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ water { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.water.orig b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.water.orig
index 542d52f791..523cb66377 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.water.orig
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0/alpha.water.orig
@@ -22,15 +22,36 @@ boundaryField
{
leftWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
rightWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
lowerWall
{
- type zeroGradient;
+ type alphaContactAngle;
+ contactAngleProperties
+ {
+ air { theta0 90; }
+ oil { theta0 90; }
+ mercury { theta0 90; }
+ }
+ value uniform 0;
}
atmosphere
{