diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/Phi b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/Phi new file mode 100644 index 0000000000000000000000000000000000000000..83377457b706fd7e360668d28b874a6cf02b788e --- /dev/null +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/Phi @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/U b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/U similarity index 100% rename from tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/U rename to tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/U diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/alpha.water b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/alpha.water similarity index 100% rename from tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/alpha.water rename to tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/alpha.water diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/p_rgh b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/p_rgh similarity index 100% rename from tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/p_rgh rename to tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/p_rgh diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean index 7fb8f95518b4e87166826a4f5a1542ddad5c4be8..2bc59d1fe3babd395ea5944b9074c92146dd2b16 100755 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean @@ -4,9 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -# remove surface +# Remove surface \rm -f constant/triSurface/bullet.stl.gz +# Remove copy of 0.org +rm -rf 0 + cleanCase # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun index d8ade7b9c06a68f9b72fc1e68970651955305e15..56a77537ecba9e356dd730f7c4c391c1fe339773 100755 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $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/ # Generate the base block mesh @@ -13,6 +13,11 @@ runApplication blockMesh # Generate the snappy mesh runApplication snappyHexMesh -overwrite +cp -r 0.org 0 + +# Initialise with potentialFoam solution +runApplication potentialFoam -pName p_rgh + # Run the solver runApplication `getApplication` diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary index c87bd5dc917069d98ffd5703d32f421044ad6947..178b615d78484b55a8083a890a08be96510b2a84 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary @@ -39,6 +39,7 @@ FoamFile bullet { type wall; + inGroups 1(wall); nFaces 37743; startFace 1133431; } diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes index a61518f6189fc69b971a092b159bbea76626dde3..a20fa5dc3eafdb37bbc776b657fa3253a2a2dabe 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes @@ -16,43 +16,44 @@ FoamFile ddtSchemes { - default Euler; + default Euler; } interpolationSchemes { - default linear; + default linear; } divSchemes { - default none; - div(rhoPhi,U) Gauss linearUpwind grad(U); - div(phi,omega) Gauss linearUpwind grad(omega); - div(phi,k) Gauss linearUpwind grad(k); - div(phi,alpha) Gauss vanLeer; - div(phirb,alpha) Gauss linear; + default none; + div(rhoPhi,U) Gauss linearUpwind grad(U); + div(phi,omega) Gauss linearUpwind grad(omega); + div(phi,k) Gauss linearUpwind grad(k); + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } gradSchemes { - default Gauss linear; + default Gauss linear; } laplacianSchemes { - default Gauss linear limited corrected 0.5; + default Gauss linear limited corrected 0.5; } snGradSchemes { - default limited corrected 0.5; + default limited corrected 0.5; } fluxRequired { - default none; + default none; + Phi; p_rgh; pcorr; alpha.water; diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution index 7c3a9803ced99df2e4dda4d64cdabbfc53b04286..e53ce0ba911d18f4595e5f7767b9a0a3c3e50ff9 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution @@ -59,12 +59,6 @@ solvers maxIter 50; }; - pcorr - { - $p_rgh; - relTol 0; - }; - p_rghFinal { solver PCG; @@ -91,6 +85,23 @@ solvers relTol 0; maxIter 50; }; + + pcorr + { + $p_rgh; + relTol 0; + }; + + Phi + { + $p_rgh; + relTol 0; + }; +} + +potentialFlow +{ + nNonOrthogonalCorrectors 3; } PIMPLE @@ -103,12 +114,9 @@ PIMPLE relaxationFactors { - fields - { - } equations { - "U.*" 1; + "U.*" 1; } }