multiphaseEulerFoam: Superseded by the much more general and extensible reactingMultiphaseEulerFoam
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wclean libso multiphaseSystem
|
||||
wclean libso interfacialModels
|
||||
wclean
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
wmake $targetType multiphaseSystem
|
||||
wmake $targetType interfacialModels
|
||||
wmake $targetType
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,60 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
CourantNo
|
||||
|
||||
Description
|
||||
Calculates and outputs the mean and maximum Courant Numbers.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
scalar CoNum = 0.0;
|
||||
scalar meanCoNum = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
scalarField sumPhi
|
||||
(
|
||||
fvc::surfaceSum(mag(phi))().primitiveField()
|
||||
);
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
sumPhi = max
|
||||
(
|
||||
sumPhi,
|
||||
fvc::surfaceSum(mag(iter().phi()))().primitiveField()
|
||||
);
|
||||
}
|
||||
|
||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
meanCoNum =
|
||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||
}
|
||||
|
||||
Info<< "Courant Number mean: " << meanCoNum
|
||||
<< " max: " << CoNum << endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,11 +0,0 @@
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
phase.DDtU() =
|
||||
fvc::ddt(phase.U())
|
||||
+ fvc::div(phase.phi(), phase.U())
|
||||
- fvc::div(phase.phi())*phase.U();
|
||||
|
||||
MRF.addAcceleration(phase.U(), phase.DDtU());
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
MRF.correctBoundaryVelocity(iter().U());
|
||||
}
|
||||
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
@ -1,3 +0,0 @@
|
||||
multiphaseEulerFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/multiphaseEulerFoam
|
||||
@ -1,22 +0,0 @@
|
||||
EXE_INC = \
|
||||
-ImultiphaseSystem/lnInclude \
|
||||
-ImultiphaseFixedFluxPressure \
|
||||
-IinterfacialModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmultiphaseSystem \
|
||||
-linterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lcompressibleMultiphaseEulerianInterfacialModels \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools
|
||||
@ -1,36 +0,0 @@
|
||||
{
|
||||
volScalarField kByCp1("kByCp1", alpha1*(k1/Cp1/rho1 + sqr(Ct)*nut2/Prt));
|
||||
volScalarField kByCp2("kByCp2", alpha2*(k2/Cp2/rho2 + nut2/Prt));
|
||||
|
||||
fvScalarMatrix T1Eqn
|
||||
(
|
||||
fvm::ddt(alpha1, T1)
|
||||
+ fvm::div(alphaPhi1, T1)
|
||||
- fvm::laplacian(kByCp1, T1)
|
||||
==
|
||||
heatTransferCoeff*T2/Cp1/rho1
|
||||
- fvm::Sp(heatTransferCoeff/Cp1/rho1, T1)
|
||||
+ alpha1*Dp1Dt/Cp1/rho1
|
||||
);
|
||||
|
||||
fvScalarMatrix T2Eqn
|
||||
(
|
||||
fvm::ddt(alpha2, T2)
|
||||
+ fvm::div(alphaPhi2, T2)
|
||||
- fvm::laplacian(kByCp2, T2)
|
||||
==
|
||||
heatTransferCoeff*T1/Cp2/rho2
|
||||
- fvm::Sp(heatTransferCoeff/Cp2/rho2, T2)
|
||||
+ alpha2*Dp2Dt/Cp2/rho2
|
||||
);
|
||||
|
||||
T1Eqn.relax();
|
||||
T1Eqn.solve();
|
||||
|
||||
T2Eqn.relax();
|
||||
T2Eqn.solve();
|
||||
|
||||
// Update compressibilities
|
||||
psi1 = 1.0/(R1*T1);
|
||||
psi2 = 1.0/(R2*T2);
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
#include "MRFCorrectBCs.H"
|
||||
|
||||
PtrList<fvVectorMatrix> UEqns(fluid.phases().size());
|
||||
autoPtr<multiphaseSystem::dragCoeffFields> dragCoeffs(fluid.dragCoeffs());
|
||||
|
||||
int phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
volVectorField& U = phase.U();
|
||||
|
||||
volScalarField nuEff(turbulence->nut() + iter().nu());
|
||||
|
||||
UEqns.set
|
||||
(
|
||||
phasei,
|
||||
new fvVectorMatrix
|
||||
(
|
||||
fvm::ddt(alpha, U)
|
||||
+ fvm::div(phase.alphaPhi(), U)
|
||||
|
||||
+ (alpha/phase.rho())*fluid.Cvm(phase)*
|
||||
(
|
||||
fvm::ddt(U)
|
||||
+ fvm::div(phase.phi(), U)
|
||||
- fvm::Sp(fvc::div(phase.phi()), U)
|
||||
)
|
||||
|
||||
- fvm::laplacian(alpha*nuEff, U)
|
||||
- fvc::div
|
||||
(
|
||||
alpha*(nuEff*dev(T(fvc::grad(U))) /*- ((2.0/3.0)*I)*k*/),
|
||||
"div(Rc)"
|
||||
)
|
||||
==
|
||||
//- fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)
|
||||
//- (alpha*phase.rho())*fluid.lift(phase)
|
||||
//+
|
||||
(alpha/phase.rho())*fluid.Svm(phase)
|
||||
- fvm::Sp
|
||||
(
|
||||
slamDampCoeff
|
||||
*max
|
||||
(
|
||||
mag(U()) - maxSlamVelocity,
|
||||
dimensionedScalar(dimVelocity, 0)
|
||||
)
|
||||
/pow(mesh.V(), 1.0/3.0),
|
||||
U
|
||||
)
|
||||
)
|
||||
);
|
||||
MRF.addAcceleration
|
||||
(
|
||||
alpha*(1 + (1/phase.rho())*fluid.Cvm(phase)),
|
||||
UEqns[phasei]
|
||||
);
|
||||
// UEqns[phasei].relax();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
CorrectPhi
|
||||
(
|
||||
U,
|
||||
phi,
|
||||
p_rgh,
|
||||
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1),
|
||||
geometricZeroField(),
|
||||
pimple,
|
||||
true
|
||||
);
|
||||
|
||||
#include "continuityErrs.H"
|
||||
@ -1,107 +0,0 @@
|
||||
Info<< "Reading field p_rgh\n" << endl;
|
||||
volScalarField p_rgh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p_rgh",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector(dimVelocity, Zero)
|
||||
);
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimArea*dimVelocity, 0)
|
||||
);
|
||||
|
||||
multiphaseSystem fluid(U, phi);
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
U += alpha*phase.U();
|
||||
phi += fvc::interpolate(alpha)*phase.phi();
|
||||
}
|
||||
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fluid.rho()
|
||||
);
|
||||
|
||||
|
||||
// Construct incompressible turbulence model
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, fluid)
|
||||
);
|
||||
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readhRef.H"
|
||||
#include "gh.H"
|
||||
|
||||
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
p_rgh + rho*gh
|
||||
);
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell
|
||||
(
|
||||
p,
|
||||
p_rgh,
|
||||
pimple.dict(),
|
||||
pRefCell,
|
||||
pRefValue
|
||||
);
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
|
||||
|
||||
#include "createMRFZones.H"
|
||||
@ -1,8 +0,0 @@
|
||||
IOMRFZoneList MRF(mesh);
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
MRF.correctBoundaryVelocity(iter().U());
|
||||
}
|
||||
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
@ -1,17 +0,0 @@
|
||||
dragModels/dragModel/dragModel.C
|
||||
dragModels/dragModel/newDragModel.C
|
||||
dragModels/Ergun/Ergun.C
|
||||
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
|
||||
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
|
||||
dragModels/SchillerNaumann/SchillerNaumann.C
|
||||
dragModels/Gibilaro/Gibilaro.C
|
||||
dragModels/WenYu/WenYu.C
|
||||
dragModels/SyamlalOBrien/SyamlalOBrien.C
|
||||
dragModels/blended/blended.C
|
||||
dragModels/interface/interface.C
|
||||
|
||||
heatTransferModels/heatTransferModel/heatTransferModel.C
|
||||
heatTransferModels/heatTransferModel/newHeatTransferModel.C
|
||||
heatTransferModels/RanzMarshall/RanzMarshall.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcompressibleMultiphaseEulerianInterfacialModels
|
||||
@ -1,6 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I../multiphaseSystem/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lmultiphaseSystem
|
||||
@ -1,82 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Ergun.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(Ergun, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
Ergun,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::Ergun::Ergun
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::Ergun::~Ergun()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField alpha2(max(phase2_, scalar(1.0e-6)));
|
||||
|
||||
return
|
||||
150.0*phase1_*phase2_.nu()*phase2_.rho()
|
||||
/sqr(alpha2*phase1_.d())
|
||||
+ 1.75*phase2_.rho()*Ur/(alpha2*phase1_.d());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::Ergun
|
||||
|
||||
Description
|
||||
H, Enwald, E. Peirano, A-E Almstedt
|
||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
||||
Eq. 104, p. 42
|
||||
|
||||
SourceFiles
|
||||
Ergun.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Ergun_H
|
||||
#define Ergun_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Ergun Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Ergun
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Ergun");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Ergun
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ergun();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,81 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Gibilaro.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(Gibilaro, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
Gibilaro,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::Gibilaro::Gibilaro
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::Gibilaro::~Gibilaro()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField alpha2(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField bp(pow(alpha2, -2.8));
|
||||
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
|
||||
return (17.3/Re + scalar(0.336))*phase2_.rho()*Ur*bp/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::Gibilaro
|
||||
|
||||
Description
|
||||
H, Enwald, E. Peirano, A-E Almstedt
|
||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
||||
Eq. 106, p. 43
|
||||
|
||||
SourceFiles
|
||||
Gibilaro.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Gibilaro_H
|
||||
#define Gibilaro_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Gibilaro Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Gibilaro
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Gibilaro");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Gibilaro
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Gibilaro();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,98 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GidaspowErgunWenYu.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
GidaspowErgunWenYu,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::GidaspowErgunWenYu::GidaspowErgunWenYu
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField alpha2(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField d(phase1_.d());
|
||||
volScalarField bp(pow(alpha2, -2.65));
|
||||
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));
|
||||
|
||||
volScalarField Cds
|
||||
(
|
||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
||||
+ pos0(Re - 1000)*0.44
|
||||
);
|
||||
|
||||
// Wen and Yu (1966)
|
||||
return
|
||||
(
|
||||
pos0(alpha2 - 0.8)
|
||||
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
|
||||
+ neg(alpha2 - 0.8)
|
||||
*(
|
||||
150.0*phase1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*d))
|
||||
+ 1.75*phase2_.rho()*Ur/(alpha2*d)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,93 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::GidaspowErgunWenYu
|
||||
|
||||
Description
|
||||
D. Gidaspow, Multiphase flow and fluidization,
|
||||
Academic Press, New York, 1994.
|
||||
|
||||
SourceFiles
|
||||
GidaspowErgunWenYu.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef GidaspowErgunWenYu_H
|
||||
#define GidaspowErgunWenYu_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class GidaspowErgunWenYu Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class GidaspowErgunWenYu
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("GidaspowErgunWenYu");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
GidaspowErgunWenYu
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~GidaspowErgunWenYu();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,87 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GidaspowSchillerNaumann.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(GidaspowSchillerNaumann, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
GidaspowSchillerNaumann,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField alpha2(max(phase2_, scalar(1e-6)));
|
||||
volScalarField bp(pow(alpha2, -2.65));
|
||||
|
||||
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
volScalarField Cds
|
||||
(
|
||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
||||
+ pos0(Re - 1000)*0.44
|
||||
);
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,102 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::GidaspowSchillerNaumann
|
||||
|
||||
Description
|
||||
H, Enwald, E. Peirano, A-E Almstedt
|
||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
||||
Eq. 86-87, p. 40
|
||||
|
||||
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
|
||||
the Ph.D. thesis of Berend van Wachem
|
||||
'Derivation, Implementation and Validation
|
||||
of
|
||||
Computer Simulation Models
|
||||
for Gas-Solid Fluidized Beds'
|
||||
|
||||
SourceFiles
|
||||
GidaspowSchillerNaumann.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef GidaspowSchillerNaumann_H
|
||||
#define GidaspowSchillerNaumann_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class GidaspowSchillerNaumann Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class GidaspowSchillerNaumann
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("GidaspowSchillerNaumann");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
GidaspowSchillerNaumann
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~GidaspowSchillerNaumann();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,84 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "SchillerNaumann.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(SchillerNaumann, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
SchillerNaumann,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::SchillerNaumann::SchillerNaumann
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::SchillerNaumann::~SchillerNaumann()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
volScalarField Cds
|
||||
(
|
||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
||||
+ pos0(Re - 1000)*0.44
|
||||
);
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,91 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::SchillerNaumann
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
SchillerNaumann.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef SchillerNaumann_H
|
||||
#define SchillerNaumann_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SchillerNaumann Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class SchillerNaumann
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("SchillerNaumann");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
SchillerNaumann
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SchillerNaumann();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,97 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "SyamlalOBrien.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(SyamlalOBrien, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
SyamlalOBrien,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::SyamlalOBrien::SyamlalOBrien
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField alpha2(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField A(pow(alpha2, 4.14));
|
||||
volScalarField B
|
||||
(
|
||||
neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28))
|
||||
+ pos0(alpha2 - 0.85)*(pow(alpha2, 2.65))
|
||||
);
|
||||
|
||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
|
||||
volScalarField Vr
|
||||
(
|
||||
0.5*
|
||||
(
|
||||
A - 0.06*Re + sqrt(sqr(0.06*Re) + 0.12*Re*(2.0*B - A) + sqr(A))
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField Cds(sqr(0.63 + 4.8*sqrt(Vr/Re)));
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur/(phase1_.d()*sqr(Vr));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,94 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::SyamlalOBrien
|
||||
|
||||
Description
|
||||
Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation,
|
||||
Theory Guide. Technical Note DOE/METC-94/1004. Morgantown, West Virginia,
|
||||
USA.
|
||||
|
||||
SourceFiles
|
||||
SyamlalOBrien.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef SyamlalOBrien_H
|
||||
#define SyamlalOBrien_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SyamlalOBrien Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class SyamlalOBrien
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("SyamlalOBrien");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
SyamlalOBrien
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SyamlalOBrien();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,87 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "WenYu.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(WenYu, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
WenYu,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::WenYu::WenYu
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::WenYu::~WenYu()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField alpha2(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField bp(pow(alpha2, -2.65));
|
||||
|
||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
volScalarField Cds
|
||||
(
|
||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
||||
+ pos0(Re - 1000)*0.44
|
||||
);
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,105 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::WenYu
|
||||
|
||||
Description
|
||||
H, Enwald, E. Peirano, A-E Almstedt
|
||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
||||
Eq. 86-87, p. 40
|
||||
|
||||
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
|
||||
the Ph.D. thesis of Berend van Wachem
|
||||
'Derivation, Implementation and Validation
|
||||
of
|
||||
Computer Simulation Models
|
||||
for Gas-Solid Fluidized Beds'
|
||||
|
||||
NB: The difference between the Gidaspow-version is the void-fraction
|
||||
in the Re-number
|
||||
|
||||
SourceFiles
|
||||
WenYu.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef WenYu_H
|
||||
#define WenYu_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class WenYu Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class WenYu
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("WenYu");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
WenYu
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~WenYu();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,79 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "blended.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(blended, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
blended,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::blended::blended
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2),
|
||||
dragModel1_(New(interfaceDict.subDict(phase1.name()), phase1, phase2)),
|
||||
dragModel2_(New(interfaceDict.subDict(phase2.name()), phase2, phase1))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::blended::~blended()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::blended::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
return phase2()*dragModel1_->K(Ur) + phase1()*dragModel2_->K(Ur);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,99 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::blended
|
||||
|
||||
Description
|
||||
Blends two drag models based on the phase fractions to handle
|
||||
phase-inversion.
|
||||
|
||||
SourceFiles
|
||||
blended.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef blended_H
|
||||
#define blended_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class blended Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class blended
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
// The two drag models to be blended
|
||||
autoPtr<dragModel> dragModel1_;
|
||||
autoPtr<dragModel> dragModel2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("blended");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
blended
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~blended();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,70 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(dragModel, 0);
|
||||
defineRunTimeSelectionTable(dragModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModel::dragModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
interfaceDict_(interfaceDict),
|
||||
phase1_(phase1),
|
||||
phase2_(phase2),
|
||||
residualPhaseFraction_
|
||||
(
|
||||
"residualPhaseFraction",
|
||||
dimless,
|
||||
interfaceDict.lookup("residualPhaseFraction")
|
||||
),
|
||||
residualSlip_
|
||||
(
|
||||
"residualSlip",
|
||||
dimVelocity,
|
||||
interfaceDict.lookup("residualSlip")
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModel::~dragModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,152 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
dragModel.C
|
||||
newDragModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef dragModel_H
|
||||
#define dragModel_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "phaseModel.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class dragModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class dragModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& interfaceDict_;
|
||||
const phaseModel& phase1_;
|
||||
const phaseModel& phase2_;
|
||||
dimensionedScalar residualPhaseFraction_;
|
||||
dimensionedScalar residualSlip_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("dragModel");
|
||||
|
||||
|
||||
// Declare runtime construction
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
dragModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
),
|
||||
(interfaceDict, phase1, phase2)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
dragModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~dragModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<dragModel> New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
const phaseModel& phase1() const
|
||||
{
|
||||
return phase1_;
|
||||
}
|
||||
|
||||
const phaseModel& phase2() const
|
||||
{
|
||||
return phase2_;
|
||||
}
|
||||
|
||||
const dimensionedScalar& residualPhaseFraction() const
|
||||
{
|
||||
return residualPhaseFraction_;
|
||||
}
|
||||
|
||||
const dimensionedScalar& residualSlip() const
|
||||
{
|
||||
return residualSlip_;
|
||||
}
|
||||
|
||||
//- The dragfunction K used in the momentum eq.
|
||||
// ddt(alpha1*rho1*U1) + ... = ... alpha1*alpha2*K*(U1-U2)
|
||||
// ddt(alpha2*rho2*U2) + ... = ... alpha1*alpha2*K*(U2-U1)
|
||||
// ********************************** NB! *****************************
|
||||
// for numerical reasons alpha1 and alpha2 has been
|
||||
// extracted from the dragFunction K,
|
||||
// so you MUST divide K by alpha1*alpha2 when implementing the drag
|
||||
// function
|
||||
// ********************************** NB! *****************************
|
||||
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,61 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word dragModelType(interfaceDict.lookup("type"));
|
||||
|
||||
Info << "Selecting dragModel for phase "
|
||||
<< phase1.name()
|
||||
<< ": "
|
||||
<< dragModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown dragModelType type "
|
||||
<< dragModelType << endl << endl
|
||||
<< "Valid dragModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(interfaceDict, phase1, phase2);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,82 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "interface.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(interface, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
interface,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::interface::interface
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::interface::~interface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::interface::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
"K",
|
||||
Ur.mesh(),
|
||||
dimensionedScalar(dimDensity/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,92 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::interface
|
||||
|
||||
Description
|
||||
Drag between phase separated by a VoF resolved interface.
|
||||
|
||||
SourceFiles
|
||||
interface.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef interface_H
|
||||
#define interface_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class interface Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class interface
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("interface");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
interface
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~interface();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,83 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "RanzMarshall.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace heatTransferModels
|
||||
{
|
||||
defineTypeNameAndDebug(RanzMarshall, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
heatTransferModel,
|
||||
RanzMarshall,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModels::RanzMarshall::RanzMarshall
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
heatTransferModel(interfaceDict, alpha1, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModels::RanzMarshall::~RanzMarshall()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::heatTransferModels::RanzMarshall::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
dimensionedScalar Prb =
|
||||
phase2_.rho()*phase2_.nu()*phase2_.Cp()/phase2_.kappa();
|
||||
volScalarField Nu(scalar(2) + 0.6*sqrt(Re)*cbrt(Prb));
|
||||
|
||||
return 6.0*phase2_.kappa()*Nu/sqr(phase1_.d());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,92 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::heatTransferModels::RanzMarshall
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
RanzMarshall.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef RanzMarshall_H
|
||||
#define RanzMarshall_H
|
||||
|
||||
#include "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace heatTransferModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class RanzMarshall Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class RanzMarshall
|
||||
:
|
||||
public heatTransferModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("RanzMarshall");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
RanzMarshall
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~RanzMarshall();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace heatTransferModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,60 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(heatTransferModel, 0);
|
||||
defineRunTimeSelectionTable(heatTransferModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModel::heatTransferModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
interfaceDict_(interfaceDict),
|
||||
alpha1_(alpha1),
|
||||
phase1_(phase1),
|
||||
phase2_(phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModel::~heatTransferModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,135 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::heatTransferModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
heatTransferModel.C
|
||||
newHeatTransferModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef heatTransferModel_H
|
||||
#define heatTransferModel_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "phaseModel.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class heatTransferModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class heatTransferModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& interfaceDict_;
|
||||
const volScalarField& alpha1_;
|
||||
const phaseModel& phase1_;
|
||||
const phaseModel& phase2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("heatTransferModel");
|
||||
|
||||
|
||||
// Declare runtime construction
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
heatTransferModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
),
|
||||
(interfaceDict, alpha1, phase1, phase2)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
heatTransferModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~heatTransferModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<heatTransferModel> New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- The heat-transfer function K used in the enthalpy eq.
|
||||
// ddt(alpha1*rho1*ha) + ... = ... alpha1*alpha2*K*(Ta - Tb)
|
||||
// ddt(alpha2*rho2*hb) + ... = ... alpha1*alpha2*K*(Tb - Ta)
|
||||
// ********************************** NB! *****************************
|
||||
// for numerical reasons alpha1 and alpha2 has been
|
||||
// extracted from the heat-transfer function K,
|
||||
// so you MUST divide K by alpha1*alpha2 when implementing the
|
||||
// heat-transfer function
|
||||
// ********************************** NB! *****************************
|
||||
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,65 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word heatTransferModelType
|
||||
(
|
||||
interfaceDict.lookup("heatTransferModel" + phase1.name())
|
||||
);
|
||||
|
||||
Info<< "Selecting heatTransferModel for phase "
|
||||
<< phase1.name()
|
||||
<< ": "
|
||||
<< heatTransferModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown heatTransferModelType type "
|
||||
<< heatTransferModelType << endl << endl
|
||||
<< "Valid heatTransferModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(interfaceDict, alpha1, phase1, phase2);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,121 +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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
multiphaseEulerFoam
|
||||
|
||||
Description
|
||||
Solver for a system of many incompressible fluid phases including
|
||||
heat-transfer.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "multiphaseSystem.H"
|
||||
#include "phaseModel.H"
|
||||
#include "dragModel.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "CorrectPhi.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "correctPhi.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
scalar slamDampCoeff
|
||||
(
|
||||
fluid.lookupOrDefault<scalar>("slamDampCoeff", 1)
|
||||
);
|
||||
|
||||
dimensionedScalar maxSlamVelocity
|
||||
(
|
||||
"maxSlamVelocity",
|
||||
dimVelocity,
|
||||
fluid.lookupOrDefault<scalar>("maxSlamVelocity", great)
|
||||
);
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (pimple.run(runTime))
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
turbulence->correct();
|
||||
fluid.solve();
|
||||
rho = fluid.rho();
|
||||
#include "zonePhaseVolumes.H"
|
||||
|
||||
//#include "TEqns.H"
|
||||
#include "UEqns.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
#include "DDtU.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< runTime.elapsedCpuTime()
|
||||
<< " s\n\n" << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,10 +0,0 @@
|
||||
phaseModel/phaseModel.C
|
||||
diameterModels/diameterModel/diameterModel.C
|
||||
diameterModels/diameterModel/newDiameterModel.C
|
||||
diameterModels/constantDiameter/constantDiameter.C
|
||||
diameterModels/isothermalDiameter/isothermalDiameter.C
|
||||
|
||||
alphaContactAngle/alphaContactAngleFvPatchScalarField.C
|
||||
multiphaseSystem.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libmultiphaseSystem
|
||||
@ -1,13 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I../interfacialModels/lnInclude \
|
||||
-IalphaContactAngle \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-linterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
@ -1,145 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField& gcpsf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
|
||||
thetaProps_(gcpsf.thetaProps_)
|
||||
{}
|
||||
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(p, iF),
|
||||
thetaProps_(dict.lookup("thetaProperties"))
|
||||
{
|
||||
evaluate();
|
||||
}
|
||||
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField& gcpsf,
|
||||
const DimensionedField<scalar, volMesh>& 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,215 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::alphaContactAngleFvPatchScalarField
|
||||
|
||||
Description
|
||||
Contact-angle boundary condition for multi-phase interface-capturing
|
||||
simulations. Used in conjunction with multiphaseSystem.
|
||||
|
||||
SourceFiles
|
||||
alphaContactAngleFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef alphaContactAngleFvPatchScalarField_H
|
||||
#define alphaContactAngleFvPatchScalarField_H
|
||||
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "multiphaseSystem.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,
|
||||
multiphaseSystem::interfacePair,
|
||||
multiphaseSystem::interfacePair::symmHash
|
||||
> thetaPropsTable;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Data
|
||||
|
||||
thetaPropsTable thetaProps_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("alphaContactAngle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given alphaContactAngleFvPatchScalarField
|
||||
// onto a new patch
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphaContactAngleFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,79 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constantDiameter.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace diameterModels
|
||||
{
|
||||
defineTypeNameAndDebug(constant, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
diameterModel,
|
||||
constant,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModels::constant::constant
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
)
|
||||
:
|
||||
diameterModel(dict, phase),
|
||||
d_("d", dimLength, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModels::constant::~constant()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::diameterModels::constant::d() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
"d",
|
||||
phase_.U().mesh(),
|
||||
d_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,96 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::diameterModels::constant
|
||||
|
||||
Description
|
||||
Constant dispersed-phase particle diameter model.
|
||||
|
||||
SourceFiles
|
||||
constant.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constantDiameter_H
|
||||
#define constantDiameter_H
|
||||
|
||||
#include "diameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace diameterModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constant Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class constant
|
||||
:
|
||||
public diameterModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- The constant diameter of the phase
|
||||
dimensionedScalar d_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("constant");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
constant
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~constant();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> d() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace diameterModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "diameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(diameterModel, 0);
|
||||
defineRunTimeSelectionTable(diameterModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModel::diameterModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
)
|
||||
:
|
||||
dict_(dict),
|
||||
phase_(phase)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModel::~diameterModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,120 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::diameterModel
|
||||
|
||||
Description
|
||||
Abstract base-class for dispersed-phase particle diameter models.
|
||||
|
||||
SourceFiles
|
||||
diameterModel.C
|
||||
newDiameterModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef diameterModel_H
|
||||
#define diameterModel_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "phaseModel.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class diameterModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class diameterModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& dict_;
|
||||
const phaseModel& phase_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("diameterModel");
|
||||
|
||||
|
||||
// Declare runtime construction
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
diameterModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
),
|
||||
(dict, phase)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
diameterModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~diameterModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<diameterModel> New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the phase mean diameter field
|
||||
virtual tmp<volScalarField> d() const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,67 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "diameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
)
|
||||
{
|
||||
word diameterModelType
|
||||
(
|
||||
dict.lookup("diameterModel")
|
||||
);
|
||||
|
||||
Info << "Selecting diameterModel for phase "
|
||||
<< phase.name()
|
||||
<< ": "
|
||||
<< diameterModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown diameterModelType type "
|
||||
<< diameterModelType << endl << endl
|
||||
<< "Valid diameterModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "isothermalDiameter.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace diameterModels
|
||||
{
|
||||
defineTypeNameAndDebug(isothermal, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
diameterModel,
|
||||
isothermal,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModels::isothermal::isothermal
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
)
|
||||
:
|
||||
diameterModel(dict, phase),
|
||||
d0_("d0", dimLength, dict),
|
||||
p0_("p0", dimPressure, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModels::isothermal::~isothermal()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::diameterModels::isothermal::d() const
|
||||
{
|
||||
const volScalarField& p = phase_.U().db().lookupObject<volScalarField>
|
||||
(
|
||||
"p"
|
||||
);
|
||||
|
||||
return d0_*pow(p0_/p, 1.0/3.0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,99 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::diameterModels::isothermal
|
||||
|
||||
Description
|
||||
Isothermal dispersed-phase particle diameter model.
|
||||
|
||||
SourceFiles
|
||||
isothermal.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef isothermalDiameter_H
|
||||
#define isothermalDiameter_H
|
||||
|
||||
#include "diameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace diameterModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class isothermal Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class isothermal
|
||||
:
|
||||
public diameterModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Reference diameter for the isothermal expansion
|
||||
dimensionedScalar d0_;
|
||||
|
||||
//- Reference pressure for the isothermal expansion
|
||||
dimensionedScalar p0_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("isothermal");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
isothermal
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phaseModel& phase
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~isothermal();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> d() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace diameterModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,933 +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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "multiphaseSystem.H"
|
||||
#include "alphaContactAngleFvPatchScalarField.H"
|
||||
#include "unitConversion.H"
|
||||
#include "fixedValueFvsPatchFields.H"
|
||||
#include "Time.H"
|
||||
#include "subCycle.H"
|
||||
#include "MULES.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "fvcSnGrad.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "fvcAverage.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::multiphaseSystem::calcAlphas()
|
||||
{
|
||||
scalar level = 0.0;
|
||||
alphas_ == 0.0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
alphas_ += level*iter();
|
||||
level += 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::multiphaseSystem::solveAlphas()
|
||||
{
|
||||
PtrList<surfaceScalarField> alphaPhiCorrs(phases_.size());
|
||||
int phasei = 0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
volScalarField& alpha1 = phase;
|
||||
|
||||
alphaPhiCorrs.set
|
||||
(
|
||||
phasei,
|
||||
new surfaceScalarField
|
||||
(
|
||||
"phi" + alpha1.name() + "Corr",
|
||||
fvc::flux
|
||||
(
|
||||
phi_,
|
||||
phase,
|
||||
"div(phi," + alpha1.name() + ')'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei];
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter2)
|
||||
{
|
||||
phaseModel& phase2 = iter2();
|
||||
volScalarField& alpha2 = phase2;
|
||||
|
||||
if (&phase2 == &phase) continue;
|
||||
|
||||
surfaceScalarField phir(phase.phi() - phase2.phi());
|
||||
|
||||
scalarCoeffSymmTable::const_iterator cAlpha
|
||||
(
|
||||
cAlphas_.find(interfacePair(phase, phase2))
|
||||
);
|
||||
|
||||
if (cAlpha != cAlphas_.end())
|
||||
{
|
||||
surfaceScalarField phic
|
||||
(
|
||||
(mag(phi_) + mag(phir))/mesh_.magSf()
|
||||
);
|
||||
|
||||
phir += min(cAlpha()*phic, max(phic))*nHatf(phase, phase2);
|
||||
}
|
||||
|
||||
word phirScheme
|
||||
(
|
||||
"div(phir," + alpha2.name() + ',' + alpha1.name() + ')'
|
||||
);
|
||||
|
||||
alphaPhiCorr += fvc::flux
|
||||
(
|
||||
-fvc::flux(-phir, phase2, phirScheme),
|
||||
phase,
|
||||
phirScheme
|
||||
);
|
||||
}
|
||||
|
||||
phase.correctInflowOutflow(alphaPhiCorr);
|
||||
|
||||
MULES::limit
|
||||
(
|
||||
1.0/mesh_.time().deltaT().value(),
|
||||
geometricOneField(),
|
||||
phase,
|
||||
phi_,
|
||||
alphaPhiCorr,
|
||||
zeroField(),
|
||||
zeroField(),
|
||||
oneField(),
|
||||
zeroField(),
|
||||
true
|
||||
);
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
MULES::limitSum(alphaPhiCorrs);
|
||||
|
||||
volScalarField sumAlpha
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sumAlpha",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimless, 0)
|
||||
);
|
||||
|
||||
phasei = 0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
|
||||
alphaPhi += upwind<scalar>(mesh_, phi_).flux(phase);
|
||||
phase.correctInflowOutflow(alphaPhi);
|
||||
|
||||
MULES::explicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
phase,
|
||||
alphaPhi
|
||||
);
|
||||
|
||||
phase.alphaPhi() = alphaPhi;
|
||||
|
||||
Info<< phase.name() << " volume fraction, min, max = "
|
||||
<< phase.weightedAverage(mesh_.V()).value()
|
||||
<< ' ' << min(phase).value()
|
||||
<< ' ' << max(phase).value()
|
||||
<< endl;
|
||||
|
||||
sumAlpha += phase;
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
Info<< "Phase-sum volume fraction, min, max = "
|
||||
<< sumAlpha.weightedAverage(mesh_.V()).value()
|
||||
<< ' ' << min(sumAlpha).value()
|
||||
<< ' ' << max(sumAlpha).value()
|
||||
<< endl;
|
||||
|
||||
// Correct the sum of the phase-fractions to avoid 'drift'
|
||||
volScalarField sumCorr(1.0 - sumAlpha);
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
volScalarField& alpha = phase;
|
||||
alpha += alpha*sumCorr;
|
||||
}
|
||||
|
||||
calcAlphas();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseSystem::nHatfv
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const
|
||||
{
|
||||
/*
|
||||
// Cell gradient of alpha
|
||||
volVectorField gradAlpha =
|
||||
alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
|
||||
|
||||
// Interpolated face-gradient of alpha
|
||||
surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
|
||||
*/
|
||||
|
||||
surfaceVectorField gradAlphaf
|
||||
(
|
||||
fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1))
|
||||
- fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2))
|
||||
);
|
||||
|
||||
// Face unit interface normal
|
||||
return gradAlphaf/(mag(gradAlphaf) + deltaN_);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::nHatf
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const
|
||||
{
|
||||
// Face unit interface normal flux
|
||||
return nHatfv(alpha1, alpha2) & mesh_.Sf();
|
||||
}
|
||||
|
||||
|
||||
// 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::multiphaseSystem::correctContactAngle
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2,
|
||||
surfaceVectorField::Boundary& nHatb
|
||||
) const
|
||||
{
|
||||
const volScalarField::Boundary& gbf
|
||||
= phase1.boundaryField();
|
||||
|
||||
const fvBoundaryMesh& boundary = mesh_.boundary();
|
||||
|
||||
forAll(boundary, patchi)
|
||||
{
|
||||
if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi]))
|
||||
{
|
||||
const alphaContactAngleFvPatchScalarField& acap =
|
||||
refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]);
|
||||
|
||||
vectorField& nHatPatch = nHatb[patchi];
|
||||
|
||||
vectorField AfHatPatch
|
||||
(
|
||||
mesh_.Sf().boundaryField()[patchi]
|
||||
/mesh_.magSf().boundaryField()[patchi]
|
||||
);
|
||||
|
||||
alphaContactAngleFvPatchScalarField::thetaPropsTable::
|
||||
const_iterator tp =
|
||||
acap.thetaProps().find(interfacePair(phase1, phase2));
|
||||
|
||||
if (tp == acap.thetaProps().end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find interface " << interfacePair(phase1, phase2)
|
||||
<< "\n in table of theta properties for patch "
|
||||
<< acap.patch().name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
bool matched = (tp.key().first() == phase1.name());
|
||||
|
||||
scalar theta0 = degToRad(tp().theta0(matched));
|
||||
scalarField theta(boundary[patchi].size(), theta0);
|
||||
|
||||
scalar uTheta = tp().uTheta();
|
||||
|
||||
// Calculate the dynamic contact angle if required
|
||||
if (uTheta > small)
|
||||
{
|
||||
scalar thetaA = degToRad(tp().thetaA(matched));
|
||||
scalar thetaR = degToRad(tp().thetaR(matched));
|
||||
|
||||
// Calculated the component of the velocity parallel to the wall
|
||||
vectorField Uwall
|
||||
(
|
||||
phase1.U().boundaryField()[patchi].patchInternalField()
|
||||
- phase1.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
|
||||
scalarField uwall(nWall & Uwall);
|
||||
|
||||
theta += (thetaA - thetaR)*tanh(uwall/uTheta);
|
||||
}
|
||||
|
||||
|
||||
// Reset nHatPatch to correspond to the contact angle
|
||||
|
||||
scalarField a12(nHatPatch & AfHatPatch);
|
||||
|
||||
scalarField b1(cos(theta));
|
||||
|
||||
scalarField b2(nHatPatch.size());
|
||||
|
||||
forAll(b2, facei)
|
||||
{
|
||||
b2[facei] = cos(acos(a12[facei]) - theta[facei]);
|
||||
}
|
||||
|
||||
scalarField det(1.0 - a12*a12);
|
||||
|
||||
scalarField a((b1 - a12*b2)/det);
|
||||
scalarField b((b2 - a12*b1)/det);
|
||||
|
||||
nHatPatch = a*AfHatPatch + b*nHatPatch;
|
||||
|
||||
nHatPatch /= (mag(nHatPatch) + deltaN_.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::K
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const
|
||||
{
|
||||
tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2);
|
||||
|
||||
correctContactAngle(phase1, phase2, tnHatfv.ref().boundaryFieldRef());
|
||||
|
||||
// Simple expression for curvature
|
||||
return -fvc::div(tnHatfv & mesh_.Sf());
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::multiphaseSystem::multiphaseSystem
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
|
||||
phases_(lookup("phases"), phaseModel::iNew(U.mesh())),
|
||||
|
||||
mesh_(U.mesh()),
|
||||
phi_(phi),
|
||||
|
||||
alphas_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alphas",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimless, 0)
|
||||
),
|
||||
|
||||
sigmas_(lookup("sigmas")),
|
||||
dimSigma_(1, 0, -2, 0, 0),
|
||||
cAlphas_(lookup("interfaceCompression")),
|
||||
Cvms_(lookup("virtualMass")),
|
||||
deltaN_
|
||||
(
|
||||
"deltaN",
|
||||
1e-8/pow(average(mesh_.V()), 1.0/3.0)
|
||||
)
|
||||
{
|
||||
calcAlphas();
|
||||
alphas_.write();
|
||||
|
||||
interfaceDictTable dragModelsDict(lookup("drag"));
|
||||
|
||||
forAllConstIter(interfaceDictTable, dragModelsDict, iter)
|
||||
{
|
||||
dragModels_.insert
|
||||
(
|
||||
iter.key(),
|
||||
dragModel::New
|
||||
(
|
||||
iter(),
|
||||
*phases_.lookup(iter.key().first()),
|
||||
*phases_.lookup(iter.key().second())
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter1)
|
||||
{
|
||||
const phaseModel& phase1 = iter1();
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter2)
|
||||
{
|
||||
const phaseModel& phase2 = iter2();
|
||||
|
||||
if (&phase2 != &phase1)
|
||||
{
|
||||
scalarCoeffSymmTable::const_iterator sigma
|
||||
(
|
||||
sigmas_.find(interfacePair(phase1, phase2))
|
||||
);
|
||||
|
||||
if (sigma != sigmas_.end())
|
||||
{
|
||||
scalarCoeffSymmTable::const_iterator cAlpha
|
||||
(
|
||||
cAlphas_.find(interfacePair(phase1, phase2))
|
||||
);
|
||||
|
||||
if (cAlpha == cAlphas_.end())
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Compression coefficient not specified for "
|
||||
"phase pair ("
|
||||
<< phase1.name() << ' ' << phase2.name()
|
||||
<< ") for which a surface tension "
|
||||
"coefficient is specified"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::rho() const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<volScalarField> trho = iter()*iter().rho();
|
||||
volScalarField& rho = trho.ref();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
rho += iter()*iter().rho();
|
||||
}
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseSystem::rho(const label patchi) const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
|
||||
scalarField& rho = trho.ref();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
rho += iter().boundaryField()[patchi]*iter().rho().value();
|
||||
}
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::nu() const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<volScalarField> tmu = iter()*(iter().rho()*iter().nu());
|
||||
volScalarField& mu = tmu.ref();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
mu += iter()*(iter().rho()*iter().nu());
|
||||
}
|
||||
|
||||
return tmu/rho();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseSystem::nu(const label patchi) const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<scalarField> tmu =
|
||||
iter().boundaryField()[patchi]
|
||||
*(iter().rho().value()*iter().nu().value());
|
||||
scalarField& mu = tmu.ref();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
mu +=
|
||||
iter().boundaryField()[patchi]
|
||||
*(iter().rho().value()*iter().nu().value());
|
||||
}
|
||||
|
||||
return tmu/rho(patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::Cvm
|
||||
(
|
||||
const phaseModel& phase
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tCvm
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
"Cvm",
|
||||
mesh_,
|
||||
dimensionedScalar(dimensionSet(1, -3, 0, 0, 0), 0)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
const phaseModel& phase2 = iter();
|
||||
|
||||
if (&phase2 != &phase)
|
||||
{
|
||||
scalarCoeffTable::const_iterator Cvm
|
||||
(
|
||||
Cvms_.find(interfacePair(phase, phase2))
|
||||
);
|
||||
|
||||
if (Cvm != Cvms_.end())
|
||||
{
|
||||
tCvm.ref() += Cvm()*phase2.rho()*phase2;
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvm = Cvms_.find(interfacePair(phase2, phase));
|
||||
|
||||
if (Cvm != Cvms_.end())
|
||||
{
|
||||
tCvm.ref() += Cvm()*phase.rho()*phase2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tCvm;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
|
||||
(
|
||||
const phaseModel& phase
|
||||
) const
|
||||
{
|
||||
tmp<volVectorField> tSvm
|
||||
(
|
||||
volVectorField::New
|
||||
(
|
||||
"Svm",
|
||||
mesh_,
|
||||
dimensionedVector(dimensionSet(1, -2, -2, 0, 0), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
const phaseModel& phase2 = iter();
|
||||
|
||||
if (&phase2 != &phase)
|
||||
{
|
||||
scalarCoeffTable::const_iterator Cvm
|
||||
(
|
||||
Cvms_.find(interfacePair(phase, phase2))
|
||||
);
|
||||
|
||||
if (Cvm != Cvms_.end())
|
||||
{
|
||||
tSvm.ref() += Cvm()*phase2.rho()*phase2*phase2.DDtU();
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvm = Cvms_.find(interfacePair(phase2, phase));
|
||||
|
||||
if (Cvm != Cvms_.end())
|
||||
{
|
||||
tSvm.ref() += Cvm()*phase.rho()*phase2*phase2.DDtU();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
volVectorField::Boundary& SvmBf =
|
||||
tSvm.ref().boundaryFieldRef();
|
||||
|
||||
// Remove virtual mass at fixed-flux boundaries
|
||||
forAll(phase.phi().boundaryField(), patchi)
|
||||
{
|
||||
if
|
||||
(
|
||||
isA<fixedValueFvsPatchScalarField>
|
||||
(
|
||||
phase.phi().boundaryField()[patchi]
|
||||
)
|
||||
)
|
||||
{
|
||||
SvmBf[patchi] = Zero;
|
||||
}
|
||||
}
|
||||
|
||||
return tSvm;
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::multiphaseSystem::dragCoeffFields>
|
||||
Foam::multiphaseSystem::dragCoeffs() const
|
||||
{
|
||||
autoPtr<dragCoeffFields> dragCoeffsPtr(new dragCoeffFields);
|
||||
|
||||
forAllConstIter(dragModelTable, dragModels_, iter)
|
||||
{
|
||||
const dragModel& dm = *iter();
|
||||
|
||||
volScalarField* Kptr =
|
||||
(
|
||||
max
|
||||
(
|
||||
// fvc::average(dm.phase1()*dm.phase2()),
|
||||
// fvc::average(dm.phase1())*fvc::average(dm.phase2()),
|
||||
dm.phase1()*dm.phase2(),
|
||||
dm.residualPhaseFraction()
|
||||
)
|
||||
*dm.K
|
||||
(
|
||||
max
|
||||
(
|
||||
mag(dm.phase1().U() - dm.phase2().U()),
|
||||
dm.residualSlip()
|
||||
)
|
||||
)
|
||||
).ptr();
|
||||
|
||||
volScalarField::Boundary& Kbf = Kptr->boundaryFieldRef();
|
||||
|
||||
// Remove drag at fixed-flux boundaries
|
||||
forAll(dm.phase1().phi().boundaryField(), patchi)
|
||||
{
|
||||
if
|
||||
(
|
||||
isA<fixedValueFvsPatchScalarField>
|
||||
(
|
||||
dm.phase1().phi().boundaryField()[patchi]
|
||||
)
|
||||
)
|
||||
{
|
||||
Kbf[patchi] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
dragCoeffsPtr().insert(iter.key(), Kptr);
|
||||
}
|
||||
|
||||
return dragCoeffsPtr;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::dragCoeff
|
||||
(
|
||||
const phaseModel& phase,
|
||||
const dragCoeffFields& dragCoeffs
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tdragCoeff
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
"dragCoeff",
|
||||
mesh_,
|
||||
dimensionedScalar(dimensionSet(1, -3, -1, 0, 0), 0)
|
||||
)
|
||||
);
|
||||
|
||||
dragModelTable::const_iterator dmIter = dragModels_.begin();
|
||||
dragCoeffFields::const_iterator dcIter = dragCoeffs.begin();
|
||||
for
|
||||
(
|
||||
;
|
||||
dmIter != dragModels_.end() && dcIter != dragCoeffs.end();
|
||||
++dmIter, ++dcIter
|
||||
)
|
||||
{
|
||||
if
|
||||
(
|
||||
&phase == &dmIter()->phase1()
|
||||
|| &phase == &dmIter()->phase2()
|
||||
)
|
||||
{
|
||||
tdragCoeff.ref() += *dcIter();
|
||||
}
|
||||
}
|
||||
|
||||
return tdragCoeff;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
|
||||
(
|
||||
const phaseModel& phase1
|
||||
) const
|
||||
{
|
||||
tmp<surfaceScalarField> tSurfaceTension
|
||||
(
|
||||
surfaceScalarField::New
|
||||
(
|
||||
"surfaceTension",
|
||||
mesh_,
|
||||
dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
const phaseModel& phase2 = iter();
|
||||
|
||||
if (&phase2 != &phase1)
|
||||
{
|
||||
scalarCoeffSymmTable::const_iterator sigma
|
||||
(
|
||||
sigmas_.find(interfacePair(phase1, phase2))
|
||||
);
|
||||
|
||||
if (sigma != sigmas_.end())
|
||||
{
|
||||
tSurfaceTension.ref() +=
|
||||
dimensionedScalar(dimSigma_, sigma())
|
||||
*fvc::interpolate(K(phase1, phase2))*
|
||||
(
|
||||
fvc::interpolate(phase2)*fvc::snGrad(phase1)
|
||||
- fvc::interpolate(phase1)*fvc::snGrad(phase2)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tSurfaceTension;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseSystem::nearInterface() const
|
||||
{
|
||||
tmp<volScalarField> tnearInt
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
"nearInterface",
|
||||
mesh_,
|
||||
dimensionedScalar(dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
tnearInt.ref() =
|
||||
max(tnearInt(), pos0(iter() - 0.01)*pos0(0.99 - iter()));
|
||||
}
|
||||
|
||||
return tnearInt;
|
||||
}
|
||||
|
||||
|
||||
void Foam::multiphaseSystem::solve()
|
||||
{
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
iter().correct();
|
||||
}
|
||||
|
||||
const Time& runTime = mesh_.time();
|
||||
|
||||
const dictionary& alphaControls = mesh_.solverDict("alpha");
|
||||
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
|
||||
|
||||
if (nAlphaSubCycles > 1)
|
||||
{
|
||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||
|
||||
PtrList<volScalarField> alpha0s(phases_.size());
|
||||
PtrList<surfaceScalarField> alphaPhiSums(phases_.size());
|
||||
|
||||
int phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
volScalarField& alpha = phase;
|
||||
|
||||
alpha0s.set
|
||||
(
|
||||
phasei,
|
||||
new volScalarField(alpha.oldTime())
|
||||
);
|
||||
|
||||
alphaPhiSums.set
|
||||
(
|
||||
phasei,
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phiSum" + alpha.name(),
|
||||
runTime.timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), 0)
|
||||
)
|
||||
);
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
for
|
||||
(
|
||||
subCycleTime alphaSubCycle
|
||||
(
|
||||
const_cast<Time&>(runTime),
|
||||
nAlphaSubCycles
|
||||
);
|
||||
!(++alphaSubCycle).end();
|
||||
)
|
||||
{
|
||||
solveAlphas();
|
||||
|
||||
int phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
alphaPhiSums[phasei] += iter().alphaPhi()/nAlphaSubCycles;
|
||||
phasei++;
|
||||
}
|
||||
}
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
volScalarField& alpha = phase;
|
||||
|
||||
phase.alphaPhi() = alphaPhiSums[phasei];
|
||||
|
||||
// Correct the time index of the field
|
||||
// to correspond to the global time
|
||||
alpha.timeIndex() = runTime.timeIndex();
|
||||
|
||||
// Reset the old-time field value
|
||||
alpha.oldTime() = alpha0s[phasei];
|
||||
alpha.oldTime().timeIndex() = runTime.timeIndex();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
solveAlphas();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Foam::multiphaseSystem::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
bool readOK = true;
|
||||
|
||||
PtrList<entry> phaseData(lookup("phases"));
|
||||
label phasei = 0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
readOK &= iter().read(phaseData[phasei++].dict());
|
||||
}
|
||||
|
||||
lookup("sigmas") >> sigmas_;
|
||||
lookup("interfaceCompression") >> cAlphas_;
|
||||
lookup("virtualMass") >> Cvms_;
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,314 +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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::multiphaseSystem
|
||||
|
||||
Description
|
||||
Incompressible multi-phase mixture with built in solution for the
|
||||
phase fractions with interface compression for interface-capturing.
|
||||
|
||||
Derived from transportModel so that it can be used in conjunction with
|
||||
the incompressible turbulence models.
|
||||
|
||||
Surface tension and contact-angle is handled for the interface
|
||||
between each phase-pair.
|
||||
|
||||
SourceFiles
|
||||
multiphaseSystem.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef multiphaseSystem_H
|
||||
#define multiphaseSystem_H
|
||||
|
||||
#include "transportModel.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "phaseModel.H"
|
||||
#include "PtrDictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "dragModel.H"
|
||||
#include "HashPtrTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class multiphaseSystem Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class multiphaseSystem
|
||||
:
|
||||
public IOdictionary,
|
||||
public transportModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
class interfacePair
|
||||
:
|
||||
public Pair<word>
|
||||
{
|
||||
public:
|
||||
|
||||
class symmHash
|
||||
:
|
||||
public Hash<interfacePair>
|
||||
{
|
||||
public:
|
||||
|
||||
symmHash()
|
||||
{}
|
||||
|
||||
label operator()(const interfacePair& key) const
|
||||
{
|
||||
return word::hash()(key.first()) + word::hash()(key.second());
|
||||
}
|
||||
};
|
||||
|
||||
class hash
|
||||
:
|
||||
public Hash<interfacePair>
|
||||
{
|
||||
public:
|
||||
|
||||
hash()
|
||||
{}
|
||||
|
||||
label operator()(const interfacePair& key) const
|
||||
{
|
||||
return word::hash()(key.first(), word::hash()(key.second()));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
interfacePair()
|
||||
{}
|
||||
|
||||
interfacePair(const word& alpha1Name, const word& alpha2Name)
|
||||
:
|
||||
Pair<word>(alpha1Name, alpha2Name)
|
||||
{}
|
||||
|
||||
interfacePair(const phaseModel& alpha1, const phaseModel& alpha2)
|
||||
:
|
||||
Pair<word>(alpha1.name(), alpha2.name())
|
||||
{}
|
||||
|
||||
|
||||
// Friend Operators
|
||||
|
||||
friend bool operator==
|
||||
(
|
||||
const interfacePair& a,
|
||||
const interfacePair& b
|
||||
)
|
||||
{
|
||||
return
|
||||
(
|
||||
((a.first() == b.first()) && (a.second() == b.second()))
|
||||
|| ((a.first() == b.second()) && (a.second() == b.first()))
|
||||
);
|
||||
}
|
||||
|
||||
friend bool operator!=
|
||||
(
|
||||
const interfacePair& a,
|
||||
const interfacePair& b
|
||||
)
|
||||
{
|
||||
return (!(a == b));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef HashPtrTable<dragModel, interfacePair, interfacePair::symmHash>
|
||||
dragModelTable;
|
||||
|
||||
typedef HashPtrTable<volScalarField, interfacePair, interfacePair::symmHash>
|
||||
dragCoeffFields;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Dictionary of phases
|
||||
PtrDictionary<phaseModel> phases_;
|
||||
|
||||
const fvMesh& mesh_;
|
||||
const surfaceScalarField& phi_;
|
||||
|
||||
volScalarField alphas_;
|
||||
|
||||
typedef HashTable<scalar, interfacePair, interfacePair::symmHash>
|
||||
scalarCoeffSymmTable;
|
||||
|
||||
typedef HashTable<scalar, interfacePair, interfacePair::hash>
|
||||
scalarCoeffTable;
|
||||
|
||||
scalarCoeffSymmTable sigmas_;
|
||||
dimensionSet dimSigma_;
|
||||
|
||||
scalarCoeffSymmTable cAlphas_;
|
||||
|
||||
scalarCoeffTable Cvms_;
|
||||
|
||||
typedef HashTable<dictionary, interfacePair, interfacePair::symmHash>
|
||||
interfaceDictTable;
|
||||
|
||||
dragModelTable dragModels_;
|
||||
|
||||
//- Stabilisation for normalisation of the interface normal
|
||||
const dimensionedScalar deltaN_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
void calcAlphas();
|
||||
|
||||
void solveAlphas();
|
||||
|
||||
tmp<surfaceVectorField> nHatfv
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const;
|
||||
|
||||
tmp<surfaceScalarField> nHatf
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const;
|
||||
|
||||
void correctContactAngle
|
||||
(
|
||||
const phaseModel& alpha1,
|
||||
const phaseModel& alpha2,
|
||||
surfaceVectorField::Boundary& nHatb
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> K
|
||||
(
|
||||
const phaseModel& alpha1,
|
||||
const phaseModel& alpha2
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
multiphaseSystem
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~multiphaseSystem()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the phases
|
||||
const PtrDictionary<phaseModel>& phases() const
|
||||
{
|
||||
return phases_;
|
||||
}
|
||||
|
||||
//- Return the phases
|
||||
PtrDictionary<phaseModel>& phases()
|
||||
{
|
||||
return phases_;
|
||||
}
|
||||
|
||||
//- Return the mixture density
|
||||
tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return the mixture density for patch
|
||||
tmp<scalarField> rho(const label patchi) const;
|
||||
|
||||
//- Return the mixture laminar viscosity
|
||||
tmp<volScalarField> nu() const;
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const;
|
||||
|
||||
//- Return the virtual-mass coefficient for the given phase
|
||||
tmp<volScalarField> Cvm(const phaseModel& phase) const;
|
||||
|
||||
//- Return the virtual-mass source for the given phase
|
||||
tmp<volVectorField> Svm(const phaseModel& phase) const;
|
||||
|
||||
//- Return the table of drag models
|
||||
const dragModelTable& dragModels() const
|
||||
{
|
||||
return dragModels_;
|
||||
}
|
||||
|
||||
//- Return the drag coefficients for all of the interfaces
|
||||
autoPtr<dragCoeffFields> dragCoeffs() const;
|
||||
|
||||
//- Return the sum of the drag coefficients for the given phase
|
||||
tmp<volScalarField> dragCoeff
|
||||
(
|
||||
const phaseModel& phase,
|
||||
const dragCoeffFields& dragCoeffs
|
||||
) const;
|
||||
|
||||
tmp<surfaceScalarField> surfaceTension(const phaseModel& phase) const;
|
||||
|
||||
//- Indicator of the proximity of the interface
|
||||
// Field values are 1 near and 0 away for the interface.
|
||||
tmp<volScalarField> nearInterface() const;
|
||||
|
||||
//- Solve for the mixture phase-fractions
|
||||
void solve();
|
||||
|
||||
//- Dummy correct
|
||||
void correct()
|
||||
{}
|
||||
|
||||
//- Read base transportProperties dictionary
|
||||
bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,263 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "phaseModel.H"
|
||||
#include "diameterModel.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "slipFvPatchFields.H"
|
||||
#include "partialSlipFvPatchFields.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcFlux.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::phaseModel::phaseModel
|
||||
(
|
||||
const word& phaseName,
|
||||
const dictionary& phaseDict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("alpha", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
),
|
||||
name_(phaseName),
|
||||
phaseDict_(phaseDict),
|
||||
nu_
|
||||
(
|
||||
"nu",
|
||||
dimensionSet(0, 2, -1, 0, 0),
|
||||
phaseDict_
|
||||
),
|
||||
kappa_
|
||||
(
|
||||
"kappa",
|
||||
dimensionSet(1, 1, -3, -1, 0),
|
||||
phaseDict_
|
||||
),
|
||||
Cp_
|
||||
(
|
||||
"Cp",
|
||||
dimensionSet(0, 2, -2, -1, 0),
|
||||
phaseDict_
|
||||
),
|
||||
rho_
|
||||
(
|
||||
"rho",
|
||||
dimDensity,
|
||||
phaseDict_
|
||||
),
|
||||
U_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("U", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
),
|
||||
DDtU_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("DDtU", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector(dimVelocity/dimTime, Zero)
|
||||
),
|
||||
alphaPhi_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("alphaPhi", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), 0)
|
||||
)
|
||||
{
|
||||
const word phiName = IOobject::groupName("phi", name_);
|
||||
|
||||
IOobject phiHeader
|
||||
(
|
||||
phiName,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
if (phiHeader.typeHeaderOk<surfaceScalarField>(true))
|
||||
{
|
||||
Info<< "Reading face flux field " << phiName << endl;
|
||||
|
||||
phiPtr_.reset
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phiName,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Calculating face flux field " << phiName << endl;
|
||||
|
||||
wordList phiTypes
|
||||
(
|
||||
U_.boundaryField().size(),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
forAll(U_.boundaryField(), i)
|
||||
{
|
||||
if
|
||||
(
|
||||
isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])
|
||||
|| isA<slipFvPatchVectorField>(U_.boundaryField()[i])
|
||||
|| isA<partialSlipFvPatchVectorField>(U_.boundaryField()[i])
|
||||
)
|
||||
{
|
||||
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
phiPtr_.reset
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phiName,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::flux(U_),
|
||||
phiTypes
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
dPtr_ = diameterModel::New
|
||||
(
|
||||
phaseDict_,
|
||||
*this
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::phaseModel::~phaseModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
||||
{
|
||||
NotImplemented;
|
||||
return autoPtr<phaseModel>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Foam::phaseModel::correct()
|
||||
{
|
||||
// nuModel_->correct();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::phaseModel::read(const dictionary& phaseDict)
|
||||
{
|
||||
phaseDict_ = phaseDict;
|
||||
|
||||
// if (nuModel_->read(phaseDict_))
|
||||
{
|
||||
phaseDict_.lookup("nu") >> nu_.value();
|
||||
phaseDict_.lookup("kappa") >> kappa_.value();
|
||||
phaseDict_.lookup("Cp") >> Cp_.value();
|
||||
phaseDict_.lookup("rho") >> rho_.value();
|
||||
|
||||
return true;
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::phaseModel::correctInflowOutflow(surfaceScalarField& alphaPhi) const
|
||||
{
|
||||
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
|
||||
const volScalarField::Boundary& alphaBf = boundaryField();
|
||||
const surfaceScalarField::Boundary& phiBf = phi().boundaryField();
|
||||
|
||||
forAll(alphaPhiBf, patchi)
|
||||
{
|
||||
fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi];
|
||||
|
||||
if (!alphaPhip.coupled())
|
||||
{
|
||||
alphaPhip = phiBf[patchi]*alphaBf[patchi];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::phaseModel::d() const
|
||||
{
|
||||
return dPtr_().d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,233 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::phaseModel
|
||||
|
||||
SourceFiles
|
||||
phaseModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef phaseModel_H
|
||||
#define phaseModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "dictionaryEntry.H"
|
||||
#include "dimensionedScalar.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class diameterModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class phaseModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class phaseModel
|
||||
:
|
||||
public volScalarField
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Name of phase
|
||||
word name_;
|
||||
|
||||
dictionary phaseDict_;
|
||||
|
||||
//- Kinematic viscosity
|
||||
dimensionedScalar nu_;
|
||||
|
||||
//- Thermal conductivity
|
||||
dimensionedScalar kappa_;
|
||||
|
||||
//- Heat capacity
|
||||
dimensionedScalar Cp_;
|
||||
|
||||
//- Density
|
||||
dimensionedScalar rho_;
|
||||
|
||||
//- Velocity
|
||||
volVectorField U_;
|
||||
|
||||
//- Substantive derivative of the velocity
|
||||
volVectorField DDtU_;
|
||||
|
||||
//- Volumetric flux of the phase
|
||||
surfaceScalarField alphaPhi_;
|
||||
|
||||
//- Volumetric flux for the phase
|
||||
autoPtr<surfaceScalarField> phiPtr_;
|
||||
|
||||
//- Diameter model
|
||||
autoPtr<diameterModel> dPtr_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
phaseModel
|
||||
(
|
||||
const word& phaseName,
|
||||
const dictionary& phaseDict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<phaseModel> clone() const;
|
||||
|
||||
//- Return a pointer to a new phase created on freestore
|
||||
// from Istream
|
||||
class iNew
|
||||
{
|
||||
const fvMesh& mesh_;
|
||||
|
||||
public:
|
||||
|
||||
iNew
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{}
|
||||
|
||||
autoPtr<phaseModel> operator()(Istream& is) const
|
||||
{
|
||||
dictionaryEntry ent(dictionary::null, is);
|
||||
return autoPtr<phaseModel>
|
||||
(
|
||||
new phaseModel(ent.keyword(), ent, mesh_)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~phaseModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
const word& name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
const word& keyword() const
|
||||
{
|
||||
return name();
|
||||
}
|
||||
|
||||
tmp<volScalarField> d() const;
|
||||
|
||||
const dimensionedScalar& nu() const
|
||||
{
|
||||
return nu_;
|
||||
}
|
||||
|
||||
const dimensionedScalar& kappa() const
|
||||
{
|
||||
return kappa_;
|
||||
}
|
||||
|
||||
const dimensionedScalar& Cp() const
|
||||
{
|
||||
return Cp_;
|
||||
}
|
||||
|
||||
const dimensionedScalar& rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
const volVectorField& U() const
|
||||
{
|
||||
return U_;
|
||||
}
|
||||
|
||||
volVectorField& U()
|
||||
{
|
||||
return U_;
|
||||
}
|
||||
|
||||
const volVectorField& DDtU() const
|
||||
{
|
||||
return DDtU_;
|
||||
}
|
||||
|
||||
volVectorField& DDtU()
|
||||
{
|
||||
return DDtU_;
|
||||
}
|
||||
|
||||
const surfaceScalarField& phi() const
|
||||
{
|
||||
return phiPtr_();
|
||||
}
|
||||
|
||||
surfaceScalarField& phi()
|
||||
{
|
||||
return phiPtr_();
|
||||
}
|
||||
|
||||
const surfaceScalarField& alphaPhi() const
|
||||
{
|
||||
return alphaPhi_;
|
||||
}
|
||||
|
||||
surfaceScalarField& alphaPhi()
|
||||
{
|
||||
return alphaPhi_;
|
||||
}
|
||||
|
||||
//- Ensure that the flux at inflow/outflow BCs is preserved
|
||||
void correctInflowOutflow(surfaceScalarField& alphaPhi) const;
|
||||
|
||||
//- Correct the phase properties
|
||||
void correct();
|
||||
|
||||
//-Inherit read from volScalarField
|
||||
using volScalarField::read;
|
||||
|
||||
//- Read base transportProperties dictionary
|
||||
bool read(const dictionary& phaseDict);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,309 +0,0 @@
|
||||
{
|
||||
// rho1 = rho10 + psi1*p_rgh;
|
||||
// rho2 = rho20 + psi2*p_rgh;
|
||||
|
||||
// tmp<fvScalarMatrix> pEqnComp1;
|
||||
// tmp<fvScalarMatrix> pEqnComp2;
|
||||
|
||||
// // if (transonic)
|
||||
// //{
|
||||
// //}
|
||||
// // else
|
||||
// {
|
||||
// surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi1);
|
||||
// surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi2);
|
||||
|
||||
// pEqnComp1 =
|
||||
// fvc::ddt(rho1) + psi1*correction(fvm::ddt(p_rgh))
|
||||
// + fvc::div(phid1, p_rgh)
|
||||
// - fvc::Sp(fvc::div(phid1), p_rgh);
|
||||
|
||||
// pEqnComp2 =
|
||||
// fvc::ddt(rho2) + psi2*correction(fvm::ddt(p_rgh))
|
||||
// + fvc::div(phid2, p_rgh)
|
||||
// - fvc::Sp(fvc::div(phid2), p_rgh);
|
||||
// }
|
||||
|
||||
PtrList<surfaceScalarField> alphafs(fluid.phases().size());
|
||||
PtrList<volVectorField> HbyAs(fluid.phases().size());
|
||||
PtrList<surfaceScalarField> phiHbyAs(fluid.phases().size());
|
||||
PtrList<volScalarField> rAUs(fluid.phases().size());
|
||||
PtrList<surfaceScalarField> rAlphaAUfs(fluid.phases().size());
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
MRF.makeAbsolute(phase.phi().oldTime());
|
||||
MRF.makeAbsolute(phase.phi());
|
||||
|
||||
HbyAs.set(phasei, new volVectorField(phase.U()));
|
||||
phiHbyAs.set(phasei, new surfaceScalarField(1.0*phase.phi()));
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phiHbyA",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimArea*dimVelocity, 0)
|
||||
);
|
||||
|
||||
volScalarField rho("rho", fluid.rho());
|
||||
surfaceScalarField ghSnGradRho(ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
alphafs.set(phasei, fvc::interpolate(alpha).ptr());
|
||||
alphafs[phasei].rename("hmm" + alpha.name());
|
||||
|
||||
volScalarField dragCoeffi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dragCoeffi",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
fluid.dragCoeff(phase, dragCoeffs())/phase.rho(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
dragCoeffi.correctBoundaryConditions();
|
||||
|
||||
rAUs.set(phasei, (1.0/(UEqns[phasei].A() + dragCoeffi)).ptr());
|
||||
rAlphaAUfs.set
|
||||
(
|
||||
phasei,
|
||||
(
|
||||
alphafs[phasei]
|
||||
/fvc::interpolate(UEqns[phasei].A() + dragCoeffi)
|
||||
).ptr()
|
||||
);
|
||||
|
||||
HbyAs[phasei] = rAUs[phasei]*UEqns[phasei].H();
|
||||
|
||||
phiHbyAs[phasei] =
|
||||
(
|
||||
fvc::flux(HbyAs[phasei])
|
||||
+ MRF.zeroFilter
|
||||
(
|
||||
rAlphaAUfs[phasei]*fvc::ddtCorr(phase.U(), phase.phi())
|
||||
)
|
||||
);
|
||||
MRF.makeRelative(phiHbyAs[phasei]);
|
||||
MRF.makeRelative(phase.phi().oldTime());
|
||||
MRF.makeRelative(phase.phi());
|
||||
|
||||
phiHbyAs[phasei] +=
|
||||
rAlphaAUfs[phasei]
|
||||
*(
|
||||
fluid.surfaceTension(phase)*mesh.magSf()
|
||||
+ (phase.rho() - fvc::interpolate(rho))*(g & mesh.Sf())
|
||||
- ghSnGradRho
|
||||
)/phase.rho();
|
||||
|
||||
multiphaseSystem::dragModelTable::const_iterator dmIter =
|
||||
fluid.dragModels().begin();
|
||||
multiphaseSystem::dragCoeffFields::const_iterator dcIter =
|
||||
dragCoeffs().begin();
|
||||
for
|
||||
(
|
||||
;
|
||||
dmIter != fluid.dragModels().end() && dcIter != dragCoeffs().end();
|
||||
++dmIter, ++dcIter
|
||||
)
|
||||
{
|
||||
const phaseModel *phase2Ptr = nullptr;
|
||||
|
||||
if (&phase == &dmIter()->phase1())
|
||||
{
|
||||
phase2Ptr = &dmIter()->phase2();
|
||||
}
|
||||
else if (&phase == &dmIter()->phase2())
|
||||
{
|
||||
phase2Ptr = &dmIter()->phase1();
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
phiHbyAs[phasei] +=
|
||||
fvc::interpolate((*dcIter())/phase.rho())
|
||||
/fvc::interpolate(UEqns[phasei].A() + dragCoeffi)
|
||||
*phase2Ptr->phi();
|
||||
|
||||
HbyAs[phasei] +=
|
||||
(1.0/phase.rho())*rAUs[phasei]*(*dcIter())
|
||||
*phase2Ptr->U();
|
||||
|
||||
// Alternative flux-pressure consistent drag
|
||||
// but not momentum conservative
|
||||
//
|
||||
// HbyAs[phasei] += fvc::reconstruct
|
||||
// (
|
||||
// fvc::interpolate
|
||||
// (
|
||||
// (1.0/phase.rho())*rAUs[phasei]*(*dcIter())
|
||||
// )*phase2Ptr->phi()
|
||||
// );
|
||||
}
|
||||
|
||||
phiHbyA += alphafs[phasei]*phiHbyAs[phasei];
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
surfaceScalarField rAUf
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rAUf",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimensionSet(-1, 3, 1, 0, 0), 0)
|
||||
);
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
rAUf += mag(alphafs[phasei]*rAlphaAUfs[phasei])/phase.rho();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
// Update the fixedFluxPressure BCs to ensure flux consistency
|
||||
{
|
||||
surfaceScalarField::Boundary phib(phi.boundaryField());
|
||||
phib = 0;
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
phib +=
|
||||
alphafs[phasei].boundaryField()
|
||||
*(mesh.Sf().boundaryField() & phase.U().boundaryField());
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
setSnGrad<fixedFluxPressureFvPatchScalarField>
|
||||
(
|
||||
p_rgh.boundaryFieldRef(),
|
||||
(
|
||||
phiHbyA.boundaryField() - MRF.relative(phib)
|
||||
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
|
||||
);
|
||||
}
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqnIncomp
|
||||
(
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rAUf, p_rgh)
|
||||
);
|
||||
|
||||
pEqnIncomp.setReference(pRefCell, pRefValue);
|
||||
|
||||
solve
|
||||
(
|
||||
// (
|
||||
// (alpha1/rho1)*pEqnComp1()
|
||||
// + (alpha2/rho2)*pEqnComp2()
|
||||
// ) +
|
||||
pEqnIncomp
|
||||
);
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
surfaceScalarField mSfGradp("mSfGradp", pEqnIncomp.flux()/rAUf);
|
||||
|
||||
phasei = 0;
|
||||
phi = dimensionedScalar(phi.dimensions(), 0);
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
phase.phi() =
|
||||
phiHbyAs[phasei]
|
||||
+ rAlphaAUfs[phasei]*mSfGradp/phase.rho();
|
||||
phi +=
|
||||
alphafs[phasei]*phiHbyAs[phasei]
|
||||
+ mag(alphafs[phasei]*rAlphaAUfs[phasei])
|
||||
*mSfGradp/phase.rho();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
// dgdt =
|
||||
|
||||
// (
|
||||
// pos0(alpha2)*(pEqnComp2 & p)/rho2
|
||||
// - pos0(alpha1)*(pEqnComp1 & p)/rho1
|
||||
// );
|
||||
|
||||
p_rgh.relax();
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
mSfGradp = pEqnIncomp.flux()/rAUf;
|
||||
|
||||
U = dimensionedVector(dimVelocity, Zero);
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
phase.U() =
|
||||
HbyAs[phasei]
|
||||
+ fvc::reconstruct
|
||||
(
|
||||
rAlphaAUfs[phasei]
|
||||
*(
|
||||
(phase.rho() - fvc::interpolate(rho))
|
||||
*(g & mesh.Sf())
|
||||
- ghSnGradRho
|
||||
+ mSfGradp
|
||||
)
|
||||
)/phase.rho();
|
||||
|
||||
// phase.U() = fvc::reconstruct(phase.phi());
|
||||
phase.U().correctBoundaryConditions();
|
||||
|
||||
U += alpha*phase.U();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// p = max(p, pMin);
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// rho1 = rho10 + psi1*p_rgh;
|
||||
// rho2 = rho20 + psi2*p_rgh;
|
||||
|
||||
// Dp1Dt = fvc::DDt(phi1, p_rgh);
|
||||
// Dp2Dt = fvc::DDt(phi2, p_rgh);
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
{
|
||||
const scalarField& V = mesh.V();
|
||||
|
||||
forAll(mesh.cellZones(), czi)
|
||||
{
|
||||
const labelList& cellLabels = mesh.cellZones()[czi];
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
const volScalarField& alpha = iter();
|
||||
scalar phaseVolume = 0;
|
||||
|
||||
forAll(cellLabels, cli)
|
||||
{
|
||||
label celli = cellLabels[cli];
|
||||
phaseVolume += alpha[celli]*V[celli];
|
||||
}
|
||||
|
||||
reduce(phaseVolume, sumOp<scalar>());
|
||||
|
||||
Info<< alpha.name()
|
||||
<< " phase volume in zone " << mesh.cellZones()[czi].name()
|
||||
<< " = " << phaseVolume*1e6 << " ml " << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2621,31 +2621,6 @@ _mshToFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _mshToFoam_ mshToFoam
|
||||
|
||||
_multiphaseEulerFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listMomentumTransportModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _multiphaseEulerFoam_ multiphaseEulerFoam
|
||||
|
||||
_multiphaseInterFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5366,31 +5341,6 @@ _twoLiquidMixingFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _twoLiquidMixingFoam_ twoLiquidMixingFoam
|
||||
|
||||
_twoPhaseEulerFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _twoPhaseEulerFoam_ twoPhaseEulerFoam
|
||||
|
||||
_uncoupledKinematicParcelDyMFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
phi phi.air;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -1,45 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 350;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
phi phi.water;
|
||||
inletValue uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Theta;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1.0e-7;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1.0e-7;
|
||||
value uniform 1.0e-7;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
class volVectorField;
|
||||
object U.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0.1 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
phi phi.air;
|
||||
value $internalField;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
class volVectorField;
|
||||
object U.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
phi phi.water;
|
||||
value $internalField;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphaair;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.5;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
phi phi.air;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.5;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
phi phi.water;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,39 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,22 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,21 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object momentumTransport;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,94 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases
|
||||
(
|
||||
air
|
||||
{
|
||||
rho 1;
|
||||
nu 1.6e-05;
|
||||
kappa 0;
|
||||
Cp 0;
|
||||
|
||||
diameterModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
d 3e-3;
|
||||
}
|
||||
}
|
||||
|
||||
water
|
||||
{
|
||||
rho 1000;
|
||||
nu 1e-06;
|
||||
kappa 0;
|
||||
Cp 0;
|
||||
|
||||
diameterModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
d 1e-4;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
sigmas
|
||||
(
|
||||
);
|
||||
|
||||
interfaceCompression
|
||||
(
|
||||
);
|
||||
|
||||
virtualMass
|
||||
(
|
||||
(air water) 0.5
|
||||
);
|
||||
|
||||
drag
|
||||
(
|
||||
(air water)
|
||||
{
|
||||
type blended;
|
||||
|
||||
air
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
water
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// This is a dummy to support the Smagorinsky model
|
||||
transportModel Newtonian;
|
||||
nu [0 2 -1 0 0 0 0] 0;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,61 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(0.15 0 0)
|
||||
(0.15 1 0)
|
||||
(0 1 0)
|
||||
(0 0 0.1)
|
||||
(0.15 0 0.1)
|
||||
(0.15 1 0.1)
|
||||
(0 1 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (25 75 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch inlet
|
||||
(
|
||||
(1 5 4 0)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(3 7 6 2)
|
||||
)
|
||||
wall walls
|
||||
(
|
||||
(0 4 7 3)
|
||||
(2 6 5 1)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,60 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application multiphaseEulerFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 0.5;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
{
|
||||
#includeFunc fieldAverage(U.air, U.water, alpha.air, p)
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
"div\(phi,alpha.*\)" Gauss vanLeer;
|
||||
"div\(phir,alpha.*,alpha.*\)" Gauss vanLeer;
|
||||
|
||||
"div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1;
|
||||
div(Rc) Gauss linear;
|
||||
"div\(phi.*,U.*\)" Gauss limitedLinearV 1;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,106 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"alpha.*"
|
||||
{
|
||||
nAlphaSubCycles 2;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
smoother DIC;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-9;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"pcorr.*"
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"U.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"T.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"Theta.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"k.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"epsilon.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
"U.*" 1;
|
||||
"T.*" 1;
|
||||
"alpha.*" 1;
|
||||
"Theta.*" 1;
|
||||
"k.*" 1;
|
||||
"epsilon.*" 1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,38 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.air 1
|
||||
volScalarFieldValue alpha.water 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 -0.1) (0.15 0.701 0.1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.air 0
|
||||
volScalarFieldValue alpha.water 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U.mercury;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U.oil;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object Uwater;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,79 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alpha.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
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
|
||||
);
|
||||
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
|
||||
);
|
||||
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
|
||||
);
|
||||
value uniform 0;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,49 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alpha.mercury;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,49 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alpha.oil;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,49 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alpha.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
rightWall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type totalPressure;
|
||||
p0 uniform 0;
|
||||
U U.air;
|
||||
phi phi.air;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanVoFCase
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application=$(getApplication)
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,22 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,21 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object momentumTransport;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,21 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object motionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
movingFvMesh staticFvMesh;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,236 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases
|
||||
(
|
||||
water
|
||||
{
|
||||
nu 1e-06;
|
||||
kappa 1e-06;
|
||||
Cp 4195;
|
||||
rho 1000;
|
||||
|
||||
diameterModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
d 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
oil
|
||||
{
|
||||
nu 1e-06;
|
||||
kappa 1e-06;
|
||||
Cp 4195;
|
||||
rho 500;
|
||||
|
||||
diameterModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
d 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
mercury
|
||||
{
|
||||
nu 1.125e-07;
|
||||
kappa 1e-06;
|
||||
Cp 4195;
|
||||
rho 13529;
|
||||
|
||||
diameterModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
d 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
air
|
||||
{
|
||||
nu 1.48e-05;
|
||||
kappa 2.63e-2;
|
||||
Cp 1007;
|
||||
rho 1;
|
||||
|
||||
diameterModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
d 3e-3;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
sigmas
|
||||
(
|
||||
(air water) 0.07
|
||||
(air oil) 0.07
|
||||
(air mercury) 0.07
|
||||
);
|
||||
|
||||
interfaceCompression
|
||||
(
|
||||
(air water) 1
|
||||
(air oil) 1
|
||||
(air mercury) 1
|
||||
);
|
||||
|
||||
virtualMass
|
||||
(
|
||||
);
|
||||
|
||||
drag
|
||||
(
|
||||
(air water)
|
||||
{
|
||||
type blended;
|
||||
|
||||
air
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
water
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
|
||||
(air oil)
|
||||
{
|
||||
type blended;
|
||||
|
||||
air
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
oil
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
|
||||
(air mercury)
|
||||
{
|
||||
type blended;
|
||||
|
||||
air
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
mercury
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
|
||||
(water oil)
|
||||
{
|
||||
type blended;
|
||||
|
||||
water
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
oil
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
|
||||
(water mercury)
|
||||
{
|
||||
type blended;
|
||||
|
||||
water
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
mercury
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
|
||||
(oil mercury)
|
||||
{
|
||||
type blended;
|
||||
|
||||
oil
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
mercury
|
||||
{
|
||||
type SchillerNaumann;
|
||||
residualPhaseFraction 0;
|
||||
residualSlip 0;
|
||||
}
|
||||
|
||||
residualPhaseFraction 1e-3;
|
||||
residualSlip 1e-3;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// This is a dummy to support the Smagorinsky model
|
||||
transportModel Newtonian;
|
||||
nu [0 2 -1 0 0 0 0] 0;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,108 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.146;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(2 0 0)
|
||||
(2.16438 0 0)
|
||||
(4 0 0)
|
||||
(0 0.32876 0)
|
||||
(2 0.32876 0)
|
||||
(2.16438 0.32876 0)
|
||||
(4 0.32876 0)
|
||||
(0 4 0)
|
||||
(2 4 0)
|
||||
(2.16438 4 0)
|
||||
(4 4 0)
|
||||
(0 0 0.1)
|
||||
(2 0 0.1)
|
||||
(2.16438 0 0.1)
|
||||
(4 0 0.1)
|
||||
(0 0.32876 0.1)
|
||||
(2 0.32876 0.1)
|
||||
(2.16438 0.32876 0.1)
|
||||
(4 0.32876 0.1)
|
||||
(0 4 0.1)
|
||||
(2 4 0.1)
|
||||
(2.16438 4 0.1)
|
||||
(4 4 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1)
|
||||
hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1)
|
||||
hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1)
|
||||
hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1)
|
||||
hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
leftWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 12 16 4)
|
||||
(4 16 20 8)
|
||||
);
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(7 19 15 3)
|
||||
(11 23 19 7)
|
||||
);
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 13 12)
|
||||
(1 5 17 13)
|
||||
(5 6 18 17)
|
||||
(2 14 18 6)
|
||||
(2 3 15 14)
|
||||
);
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(8 20 21 9)
|
||||
(9 21 22 10)
|
||||
(10 22 23 11)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application multiphaseEulerFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 6;
|
||||
|
||||
deltaT 0.001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.01;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat binary;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.5;
|
||||
maxAlphaCo 0.5;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,45 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method simple;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (1 1 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots ( );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,53 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
"div\(phi,alpha.*\)" Gauss vanLeer;
|
||||
"div\(phir,alpha.*,alpha.*\)" Gauss vanLeer;
|
||||
|
||||
"div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1;
|
||||
div(Rc) Gauss linear;
|
||||
"div\(phi.*,U.*\)" Gauss limitedLinearV 1;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,84 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"alpha.*"
|
||||
{
|
||||
nAlphaSubCycles 3;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.05;
|
||||
smoother GaussSeidel;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
{
|
||||
preconditioner GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
nVcycles 2;
|
||||
smoother GaussSeidel;
|
||||
}
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
maxIter 20;
|
||||
}
|
||||
|
||||
"pcorr.*"
|
||||
{
|
||||
$p_rghFinal;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
nSweeps 1;
|
||||
}
|
||||
|
||||
UFinal
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
"U.*" 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,64 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.air 1
|
||||
volScalarFieldValue alpha.water 0
|
||||
volScalarFieldValue alpha.oil 0
|
||||
volScalarFieldValue alpha.mercury 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 -1) (0.1461 0.292 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 1
|
||||
volScalarFieldValue alpha.oil 0
|
||||
volScalarFieldValue alpha.mercury 0
|
||||
volScalarFieldValue alpha.air 0
|
||||
);
|
||||
}
|
||||
boxToCell
|
||||
{
|
||||
box (0.1461 0 -1) (0.2922 0.292 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 0
|
||||
volScalarFieldValue alpha.oil 1
|
||||
volScalarFieldValue alpha.mercury 0
|
||||
volScalarFieldValue alpha.air 0
|
||||
);
|
||||
}
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 -1) (0.1461 0.1 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 0
|
||||
volScalarFieldValue alpha.oil 0
|
||||
volScalarFieldValue alpha.mercury 1
|
||||
volScalarFieldValue alpha.air 0
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
leftWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type fluxCorrectedVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user