mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: compressibleInterPhaseTransportFoam: New variant of compressibleInterFoam supporting separate phase stress models
In this version of compressibleInterFoam separate stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each of the two phases allowing for completely different modeling for the phases. e.g. in the climbingRod tutorial case provided a Newtonian laminar model is instantiated for the air and a Maxwell non-Newtonian model is instantiated for the viscoelastic liquid. To stabilize the Maxwell model in regions where the liquid phase-fraction is 0 the new symmTensorPhaseLimitStabilization fvOption is applied. Other phase stress modeling combinations are also possible, e.g. the air may be turbulent but the liquid laminar and an RAS or LES model applied to the air only. However, to stabilize this combination a suitable fvOption would need to be applied to the turbulence properties where the air phase-fraction is 0. Henry G. Weller, Chris Greenshields CFD Direct Ltd.
This commit is contained in:
committed by
Andrew Heather
parent
d43c3438fe
commit
dbc111e6ee
@ -10,5 +10,6 @@ wmake $targetType surfaceTensionModels
|
||||
wmake $targetType
|
||||
wmake $targetType compressibleInterDyMFoam
|
||||
wmake $targetType compressibleInterFilmFoam
|
||||
compressibleInterPhaseTransportFoam/Allwmake $targetType $*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wclean libso VoFphaseCompressibleTurbulenceModels
|
||||
wclean
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
wmake $targetType VoFphaseCompressibleTurbulenceModels
|
||||
wmake $targetType
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,3 @@
|
||||
compressibleInterPhaseTransportFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/compressibleInterPhaseTransportFoam
|
||||
@ -0,0 +1,31 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I$(FOAM_SOLVERS)/multiphase/VoF \
|
||||
-I$(FOAM_SOLVERS)/multiphase/compressibleInterFoam/twoPhaseMixtureThermo \
|
||||
-I$(FOAM_SOLVERS)/multiphase/compressibleInterFoam \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-IVoFphaseCompressibleTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-ltwoPhaseSurfaceTension \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-ltwoPhaseMixture \
|
||||
-ltwoPhaseProperties \
|
||||
-linterfaceProperties \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lVoFphaseCompressibleTurbulenceModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools
|
||||
@ -0,0 +1,37 @@
|
||||
{
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(rho, T) + fvm::div(rhoPhi, T)
|
||||
- fvm::Sp(contErr, T)
|
||||
- fvm::laplacian
|
||||
(
|
||||
mixture.alphaEff
|
||||
(
|
||||
alpha1*turbulence1->mut()
|
||||
+ alpha2*turbulence2->mut()
|
||||
),
|
||||
T
|
||||
)
|
||||
+ (
|
||||
fvc::div(fvc::absolute(phi, U), p)
|
||||
+ fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
|
||||
)
|
||||
*(
|
||||
alpha1/mixture.thermo1().Cv()
|
||||
+ alpha2/mixture.thermo2().Cv()
|
||||
)
|
||||
==
|
||||
fvOptions(rho, T)
|
||||
);
|
||||
|
||||
TEqn.relax();
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
|
||||
TEqn.solve();
|
||||
|
||||
fvOptions.correct(T);
|
||||
|
||||
mixture.correctThermo();
|
||||
mixture.correct();
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
||||
- fvm::Sp(contErr, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence1->divDevRhoReff(U)
|
||||
+ turbulence2->divDevRhoReff(U)
|
||||
==
|
||||
fvOptions(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
(
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
- fvc::snGrad(p_rgh)
|
||||
) * mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
fvOptions.correct(U);
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
VoFphaseCompressibleTurbulenceModels.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libVoFphaseCompressibleTurbulenceModels
|
||||
@ -0,0 +1,20 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools
|
||||
@ -0,0 +1,52 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 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/>.
|
||||
|
||||
Typedef
|
||||
Foam::VoFphaseCompressibleTurbulenceModel
|
||||
|
||||
Description
|
||||
Typedef for VoFphaseCompressibleTurbulenceModel
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef VoFphaseCompressibleTurbulenceModel_H
|
||||
#define VoFphaseCompressibleTurbulenceModel_H
|
||||
|
||||
#include "VoFphaseCompressibleTurbulenceModelFwd.H"
|
||||
#include "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "ThermalDiffusivity.H"
|
||||
#include "fluidThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
|
||||
VoFphaseCompressibleTurbulenceModel;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,55 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 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/>.
|
||||
|
||||
Typedef
|
||||
Foam::VoFphaseCompressibleTurbulenceModel
|
||||
|
||||
Description
|
||||
Forward declaration of typedef for VoFphaseCompressibleTurbulenceModel
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef VoFphaseCompressibleTurbulenceModelFwd_H
|
||||
#define VoFphaseCompressibleTurbulenceModelFwd_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
class fluidThermo;
|
||||
|
||||
template<class TransportModel>
|
||||
class PhaseCompressibleTurbulenceModel;
|
||||
|
||||
template<class BasicTurbulenceModel>
|
||||
class ThermalDiffusivity;
|
||||
|
||||
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
|
||||
VoFphaseCompressibleTurbulenceModel;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,90 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 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 "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "makeTurbulenceModel.H"
|
||||
|
||||
#include "ThermalDiffusivity.H"
|
||||
#include "EddyDiffusivity.H"
|
||||
|
||||
#include "laminarModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeTurbulenceModelTypes
|
||||
(
|
||||
volScalarField,
|
||||
volScalarField,
|
||||
compressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
ThermalDiffusivity,
|
||||
fluidThermo
|
||||
);
|
||||
|
||||
makeBaseTurbulenceModel
|
||||
(
|
||||
volScalarField,
|
||||
volScalarField,
|
||||
compressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
ThermalDiffusivity,
|
||||
fluidThermo
|
||||
);
|
||||
|
||||
#define makeLaminarModel(Type) \
|
||||
makeTemplatedLaminarModel \
|
||||
(fluidThermoPhaseCompressibleTurbulenceModel, laminar, Type)
|
||||
|
||||
#define makeRASModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(fluidThermoPhaseCompressibleTurbulenceModel, RAS, Type)
|
||||
|
||||
#define makeLESModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(fluidThermoPhaseCompressibleTurbulenceModel, LES, Type)
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
#include "Maxwell.H"
|
||||
makeLaminarModel(Maxwell);
|
||||
|
||||
#include "kEpsilon.H"
|
||||
makeRASModel(kEpsilon);
|
||||
|
||||
#include "kOmegaSST.H"
|
||||
makeRASModel(kOmegaSST);
|
||||
|
||||
#include "Smagorinsky.H"
|
||||
makeLESModel(Smagorinsky);
|
||||
|
||||
#include "kEqn.H"
|
||||
makeLESModel(kEqn);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,180 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 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
|
||||
compressibleInterPhaseTransportFoam
|
||||
|
||||
Description
|
||||
Solver for 2 compressible, non-isothermal immiscible fluids using a VOF
|
||||
(volume of fluid) phase-fraction based interface capturing approach.
|
||||
|
||||
The momentum and other fluid properties are of the "mixture" and a single
|
||||
momentum equation is solved.
|
||||
|
||||
The fluid stress modelling is generic Euler-Euler two-phase in which
|
||||
separate laminar, RAS or LES are selected for each of the phases.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "CMULES.H"
|
||||
#include "EulerDdtScheme.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "subCycle.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "twoPhaseMixtureThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fvcSmooth.H"
|
||||
#include "VoFphaseCompressibleTurbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "createFields.H"
|
||||
#include "createAlphaFluxes.H"
|
||||
|
||||
volScalarField& p = mixture.p();
|
||||
volScalarField& T = mixture.T();
|
||||
const volScalarField& psi1 = mixture.thermo1().psi();
|
||||
const volScalarField& psi2 = mixture.thermo2().psi();
|
||||
|
||||
|
||||
surfaceScalarField alphaRhoPhi1
|
||||
(
|
||||
IOobject::groupName("alphaRhoPhi", alpha1.group()),
|
||||
fvc::interpolate(rho1)*alphaPhi10
|
||||
);
|
||||
|
||||
autoPtr<PhaseCompressibleTurbulenceModel<fluidThermo>> turbulence1
|
||||
(
|
||||
PhaseCompressibleTurbulenceModel<fluidThermo>::New
|
||||
(
|
||||
alpha1,
|
||||
rho1,
|
||||
U,
|
||||
alphaRhoPhi1,
|
||||
phi,
|
||||
mixture.thermo1()
|
||||
)
|
||||
);
|
||||
|
||||
surfaceScalarField alphaRhoPhi2
|
||||
(
|
||||
IOobject::groupName("alphaRhoPhi", alpha2.group()),
|
||||
fvc::interpolate(rho2)*(phi - alphaPhi10)
|
||||
);
|
||||
|
||||
autoPtr<PhaseCompressibleTurbulenceModel<fluidThermo>> turbulence2
|
||||
(
|
||||
PhaseCompressibleTurbulenceModel<fluidThermo>::New
|
||||
(
|
||||
alpha2,
|
||||
rho2,
|
||||
U,
|
||||
alphaRhoPhi2,
|
||||
phi,
|
||||
mixture.thermo2()
|
||||
)
|
||||
);
|
||||
|
||||
if (!LTS)
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
#include "setRDeltaT.H"
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "CourantNo.H"
|
||||
#include "alphaCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "alphaControls.H"
|
||||
#include "compressibleAlphaEqnSubCycle.H"
|
||||
|
||||
alphaRhoPhi1 = fvc::interpolate(rho1)*alphaPhi10;
|
||||
alphaRhoPhi2 = fvc::interpolate(rho2)*(phi - alphaPhi10);
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "TEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence1->correct();
|
||||
turbulence2->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< runTime.elapsedCpuTime()
|
||||
<< " s\n\n" << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,96 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Reading field p_rgh\n" << endl;
|
||||
volScalarField p_rgh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p_rgh",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
|
||||
twoPhaseMixtureThermo mixture(U, phi);
|
||||
|
||||
volScalarField& alpha1(mixture.alpha1());
|
||||
volScalarField& alpha2(mixture.alpha2());
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
const volScalarField& rho1 = mixture.thermo1().rho();
|
||||
const volScalarField& rho2 = mixture.thermo2().rho();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
alpha1*rho1 + alpha2*rho2
|
||||
);
|
||||
|
||||
|
||||
dimensionedScalar pMin
|
||||
(
|
||||
"pMin",
|
||||
dimPressure,
|
||||
mixture
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readhRef.H"
|
||||
#include "gh.H"
|
||||
|
||||
|
||||
// Mass flux
|
||||
// Initialisation does not matter because rhoPhi is reset after the
|
||||
// alpha1 solution before it is used in the U equation.
|
||||
surfaceScalarField rhoPhi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rhoPhi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
fvc::interpolate(rho)*phi
|
||||
);
|
||||
|
||||
volScalarField dgdt(alpha1*fvc::div(phi));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ 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
|
||||
{
|
||||
rod
|
||||
{
|
||||
type rotatingWallVelocity;
|
||||
axis (0 1 0);
|
||||
origin (0 0 0);
|
||||
omega constant 13.2; // 2.1 rev/s
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
vessel
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.liquid;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type totalPressure;
|
||||
p0 $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object sigma.liquid;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0 0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0 2> /dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
18
tutorials/multiphase/compressibleInterPhaseTransportFoam/climbingRod/Allrun
Executable file
18
tutorials/multiphase/compressibleInterPhaseTransportFoam/climbingRod/Allrun
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication extrudeMesh
|
||||
|
||||
rm -rf 0 2> /dev/null
|
||||
cp -r 0.orig 0
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,40 @@
|
||||
Reference:
|
||||
|
||||
Figueiredo, R. A., Oishi, C. M., Afonso, A. M., Tasso, I. V. M., &
|
||||
Cuminato, J. A. (2016).
|
||||
A two-phase solver for complex fluids: Studies of the Weissenberg effect.
|
||||
International Journal of Multiphase Flow, 84, 98-115.
|
||||
|
||||
In compressibleInterPhaseTransportFoam, separate stress models
|
||||
(laminar, non-Newtonian, LES or RAS) are instantiated for each of the
|
||||
two phases allowing for different modeling for the phases.
|
||||
|
||||
This example case uses:
|
||||
- phases "air" and "liquid"
|
||||
- air phase
|
||||
- constant/turbulenceProperties.air:
|
||||
- stress model set to laminar, Newtonian
|
||||
- constant/thermophysicalProperties.air:
|
||||
- transport set to const (Newtonian)
|
||||
- mu (dynamic viscoity) = 1.84e-5
|
||||
- liquid phase
|
||||
- constant/turbulenceProperties.liquid:
|
||||
- stress model set to laminar, Maxwell non-Newtonian
|
||||
- nuM (kinematic viscosity) = 0.01476
|
||||
- lambda = 0.018225
|
||||
- constant/thermophysicalProperties.liquid
|
||||
- transport set to const (Newtonian)
|
||||
- mu (dynamic viscoity) = 1.46
|
||||
|
||||
Liquid phase properties were calculated from the relations given in the paper:
|
||||
- rho = 890 kg/m^3
|
||||
- mu = mu_{s} + mu_{p} = 146 poise = 14.6 Pa.s
|
||||
s = solvent (Newtonian), p = polymer (Maxwell)
|
||||
- mu_{s}/mu_{p} = 1/9
|
||||
|
||||
=> mu_{s} = 14.6/10 = 1.46 Pa.s
|
||||
=> nu_{p} = nuM = (9/10)*14.6/890 = 0.01476 m^2/s
|
||||
|
||||
compressibleInterPhaseTransportFoam solves the energy equation, despite not
|
||||
being needed in this example. The case is simply initialised at a uniform
|
||||
temperature of 300K throughout the domain and at the atmosphere boundary.
|
||||
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object fvOptions;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
stabilization
|
||||
{
|
||||
type symmTensorPhaseLimitStabilization;
|
||||
|
||||
field sigma.liquid;
|
||||
rate rLambda.liquid;
|
||||
residualAlpha 1e-3;
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ 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);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (liquid air);
|
||||
|
||||
pMin 10000;
|
||||
|
||||
sigma 0.0309;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.9;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 1.2;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.84e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 18.0;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 890;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 4195;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.46;
|
||||
Pr 2.289;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
laminar
|
||||
{
|
||||
laminarModel Maxwell;
|
||||
|
||||
nuM 0.01476;
|
||||
lambda 0.018225;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,114 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
// H 77;
|
||||
R 6.35;
|
||||
Rc 152.25;
|
||||
hTotal 110;
|
||||
|
||||
rCells 80;
|
||||
hCells 80;
|
||||
|
||||
rGrading
|
||||
(
|
||||
(0.1 1 1)
|
||||
(0.9 2.25 10)
|
||||
);
|
||||
|
||||
hGrading
|
||||
(
|
||||
(0.65 2 0.1)
|
||||
(0.2 2.4 1)
|
||||
(0.15 1.2 2)
|
||||
);
|
||||
|
||||
vertices
|
||||
(
|
||||
($R 0 -1)
|
||||
($Rc 0 -1)
|
||||
($R $hTotal -1)
|
||||
($Rc $hTotal -1)
|
||||
|
||||
($R 0 0)
|
||||
($Rc 0 0)
|
||||
($R $hTotal 0)
|
||||
($Rc $hTotal 0)
|
||||
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 3 2 4 5 7 6)
|
||||
($rCells $hCells 1)
|
||||
simpleGrading ($rGrading $hGrading 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
rod
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 2 6 4)
|
||||
);
|
||||
}
|
||||
vessel
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 3 7 5)
|
||||
(0 1 5 4)
|
||||
);
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3 7 6)
|
||||
);
|
||||
}
|
||||
back
|
||||
{
|
||||
type symmetry;
|
||||
faces
|
||||
(
|
||||
(0 2 3 1)
|
||||
);
|
||||
}
|
||||
front
|
||||
{
|
||||
type symmetry;
|
||||
faces
|
||||
(
|
||||
(4 5 7 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,56 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application compressibleInterPhaseTransportFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 25;
|
||||
|
||||
deltaT 1e-3;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.5;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 1;
|
||||
maxAlphaCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
constructFrom patch;
|
||||
sourceCase "$FOAM_CASE";
|
||||
|
||||
sourcePatches (front);
|
||||
exposedPatchName back;
|
||||
|
||||
extrudeModel wedge;
|
||||
|
||||
sectorCoeffs
|
||||
{
|
||||
axisPt (0 0 0);
|
||||
axis (0 -1 0);
|
||||
angle 1;
|
||||
}
|
||||
|
||||
flipNormals false;
|
||||
mergeFaces false;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -0,0 +1,65 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(rhoPhi,U) Gauss linearUpwindV grad(U);
|
||||
div(rhoPhi,T) Gauss linearUpwind grad(T);
|
||||
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
|
||||
div(phi,p) Gauss upwind;
|
||||
div(rhoPhi,K) Gauss upwind;
|
||||
|
||||
div(alphaRhoPhi.liquid,sigma.liquid) Gauss linearUpwind grad(sigma);
|
||||
|
||||
div(((alpha.liquid*thermo:rho.liquid)*sigma.liquid)) Gauss linear;
|
||||
div((((alpha.liquid*thermo:rho.liquid)*nuM)*grad(U))) Gauss linear;
|
||||
div((((alpha.liquid*thermo:rho.liquid)*(thermo:mu.liquid|thermo:rho.liquid))*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
div((((alpha.air*thermo:rho.air)*nuEff.air)*dev2(T(grad(U))))) Gauss linear;
|
||||
div((((alpha.liquid*thermo:rho.liquid)*nuEff.liquid)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,91 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"alpha.liquid.*"
|
||||
{
|
||||
nAlphaCorr 2;
|
||||
nAlphaSubCycles 1;
|
||||
cAlpha 1;
|
||||
|
||||
MULESCorr yes;
|
||||
nLimiterIter 5;
|
||||
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"pcorr.*"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-9;
|
||||
relTol 0.05;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"U.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(T|k|B|nuTilda|sigma).*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,36 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.liquid 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 -1) (1 0.0771 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.liquid 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user