mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: new solvers: overCompressibleInterDyMFoam and overInterPhaseChangeDyMFoam
- overCompressibleInterDyMFoam: Overset solver for two compressible, non-isothermal, immiscible fluids using a VOF (i.e. volume of fluid) phase-fraction based interface capturing approach. - overInterPhaseChangeDyMFoam: Overset solver for two incompressible, isothermal, immiscible fluids with phase-change (e.g. cavitation) using VoF (i.e. volume of fluid) phase-fraction based interface capturing approach. - adds new tutorials: - multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors - multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
This commit is contained in:
@ -11,5 +11,6 @@ wmake $targetType
|
||||
wmake $targetType compressibleInterDyMFoam
|
||||
wmake $targetType compressibleInterFilmFoam
|
||||
wmake $targetType compressibleInterIsoFoam
|
||||
wmake $targetType overCompressibleInterDyMFoam
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
overCompressibleInterDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overCompressibleInterDyMFoam
|
||||
@ -0,0 +1,40 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../../VoF \
|
||||
-I../../interFoam/overInterDyMFoam \
|
||||
-I../twoPhaseMixtureThermo \
|
||||
-I../VoFphaseCompressibleTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-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 \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/incompressible/pimpleFoam/overPimpleDyMFoam \
|
||||
-I$(LIB_SRC)/overset/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-ltwoPhaseSurfaceTension \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-ltwoPhaseMixture \
|
||||
-ltwoPhaseProperties \
|
||||
-linterfaceProperties \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lVoFphaseCompressibleTurbulenceModels \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-loverset \
|
||||
-lwaveModels
|
||||
@ -0,0 +1,28 @@
|
||||
{
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T)
|
||||
- fvm::laplacian(turbulence.alphaEff(), T)
|
||||
+ (
|
||||
divUp()// - contErr/rho*p
|
||||
+ (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))() - contErr*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,36 @@
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
||||
- fvm::Sp(contErr, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence.divDevRhoReff(U)
|
||||
==
|
||||
fvOptions(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
cellMask*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,43 @@
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Sp",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dgdt.dimensions(), Zero)
|
||||
);
|
||||
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Su",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dgdt.dimensions(), Zero)
|
||||
);
|
||||
|
||||
forAll(dgdt, celli)
|
||||
{
|
||||
if (dgdt[celli] > 0.0)
|
||||
{
|
||||
Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
|
||||
Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
|
||||
}
|
||||
else if (dgdt[celli] < 0.0)
|
||||
{
|
||||
Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField::Internal divU
|
||||
(
|
||||
mesh.moving()
|
||||
? fvc::div(phi + mesh.phi())
|
||||
: fvc::div(phi)
|
||||
);
|
||||
@ -0,0 +1,138 @@
|
||||
#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));
|
||||
|
||||
#include "createAlphaFluxes.H"
|
||||
|
||||
// Construct compressible turbulence model
|
||||
compressibleInterPhaseTransportModel turbulence
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
rhoPhi,
|
||||
alphaPhi10,
|
||||
mixture
|
||||
);
|
||||
|
||||
#include "createK.H"
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
|
||||
nonInt.insert("HbyA");
|
||||
nonInt.insert("grad(p_rgh)");
|
||||
nonInt.insert("nHat");
|
||||
nonInt.insert("surfaceIntegrate(phi)");
|
||||
nonInt.insert("surfaceIntegrate(phiHbyA)");
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("cellDisplacement");
|
||||
nonInt.insert("interpolatedCells");
|
||||
nonInt.insert("cellInterpolationWeight");
|
||||
nonInt.insert("pcorr");
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
||||
|
||||
surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
|
||||
// Create bool field with interpolated cells
|
||||
#include "createInterpolatedCells.H"
|
||||
@ -0,0 +1,240 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
overCompressibleInterDyMFoam
|
||||
|
||||
Group
|
||||
grpMultiphaseSolvers
|
||||
|
||||
Description
|
||||
Solver for two compressible, non-isothermal, immiscible fluids using VOF
|
||||
(i.e. volume of fluid) phase-fraction based interface capturing approach.
|
||||
|
||||
This solver supports dynamic mesh motions including overset cases.
|
||||
|
||||
The momentum and other fluid properties are of the "mixture" and a single
|
||||
momentum equation is solved.
|
||||
|
||||
Either mixture or two-phase transport modelling may be selected. In the
|
||||
mixture approach, a single laminar, RAS or LES model is selected to model
|
||||
the momentum stress. In the Euler-Euler two-phase approach separate
|
||||
laminar, RAS or LES selected models are selected for each of the phases.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "CMULES.H"
|
||||
#include "EulerDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "subCycle.H"
|
||||
#include "compressibleInterPhaseTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fvcSmooth.H"
|
||||
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "localMin.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
#include "transform.H"
|
||||
#include "fvMeshSubset.H"
|
||||
#include "oversetAdjustPhi.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for two compressible, non-isothermal, immiscible fluids"
|
||||
" using VOF phase-fraction based interface capturing approach.\n"
|
||||
"Supports dynamic mesh motions including overset cases."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createTimeControls.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "createFields.H"
|
||||
|
||||
volScalarField& p = mixture.p();
|
||||
volScalarField& T = mixture.T();
|
||||
const volScalarField& psi1 = mixture.thermo1().psi();
|
||||
const volScalarField& psi2 = mixture.thermo2().psi();
|
||||
|
||||
#include "correctPhi.H"
|
||||
#include "createUf.H"
|
||||
|
||||
if (!LTS)
|
||||
{
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
}
|
||||
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readControls.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())
|
||||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
Info<< "Execution time for mesh.update() = "
|
||||
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
||||
<< " s" << endl;
|
||||
|
||||
// Do not apply previous time-step mesh compression flux
|
||||
// if the mesh topology changed
|
||||
if (mesh.topoChanging())
|
||||
{
|
||||
talphaPhi1Corr0.clear();
|
||||
}
|
||||
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
// Update cellMask field for blocking out hole cells
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
|
||||
faceMask =
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime());
|
||||
|
||||
// Zero Uf on old faceMask (H-I)
|
||||
Uf *= faceMask;
|
||||
|
||||
const surfaceVectorField Uint(fvc::interpolate(U));
|
||||
// Update Uf and phi on new C-I faces
|
||||
Uf += (1-faceMask)*Uint;
|
||||
|
||||
// Update Uf boundary
|
||||
forAll(Uf.boundaryField(), patchI)
|
||||
{
|
||||
Uf.boundaryFieldRef()[patchI] =
|
||||
Uint.boundaryField()[patchI];
|
||||
}
|
||||
|
||||
phi = mesh.Sf() & Uf;
|
||||
|
||||
// Correct phi on individual regions
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
mixture.correct();
|
||||
|
||||
// Zero phi on current H-I
|
||||
faceMask = localMin<scalar>(mesh).interpolate(cellMask);
|
||||
|
||||
phi *= faceMask;
|
||||
U *= cellMask;
|
||||
|
||||
// Make the flux relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
}
|
||||
|
||||
if (mesh.changing() && checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
#include "alphaControls.H"
|
||||
#include "compressibleAlphaEqnSubCycle.H"
|
||||
|
||||
const surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
rhoPhi *= faceMask;
|
||||
|
||||
turbulence.correctPhasePhi();
|
||||
|
||||
#include "UEqn.H"
|
||||
volScalarField divUp("divUp", fvc::div(fvc::absolute(phi, U), p));
|
||||
#include "TEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence.correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,177 @@
|
||||
{
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
|
||||
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
if (ddtCorr)
|
||||
{
|
||||
surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
phiHbyA +=
|
||||
MRF.zeroFilter
|
||||
(
|
||||
fvc::interpolate(rho*rAU)*faceMaskOld*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
}
|
||||
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
surfaceScalarField phig
|
||||
(
|
||||
(
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*faceMask*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
|
||||
|
||||
tmp<fvScalarMatrix> p_rghEqnComp1;
|
||||
tmp<fvScalarMatrix> p_rghEqnComp2;
|
||||
|
||||
if (pimple.transonic())
|
||||
{
|
||||
#include "rhofs.H"
|
||||
|
||||
surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi);
|
||||
surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi);
|
||||
|
||||
p_rghEqnComp1 =
|
||||
pos(alpha1)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f)
|
||||
- (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
|
||||
)/rho1
|
||||
- fvc::ddt(alpha1) - fvc::div(alphaPhi1)
|
||||
+ (alpha1/rho1)
|
||||
*correction
|
||||
(
|
||||
psi1*fvm::ddt(p_rgh)
|
||||
+ fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
|
||||
)
|
||||
);
|
||||
p_rghEqnComp1.ref().relax();
|
||||
|
||||
p_rghEqnComp2 =
|
||||
pos(alpha2)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f)
|
||||
- (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
|
||||
)/rho2
|
||||
- fvc::ddt(alpha2) - fvc::div(alphaPhi2)
|
||||
+ (alpha2/rho2)
|
||||
*correction
|
||||
(
|
||||
psi2*fvm::ddt(p_rgh)
|
||||
+ fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
|
||||
)
|
||||
);
|
||||
p_rghEqnComp2.ref().relax();
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "rhofs.H"
|
||||
|
||||
p_rghEqnComp1 =
|
||||
pos(alpha1)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f)
|
||||
- (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
|
||||
)/rho1
|
||||
- fvc::ddt(alpha1) - fvc::div(alphaPhi1)
|
||||
+ (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh))
|
||||
);
|
||||
|
||||
p_rghEqnComp2 =
|
||||
pos(alpha2)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f)
|
||||
- (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
|
||||
)/rho2
|
||||
- fvc::ddt(alpha2) - fvc::div(alphaPhi2)
|
||||
+ (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh))
|
||||
);
|
||||
}
|
||||
|
||||
// Cache p_rgh prior to solve for density update
|
||||
volScalarField p_rgh_0(p_rgh);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix p_rghEqnIncomp
|
||||
(
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rAUf, p_rgh)
|
||||
);
|
||||
|
||||
solve
|
||||
(
|
||||
p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp,
|
||||
mesh.solver(p_rgh.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
|
||||
p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh;
|
||||
|
||||
dgdt =
|
||||
(
|
||||
alpha1*(p_rghEqnComp2 & p_rgh)
|
||||
- alpha2*(p_rghEqnComp1 & p_rgh)
|
||||
);
|
||||
|
||||
phi = phiHbyA + p_rghEqnIncomp.flux();
|
||||
|
||||
U =
|
||||
cellMask*
|
||||
(
|
||||
HbyA
|
||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf)
|
||||
);
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += n*(fvc::absolute(phi, U)/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
// Zero faces H-I for transport Eq after pEq
|
||||
phi *= faceMask;
|
||||
|
||||
// Update densities from change in p_rgh
|
||||
mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0));
|
||||
mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0));
|
||||
|
||||
rho = alpha1*rho1 + alpha2*rho2;
|
||||
|
||||
// Correct p_rgh for consistency with p and the updated densities
|
||||
p_rgh = p - rho*gh;
|
||||
p_rgh.correctBoundaryConditions();
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
@ -4,7 +4,9 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake $targetType phaseChangeTwoPhaseMixtures
|
||||
|
||||
wmake $targetType
|
||||
wmake $targetType interPhaseChangeDyMFoam
|
||||
wmake $targetType overInterPhaseChangeDyMFoam
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
overInterPhaseChangeDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overInterPhaseChangeDyMFoam
|
||||
@ -0,0 +1,35 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../../interFoam/overInterDyMFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I../phaseChangeTwoPhaseMixtures/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/incompressible/pimpleFoam/overPimpleDyMFoam \
|
||||
-I$(LIB_SRC)/overset/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lphaseChangeTwoPhaseMixtures \
|
||||
-ltwoPhaseMixture \
|
||||
-linterfaceProperties \
|
||||
-ltwoPhaseProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-loverset \
|
||||
-lwaveModels
|
||||
@ -0,0 +1,31 @@
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
||||
- fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
|
||||
+ turbulence->divDevRhoReff(rho, U)
|
||||
==
|
||||
fvOptions(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
cellMask*fvc::reconstruct
|
||||
(
|
||||
(
|
||||
interface.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
- fvc::snGrad(p_rgh)
|
||||
) * mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
CorrectPhi
|
||||
(
|
||||
U,
|
||||
phi,
|
||||
p_rgh,
|
||||
surfaceScalarField("rAUf", fvc::interpolate(rAU)),
|
||||
divU,
|
||||
pimple
|
||||
);
|
||||
|
||||
#include "continuityErrs.H"
|
||||
@ -0,0 +1,158 @@
|
||||
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<< "Creating phaseChangeTwoPhaseMixture\n" << endl;
|
||||
autoPtr<phaseChangeTwoPhaseMixture> mixture =
|
||||
phaseChangeTwoPhaseMixture::New(U, phi);
|
||||
|
||||
volScalarField& alpha1(mixture->alpha1());
|
||||
volScalarField& alpha2(mixture->alpha2());
|
||||
|
||||
const dimensionedScalar& rho1 = mixture->rho1();
|
||||
const dimensionedScalar& rho2 = mixture->rho2();
|
||||
|
||||
|
||||
// Need to store rho for ddt(rho, U)
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
alpha1*rho1 + alpha2*rho2
|
||||
);
|
||||
rho.oldTime();
|
||||
|
||||
|
||||
// Construct interface from alpha1 distribution
|
||||
interfaceProperties interface(alpha1, U, mixture());
|
||||
|
||||
// Construct incompressible turbulence model
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, mixture())
|
||||
);
|
||||
|
||||
|
||||
#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
|
||||
);
|
||||
|
||||
if (p_rgh.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pRefCell)
|
||||
);
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
#include "createFvOptions.H"
|
||||
|
||||
IOobject alphaPhi10Header
|
||||
(
|
||||
IOobject::groupName("alphaPhi0", alpha1.group()),
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
// MULES flux from previous time-step
|
||||
surfaceScalarField alphaPhi10
|
||||
(
|
||||
alphaPhi10Header,
|
||||
phi*fvc::interpolate(alpha1)
|
||||
);
|
||||
|
||||
|
||||
// Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
|
||||
nonInt.insert("HbyA");
|
||||
nonInt.insert("grad(p_rgh)");
|
||||
nonInt.insert("nHat");
|
||||
nonInt.insert("surfaceIntegrate(phi)");
|
||||
nonInt.insert("surfaceIntegrate(phiHbyA)");
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("cellDisplacement");
|
||||
nonInt.insert("interpolatedCells");
|
||||
nonInt.insert("cellInterpolationWeight");
|
||||
nonInt.insert("pcorr");
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
||||
|
||||
surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
|
||||
// Create bool field with interpolated cells
|
||||
#include "createInterpolatedCells.H"
|
||||
@ -0,0 +1,250 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
overInterPhaseChangeDyMFoam
|
||||
|
||||
Group
|
||||
grpMultiphaseSolvers grpMovingMeshSolvers
|
||||
|
||||
Description
|
||||
Solver for two incompressible, isothermal, immiscible fluids with
|
||||
phase-change (e.g. cavitation) using VOF (i.e. volume of fluid)
|
||||
phase-fraction based interface capturing, with optional dynamic mesh
|
||||
motion (including overset) and mesh topology changes including adaptive
|
||||
re-meshing.
|
||||
|
||||
The momentum and other fluid properties are of the "mixture" and a
|
||||
single momentum equation is solved.
|
||||
|
||||
The set of phase-change models provided are designed to simulate cavitation
|
||||
but other mechanisms of phase-change are supported within this solver
|
||||
framework.
|
||||
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "CMULES.H"
|
||||
#include "subCycle.H"
|
||||
#include "interfaceProperties.H"
|
||||
#include "phaseChangeTwoPhaseMixture.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
#include "CorrectPhi.H"
|
||||
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "localMin.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
#include "transform.H"
|
||||
#include "oversetAdjustPhi.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for two incompressible, isothermal, immiscible fluids with"
|
||||
" phase-change\n"
|
||||
"using VOF (volume of fluid) phase-fraction based interface capturing,"
|
||||
" with optional dynamic mesh motion (including overset)\n"
|
||||
"and mesh topology changes including adaptive re-meshing."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createTimeControls.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
|
||||
volScalarField rAU
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rAU",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0)
|
||||
);
|
||||
|
||||
#include "createUf.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readControls.H"
|
||||
|
||||
// Store divU from the previous mesh so that it can be mapped
|
||||
// and used in correctPhi to ensure the corrected phi has the
|
||||
// same divergence
|
||||
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
|
||||
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
Info<< "Execution time for mesh.update() = "
|
||||
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
||||
<< " s" << endl;
|
||||
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
// Update cellMask field for blocking out hole cells
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
|
||||
faceMask =
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime());
|
||||
|
||||
|
||||
// Zero Uf on old faceMask (H-I)
|
||||
Uf *= faceMask;
|
||||
|
||||
const surfaceVectorField Uint(fvc::interpolate(U));
|
||||
// Update Uf and phi on new C-I faces
|
||||
Uf += (1-faceMask)*Uint;
|
||||
|
||||
// Update Uf boundary
|
||||
forAll(Uf.boundaryField(), patchI)
|
||||
{
|
||||
Uf.boundaryFieldRef()[patchI] =
|
||||
Uint.boundaryField()[patchI];
|
||||
}
|
||||
|
||||
phi = mesh.Sf() & Uf;
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
mixture->correct();
|
||||
|
||||
// Zero phi on current H-I
|
||||
faceMask = localMin<scalar>(mesh).interpolate(cellMask);
|
||||
|
||||
phi *= faceMask;
|
||||
U *= cellMask;
|
||||
|
||||
// Make the flux relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
}
|
||||
|
||||
if (mesh.changing() && checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
#include "alphaControls.H"
|
||||
|
||||
surfaceScalarField rhoPhi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rhoPhi",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimMass/dimTime, Zero)
|
||||
);
|
||||
|
||||
mixture->correct();
|
||||
|
||||
#include "alphaEqnSubCycle.H"
|
||||
const surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
rhoPhi *= faceMask;
|
||||
|
||||
interface.correct();
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
{
|
||||
rAU = 1.0/UEqn.A();
|
||||
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
|
||||
if (ddtCorr)
|
||||
{
|
||||
surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
phiHbyA += faceMaskOld*fvc::ddtCorr(U, Uf);
|
||||
}
|
||||
|
||||
if (p_rgh.needReference())
|
||||
{
|
||||
fvc::makeRelative(phiHbyA, U);
|
||||
adjustPhi(phiHbyA, U, p_rgh);
|
||||
fvc::makeAbsolute(phiHbyA, U);
|
||||
}
|
||||
|
||||
surfaceScalarField phig
|
||||
(
|
||||
(
|
||||
interface.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*faceMask*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p_rgh, U, phiHbyA, rAUf);
|
||||
|
||||
Pair<tmp<volScalarField>> vDotP = mixture->vDotP();
|
||||
const volScalarField& vDotcP = vDotP[0]();
|
||||
const volScalarField& vDotvP = vDotP[1]();
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix p_rghEqn
|
||||
(
|
||||
fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh)
|
||||
- (vDotvP - vDotcP)*(mixture->pSat() - rho*gh)
|
||||
+ fvm::Sp(vDotvP - vDotcP, p_rgh)
|
||||
);
|
||||
|
||||
|
||||
//p_rghEqn.setReference(pRefCell, pRefValue);
|
||||
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
|
||||
|
||||
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + p_rghEqn.flux();
|
||||
|
||||
p_rgh.relax();
|
||||
|
||||
U =
|
||||
cellMask
|
||||
*(HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf));
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
// Zero faces H-I for transport Eq after pEq
|
||||
phi *= faceMask;
|
||||
|
||||
p == p_rgh + rho*gh;
|
||||
|
||||
if (p_rgh.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pRefCell)
|
||||
);
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(hole|outlet|inlet)"
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 400;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,56 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
hole
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(outlet|inlet)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(walls|hole)"
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(walls|hole|outlet|inlet)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ 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
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
oversetPatch
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|outlet|inlet)"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class pointVectorField;
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
hole
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
patchType overset;
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object zoneID;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
|
||||
rm -f constant/cellInterpolationWeight
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
canCompile || exit 0 # Dynamic code
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
# Serial
|
||||
#runApplication $(getApplication)
|
||||
|
||||
# Parallel
|
||||
runApplication decomposePar -cellDist
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# Select cellSets
|
||||
runApplication -s 1 topoSet
|
||||
|
||||
runApplication subsetMesh box -patch hole -overwrite
|
||||
|
||||
# Select cellSets
|
||||
runApplication -s 2 topoSet
|
||||
|
||||
restore0Dir
|
||||
|
||||
# Use cellSets to write zoneID
|
||||
runApplication setFields
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicOversetFvMesh;
|
||||
|
||||
dynamicOversetFvMeshCoeffs
|
||||
{
|
||||
// layerRelax 0.3;
|
||||
}
|
||||
|
||||
solver multiSolidBodyMotionSolver;
|
||||
|
||||
multiSolidBodyMotionSolverCoeffs
|
||||
{
|
||||
movingZone1
|
||||
{
|
||||
solidBodyMotionFunction rotatingMotion;
|
||||
rotatingMotionCoeffs
|
||||
{
|
||||
origin (0.005 0.005 0.005);
|
||||
axis (0 0 1);
|
||||
omega 20.0;
|
||||
}
|
||||
}
|
||||
|
||||
movingZone2
|
||||
{
|
||||
solidBodyMotionFunction rotatingMotion;
|
||||
rotatingMotionCoeffs
|
||||
{
|
||||
origin (0.013 0.005 0.005);
|
||||
axis (0 0 1);
|
||||
omega -20.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value ( 0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water air);
|
||||
|
||||
pMin 10000;
|
||||
|
||||
sigma
|
||||
{
|
||||
type constant;
|
||||
sigma 0.07;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.9;
|
||||
}
|
||||
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: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectFluid;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 18.0;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
R 3000;
|
||||
rho0 1027;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 4195;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 3.645e-4;
|
||||
Pr 2.289;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,149 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 0.01;
|
||||
|
||||
vertices
|
||||
(
|
||||
( 0.00 0.0 0)
|
||||
( 2.00 0.0 0)
|
||||
( 2.00 1.0 0)
|
||||
( 0.00 1.0 0)
|
||||
( 0.00 0.0 1)
|
||||
( 2.00 0.0 1)
|
||||
( 2.00 1.0 1)
|
||||
( 0.00 1.0 1)
|
||||
|
||||
// movingZone1
|
||||
( 0.15 0.35 0)
|
||||
( 0.85 0.35 0)
|
||||
( 0.85 0.65 0)
|
||||
( 0.15 0.65 0)
|
||||
( 0.15 0.35 1)
|
||||
( 0.85 0.35 1)
|
||||
( 0.85 0.65 1)
|
||||
( 0.15 0.65 1)
|
||||
|
||||
// movingZone2
|
||||
( 1.15 0.15 0)
|
||||
( 1.45 0.15 0)
|
||||
( 1.45 0.85 0)
|
||||
( 1.15 0.85 0)
|
||||
( 1.15 0.15 1)
|
||||
( 1.45 0.15 1)
|
||||
( 1.45 0.85 1)
|
||||
( 1.15 0.85 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (140 70 1) simpleGrading (1 1 1)
|
||||
|
||||
hex (8 9 10 11 12 13 14 15) movingZone1 (60 24 1) simpleGrading (1 1 1)
|
||||
|
||||
hex (16 17 18 19 20 21 22 23) movingZone2 (24 60 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
faces
|
||||
(
|
||||
( 8 12 15 11)
|
||||
(10 14 13 9)
|
||||
(11 15 14 10)
|
||||
( 9 13 12 8)
|
||||
);
|
||||
}
|
||||
overset2
|
||||
{
|
||||
type overset;
|
||||
faces
|
||||
(
|
||||
(16 20 23 19)
|
||||
(18 22 21 17)
|
||||
(19 23 22 18)
|
||||
(17 21 20 16)
|
||||
);
|
||||
}
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
// Populated by subsetMesh
|
||||
hole
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
( 8 11 10 9)
|
||||
(12 13 14 15)
|
||||
);
|
||||
}
|
||||
frontAndBack2
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(16 19 18 17)
|
||||
(20 21 22 23)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,111 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
libs (overset fvMotionSolvers);
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
overset 0;
|
||||
dynamicOversetFvMesh 0;
|
||||
cellVolumeWeight 0;
|
||||
}
|
||||
|
||||
application overCompressibleInterDyMFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0.0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 2;
|
||||
|
||||
deltaT 0.001;
|
||||
|
||||
writeControl adjustable;
|
||||
|
||||
writeInterval 0.01;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 12;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 1.5;
|
||||
|
||||
maxAlphaCo 2.0;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
|
||||
functions
|
||||
{
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
libs (sampling);
|
||||
|
||||
// Name of the directory for probe data
|
||||
name probes;
|
||||
|
||||
// Write at same frequency as fields
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
// Fields to be probed
|
||||
fields (p U);
|
||||
|
||||
// Optional: interpolation scheme to use (default is cell)
|
||||
interpolationScheme cell;
|
||||
|
||||
probeLocations
|
||||
(
|
||||
(0.0009999 0.0015 0.003)
|
||||
);
|
||||
}
|
||||
|
||||
alphaVol
|
||||
{
|
||||
libs (utilityFunctionObjects);
|
||||
type coded;
|
||||
name alphaVolume;
|
||||
writeControl timeStep;
|
||||
writeInterval 10;
|
||||
|
||||
codeWrite
|
||||
#{
|
||||
const auto& alpha =
|
||||
mesh().lookupObject<volScalarField>("alpha.water");
|
||||
|
||||
Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc())
|
||||
<< endl;
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,27 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 12;
|
||||
|
||||
method hierarchical;
|
||||
|
||||
coeffs
|
||||
{
|
||||
n (12 1 1);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,85 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(T) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(rhoPhi,U) Gauss upwind;
|
||||
div(rhoPhi,T) Gauss upwind;
|
||||
div(rhoPhi,K) Gauss upwind;
|
||||
div(U) Gauss linear;
|
||||
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
|
||||
div(phi,alpha.water) Gauss upwind;
|
||||
|
||||
div(rhoPhi,epsilon) Gauss upwind;
|
||||
div(rhoPhi,k) Gauss upwind;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
div((phi+meshPhi),p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
oversetInterpolation
|
||||
{
|
||||
method inverseDistance;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pcorr ;
|
||||
p ;
|
||||
}
|
||||
|
||||
oversetInterpolationSuppressed
|
||||
{
|
||||
grad(p_rgh);
|
||||
surfaceIntegrate(phiHbyA);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,115 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
cellDisplacement
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
"alpha.water.*"
|
||||
{
|
||||
nAlphaCorr 3;
|
||||
nAlphaSubCycles 2;
|
||||
cAlpha 1;
|
||||
icAlpha 0;
|
||||
scAlpha 0;
|
||||
|
||||
MULESCorr yes;
|
||||
nLimiterIter 5;
|
||||
alphaApplyPrevCorr no;
|
||||
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-12;
|
||||
relTol 0.01;
|
||||
maxIter 500;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
pcorr
|
||||
{
|
||||
$p;
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
}
|
||||
|
||||
pcorrFinal
|
||||
{
|
||||
$pcorr;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|T)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0.01;
|
||||
maxIter 200;
|
||||
minIter 1;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|T)Final"
|
||||
{
|
||||
$U;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
correctPhi no;
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
|
||||
ddtCorr false;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,68 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 123
|
||||
volScalarFieldValue alpha.water 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
// Set cell values
|
||||
// (does zerogradient on boundaries)
|
||||
cellToCell
|
||||
{
|
||||
set c0;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 0
|
||||
);
|
||||
}
|
||||
|
||||
cellToCell
|
||||
{
|
||||
set c1;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 1
|
||||
);
|
||||
}
|
||||
|
||||
cellToCell
|
||||
{
|
||||
set c2;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 2
|
||||
);
|
||||
}
|
||||
|
||||
boxToCell
|
||||
{
|
||||
box ( -100 -100 -100 ) ( 100 0.005 100 );
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,95 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source regionsToCell;
|
||||
insidePoints ((0.001 0.001 0.001));
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
set c0;
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name c2;
|
||||
type cellSet;
|
||||
action new;
|
||||
source regionsToCell;
|
||||
insidePoints ((0.0116 0.00151 0.001));
|
||||
set c1;
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action subtract;
|
||||
source cellToCell;
|
||||
set c2;
|
||||
}
|
||||
|
||||
// Select box to remove from region 1 and 2
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
set c1;
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action add;
|
||||
source cellToCell;
|
||||
set c2;
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action subset;
|
||||
source boxToCell;
|
||||
boxes
|
||||
(
|
||||
(0.0025 0.0045 -100)(0.0075 0.0055 100)
|
||||
(0.0125 0.0025 -100)(0.0135 0.0075 100)
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,56 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
hole
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(outlet|inlet)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(walls|hole)"
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(walls|hole|outlet|inlet)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ 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
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
oversetPatch
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|outlet|inlet)"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class pointVectorField;
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
hole
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
overset
|
||||
{
|
||||
patchType overset;
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object zoneID;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
10
tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/Allclean
Executable file
10
tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/Allclean
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
|
||||
rm -f constant/cellInterpolationWeight
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
17
tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/Allrun
Executable file
17
tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/Allrun
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
canCompile || exit 0 # Dynamic code
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
# Serial
|
||||
#runApplication $(getApplication)
|
||||
|
||||
# Parallel
|
||||
runApplication decomposePar -cellDist
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
21
tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/Allrun.pre
Executable file
21
tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/Allrun.pre
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# Select cellSets
|
||||
runApplication -s 1 topoSet
|
||||
|
||||
runApplication subsetMesh box -patch hole -overwrite
|
||||
|
||||
# Select cellSets
|
||||
runApplication -s 2 topoSet
|
||||
|
||||
restore0Dir
|
||||
|
||||
# Use cellSets to write zoneID
|
||||
runApplication setFields
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicOversetFvMesh;
|
||||
|
||||
dynamicOversetFvMeshCoeffs
|
||||
{
|
||||
// layerRelax 0.3;
|
||||
}
|
||||
|
||||
solver multiSolidBodyMotionSolver;
|
||||
|
||||
multiSolidBodyMotionSolverCoeffs
|
||||
{
|
||||
movingZone1
|
||||
{
|
||||
solidBodyMotionFunction rotatingMotion;
|
||||
rotatingMotionCoeffs
|
||||
{
|
||||
origin (0.005 0.005 0.005);
|
||||
axis (0 0 1);
|
||||
omega 2000.0;
|
||||
}
|
||||
}
|
||||
|
||||
movingZone2
|
||||
{
|
||||
solidBodyMotionFunction rotatingMotion;
|
||||
rotatingMotionCoeffs
|
||||
{
|
||||
origin (0.013 0.005 0.005);
|
||||
axis (0 0 1);
|
||||
omega -2000.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,64 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water vapour);
|
||||
|
||||
phaseChangeTwoPhaseMixture SchnerrSauer;
|
||||
|
||||
pSat 9e4; // Saturation pressure
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 9e-07;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
vapour
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 4.273e-04;
|
||||
rho 0.02308;
|
||||
}
|
||||
|
||||
KunzCoeffs
|
||||
{
|
||||
UInf 20.0;
|
||||
tInf 0.005; // L = 0.1 m
|
||||
Cc 1000;
|
||||
Cv 1000;
|
||||
}
|
||||
|
||||
MerkleCoeffs
|
||||
{
|
||||
UInf 20.0;
|
||||
tInf 0.005; // L = 0.1 m
|
||||
Cc 80;
|
||||
Cv 1e-03;
|
||||
}
|
||||
|
||||
SchnerrSauerCoeffs
|
||||
{
|
||||
n 1.6e+13;
|
||||
dNuc 2.0e-06;
|
||||
Cc 1;
|
||||
Cv 1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,149 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 0.01;
|
||||
|
||||
vertices
|
||||
(
|
||||
( 0.00 0.0 0)
|
||||
( 2.00 0.0 0)
|
||||
( 2.00 1.0 0)
|
||||
( 0.00 1.0 0)
|
||||
( 0.00 0.0 1)
|
||||
( 2.00 0.0 1)
|
||||
( 2.00 1.0 1)
|
||||
( 0.00 1.0 1)
|
||||
|
||||
// movingZone1
|
||||
( 0.15 0.35 0)
|
||||
( 0.85 0.35 0)
|
||||
( 0.85 0.65 0)
|
||||
( 0.15 0.65 0)
|
||||
( 0.15 0.35 1)
|
||||
( 0.85 0.35 1)
|
||||
( 0.85 0.65 1)
|
||||
( 0.15 0.65 1)
|
||||
|
||||
// movingZone2
|
||||
( 1.15 0.15 0)
|
||||
( 1.45 0.15 0)
|
||||
( 1.45 0.85 0)
|
||||
( 1.15 0.85 0)
|
||||
( 1.15 0.15 1)
|
||||
( 1.45 0.15 1)
|
||||
( 1.45 0.85 1)
|
||||
( 1.15 0.85 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (140 70 1) simpleGrading (1 1 1)
|
||||
|
||||
hex (8 9 10 11 12 13 14 15) movingZone1 (60 24 1) simpleGrading (1 1 1)
|
||||
|
||||
hex (16 17 18 19 20 21 22 23) movingZone2 (24 60 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
faces
|
||||
(
|
||||
( 8 12 15 11)
|
||||
(10 14 13 9)
|
||||
(11 15 14 10)
|
||||
( 9 13 12 8)
|
||||
);
|
||||
}
|
||||
overset2
|
||||
{
|
||||
type overset;
|
||||
faces
|
||||
(
|
||||
(16 20 23 19)
|
||||
(18 22 21 17)
|
||||
(19 23 22 18)
|
||||
(17 21 20 16)
|
||||
);
|
||||
}
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
// Populated by subsetMesh
|
||||
hole
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
( 8 11 10 9)
|
||||
(12 13 14 15)
|
||||
);
|
||||
}
|
||||
frontAndBack2
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(16 19 18 17)
|
||||
(20 21 22 23)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,110 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
libs (overset fvMotionSolvers);
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
overset 0;
|
||||
dynamicOversetFvMesh 0;
|
||||
cellVolumeWeight 0;
|
||||
}
|
||||
|
||||
application overInterPhaseChangeDyMFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0.0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.2;
|
||||
|
||||
deltaT 0.00001;
|
||||
|
||||
writeControl adjustable;
|
||||
|
||||
writeInterval 0.001;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 12;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 1.5;
|
||||
|
||||
maxAlphaCo 2.0;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
|
||||
functions
|
||||
{
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
libs (sampling);
|
||||
|
||||
// Name of the directory for probe data
|
||||
name probes;
|
||||
|
||||
// Write at same frequency as fields
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
// Fields to be probed
|
||||
fields (p U);
|
||||
|
||||
// Optional: interpolation scheme to use (default is cell)
|
||||
interpolationScheme cell;
|
||||
|
||||
probeLocations
|
||||
(
|
||||
(0.0009999 0.0015 0.003)
|
||||
);
|
||||
}
|
||||
|
||||
alphaVol
|
||||
{
|
||||
libs (utilityFunctionObjects);
|
||||
type coded;
|
||||
name alphaVolume;
|
||||
writeControl timeStep;
|
||||
writeInterval 10;
|
||||
|
||||
codeWrite
|
||||
#{
|
||||
const auto& alpha =
|
||||
mesh().lookupObject<volScalarField>("alpha.water");
|
||||
|
||||
Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc())
|
||||
<< endl;
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,27 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 12;
|
||||
|
||||
method hierarchical;
|
||||
|
||||
coeffs
|
||||
{
|
||||
n (12 1 1);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,84 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(T) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(rhoPhi,U) Gauss upwind;
|
||||
|
||||
div(U) Gauss linear;
|
||||
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
|
||||
div(phi,alpha.water) Gauss upwind;
|
||||
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
div((phi+meshPhi),p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
oversetInterpolation
|
||||
{
|
||||
method inverseDistance;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pcorr ;
|
||||
p ;
|
||||
}
|
||||
|
||||
oversetInterpolationSuppressed
|
||||
{
|
||||
grad(p_rgh);
|
||||
surfaceIntegrate(phiHbyA);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,119 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
cellDisplacement
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
"alpha.water.*"
|
||||
{
|
||||
nAlphaCorr 3;
|
||||
nAlphaSubCycles 2;
|
||||
cAlpha 0;
|
||||
icAlpha 0;
|
||||
scAlpha 0;
|
||||
|
||||
MULESCorr yes;
|
||||
nLimiterIter 5;
|
||||
alphaApplyPrevCorr no;
|
||||
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
maxIter 100;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-12;
|
||||
relTol 0.01;
|
||||
maxIter 500;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
pcorr
|
||||
{
|
||||
$p;
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
}
|
||||
|
||||
pcorrFinal
|
||||
{
|
||||
$pcorr;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|T)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0.01;
|
||||
maxIter 200;
|
||||
minIter 1;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|T)Final"
|
||||
{
|
||||
$U;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
correctPhi no;
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
|
||||
ddtCorr false;
|
||||
|
||||
pRefPoint (0.0002 0.0099 0.001);
|
||||
pRefValue 1e5; //Not used
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,68 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 123
|
||||
volScalarFieldValue alpha.water 1
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
// Set cell values
|
||||
// (does zerogradient on boundaries)
|
||||
cellToCell
|
||||
{
|
||||
set c0;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 0
|
||||
);
|
||||
}
|
||||
|
||||
cellToCell
|
||||
{
|
||||
set c1;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 1
|
||||
);
|
||||
}
|
||||
|
||||
cellToCell
|
||||
{
|
||||
set c2;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 2
|
||||
);
|
||||
}
|
||||
|
||||
boxToCell
|
||||
{
|
||||
box ( -100 -100 -100 ) ( 100 0.005 100 );
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,95 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source regionsToCell;
|
||||
insidePoints ((0.001 0.001 0.001));
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
set c0;
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
{
|
||||
name c2;
|
||||
type cellSet;
|
||||
action new;
|
||||
source regionsToCell;
|
||||
insidePoints ((0.0116 0.00151 0.001));
|
||||
set c1;
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action subtract;
|
||||
source cellToCell;
|
||||
set c2;
|
||||
}
|
||||
|
||||
// Select box to remove from region 1 and 2
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
set c1;
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action add;
|
||||
source cellToCell;
|
||||
set c2;
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action subset;
|
||||
source boxToCell;
|
||||
boxes
|
||||
(
|
||||
(0.0025 0.0045 -100)(0.0075 0.0055 100)
|
||||
(0.0125 0.0025 -100)(0.0135 0.0075 100)
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user