diff --git a/integration/OpenCFD/testCases/waveExampleCnoidal/system/decomposeParDict b/integration/OpenCFD/testCases/waveExampleCnoidal/system/decomposeParDict index 28bcf3ad28..301d97027b 100644 --- a/integration/OpenCFD/testCases/waveExampleCnoidal/system/decomposeParDict +++ b/integration/OpenCFD/testCases/waveExampleCnoidal/system/decomposeParDict @@ -15,13 +15,13 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 8; +numberOfSubdomains 2; method hierarchical; hierarchicalCoeffs { - n (4 2 1); + n (2 1 1); delta 0.001; order xyz; } diff --git a/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSchemes b/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSchemes index c0cddb6d0e..eeff89271f 100644 --- a/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSchemes +++ b/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSchemes @@ -31,18 +31,12 @@ divSchemes div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div(phi,k) Gauss upwind; - div(phi,epsilon) Gauss upwind; - div(phi,omega) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; - div(phi,nuTilda) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default Gauss linear corrected; + default Gauss linear orthogonal; } interpolationSchemes @@ -52,15 +46,7 @@ interpolationSchemes snGradSchemes { - default corrected; -} - -fluxRequired -{ - default no; - p_rgh; - pcorr; - alpha; + default orthogonal; } diff --git a/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSolution b/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSolution index bb74b12427..a6d6b31154 100644 --- a/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSolution +++ b/integration/OpenCFD/testCases/waveExampleCnoidal/system/fvSolution @@ -21,7 +21,7 @@ solvers "alpha.water.*" { nAlphaCorr 1; - nAlphaSubCycles 2; + nAlphaSubCycles 3; alphaOuterCorrectors yes; cAlpha 1; @@ -47,41 +47,32 @@ solvers solver PCG; preconditioner DIC; tolerance 1e-6; - relTol 0; + relTol 0.1; } p_rghFinal { - solver PCG; - preconditioner DIC; - tolerance 1e-6; + solver GAMG; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + tolerance 1e-7; relTol 0; } - "(U|k|epsilon|omega)" + U { solver PBiCG; preconditioner DILU; tolerance 1e-6; - relTol 0; + relTol 0.1; } - "(U|k|epsilon|omega)Final" - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-6; - relTol 0; - } - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-6; - relTol 0; - } - - nuTilda + UFinal { solver PBiCG; preconditioner DILU; @@ -93,7 +84,7 @@ solvers PIMPLE { momentumPredictor no; - nCorrectors 3; + nCorrectors 2; nNonOrthogonalCorrectors 0; } diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/U b/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/U new file mode 100644 index 0000000000..b215c9cd48 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/U @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type waveInletVelocity; + value uniform (0 0 0); + } + + outlet + { + type waveInletVelocity; + value uniform (0 0 0); + } + + sides + { + type empty; + } + + ground + { + type fixedValue; + value uniform (0 0 0); + } + + top + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/alpha.water b/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/alpha.water new file mode 100644 index 0000000000..a99cef99e9 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/alpha.water @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type waveInletAlpha; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + ground + { + type zeroGradient; + } + + sides + { + type empty; + } + + top + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/p_rgh b/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/p_rgh new file mode 100644 index 0000000000..7ad5729cbf --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/0.orig/p_rgh @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedFluxPressure; + value uniform 0; + } + + outlet + { + type fixedFluxPressure; + value uniform 0; + } + + ground + { + type fixedFluxPressure; + value uniform 0; + } + + sides + { + type empty; + } + + top + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/Allclean b/integration/OpenCFD/testCases/waveExampleSolitary/Allclean new file mode 100755 index 0000000000..705f91474c --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -rf 0 + +cleanCase + diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/Allrun b/integration/OpenCFD/testCases/waveExampleSolitary/Allrun new file mode 100755 index 0000000000..9f0c668029 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/Allrun @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +restore0Dir + +runApplication blockMesh + +runApplication decomposePar + +runParallel setFields + +runParallel $(getApplication) diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/constant/g b/integration/OpenCFD/testCases/waveExampleSolitary/constant/g new file mode 100644 index 0000000000..3ec2141e5c --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 ); + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/constant/transportProperties b/integration/OpenCFD/testCases/waveExampleSolitary/constant/transportProperties new file mode 100644 index 0000000000..019225dd4f --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/constant/transportProperties @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1e-06; + rho [1 -3 0 0 0 0 0] 1000; +} + +air +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1.48e-05; + rho [1 -3 0 0 0 0 0] 1; +} + +sigma [1 0 -2 0 0 0 0] 0.07; + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/constant/turbulenceProperties b/integration/OpenCFD/testCases/waveExampleSolitary/constant/turbulenceProperties new file mode 100644 index 0000000000..115a9830c1 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/constant/waveProperties b/integration/OpenCFD/testCases/waveExampleSolitary/constant/waveProperties new file mode 100644 index 0000000000..b2568d8bda --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/constant/waveProperties @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object wavesProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inlet +{ + alpha alpha.water; + + waveModel Boussinesq; + + nPaddle 1; + + waveHeight 0.3; + + waveAngle 0.0; + + activeAbsorption yes; + + wavePeriod 0.0; +} + +outlet +{ + alpha alpha.water; + + waveModel shallowWaterAbsorption; + + nPaddle 1; +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/system/blockMeshDict b/integration/OpenCFD/testCases/waveExampleSolitary/system/blockMeshDict new file mode 100644 index 0000000000..175bb83f20 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/system/blockMeshDict @@ -0,0 +1,90 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + ( 0.0 0.0 0.0) + ( 10.0 0.0 0.0) + ( 10.0 0.02 0.0) + ( 0.0 0.02 0.0) + ( 0.0 0.0 1.5) + ( 10.0 0.0 1.5) + ( 10.0 0.02 1.5) + ( 0.0 0.02 1.5) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (500 1 150) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (1 5 6 2) + ); + } + ground + { + type wall; + faces + ( + (0 1 2 3) + ); + } + top + { + type patch; + faces + ( + (4 5 6 7) + ); + } + sides + { + type empty; + faces + ( + (0 1 5 4) + (3 2 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/system/controlDict b/integration/OpenCFD/testCases/waveExampleSolitary/system/controlDict new file mode 100644 index 0000000000..7894dff756 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/system/controlDict @@ -0,0 +1,136 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs +( + "libwaveBCs.so" + "libwaveModels.so" +); + +application interFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 7.0; + +deltaT 0.01; + +writeControl adjustableRunTime; + +writeInterval 0.033; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.65; +maxAlphaCo 0.65; + +maxDeltaT 0.05; + + +functions +{ + line + { + type sets; + libs ("libsampling.so"); + enabled true; + writeControl writeTime; + writeInterval 1; + + interpolationScheme cellPoint; + setFormat raw; + sets + ( + line1 + { + type uniform; + axis distance; + start ( 1.0 0.01 0.0 ); + end ( 1.0 0.01 1.5 ); + nPoints 1001; + } + line2 + { + type uniform; + axis distance; + start ( 2.0 0.01 0.0 ); + end ( 2.0 0.01 1.5 ); + nPoints 1001; + } + line3 + { + type uniform; + axis distance; + start ( 3.0 0.01 0.0 ); + end ( 3.0 0.01 1.5 ); + nPoints 1001; + } + line4 + { + type uniform; + axis distance; + start ( 5.0 0.01 0.0 ); + end ( 5.0 0.01 1.5 ); + nPoints 1001; + } + line5 + { + type uniform; + axis distance; + start ( 7.5 0.01 0.0 ); + end ( 7.5 0.01 1.5 ); + nPoints 1001; + } + + line6 + { + type uniform; + axis distance; + start ( 9.0 0.01 0.0 ); + end ( 9.0 0.01 1.5 ); + nPoints 1001; + } + ); + + fixedLocations false; + fields + ( + U alpha.water + ); + } +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/system/decomposeParDict b/integration/OpenCFD/testCases/waveExampleSolitary/system/decomposeParDict new file mode 100644 index 0000000000..301d97027b --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/system/decomposeParDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method hierarchical; + +hierarchicalCoeffs +{ + n (2 1 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/system/fvSchemes b/integration/OpenCFD/testCases/waveExampleSolitary/system/fvSchemes new file mode 100644 index 0000000000..eeff89271f --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/system/fvSchemes @@ -0,0 +1,54 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss linearUpwind grad(U); + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/system/fvSolution b/integration/OpenCFD/testCases/waveExampleSolitary/system/fvSolution new file mode 100644 index 0000000000..a6d6b31154 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/system/fvSolution @@ -0,0 +1,93 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 1; + nAlphaSubCycles 3; + alphaOuterCorrectors yes; + cAlpha 1; + + MULESCorr no; + nLimiterIter 3; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + pcorr + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.1; + } + + p_rghFinal + { + solver GAMG; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + tolerance 1e-7; + relTol 0; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-6; + relTol 0.1; + } + + UFinal + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleSolitary/system/setFieldsDict b/integration/OpenCFD/testCases/waveExampleSolitary/system/setFieldsDict new file mode 100644 index 0000000000..755936dbe4 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleSolitary/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box (0 0 0) (30.0 1.0 0.7); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/U b/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/U new file mode 100644 index 0000000000..b215c9cd48 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/U @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type waveInletVelocity; + value uniform (0 0 0); + } + + outlet + { + type waveInletVelocity; + value uniform (0 0 0); + } + + sides + { + type empty; + } + + ground + { + type fixedValue; + value uniform (0 0 0); + } + + top + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/alpha.water b/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/alpha.water new file mode 100644 index 0000000000..a99cef99e9 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/alpha.water @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type waveInletAlpha; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + ground + { + type zeroGradient; + } + + sides + { + type empty; + } + + top + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/p_rgh b/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/p_rgh new file mode 100644 index 0000000000..7ad5729cbf --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/0.orig/p_rgh @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedFluxPressure; + value uniform 0; + } + + outlet + { + type fixedFluxPressure; + value uniform 0; + } + + ground + { + type fixedFluxPressure; + value uniform 0; + } + + sides + { + type empty; + } + + top + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/Allclean b/integration/OpenCFD/testCases/waveExampleStokesI/Allclean new file mode 100755 index 0000000000..705f91474c --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -rf 0 + +cleanCase + diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/Allrun b/integration/OpenCFD/testCases/waveExampleStokesI/Allrun new file mode 100755 index 0000000000..9f0c668029 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/Allrun @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +restore0Dir + +runApplication blockMesh + +runApplication decomposePar + +runParallel setFields + +runParallel $(getApplication) diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/constant/g b/integration/OpenCFD/testCases/waveExampleStokesI/constant/g new file mode 100644 index 0000000000..3ec2141e5c --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 ); + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/constant/transportProperties b/integration/OpenCFD/testCases/waveExampleStokesI/constant/transportProperties new file mode 100644 index 0000000000..019225dd4f --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/constant/transportProperties @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1e-06; + rho [1 -3 0 0 0 0 0] 1000; +} + +air +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1.48e-05; + rho [1 -3 0 0 0 0 0] 1; +} + +sigma [1 0 -2 0 0 0 0] 0.07; + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/constant/turbulenceProperties b/integration/OpenCFD/testCases/waveExampleStokesI/constant/turbulenceProperties new file mode 100644 index 0000000000..115a9830c1 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/constant/waveProperties b/integration/OpenCFD/testCases/waveExampleStokesI/constant/waveProperties new file mode 100644 index 0000000000..7597533efd --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/constant/waveProperties @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object wavesProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inlet +{ + alpha alpha.water; + + waveModel StokesI; + + nPaddle 1; + + waveHeight 0.05; + + waveAngle 0.0; + + rampTime 3.0; + + activeAbsorption yes; + + wavePeriod 3.0; +} + +outlet +{ + alpha alpha.water; + + waveModel shallowWaterAbsorption; + + nPaddle 1; +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/system/blockMeshDict b/integration/OpenCFD/testCases/waveExampleStokesI/system/blockMeshDict new file mode 100644 index 0000000000..2a16096fd6 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/system/blockMeshDict @@ -0,0 +1,90 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + ( 0.0 0.0 0.0) + ( 20.0 0.0 0.0) + ( 20.0 0.04 0.0) + ( 0.0 0.04 0.0) + ( 0.0 0.0 0.75) + ( 20.0 0.0 0.75) + ( 20.0 0.04 0.75) + ( 0.0 0.04 0.75) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (500 1 75) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (1 5 6 2) + ); + } + ground + { + type wall; + faces + ( + (0 1 2 3) + ); + } + top + { + type patch; + faces + ( + (4 5 6 7) + ); + } + sides + { + type empty; + faces + ( + (0 1 5 4) + (3 2 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/system/controlDict b/integration/OpenCFD/testCases/waveExampleStokesI/system/controlDict new file mode 100644 index 0000000000..c0d020cf65 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/system/controlDict @@ -0,0 +1,152 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs +( + "libwaveBCs.so" + "libwaveModels.so" +); + +application interFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 20.0; + +deltaT 0.01; + +writeControl adjustableRunTime; + +writeInterval 0.033; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.65; +maxAlphaCo 0.65; + +maxDeltaT 0.05; + + +functions +{ + line + { + type sets; + libs ("libsampling.so"); + enabled true; + writeControl writeTime; + writeInterval 1; + + interpolationScheme cellPoint; + setFormat raw; + sets + ( + line1 + { + type uniform; + axis distance; + start ( 1.0 0.02 0.0 ); + end ( 1.0 0.02 0.75 ); + nPoints 1001; + } + line2 + { + type uniform; + axis distance; + start ( 2.0 0.02 0.0 ); + end ( 2.0 0.02 0.75 ); + nPoints 1001; + } + line3 + { + type uniform; + axis distance; + start ( 3.0 0.02 0.0 ); + end ( 3.0 0.02 0.75 ); + nPoints 1001; + } + line4 + { + type uniform; + axis distance; + start ( 5.0 0.02 0.0 ); + end ( 5.0 0.02 0.75 ); + nPoints 1001; + } + line5 + { + type uniform; + axis distance; + start ( 7.5 0.02 0.0 ); + end ( 7.5 0.02 0.75 ); + nPoints 1001; + } + + line6 + { + type uniform; + axis distance; + start ( 10.0 0.02 0.0 ); + end ( 10.0 0.02 0.75 ); + nPoints 1001; + } + line7 + { + type uniform; + axis distance; + start ( 12.0 0.005 0.0 ); + end ( 12.0 0.005 0.75 ); + nPoints 1001; + } + line8 + { + type uniform; + axis distance; + start ( 14.0 0.005 0.0 ); + end ( 14.0 0.005 0.75 ); + nPoints 1001; + } + ); + + fixedLocations false; + fields + ( + U alpha.water + ); + } +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/system/decomposeParDict b/integration/OpenCFD/testCases/waveExampleStokesI/system/decomposeParDict new file mode 100644 index 0000000000..301d97027b --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/system/decomposeParDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method hierarchical; + +hierarchicalCoeffs +{ + n (2 1 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/system/fvSchemes b/integration/OpenCFD/testCases/waveExampleStokesI/system/fvSchemes new file mode 100644 index 0000000000..eeff89271f --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/system/fvSchemes @@ -0,0 +1,54 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss linearUpwind grad(U); + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/system/fvSolution b/integration/OpenCFD/testCases/waveExampleStokesI/system/fvSolution new file mode 100644 index 0000000000..a6d6b31154 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/system/fvSolution @@ -0,0 +1,93 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 1; + nAlphaSubCycles 3; + alphaOuterCorrectors yes; + cAlpha 1; + + MULESCorr no; + nLimiterIter 3; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + pcorr + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.1; + } + + p_rghFinal + { + solver GAMG; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + tolerance 1e-7; + relTol 0; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-6; + relTol 0.1; + } + + UFinal + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleStokesI/system/setFieldsDict b/integration/OpenCFD/testCases/waveExampleStokesI/system/setFieldsDict new file mode 100644 index 0000000000..7ef9bb06a1 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesI/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box (0 0 0) (20.0 1.0 0.6); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/U b/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/U new file mode 100644 index 0000000000..b215c9cd48 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/U @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type waveInletVelocity; + value uniform (0 0 0); + } + + outlet + { + type waveInletVelocity; + value uniform (0 0 0); + } + + sides + { + type empty; + } + + ground + { + type fixedValue; + value uniform (0 0 0); + } + + top + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/alpha.water b/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/alpha.water new file mode 100644 index 0000000000..a99cef99e9 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/alpha.water @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type waveInletAlpha; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + ground + { + type zeroGradient; + } + + sides + { + type empty; + } + + top + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/p_rgh b/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/p_rgh new file mode 100644 index 0000000000..7ad5729cbf --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/0.orig/p_rgh @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedFluxPressure; + value uniform 0; + } + + outlet + { + type fixedFluxPressure; + value uniform 0; + } + + ground + { + type fixedFluxPressure; + value uniform 0; + } + + sides + { + type empty; + } + + top + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/Allclean b/integration/OpenCFD/testCases/waveExampleStokesII/Allclean new file mode 100755 index 0000000000..705f91474c --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -rf 0 + +cleanCase + diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/Allrun b/integration/OpenCFD/testCases/waveExampleStokesII/Allrun new file mode 100755 index 0000000000..9f0c668029 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/Allrun @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +restore0Dir + +runApplication blockMesh + +runApplication decomposePar + +runParallel setFields + +runParallel $(getApplication) diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/constant/g b/integration/OpenCFD/testCases/waveExampleStokesII/constant/g new file mode 100644 index 0000000000..3ec2141e5c --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 ); + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/constant/transportProperties b/integration/OpenCFD/testCases/waveExampleStokesII/constant/transportProperties new file mode 100644 index 0000000000..019225dd4f --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/constant/transportProperties @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1e-06; + rho [1 -3 0 0 0 0 0] 1000; +} + +air +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1.48e-05; + rho [1 -3 0 0 0 0 0] 1; +} + +sigma [1 0 -2 0 0 0 0] 0.07; + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/constant/turbulenceProperties b/integration/OpenCFD/testCases/waveExampleStokesII/constant/turbulenceProperties new file mode 100644 index 0000000000..115a9830c1 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/constant/waveProperties b/integration/OpenCFD/testCases/waveExampleStokesII/constant/waveProperties new file mode 100644 index 0000000000..2099df6ed5 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/constant/waveProperties @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object wavesProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inlet +{ + alpha alpha.water; + + waveModel StokesII; + + nPaddle 1; + + waveHeight 0.05; + + waveAngle 0.0; + + rampTime 3.0; + + activeAbsorption yes; + + wavePeriod 3.0; +} + +outlet +{ + alpha alpha.water; + + waveModel shallowWaterAbsorption; + + nPaddle 1; +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/system/blockMeshDict b/integration/OpenCFD/testCases/waveExampleStokesII/system/blockMeshDict new file mode 100644 index 0000000000..afdb56d1bb --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/system/blockMeshDict @@ -0,0 +1,90 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + ( 0.0 0.0 0.0) + ( 20.0 0.0 0.0) + ( 20.0 0.04 0.0) + ( 0.0 0.04 0.0) + ( 0.0 0.0 0.55) + ( 20.0 0.0 0.55) + ( 20.0 0.04 0.55) + ( 0.0 0.04 0.55) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (500 1 55) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (1 5 6 2) + ); + } + ground + { + type wall; + faces + ( + (0 1 2 3) + ); + } + top + { + type patch; + faces + ( + (4 5 6 7) + ); + } + sides + { + type empty; + faces + ( + (0 1 5 4) + (3 2 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/system/controlDict b/integration/OpenCFD/testCases/waveExampleStokesII/system/controlDict new file mode 100644 index 0000000000..f779aa6fe6 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/system/controlDict @@ -0,0 +1,152 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs +( + "libwaveBCs.so" + "libwaveModels.so" +); + +application interFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 20.0; + +deltaT 0.01; + +writeControl adjustableRunTime; + +writeInterval 0.033; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.65; +maxAlphaCo 0.65; + +maxDeltaT 0.05; + + +functions +{ + line + { + type sets; + libs ("libsampling.so"); + enabled true; + writeControl writeTime; + writeInterval 1; + + interpolationScheme cellPoint; + setFormat raw; + sets + ( + line1 + { + type uniform; + axis distance; + start ( 1.0 0.02 0.0 ); + end ( 1.0 0.02 0.55 ); + nPoints 1001; + } + line2 + { + type uniform; + axis distance; + start ( 2.0 0.02 0.0 ); + end ( 2.0 0.02 0.55 ); + nPoints 1001; + } + line3 + { + type uniform; + axis distance; + start ( 3.0 0.02 0.0 ); + end ( 3.0 0.02 0.55 ); + nPoints 1001; + } + line4 + { + type uniform; + axis distance; + start ( 5.0 0.02 0.0 ); + end ( 5.0 0.02 0.55 ); + nPoints 1001; + } + line5 + { + type uniform; + axis distance; + start ( 7.5 0.02 0.0 ); + end ( 7.5 0.02 0.55 ); + nPoints 1001; + } + + line6 + { + type uniform; + axis distance; + start ( 10.0 0.02 0.0 ); + end ( 10.0 0.02 0.55 ); + nPoints 1001; + } + line7 + { + type uniform; + axis distance; + start ( 12.0 0.005 0.0 ); + end ( 12.0 0.005 0.55 ); + nPoints 1001; + } + line8 + { + type uniform; + axis distance; + start ( 14.0 0.005 0.0 ); + end ( 14.0 0.005 0.55 ); + nPoints 1001; + } + ); + + fixedLocations false; + fields + ( + U alpha.water + ); + } +} + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/system/decomposeParDict b/integration/OpenCFD/testCases/waveExampleStokesII/system/decomposeParDict new file mode 100644 index 0000000000..301d97027b --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/system/decomposeParDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method hierarchical; + +hierarchicalCoeffs +{ + n (2 1 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/system/fvSchemes b/integration/OpenCFD/testCases/waveExampleStokesII/system/fvSchemes new file mode 100644 index 0000000000..eeff89271f --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/system/fvSchemes @@ -0,0 +1,54 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss linearUpwind grad(U); + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/system/fvSolution b/integration/OpenCFD/testCases/waveExampleStokesII/system/fvSolution new file mode 100644 index 0000000000..a6d6b31154 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/system/fvSolution @@ -0,0 +1,93 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 1; + nAlphaSubCycles 3; + alphaOuterCorrectors yes; + cAlpha 1; + + MULESCorr no; + nLimiterIter 3; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + pcorr + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.1; + } + + p_rghFinal + { + solver GAMG; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + tolerance 1e-7; + relTol 0; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-6; + relTol 0.1; + } + + UFinal + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // + diff --git a/integration/OpenCFD/testCases/waveExampleStokesII/system/setFieldsDict b/integration/OpenCFD/testCases/waveExampleStokesII/system/setFieldsDict new file mode 100644 index 0000000000..9d2a8bcb80 --- /dev/null +++ b/integration/OpenCFD/testCases/waveExampleStokesII/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box (0 0 0) (30.0 1.0 0.4); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + + +// ************************************************************************* // diff --git a/integration/OpenCFD/testCases/waveExampleStokesV/system/decomposeParDict b/integration/OpenCFD/testCases/waveExampleStokesV/system/decomposeParDict index e0b4d2df3e..57c7bea5e3 100644 --- a/integration/OpenCFD/testCases/waveExampleStokesV/system/decomposeParDict +++ b/integration/OpenCFD/testCases/waveExampleStokesV/system/decomposeParDict @@ -15,13 +15,13 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 8; +numberOfSubdomains 2; method hierarchical; hierarchicalCoeffs { - n (2 2 2); + n (2 1 1); delta 0.001; order xyz; } diff --git a/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSchemes b/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSchemes index c0cddb6d0e..eeff89271f 100644 --- a/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSchemes +++ b/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSchemes @@ -31,18 +31,12 @@ divSchemes div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div(phi,k) Gauss upwind; - div(phi,epsilon) Gauss upwind; - div(phi,omega) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; - div(phi,nuTilda) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default Gauss linear corrected; + default Gauss linear orthogonal; } interpolationSchemes @@ -52,15 +46,7 @@ interpolationSchemes snGradSchemes { - default corrected; -} - -fluxRequired -{ - default no; - p_rgh; - pcorr; - alpha; + default orthogonal; } diff --git a/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSolution b/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSolution index bb74b12427..a6d6b31154 100644 --- a/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSolution +++ b/integration/OpenCFD/testCases/waveExampleStokesV/system/fvSolution @@ -21,7 +21,7 @@ solvers "alpha.water.*" { nAlphaCorr 1; - nAlphaSubCycles 2; + nAlphaSubCycles 3; alphaOuterCorrectors yes; cAlpha 1; @@ -47,41 +47,32 @@ solvers solver PCG; preconditioner DIC; tolerance 1e-6; - relTol 0; + relTol 0.1; } p_rghFinal { - solver PCG; - preconditioner DIC; - tolerance 1e-6; + solver GAMG; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + tolerance 1e-7; relTol 0; } - "(U|k|epsilon|omega)" + U { solver PBiCG; preconditioner DILU; tolerance 1e-6; - relTol 0; + relTol 0.1; } - "(U|k|epsilon|omega)Final" - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-6; - relTol 0; - } - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-6; - relTol 0; - } - - nuTilda + UFinal { solver PBiCG; preconditioner DILU; @@ -93,7 +84,7 @@ solvers PIMPLE { momentumPredictor no; - nCorrectors 3; + nCorrectors 2; nNonOrthogonalCorrectors 0; }