diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/Allclean b/tutorials/incompressible/pisoFoam/les/motorBike/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..ed221771be97b912d534e7e440fcec5582b1856a --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +(cd motorBike && ./Allclean) + +rm -rf motorBikeLES + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..634e4374e3394d8b3b22835a3dfd2dc32023b775 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/Allrun @@ -0,0 +1,35 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + + +cloneParallelCase() +{ + if [ -d $2 ] + then + echo "Case already cloned: remove case directory $2 to clone" + else + echo "Cloning $2 case from $1 in parallel mode" + mkdir $2 + cpfiles="0 0.org processor* system constant" + for f in $cpfiles + do + cp -r $1/$f $2 + done + fi +} + + +# Do the Spalart-Allmaras steady-state case +(cd motorBike && foamRunTutorials) + +# Clone the steady-stae case to the LES case +cloneParallelCase motorBike motorBikeLES + +# Do the LES case +cp lesFiles/Allrun motorBikeLES/ +(cd motorBikeLES && foamRunTutorials) + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..816c0eb32fa979079d650ce3cb8953b8a9d0840f --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun @@ -0,0 +1,25 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + + +# Set-up the LES case +cp ../lesFiles/fvS* ../lesFiles/controlDict system/ +cp ../lesFiles/LESProperties ../lesFiles/turbulenceProperties constant/ +cp ../lesFiles/nuSgs 0/ + +ls -d processor* | xargs -i rm -rf ./{}/0 $1 +ls -d processor* | xargs -i mv ./{}/500 ./{}/0 $1 +ls -d processor* | xargs -i rm -rf ./{}/0/uniform $1 + +ls -d processor* | xargs -i cp ../lesFiles/LESProperties ./{}/constant/ $1 +ls -d processor* | xargs -i cp ../lesFiles/turbulenceProperties ./{}/constant/ $1 +ls -d processor* | xargs -i cp ../lesFiles/nuSgs ./{}/0/ $1 + + +runParallel pisoFoam 8 + +runApplication reconstructParMesh -constant -mergeTol 1e-6 + +runApplication reconstructPar diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/LESProperties b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/LESProperties new file mode 100644 index 0000000000000000000000000000000000000000..cf4daa19a55f437de29e55a30c87a07f0c8b2630 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/LESProperties @@ -0,0 +1,203 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object LESProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +LESModel SpalartAllmarasDDES; + +delta cubeRootVol; + +printCoeffs on; + +laminarCoeffs +{ +} + +oneEqEddyCoeffs +{ + ck 0.07; + ce 1.05; +} + +dynOneEqEddyCoeffs +{ + ce 1.05; + filter simple; +} + +locDynOneEqEddyCoeffs +{ + ce 1.05; + filter simple; +} + +SmagorinskyCoeffs +{ + ce 1.05; + ck 0.07; +} + +Smagorinsky2Coeffs +{ + ce 1.05; + ck 0.07; + cD2 0.02; +} + +spectEddyViscCoeffs +{ + ce 1.05; + cB 8.22; + cK1 0.83; + cK2 1.03; + cK3 4.75; + cK4 2.55; +} + +dynSmagorinskyCoeffs +{ + ce 1.05; + filter simple; +} + +mixedSmagorinskyCoeffs +{ + ce 1.05; + ck 0.07; + filter simple; +} + +dynMixedSmagorinskyCoeffs +{ + ce 1.05; + filter simple; +} + +LRRDiffStressCoeffs +{ + ce 1.05; + ck 0.09; + c1 1.8; + c2 0.6; +} + +DeardorffDiffStressCoeffs +{ + ce 1.05; + ck 0.09; + cm 4.13; +} + +SpalartAllmarasCoeffs +{ + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; +} + +SpalartAllmarasDDESCoeffs +{ + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2.0; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; +} + +SpalartAllmarasIDDESCoeffs +{ + alphaNut 1.5; + kappa 0.4187; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2.0; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; +} + +cubeRootVolCoeffs +{ + deltaCoeff 1; +} + +PrandtlCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Cdelta 0.158; +} + +vanDriestCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Aplus 26; + Cdelta 0.158; +} + +smoothCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; +} + +kappa 0.4187; + +wallFunctionCoeffs +{ + E 9; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/controlDict b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..e08022a1d38e4abd3823b42e728da412a319eb2e --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/controlDict @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs ("libOpenFOAM.so" "libfieldFunctionObjects.so"); + +application pisoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.7; + +deltaT 1e-4; + +writeControl timeStep; + +writeInterval 1000; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression compressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +functions +{ + #include "readFields" + #include "cuttingPlane" + #include "streamLines" + #include "forceCoeffs" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..952e8fcbd1c6807469fcdbd289872705746e386a --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes @@ -0,0 +1,67 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default backward; +} + +d2dt2Schemes +{ +} + +gradSchemes +{ + default Gauss linear; + + grad(nuTilda) cellLimited Gauss linear 1; + grad(U) cellLimited Gauss linear 1; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss LUST unlimitedGrad(U); + //div(phi,U) Gauss linearUpwind unlimitedGrad(U); + div(phi,k) Gauss limitedLinear 1; + div(phi,nuTilda) Gauss limitedLinear 1; + + div((nuEff*dev(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear limited 0.33; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default limited 0.33; +} + +fluxRequired +{ + default no; + p; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..ea66aafdd784b2c78e959639172527f19d1841f1 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution @@ -0,0 +1,113 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-6; + relTol 0.1; + + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + + cacheAgglomeration true; + + nCellsInCoarsestLevel 50;//10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + + pFinal + { + solver GAMG; + tolerance 1e-6; + relTol 0; + + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + + cacheAgglomeration true; + + nCellsInCoarsestLevel 50;//10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-08; + relTol 0; + }; + + UFinal + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-08; + relTol 0; + }; + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-07; + relTol 0; + }; + + B + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-07; + relTol 0; + }; + + nuTilda + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-07; + relTol 0; + }; +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 1; +} + +PIMPLE +{ + nCorrectors 2; + nNonOrthogonalCorrectors 1; +} + +relaxationFactors +{ + U 1; + nuTilda 1; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs new file mode 100644 index 0000000000000000000000000000000000000000..8457a2775dc97259cf9dd5b027a44e10b8977e60 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nuSgs; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0.0544766; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.0544766; + } + + outlet + { + type inletOutlet; + inletValue uniform 0.0544766; + value uniform 0.0544766; + } + + frontAndBack + { + type symmetryPlane; + } + + lowerWall + { + type nuSgsUSpaldingWallFunction; + value uniform 0.0544766; + } + + upperWall + { + type symmetryPlane; + } + + "motorBike_.*" + { + type nuSgsUSpaldingWallFunction; + value uniform 0.0544766; + } + + "proc.*" + { + type processor; + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..b57933dc65ea4c78e3d08efedda6284f065196d8 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties @@ -0,0 +1,175 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType LESModel; + +turbulenceModel SpalartAllmaras; //kEpsilon; + +turbulence on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; +} + +RNGkEpsilonCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.0845; + C1 C1 [0 0 0 0 0 0 0] 1.42; + C2 C2 [0 0 0 0 0 0 0] 1.68; + alphak alphaK [0 0 0 0 0 0 0] 1.39; + alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; + eta0 eta0 [0 0 0 0 0 0 0] 4.38; + beta beta [0 0 0 0 0 0 0] 0.012; +} + +NonlinearKEShihCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphak alphak [0 0 0 0 0 0 0] 1; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; + A1 A1 [0 0 0 0 0 0 0] 1.25; + A2 A2 [0 0 0 0 0 0 0] 1000; + Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; + Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; + Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; + alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; +} + +LienCubicKECoeffs +{ + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphak alphak [0 0 0 0 0 0 0] 1; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + A1 A1 [0 0 0 0 0 0 0] 1.25; + A2 A2 [0 0 0 0 0 0 0] 1000; + Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; + Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; + Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; + alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; +} + +QZetaCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + anisotropic no; +} + +LaunderSharmaKECoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; +} + +LamBremhorstKECoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; +} + +LienCubicKELowReCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphak alphak [0 0 0 0 0 0 0] 1; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + A1 A1 [0 0 0 0 0 0 0] 1.25; + A2 A2 [0 0 0 0 0 0 0] 1000; + Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; + Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; + Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; + alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Am Am [0 0 0 0 0 0 0] 0.016; + Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; + Amu Amu [0 0 0 0 0 0 0] 0.00222; +} + +LienLeschzinerLowReCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + alphak alphak [0 0 0 0 0 0 0] 1; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Am Am [0 0 0 0 0 0 0] 0.016; + Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; + Amu Amu [0 0 0 0 0 0 0] 0.00222; +} + +LRRCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; + Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + Cs Cs [0 0 0 0 0 0 0] 0.25; + Ceps Ceps [0 0 0 0 0 0 0] 0.15; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; +} + +LaunderGibsonRSTMCoeffs +{ + Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; + Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; + C1 C1 [0 0 0 0 0 0 0] 1.44; + C2 C2 [0 0 0 0 0 0 0] 1.92; + C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; + C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; + Cs Cs [0 0 0 0 0 0 0] 0.25; + Ceps Ceps [0 0 0 0 0 0 0] 0.15; + alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaR alphaR [0 0 0 0 0 0 0] 1.22; +} + +SpalartAllmarasCoeffs +{ + alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; + Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; + Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; + Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; + Cw3 Cw3 [0 0 0 0 0 0 0] 2; + Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; + //Next line Modified vorticity factor by Ashford 1996 + Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; +} + +wallFunctionCoeffs +{ + kappa kappa [0 0 0 0 0 0 0] 0.4187; + E E [0 0 0 0 0 0 0] 9; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U new file mode 100644 index 0000000000000000000000000000000000000000..429820c1d790b4c3800992667a49d597671cf672 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +flowVelocity ( 20 0 0 ); + +pressure 0; + +turbulentKE 0.24; + +turbulentOmega 1.78; + +dimensions [ 0 1 -1 0 0 0 0 ]; + +internalField uniform ( 20 0 0 ); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform ( 20 0 0 ); + } + outlet + { + type inletOutlet; + inletValue uniform ( 0 0 0 ); + value uniform ( 20 0 0 ); + } + lowerWall + { + type fixedValue; + value uniform ( 20 0 0 ); + } + "motorBike_.*" + { + type fixedValue; + value uniform ( 0 0 0 ); + } + upperWall + { + type symmetryPlane; + } + frontAndBack + { + type symmetryPlane; + } + "proc.*" + { + type processor; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/fixedInlet b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/fixedInlet new file mode 100644 index 0000000000000000000000000000000000000000..f5f7a28192108d95603ea2906f299da8c9d1e584 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/fixedInlet @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +inlet +{ + type fixedValue; + value $internalField; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches new file mode 100644 index 0000000000000000000000000000000000000000..366119c086055ccca540aa1692a3bc20f9ab77e8 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +upperWall +{ + type symmetryPlane; +} + +frontAndBack +{ + type symmetryPlane; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/initialConditions b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/initialConditions new file mode 100644 index 0000000000000000000000000000000000000000..c5f017938b3677a5aaf16874de0001862d83cf46 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/initialConditions @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +flowVelocity (20 0 0); +pressure 0; +turbulentKE 0.24; +turbulentOmega 1.78; +#inputMode merge + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k new file mode 100644 index 0000000000000000000000000000000000000000..70993d30df916996d938634ce6475d92553f9c43 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 0.24; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.24; + } + outlet + { + type inletOutlet; + inletValue uniform 0.24; + value uniform 0.24; + } + lowerWall + { + type kqRWallFunction; + value uniform 0.24; + } + "motorBike_.*" + { + type kqRWallFunction; + value uniform 0.24; + } + upperWall + { + type symmetryPlane; + } + frontAndBack + { + type symmetryPlane; + } + "proc.*" + { + type processor; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda new file mode 100644 index 0000000000000000000000000000000000000000..fd875a7f5878cffea3af1451dcfa1ddfd4226bd6 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -1 0 0 0 0 ]; + +internalField uniform 0.05; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.05; + } + outlet + { + type inletOutlet; + inletValue uniform 0.05; + value uniform 0.05; + } + lowerWall + { + type fixedValue; + value uniform 0; + } + "motorBike_.*" + { + type fixedValue; + value uniform 0; + } + upperWall + { + type symmetryPlane; + } + frontAndBack + { + type symmetryPlane; + } + "proc.*" + { + type processor; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut new file mode 100644 index 0000000000000000000000000000000000000000..81fa3491fe4bbef7b2314402aa7447257e247d04 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -1 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + frontAndBack + { + type symmetryPlane; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + lowerWall + { + type nutUSpaldingWallFunction; + value uniform 0; + } + upperWall + { + type symmetryPlane; + value uniform 0; + } + "motorBike_.*" + { + type nutUSpaldingWallFunction; + value uniform 0; + } + "proc.*" + { + type processor; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p new file mode 100644 index 0000000000000000000000000000000000000000..c1dcf5ba2464d603da7254bb14230603a54d6926 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type fixedValue; + value uniform 0; + } + lowerWall + { + type zeroGradient; + } + "motorBike_.*" + { + type zeroGradient; + } + upperWall + { + type symmetryPlane; + } + frontAndBack + { + type symmetryPlane; + } + "proc.*" + { + type processor; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..51722330009f7c61c22ef6b77695c20eabc0e829 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean @@ -0,0 +1,14 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -rf 0 > /dev/null 2>&1 + +cleanCase + +# Reset decomposeParDict +cp system/decomposeParDict.hierarchical system/decomposeParDict + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..a49569ec1494e46e3d72cb724ea5b58d63e61d2c --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun @@ -0,0 +1,31 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + + +# Make dummy 0 directory +mkdir 0 + +runApplication blockMesh + +cp system/decomposeParDict.hierarchical system/decomposeParDict + +runApplication decomposePar + +cp system/decomposeParDict.ptscotch system/decomposeParDict + +runParallel snappyHexMesh 8 -overwrite -parallel + +find . -type f -iname "*level*" -exec rm {} \; + +ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1 + +runParallel renumberMesh 8 -overwrite + +runParallel potentialFoam 8 -initialiseUBCs -noFunctionObjects + +runParallel `getApplication` 8 + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/RASProperties b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/RASProperties new file mode 100644 index 0000000000000000000000000000000000000000..4b197babcd2b49c6020060e7cca039876c0fe4fb --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel SpalartAllmaras; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..ac00ce3248895fde6f16b33d0ca69cfbd4c7451a --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-5 -4 0) + (15 -4 0) + (15 4 0) + (-5 4 0) + (-5 -4 8) + (15 -4 8) + (15 4 8) + (-5 4 8) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 8 8) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + frontAndBack + { + type symmetryPlane; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (2 6 5 1) + ); + } + lowerWall + { + type wall; + faces + ( + (0 3 2 1) + ); + } + upperWall + { + type symmetryPlane; + faces + ( + (4 5 6 7) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall new file mode 100644 index 0000000000000000000000000000000000000000..3973c61866bb80b71f8e171e1989367699a1de1e --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-5 -4 0) + (15 -4 0) + (15 4 0) + (-5 4 0) + (-5 -4 8) + (15 -4 8) + (15 4 8) + (-5 4 8) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 10 10) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + frontAndBack + { + type symmetryPlane; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (2 6 5 1) + ); + } + lowerWall + { + type wall; + faces + ( + (0 3 2 1) + ); + } + upperWall + { + type symmetryPlane; + faces + ( + (4 5 6 7) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..42ee5fbee4ef5ee3fe94affed563830335f56f4b --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + frontAndBack + { + type symmetryPlane; + nFaces 320; + startFace 3456; + } + inlet + { + type patch; + nFaces 64; + startFace 3776; + } + outlet + { + type patch; + nFaces 64; + startFace 3840; + } + lowerWall + { + type wall; + nFaces 160; + startFace 3904; + } + upperWall + { + type symmetryPlane; + nFaces 160; + startFace 4064; + } +) + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/transportProperties b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..956d860898a187591b89ecee3bcedee6a06be855 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/transportProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [0 2 -1 0 0 0 0] 1.5e-05; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/triSurface/motorBike.stl b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/triSurface/motorBike.stl new file mode 100644 index 0000000000000000000000000000000000000000..ea9666fcf2db9cb1f0237ee80849acabf6b67dcf Binary files /dev/null and b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/triSurface/motorBike.stl differ diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..38eebca13e49e5a9ad147195357a9b4bfa634da9 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict @@ -0,0 +1,112 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs ("libOpenFOAM.so" "libfieldFunctionObjects.so"); + +application simpleFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 500; + +deltaT 1; + +writeControl timeStep; + +writeInterval 500; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression compressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ + readFields + { + functionObjectLibs ( "libfieldFunctionObjects.so" ); + type readFields; + fields ( p U ); + } + streamLines + { + type streamLine; + outputControl outputTime; + setFormat vtk; + U U; + trackForward true; + fields ( p U ); + lifeTime 10000; + nSubCycle 5; + cloudName particleTracks; + seedSampleSet uniform; + uniformCoeffs + { + type uniform; + axis x; + start ( -1.001 1e-07 0.0011 ); + end ( -1.001 1e-07 1.0011 ); + nPoints 20; + } + } + cuttingPlane + { + type surfaces; + functionObjectLibs ( "libsampling.so" ); + outputControl outputTime; + surfaceFormat vtk; + fields ( p U ); + interpolationScheme cellPoint; + surfaces ( yNormal { type cuttingPlane ; planeType pointAndNormal ; pointAndNormalDict { basePoint ( 0 0 0 ) ; normalVector ( 0 1 0 ) ; } interpolate true ; } ); + } + forces + { + type forceCoeffs; + functionObjectLibs ( "libforces.so" ); + outputControl timeStep; + outputInterval 1; + patches ( "motorBike.*" ); + pName p; + UName U; + rhoName rhoInf; + log true; + rhoInf 1; + liftDir ( 0 0 1 ); + dragDir ( 1 0 0 ); + CofR ( 0.72 0 0 ); + pitchAxis ( 0 1 0 ); + magUInf 20; + lRef 1.42; + Aref 0.75; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/cuttingPlane b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/cuttingPlane new file mode 100644 index 0000000000000000000000000000000000000000..1958ef2596a97d69d5009e2f8700d4931e26b01f --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/cuttingPlane @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +cuttingPlane +{ + type surfaces; + functionObjectLibs ("libsampling.so"); + outputControl outputTime; + + surfaceFormat vtk; + fields ( p U ); + + interpolationScheme cellPoint; + + surfaces + ( + yNormal + { + type cuttingPlane; + planeType pointAndNormal; + pointAndNormalDict + { + basePoint (0 0 0); + normalVector (0 1 0); + } + interpolate true; + } + ); +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..01cc97fc2ac40fad695c4e08bb8788e40cfe10ba --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method hierarchical; + +simpleCoeffs +{ + n ( 4 1 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 4 2 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile "cellDecomposition"; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict.hierarchical b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict.hierarchical new file mode 100644 index 0000000000000000000000000000000000000000..01cc97fc2ac40fad695c4e08bb8788e40cfe10ba --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict.hierarchical @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method hierarchical; + +simpleCoeffs +{ + n ( 4 1 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 4 2 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile "cellDecomposition"; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict.ptscotch b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict.ptscotch new file mode 100644 index 0000000000000000000000000000000000000000..aa42c46c5b93dc7b1ebf932b72c0ef215dbc8300 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict.ptscotch @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method ptscotch; + +simpleCoeffs +{ + n ( 4 1 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 4 2 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile "cellDecomposition"; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/forceCoeffs b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/forceCoeffs new file mode 100644 index 0000000000000000000000000000000000000000..d3dffac3df95b7fd30ddcaf04bc51816d3bfa713 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/forceCoeffs @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +forces +{ + type forceCoeffs; + functionObjectLibs ( "libforces.so" ); + outputControl timeStep; + outputInterval 1; + + patches ( "motorBike.*" ); + pName p; + UName U; + rhoName rhoInf; // Indicates incompressible + log true; + rhoInf 1; // Redundant for incompressible + liftDir (0 0 1); + dragDir (1 0 0); + CofR (0.72 0 0); // Axle midpoint on ground + pitchAxis (0 1 0); + magUInf 20; + lRef 1.42; // Wheelbase length + Aref 0.75; // Estimated +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..2733c3fc9ac05ddf91724d6ee3c37e6a8dc8edfa --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + grad(U) cellLimited Gauss linear 1; + grad(nuTilda) cellLimited Gauss linear 1; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linearUpwindV grad(U); + div(phi,k) Gauss upwind; + div(phi,omega) Gauss upwind; + div((nuEff*dev(T(grad(U))))) Gauss linear; + div(phi,nuTilda) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..e93a193ab40f0e95427bcddec8ebe3fbef4e44e5 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution @@ -0,0 +1,92 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-07; + relTol 0.1; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + } + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-08; + relTol 0.1; + nSweeps 1; + } + k + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-08; + relTol 0.1; + nSweeps 1; + } + omega + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-08; + relTol 0.1; + nSweeps 1; + } + nuTilda + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-08; + relT 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 2; +} + +potentialFlow +{ + nNonOrthogonalCorrectors 10; +} + +relaxationFactors +{ + p 0.3; + U 0.5; + k 0.7; + omega 0.7; + nuTilda 0.5; +} + +cache +{ + grad(U) ; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/readFields b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/readFields new file mode 100644 index 0000000000000000000000000000000000000000..9860e9076906f1beaf60571aaf5fbe04078598e3 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/readFields @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +// Make sure all fields for functionObjects are loaded. Prevents any +// problems running with execFlowFunctionObjects. +readFields +{ + // Where to load it from (if not already in solver) + functionObjectLibs ("libfieldFunctionObjects.so"); + + type readFields; + fields (p U); +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..dfd02f1a5b4b9273b98ad884c50ed17f7f7272b9 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict @@ -0,0 +1,332 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.7.1 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object snappyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Which of the steps to run +castellatedMesh true; +snap true; +addLayers false; + + +// Geometry. Definition of all surfaces. All surfaces are of class +// searchableSurface. +// Surfaces are used +// - to specify refinement for any mesh cell intersecting it +// - to specify refinement for any mesh cell inside/outside/near +// - to 'snap' the mesh boundary to the surface +geometry +{ + motorBike.stl + { + type triSurfaceMesh; + name motorBike; + } + + // Analytical shape; cylinder, sphere + refinementBox + { + type searchableBox; + min (-1.0 -0.7 0.0); + max ( 8.0 0.7 2.5); + } +}; + + + +// Settings for the castellatedMesh generation. +castellatedMeshControls +{ + + // Refinement parameters + // ~~~~~~~~~~~~~~~~~~~~~ + + // If local number of cells is >= maxLocalCells on any processor + // switches from from refinement followed by balancing + // (current method) to (weighted) balancing before refinement. + maxLocalCells 100000; + + // Overall cell limit (approximately). Refinement will stop immediately + // upon reaching this number so a refinement level might not complete. + // Note that this is the number of cells before removing the part which + // is not 'visible' from the keepPoint. The final number of cells might + // actually be a lot less. + maxGlobalCells 7000000; + + // The surface refinement loop might spend lots of iterations refining just a + // few cells. This setting will cause refinement to stop if <= minimumRefine + // are selected for refinement. Note: it will at least do one iteration + // (unless the number of cells to refine is 0) + minRefinementCells 10; + + // Allow a certain level of imbalance during refining + // (since balancing is quite expensive) + // Expressed as fraction of perfect balance (= overall number of cells / + // nProcs). 0=balance always. + maxLoadUnbalance 0.10; + + + // Number of buffer layers between different levels. + // 1 means normal 2:1 refinement restriction, larger means slower + // refinement. + nCellsBetweenLevels 3; + + + + // Explicit feature edge refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies a level for any cell intersected by its edges. + // This is a featureEdgeMesh, read from constant/triSurface for now. + features + ( + //{ + // file "someLine.eMesh"; + // level 2; + //} + ); + + + + // Surface based refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies two levels for every surface. The first is the minimum level, + // every cell intersecting a surface gets refined up to the minimum level. + // The second level is the maximum level. Cells that 'see' multiple + // intersections where the intersections make an + // angle > resolveFeatureAngle get refined up to the maximum level. + + refinementSurfaces + { + motorBike + { + // Surface-wise min and max refinement level + level (6 8); + } + } + + // Resolve sharp angles + resolveFeatureAngle 60; + + + // Region-wise refinement + // ~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies refinement level for cells in relation to a surface. One of + // three modes + // - distance. 'levels' specifies per distance to the surface the + // wanted refinement level. The distances need to be specified in + // descending order. + // - inside. 'levels' is only one entry and only the level is used. All + // cells inside the surface get refined up to the level. The surface + // needs to be closed for this to be possible. + // - outside. Same but cells outside. + + refinementRegions + { + refinementBox + { + mode inside; + levels ((1E15 5)); + } + } + + + // Mesh selection + // ~~~~~~~~~~~~~~ + + // After refinement patches get added for all refinementSurfaces and + // all cells intersecting the surfaces get put into these patches. The + // section reachable from the locationInMesh is kept. + // NOTE: This point should never be on a face, always inside a cell, even + // after refinement. + locationInMesh (3 3 0.43); + + + // Whether any faceZones (as specified in the refinementSurfaces) + // are only on the boundary of corresponding cellZones or also allow + // free-standing zone faces. Not used if there are no faceZones. + allowFreeStandingZoneFaces false; +} + + + +// Settings for the snapping. +snapControls +{ + //- Number of patch smoothing iterations before finding correspondence + // to surface + nSmoothPatch 3; + + //- Relative distance for points to be attracted by surface feature point + // or edge. True distance is this factor times local + // maximum edge length. + tolerance 4.0; + + //- Number of mesh displacement relaxation iterations. + nSolveIter 30; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 5; +} + + + +// Settings for the layer addition. +addLayersControls +{ + // Are the thickness parameters below relative to the undistorted + // size of the refined cell outside layer (true) or absolute sizes (false). + relativeSizes true; + + // Per final patch (so not geometry!) the layer information + layers + { + "(lowerWall|motorBike).*" + { + nSurfaceLayers 1; + } + } + + // Expansion factor for layer mesh + expansionRatio 1.0; + + //- Wanted thickness of final added cell layer. If multiple layers + // is the thickness of the layer furthest away from the wall. + // See relativeSizes parameter. + finalLayerThickness 0.3; + + //- Minimum thickness of cell layer. If for any reason layer + // cannot be above minThickness do not add layer. + // Relative to undistorted size of cell outside layer. + minThickness 0.1; + + //- If points get not extruded do nGrow layers of connected faces that are + // also not grown. This helps convergence of the layer addition process + // close to features. + nGrow 0; + + + // Advanced settings + + //- When not to extrude surface. 0 is flat surface, 90 is when two faces + // make straight angle. + featureAngle 60; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 3; + + // Number of smoothing iterations of surface normals + nSmoothSurfaceNormals 1; + + // Number of smoothing iterations of interior mesh movement direction + nSmoothNormals 3; + + // Smooth layer thickness over surface patches + nSmoothThickness 2; + + // Stop layer growth on highly warped cells + maxFaceThicknessRatio 0.5; + + // Reduce layer growth where ratio thickness to medial + // distance is large + maxThicknessToMedialRatio 0.3; + + // Angle used to pick up medial axis points + minMedianAxisAngle 90; + + // Create buffer region for new layer terminations + nBufferCellsNoExtrude 0; + + // Overall max number of layer addition iterations + nLayerIter 50; +} + + + +// Generic mesh quality settings. At any undoable phase these determine +// where to undo. +meshQualityControls +{ + //- Maximum non-orthogonality allowed. Set to 180 to disable. + maxNonOrtho 65; + + //- Max skewness allowed. Set to <0 to disable. + maxBoundarySkewness 20; + maxInternalSkewness 4; + + //- Max concaveness allowed. Is angle (in degrees) below which concavity + // is allowed. 0 is straight face, <0 would be convex face. + // Set to 180 to disable. + maxConcave 80; + + //- Minimum projected area v.s. actual area. Set to -1 to disable. + minFlatness 0.5; + + //- Minimum pyramid volume. Is absolute volume of cell pyramid. + // Set to a sensible fraction of the smallest cell volume expected. + // Set to very negative number (e.g. -1E30) to disable. + minVol 1e-13; + minTetQuality 1e-30; + + //- Minimum face area. Set to <0 to disable. + minArea -1; + + //- Minimum face twist. Set to <-1 to disable. dot product of face normal + //- and face centre triangles normal + minTwist 0.02; + + //- minimum normalised cell determinant + //- 1 = hex, <= 0 = folded or flattened illegal cell + minDeterminant 0.001; + + //- minFaceWeight (0 -> 0.5) + minFaceWeight 0.02; + + //- minVolRatio (0 -> 1) + minVolRatio 0.01; + + //must be >0 for Fluent compatibility + minTriangleTwist -1; + + + // Advanced + + //- Number of error distribution iterations + nSmoothScale 4; + //- amount to scale back displacement at error points + errorReduction 0.75; +} + + +// Advanced + +// Flags for optional output +// 0 : only write final meshes +// 1 : write intermediate meshes +// 2 : write volScalarField with cellLevel for postprocessing +// 4 : write current intersections as .obj files +debug 0; + + +// Merge tolerance. Is fraction of overall bounding box of initial mesh. +// Note: the write tolerance needs to be higher than this. +mergeTolerance 1E-6; + + +// ************************************************************************* // + diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/streamLines b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/streamLines new file mode 100644 index 0000000000000000000000000000000000000000..cfe583c4028d588a217b9e5e1b8fbc0118f9375e --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/streamLines @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +streamLines +{ + type streamLine; + + // Output every + outputControl outputTime; + // outputInterval 10; + + setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; + + // Velocity field to use for tracking. + U U; + + // Tracked forwards (+U) or backwards (-U) + trackForward true; + + // Names of fields to sample. Should contain above velocity field! + fields (p U); + + // Steps particles can travel before being removed + lifeTime 10000; + + // Number of steps per cell (estimate). Set to 1 to disable subcycling. + nSubCycle 5; + + // Cloud name to use + cloudName particleTracks; + + // Seeding method. See the sampleSets in sampleDict. + seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet; + + uniformCoeffs + { + type uniform; + axis x; //distance; + + // Note: tracks slightly offset so as not to be on a face + start (-1.001 1e-7 0.0011); + end (-1.001 1e-7 1.0011); + nPoints 20; + } +} + + +// ************************************************************************* //