mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet: Added a potentialFoam initializer step
This commit is contained in:
@ -0,0 +1,46 @@
|
|||||||
|
/*--------------------------------*- 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;
|
||||||
|
location "0";
|
||||||
|
object Phi;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type symmetry;
|
||||||
|
}
|
||||||
|
|
||||||
|
bullet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -4,9 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Source tutorial clean functions
|
# Source tutorial clean functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
# remove surface
|
# Remove surface
|
||||||
\rm -f constant/triSurface/bullet.stl.gz
|
\rm -f constant/triSurface/bullet.stl.gz
|
||||||
|
|
||||||
|
# Remove copy of 0.org
|
||||||
|
rm -rf 0
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Source tutorial run functions
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
# copy bullet surface from resources directory
|
# Copy bullet surface from resources directory
|
||||||
cp $FOAM_TUTORIALS/resources/geometry/bullet.stl.gz constant/triSurface/
|
cp $FOAM_TUTORIALS/resources/geometry/bullet.stl.gz constant/triSurface/
|
||||||
|
|
||||||
# Generate the base block mesh
|
# Generate the base block mesh
|
||||||
@ -13,6 +13,11 @@ runApplication blockMesh
|
|||||||
# Generate the snappy mesh
|
# Generate the snappy mesh
|
||||||
runApplication snappyHexMesh -overwrite
|
runApplication snappyHexMesh -overwrite
|
||||||
|
|
||||||
|
cp -r 0.org 0
|
||||||
|
|
||||||
|
# Initialise with potentialFoam solution
|
||||||
|
runApplication potentialFoam -pName p_rgh
|
||||||
|
|
||||||
# Run the solver
|
# Run the solver
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ FoamFile
|
|||||||
bullet
|
bullet
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
|
inGroups 1(wall);
|
||||||
nFaces 37743;
|
nFaces 37743;
|
||||||
startFace 1133431;
|
startFace 1133431;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,43 +16,44 @@ FoamFile
|
|||||||
|
|
||||||
ddtSchemes
|
ddtSchemes
|
||||||
{
|
{
|
||||||
default Euler;
|
default Euler;
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
{
|
{
|
||||||
default linear;
|
default linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
divSchemes
|
divSchemes
|
||||||
{
|
{
|
||||||
default none;
|
default none;
|
||||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||||
div(phi,omega) Gauss linearUpwind grad(omega);
|
div(phi,omega) Gauss linearUpwind grad(omega);
|
||||||
div(phi,k) Gauss linearUpwind grad(k);
|
div(phi,k) Gauss linearUpwind grad(k);
|
||||||
div(phi,alpha) Gauss vanLeer;
|
div(phi,alpha) Gauss vanLeer;
|
||||||
div(phirb,alpha) Gauss linear;
|
div(phirb,alpha) Gauss linear;
|
||||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
gradSchemes
|
gradSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear;
|
default Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear limited corrected 0.5;
|
default Gauss linear limited corrected 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
snGradSchemes
|
snGradSchemes
|
||||||
{
|
{
|
||||||
default limited corrected 0.5;
|
default limited corrected 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
fluxRequired
|
fluxRequired
|
||||||
{
|
{
|
||||||
default none;
|
default none;
|
||||||
|
Phi;
|
||||||
p_rgh;
|
p_rgh;
|
||||||
pcorr;
|
pcorr;
|
||||||
alpha.water;
|
alpha.water;
|
||||||
|
|||||||
@ -59,12 +59,6 @@ solvers
|
|||||||
maxIter 50;
|
maxIter 50;
|
||||||
};
|
};
|
||||||
|
|
||||||
pcorr
|
|
||||||
{
|
|
||||||
$p_rgh;
|
|
||||||
relTol 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
p_rghFinal
|
p_rghFinal
|
||||||
{
|
{
|
||||||
solver PCG;
|
solver PCG;
|
||||||
@ -91,6 +85,23 @@ solvers
|
|||||||
relTol 0;
|
relTol 0;
|
||||||
maxIter 50;
|
maxIter 50;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pcorr
|
||||||
|
{
|
||||||
|
$p_rgh;
|
||||||
|
relTol 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
Phi
|
||||||
|
{
|
||||||
|
$p_rgh;
|
||||||
|
relTol 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
potentialFlow
|
||||||
|
{
|
||||||
|
nNonOrthogonalCorrectors 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
PIMPLE
|
PIMPLE
|
||||||
@ -103,12 +114,9 @@ PIMPLE
|
|||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
{
|
{
|
||||||
fields
|
|
||||||
{
|
|
||||||
}
|
|
||||||
equations
|
equations
|
||||||
{
|
{
|
||||||
"U.*" 1;
|
"U.*" 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user