mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressibleInterDyMFoam: Update ddtCorr to use Uf rather than phi
Add tutorial case
This commit is contained in:
@ -56,12 +56,13 @@ int main(int argc, char *argv[])
|
|||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "readGravitationalAcceleration.H"
|
#include "readGravitationalAcceleration.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
pimpleControl pimple(mesh);
|
||||||
|
|
||||||
#include "readControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createUf.H"
|
||||||
|
#include "readControls.H"
|
||||||
#include "createPrghCorrTypes.H"
|
#include "createPrghCorrTypes.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
@ -74,9 +75,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "readControls.H"
|
#include "readControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
// Make the fluxes absolute
|
|
||||||
fvc::makeAbsolute(phi, U);
|
|
||||||
|
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
@ -85,7 +83,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Store divU from the previous mesh for the correctPhi
|
// Store divU from the previous mesh for the correctPhi
|
||||||
volScalarField divU(fvc::div(phi));
|
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
|
||||||
|
|
||||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||||
|
|
||||||
@ -104,12 +102,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (mesh.changing() && correctPhi)
|
if (mesh.changing() && correctPhi)
|
||||||
{
|
{
|
||||||
|
// Calculate absolute flux from the mapped surface velocity
|
||||||
|
phi = mesh.Sf() & Uf;
|
||||||
|
|
||||||
#include "correctPhi.H"
|
#include "correctPhi.H"
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
// Make the fluxes relative to the mesh motion
|
||||||
fvc::makeRelative(phi, U);
|
fvc::makeRelative(phi, U);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mesh.changing() && checkMeshCourantNo)
|
if (mesh.changing() && checkMeshCourantNo)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -40,8 +40,6 @@
|
|||||||
|
|
||||||
dimensionedScalar Dp("Dp", dimTime/rho.dimensions(), 1.0);
|
dimensionedScalar Dp("Dp", dimTime/rho.dimensions(), 1.0);
|
||||||
|
|
||||||
adjustPhi(phi, U, pcorr);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
|
|||||||
@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||||
|
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
||||||
|
|
||||||
|
volVectorField HbyA("HbyA", U);
|
||||||
|
HbyA = rAU*UEqn.H();
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA
|
||||||
|
(
|
||||||
|
"phiHbyA",
|
||||||
|
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
|
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceScalarField phig
|
||||||
|
(
|
||||||
|
(
|
||||||
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
|
- ghf*fvc::snGrad(rho)
|
||||||
|
)*rAUf*mesh.magSf()
|
||||||
|
);
|
||||||
|
|
||||||
|
phiHbyA += phig;
|
||||||
|
|
||||||
|
// Update the fixedFluxPressure BCs to ensure flux consistency
|
||||||
|
setSnGrad<fixedFluxPressureFvPatchScalarField>
|
||||||
|
(
|
||||||
|
p_rgh.boundaryField(),
|
||||||
|
(
|
||||||
|
phiHbyA.boundaryField()
|
||||||
|
- (mesh.Sf().boundaryField() & U.boundaryField())
|
||||||
|
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
|
||||||
|
);
|
||||||
|
|
||||||
|
tmp<fvScalarMatrix> p_rghEqnComp1;
|
||||||
|
tmp<fvScalarMatrix> p_rghEqnComp2;
|
||||||
|
|
||||||
|
if (pimple.transonic())
|
||||||
|
{
|
||||||
|
surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi);
|
||||||
|
surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi);
|
||||||
|
|
||||||
|
p_rghEqnComp1 =
|
||||||
|
fvc::ddt(rho1) + fvc::div(phi, rho1) - fvc::Sp(fvc::div(phi), rho1)
|
||||||
|
+ correction
|
||||||
|
(
|
||||||
|
psi1*fvm::ddt(p_rgh)
|
||||||
|
+ fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
|
||||||
|
);
|
||||||
|
deleteDemandDrivenData(p_rghEqnComp1().faceFluxCorrectionPtr());
|
||||||
|
p_rghEqnComp1().relax();
|
||||||
|
|
||||||
|
p_rghEqnComp2 =
|
||||||
|
fvc::ddt(rho2) + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2)
|
||||||
|
+ correction
|
||||||
|
(
|
||||||
|
psi2*fvm::ddt(p_rgh)
|
||||||
|
+ fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
|
||||||
|
);
|
||||||
|
deleteDemandDrivenData(p_rghEqnComp2().faceFluxCorrectionPtr());
|
||||||
|
p_rghEqnComp2().relax();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p_rghEqnComp1 =
|
||||||
|
fvc::ddt(rho1) + psi1*correction(fvm::ddt(p_rgh))
|
||||||
|
+ fvc::div(phi, rho1) - fvc::Sp(fvc::div(phi), rho1);
|
||||||
|
|
||||||
|
p_rghEqnComp2 =
|
||||||
|
fvc::ddt(rho2) + psi2*correction(fvm::ddt(p_rgh))
|
||||||
|
+ fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
(
|
||||||
|
(
|
||||||
|
(max(alpha1, scalar(0))/rho1)*p_rghEqnComp1()
|
||||||
|
+ (max(alpha2, scalar(0))/rho2)*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 =
|
||||||
|
(
|
||||||
|
pos(alpha2)*(p_rghEqnComp2 & p_rgh)/rho2
|
||||||
|
- pos(alpha1)*(p_rghEqnComp1 & p_rgh)/rho1
|
||||||
|
);
|
||||||
|
|
||||||
|
phi = phiHbyA + p_rghEqnIncomp.flux();
|
||||||
|
|
||||||
|
U = HbyA
|
||||||
|
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Uf = fvc::interpolate(U);
|
||||||
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
|
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh motion
|
||||||
|
fvc::makeRelative(phi, U);
|
||||||
|
|
||||||
|
// Update densities from change in p_rgh
|
||||||
|
rho1 += psi1*(p_rgh - p_rgh_0);
|
||||||
|
rho2 += psi2*(p_rgh - p_rgh_0);
|
||||||
|
|
||||||
|
rho = alpha1*rho1 + alpha2*rho2;
|
||||||
|
|
||||||
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
|
Info<< "max(U) " << max(mag(U)).value() << endl;
|
||||||
|
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type movingWallVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object alpha.water;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 1e6;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 1e6;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
foamCleanTutorials cases
|
||||||
|
rm -rf 0/alpha.water 0/alpha.water.gz 0/T.air.gz 0/T.water.gz \
|
||||||
|
probes wallPressure pRefProbe
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
13
tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allrun
Executable file
13
tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allrun
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||||
|
runApplication blockMesh
|
||||||
|
cp 0/alpha.water.org 0/alpha.water
|
||||||
|
runApplication setFields
|
||||||
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel laminar;
|
||||||
|
|
||||||
|
turbulence off;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object dynamicMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dynamicFvMesh solidBodyMotionFvMesh;
|
||||||
|
|
||||||
|
solidBodyMotionFvMeshCoeffs
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction SDA;
|
||||||
|
SDACoeffs
|
||||||
|
{
|
||||||
|
CofG ( 0 0 0 );
|
||||||
|
lamda 50;
|
||||||
|
rollAmax 0.22654;
|
||||||
|
rollAmin 0.10472;
|
||||||
|
heaveA 3.79;
|
||||||
|
swayA 2.34;
|
||||||
|
Q 2;
|
||||||
|
Tp 13.93;
|
||||||
|
Tpn 11.93;
|
||||||
|
dTi 0.059;
|
||||||
|
dTp -0.001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
location "constant";
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value ( 0 0 -9.81 );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,145 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
`format' ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// General m4 macros
|
||||||
|
|
||||||
|
changecom(//)changequote([,]) dnl>
|
||||||
|
define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
|
||||||
|
define(VCOUNT, 0)
|
||||||
|
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
|
||||||
|
|
||||||
|
define(hex2D, hex (b$1 b$2 b$3 b$4 f$1 f$2 f$3 f$4))
|
||||||
|
define(quad2D, (b$1 b$2 f$2 f$1))
|
||||||
|
define(frontQuad, (f$1 f$2 f$3 f$4))
|
||||||
|
define(backQuad, (b$1 b$4 b$3 b$2))
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// User-defined parameters
|
||||||
|
|
||||||
|
convertToMeters 1;
|
||||||
|
|
||||||
|
define(l, 1.0) // Length of tank (x-direction)
|
||||||
|
define(b, 40) // Breadth of tank (y-direction)
|
||||||
|
define(h, 30) // Depth of tank (z-direction)
|
||||||
|
|
||||||
|
define(hlc, 5) // Depth to the top (height) of lower chamfer
|
||||||
|
define(huc, 10) // Height of upper chamfer
|
||||||
|
|
||||||
|
define(thetalc, 45) // Angle of lower chamfer to the horizontal
|
||||||
|
define(thetauc, 45) // Angle of upper chamfer to the horizontal
|
||||||
|
|
||||||
|
define(CofGy, calc(b/2.0)) // Centre of gravity in y-direction
|
||||||
|
define(CofGz, 10.0) // Centre of gravity in z-direction
|
||||||
|
|
||||||
|
define(Nl, 1) // Number of cells in the length (1 for 2D)
|
||||||
|
define(Nb, 40) // Number of cells in the breadth
|
||||||
|
define(Nhlc, 6) // Number of cells in the height of the lower champfer
|
||||||
|
define(Nh, 16) // Number of cells in the height between the chamfers
|
||||||
|
define(Nhuc, 12) // Number of cells in the height of the upper champfer
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Derived parameters
|
||||||
|
|
||||||
|
define(blc, calc(hlc/tan(deg2rad(thetalc)))) // Breadth to the top (height) of lower chamfer
|
||||||
|
define(buc, calc(huc/tan(deg2rad(thetauc)))) // Breadth of upper chamfer
|
||||||
|
|
||||||
|
define(Yl, -CofGy)
|
||||||
|
define(Yllc, calc(Yl + blc))
|
||||||
|
define(Yluc, calc(Yl + buc))
|
||||||
|
|
||||||
|
define(Yr, calc(Yl + b))
|
||||||
|
define(Yrlc, calc(Yr - blc))
|
||||||
|
define(Yruc, calc(Yr - buc))
|
||||||
|
|
||||||
|
define(Zb, -CofGz)
|
||||||
|
define(Zlc, calc(Zb + hlc))
|
||||||
|
define(Zt, calc(Zb + h))
|
||||||
|
define(Zuc, calc(Zt - huc))
|
||||||
|
|
||||||
|
define(Xf, calc(l/2.0))
|
||||||
|
define(Xb, calc(Xf - l))
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Parametric description
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(Xb Yllc Zb) vlabel(bllcb)
|
||||||
|
(Xb Yl Zlc) vlabel(bllc)
|
||||||
|
(Xb Yl Zuc) vlabel(bluc)
|
||||||
|
(Xb Yluc Zt) vlabel(bluct)
|
||||||
|
(Xb Yrlc Zb) vlabel(brlcb)
|
||||||
|
(Xb Yr Zlc) vlabel(brlc)
|
||||||
|
(Xb Yr Zuc) vlabel(bruc)
|
||||||
|
(Xb Yruc Zt) vlabel(bruct)
|
||||||
|
|
||||||
|
(Xf Yllc Zb) vlabel(fllcb)
|
||||||
|
(Xf Yl Zlc) vlabel(fllc)
|
||||||
|
(Xf Yl Zuc) vlabel(fluc)
|
||||||
|
(Xf Yluc Zt) vlabel(fluct)
|
||||||
|
(Xf Yrlc Zb) vlabel(frlcb)
|
||||||
|
(Xf Yr Zlc) vlabel(frlc)
|
||||||
|
(Xf Yr Zuc) vlabel(fruc)
|
||||||
|
(Xf Yruc Zt) vlabel(fruct)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
// block0
|
||||||
|
hex2D(llcb, rlcb, rlc, llc)
|
||||||
|
(Nb Nhlc Nl)
|
||||||
|
simpleGrading (1 1 1)
|
||||||
|
|
||||||
|
// block1
|
||||||
|
hex2D(llc, rlc, ruc, luc)
|
||||||
|
(Nb Nh Nl)
|
||||||
|
simpleGrading (1 1 1)
|
||||||
|
|
||||||
|
// block2
|
||||||
|
hex2D(luc, ruc, ruct, luct)
|
||||||
|
(Nb Nhuc Nl)
|
||||||
|
simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
patch walls
|
||||||
|
(
|
||||||
|
quad2D(llcb, rlcb)
|
||||||
|
quad2D(rlcb, rlc)
|
||||||
|
quad2D(rlc, ruc)
|
||||||
|
quad2D(ruc, ruct)
|
||||||
|
quad2D(ruct, luct)
|
||||||
|
quad2D(luct, luc)
|
||||||
|
quad2D(luc, llc)
|
||||||
|
quad2D(llc, llcb)
|
||||||
|
)
|
||||||
|
|
||||||
|
empty front
|
||||||
|
(
|
||||||
|
frontQuad(llcb, rlcb, rlc, llc)
|
||||||
|
frontQuad(llc, rlc, ruc, luc)
|
||||||
|
frontQuad(luc, ruc, ruct, luct)
|
||||||
|
)
|
||||||
|
|
||||||
|
empty back
|
||||||
|
(
|
||||||
|
backQuad(llcb, rlcb, rlc, llc)
|
||||||
|
backQuad(llc, rlc, ruc, luc)
|
||||||
|
backQuad(luc, ruc, ruct, luct)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
3
|
||||||
|
(
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 148;
|
||||||
|
startFace 2646;
|
||||||
|
}
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
inGroups 1(empty);
|
||||||
|
nFaces 1360;
|
||||||
|
startFace 2794;
|
||||||
|
}
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
inGroups 1(empty);
|
||||||
|
nFaces 1360;
|
||||||
|
startFace 4154;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
phases (water air);
|
||||||
|
|
||||||
|
pMin pMin [ 1 -1 -2 0 0 0 0 ] 1000;
|
||||||
|
|
||||||
|
sigma sigma [ 1 0 -2 0 0 0 0 ] 0;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heRhoThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport const;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState perfectGas;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleInternalEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 28.9;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Cp 1007;
|
||||||
|
Hf 0;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
mu 1.84e-05;
|
||||||
|
Pr 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heRhoThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport const;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState perfectFluid;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleInternalEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 18.0;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
R 3000;
|
||||||
|
rho0 1027;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Cp 4195;
|
||||||
|
Hf 0;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
mu 3.645e-4;
|
||||||
|
Pr 2.289;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object transportProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
phases (water air);
|
||||||
|
|
||||||
|
water
|
||||||
|
{
|
||||||
|
transportModel Newtonian;
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
air
|
||||||
|
{
|
||||||
|
transportModel Newtonian;
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
|
||||||
|
rho rho [ 1 -3 0 0 0 0 0 ] 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sigma sigma [ 1 0 -2 0 0 0 0 ] 0;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application compressibleInterDyMFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 40;
|
||||||
|
|
||||||
|
deltaT 0.0001;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
|
||||||
|
writeInterval 0.05;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression compressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 0.5;
|
||||||
|
maxAlphaCo 0.5;
|
||||||
|
|
||||||
|
maxDeltaT 1;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
probes
|
||||||
|
{
|
||||||
|
type probes;
|
||||||
|
functionObjectLibs ("libsampling.so");
|
||||||
|
outputControl outputTime;
|
||||||
|
probeLocations
|
||||||
|
(
|
||||||
|
( 0 9.95 19.77 )
|
||||||
|
( 0 -9.95 19.77 )
|
||||||
|
);
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
p
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
wallPressure
|
||||||
|
{
|
||||||
|
type surfaces;
|
||||||
|
functionObjectLibs ("libsampling.so");
|
||||||
|
outputControl outputTime;
|
||||||
|
surfaceFormat raw;
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
p
|
||||||
|
);
|
||||||
|
interpolationScheme cellPoint;
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
(
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
patches (walls);
|
||||||
|
triangulate false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 16;
|
||||||
|
|
||||||
|
method hierarchical;
|
||||||
|
|
||||||
|
simpleCoeffs
|
||||||
|
{
|
||||||
|
n ( 2 2 1 );
|
||||||
|
delta 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
|
hierarchicalCoeffs
|
||||||
|
{
|
||||||
|
n ( 4 2 2 );
|
||||||
|
delta 0.001;
|
||||||
|
order xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
manualCoeffs
|
||||||
|
{
|
||||||
|
dataFile "";
|
||||||
|
}
|
||||||
|
|
||||||
|
distributed no;
|
||||||
|
|
||||||
|
roots ( );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
div(phi,alpha) Gauss vanLeer;
|
||||||
|
div(phirb,alpha) Gauss interfaceCompression 1;
|
||||||
|
|
||||||
|
div(rho*phi,U) Gauss vanLeerV;
|
||||||
|
div(phi,thermo:rho.water) Gauss linear;
|
||||||
|
div(phi,thermo:rho.air) Gauss linear;
|
||||||
|
div(rho*phi,T) Gauss vanLeer;
|
||||||
|
div(rho*phi,K) Gauss linear;
|
||||||
|
div((phi+meshPhi),p) Gauss linear;
|
||||||
|
|
||||||
|
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p_rgh;
|
||||||
|
pcorr;
|
||||||
|
alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,134 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
alpha.water
|
||||||
|
{
|
||||||
|
nAlphaCorr 1;
|
||||||
|
nAlphaSubCycles 3;
|
||||||
|
cAlpha 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
".*(rho|rhoFinal)"
|
||||||
|
{
|
||||||
|
solver diagonal;
|
||||||
|
}
|
||||||
|
|
||||||
|
pcorr
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner
|
||||||
|
{
|
||||||
|
preconditioner GAMG;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
nPreSweeps 0;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nFinestSweeps 2;
|
||||||
|
cacheAgglomeration false;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
maxIter 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-08;
|
||||||
|
relTol 0.01;
|
||||||
|
smoother DIC;
|
||||||
|
nPreSweeps 0;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nFinestSweeps 2;
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rghFinal
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner
|
||||||
|
{
|
||||||
|
preconditioner GAMG;
|
||||||
|
tolerance 2e-09;
|
||||||
|
relTol 0;
|
||||||
|
nVcycles 2;
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
nPreSweeps 2;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nFinestSweeps 2;
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tolerance 2e-09;
|
||||||
|
relTol 0;
|
||||||
|
maxIter 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
U
|
||||||
|
{
|
||||||
|
solver smoothSolver;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
nSweeps 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(T|k|B|nuTilda).*"
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-08;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
momentumPredictor no;
|
||||||
|
transonic no;
|
||||||
|
nOuterCorrectors 1;
|
||||||
|
nCorrectors 2;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
correctPhi no;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
fields
|
||||||
|
{
|
||||||
|
}
|
||||||
|
equations
|
||||||
|
{
|
||||||
|
"U.*" 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object setFieldsDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defaultFieldValues
|
||||||
|
(
|
||||||
|
volScalarFieldValue alpha.water 0
|
||||||
|
);
|
||||||
|
|
||||||
|
regions
|
||||||
|
(
|
||||||
|
boxToCell
|
||||||
|
{
|
||||||
|
box ( -100 -100 -100 ) ( 100 100 0 );
|
||||||
|
fieldValues
|
||||||
|
(
|
||||||
|
volScalarFieldValue alpha.water 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -24,6 +24,11 @@ solvers
|
|||||||
cAlpha 1;
|
cAlpha 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
".*(rho|rhoFinal)"
|
||||||
|
{
|
||||||
|
solver diagonal;
|
||||||
|
}
|
||||||
|
|
||||||
pcorr
|
pcorr
|
||||||
{
|
{
|
||||||
solver PCG;
|
solver PCG;
|
||||||
@ -46,11 +51,6 @@ solvers
|
|||||||
maxIter 100;
|
maxIter 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
".*(rho|rhoFinal)"
|
|
||||||
{
|
|
||||||
solver diagonal;
|
|
||||||
}
|
|
||||||
|
|
||||||
p_rgh
|
p_rgh
|
||||||
{
|
{
|
||||||
solver GAMG;
|
solver GAMG;
|
||||||
|
|||||||
Reference in New Issue
Block a user