From 69d0db285a4d2023da66bb65ed41cedf8c44d2bd Mon Sep 17 00:00:00 2001 From: Matthias Rauter <matthias.rauter@qt.io> Date: Sun, 12 Mar 2023 13:07:27 +0100 Subject: [PATCH] TUT: Added tutorial for faTwoLayerAvalancheFoam --- .../releaseAreaMapping/constant/releaseArea | 10 +- .../wolfsgrube/constant/transportProperties | 10 +- tutorials/wolfsgrube_mixed/0.orig/Us1 | 32 +++++ tutorials/wolfsgrube_mixed/0.orig/Us2 | 32 +++++ tutorials/wolfsgrube_mixed/0.orig/c2 | 32 +++++ tutorials/wolfsgrube_mixed/0.orig/h1 | 32 +++++ tutorials/wolfsgrube_mixed/0.orig/h2 | 32 +++++ tutorials/wolfsgrube_mixed/0.orig/hentrain | 32 +++++ tutorials/wolfsgrube_mixed/0.orig/k | 32 +++++ tutorials/wolfsgrube_mixed/Allclean | 12 ++ tutorials/wolfsgrube_mixed/Allrun | 1 + tutorials/wolfsgrube_mixed/Allrun-parallel | 39 ++++++ .../wolfsgrube_mixed/Allrun-redistribute | 40 ++++++ tutorials/wolfsgrube_mixed/Allrun-serial | 31 +++++ tutorials/wolfsgrube_mixed/COPYRIGHT.md | 1 + tutorials/wolfsgrube_mixed/constant/g | 20 +++ .../wolfsgrube_mixed/constant/gisdata/aoi.dbf | Bin 0 -> 88 bytes .../wolfsgrube_mixed/constant/gisdata/aoi.shp | Bin 0 -> 864 bytes .../wolfsgrube_mixed/constant/gisdata/aoi.shx | Bin 0 -> 116 bytes tutorials/wolfsgrube_mixed/constant/offset | 1 + .../wolfsgrube_mixed/constant/releaseArea | 67 ++++++++++ .../constant/transportProperties | 121 ++++++++++++++++++ .../system/autoAreaToVolumeMapping | 18 +++ tutorials/wolfsgrube_mixed/system/controlDict | 58 +++++++++ .../wolfsgrube_mixed/system/decomposeParDict | 26 ++++ .../system/decomposeParDict.16 | 27 ++++ .../system/decomposeParDict.8 | 27 ++++ .../wolfsgrube_mixed/system/faMeshDefinition | 29 +++++ tutorials/wolfsgrube_mixed/system/faSchemes | 72 +++++++++++ tutorials/wolfsgrube_mixed/system/faSolution | 75 +++++++++++ tutorials/wolfsgrube_mixed/system/fvSchemes | 51 ++++++++ tutorials/wolfsgrube_mixed/system/fvSolution | 17 +++ .../wolfsgrube_mixed/system/gridToSTLDict | 51 ++++++++ tutorials/wolfsgrube_mixed/system/meshDict | 41 ++++++ 34 files changed, 1059 insertions(+), 10 deletions(-) create mode 100644 tutorials/wolfsgrube_mixed/0.orig/Us1 create mode 100644 tutorials/wolfsgrube_mixed/0.orig/Us2 create mode 100644 tutorials/wolfsgrube_mixed/0.orig/c2 create mode 100644 tutorials/wolfsgrube_mixed/0.orig/h1 create mode 100644 tutorials/wolfsgrube_mixed/0.orig/h2 create mode 100644 tutorials/wolfsgrube_mixed/0.orig/hentrain create mode 100644 tutorials/wolfsgrube_mixed/0.orig/k create mode 100755 tutorials/wolfsgrube_mixed/Allclean create mode 120000 tutorials/wolfsgrube_mixed/Allrun create mode 100755 tutorials/wolfsgrube_mixed/Allrun-parallel create mode 100755 tutorials/wolfsgrube_mixed/Allrun-redistribute create mode 100755 tutorials/wolfsgrube_mixed/Allrun-serial create mode 100644 tutorials/wolfsgrube_mixed/COPYRIGHT.md create mode 100644 tutorials/wolfsgrube_mixed/constant/g create mode 100644 tutorials/wolfsgrube_mixed/constant/gisdata/aoi.dbf create mode 100644 tutorials/wolfsgrube_mixed/constant/gisdata/aoi.shp create mode 100644 tutorials/wolfsgrube_mixed/constant/gisdata/aoi.shx create mode 100644 tutorials/wolfsgrube_mixed/constant/offset create mode 100644 tutorials/wolfsgrube_mixed/constant/releaseArea create mode 100644 tutorials/wolfsgrube_mixed/constant/transportProperties create mode 100644 tutorials/wolfsgrube_mixed/system/autoAreaToVolumeMapping create mode 100644 tutorials/wolfsgrube_mixed/system/controlDict create mode 100644 tutorials/wolfsgrube_mixed/system/decomposeParDict create mode 100644 tutorials/wolfsgrube_mixed/system/decomposeParDict.16 create mode 100644 tutorials/wolfsgrube_mixed/system/decomposeParDict.8 create mode 100644 tutorials/wolfsgrube_mixed/system/faMeshDefinition create mode 100644 tutorials/wolfsgrube_mixed/system/faSchemes create mode 100644 tutorials/wolfsgrube_mixed/system/faSolution create mode 100644 tutorials/wolfsgrube_mixed/system/fvSchemes create mode 100644 tutorials/wolfsgrube_mixed/system/fvSolution create mode 100644 tutorials/wolfsgrube_mixed/system/gridToSTLDict create mode 100644 tutorials/wolfsgrube_mixed/system/meshDict diff --git a/tutorials/releaseAreaMapping/constant/releaseArea b/tutorials/releaseAreaMapping/constant/releaseArea index ba1292c..4fbebf4 100644 --- a/tutorials/releaseAreaMapping/constant/releaseArea +++ b/tutorials/releaseAreaMapping/constant/releaseArea @@ -62,7 +62,7 @@ fields { type polygon; filltype constant; - vertices + vertices ( (0 0 0) (2 0 0) @@ -77,7 +77,7 @@ fields { type polygon; filltype linear; - vertices + vertices ( (0 0 0) (2 0 0) @@ -99,7 +99,7 @@ fields projectToNormal on; type polygon; filltype constant; - vertices + vertices ( (0 0 0) (2 0 0) @@ -109,13 +109,13 @@ fields value 0.5; offset (5 16 0); } - + PolygonWithLinearValueProjected { projectToNormal on; type polygon; filltype linear; - vertices + vertices ( (0 0 0) (2 0 0) diff --git a/tutorials/wolfsgrube/constant/transportProperties b/tutorials/wolfsgrube/constant/transportProperties index d1604f6..0dc6662 100644 --- a/tutorials/wolfsgrube/constant/transportProperties +++ b/tutorials/wolfsgrube/constant/transportProperties @@ -18,13 +18,13 @@ pressureFeedback off; explicitDryAreas on; -hmin hmin [ 0 1 0 0 0 0 0] 1e-5; +hmin hmin [ 0 1 0 0 0 0 0] 1e-5; -rho rho [ 1 -3 0 0 0 0 0 ] 200.; +rho rho [ 1 -3 0 0 0 0 0 ] 200.; -u0 u0 [ 0 1 -1 0 0 0 0] 1e-4; +u0 u0 [ 0 1 -1 0 0 0 0] 1e-4; -h0 h0 [ 0 1 0 0 0 0 0] 1e-4; +h0 h0 [ 0 1 0 0 0 0 0] 1e-4; xi xi [ 0 0 0 0 0 0 0] 1; @@ -36,7 +36,7 @@ depositionModel depositionOff; VoellmyCoeffs { - mu mu [0 0 0 0 0 0 0] 0.26; + mu mu [0 0 0 0 0 0 0] 0.26; xi xi [0 1 -2 0 0 0 0] 8650; } diff --git a/tutorials/wolfsgrube_mixed/0.orig/Us1 b/tutorials/wolfsgrube_mixed/0.orig/Us1 new file mode 100644 index 0000000..edfec65 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/Us1 @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaVectorField; + object Us; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/0.orig/Us2 b/tutorials/wolfsgrube_mixed/0.orig/Us2 new file mode 100644 index 0000000..edfec65 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/Us2 @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaVectorField; + object Us; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/0.orig/c2 b/tutorials/wolfsgrube_mixed/0.orig/c2 new file mode 100644 index 0000000..a5770fa --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/c2 @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + object c2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/0.orig/h1 b/tutorials/wolfsgrube_mixed/0.orig/h1 new file mode 100644 index 0000000..94e4e5a --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/h1 @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + object h; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/0.orig/h2 b/tutorials/wolfsgrube_mixed/0.orig/h2 new file mode 100644 index 0000000..94e4e5a --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/h2 @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + object h; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/0.orig/hentrain b/tutorials/wolfsgrube_mixed/0.orig/hentrain new file mode 100644 index 0000000..fb0b332 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/hentrain @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + object hentrain; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/0.orig/k b/tutorials/wolfsgrube_mixed/0.orig/k new file mode 100644 index 0000000..92922f3 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/0.orig/k @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + object h; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1e-2; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/Allclean b/tutorials/wolfsgrube_mixed/Allclean new file mode 100755 index 0000000..7c080cf --- /dev/null +++ b/tutorials/wolfsgrube_mixed/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +rm -rf constant/surface.stl +rm -rf constant/offset +touch constant/offset +cleanCase0 +cleanFaMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/wolfsgrube_mixed/Allrun b/tutorials/wolfsgrube_mixed/Allrun new file mode 120000 index 0000000..f8f6fb5 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/Allrun @@ -0,0 +1 @@ +Allrun-parallel \ No newline at end of file diff --git a/tutorials/wolfsgrube_mixed/Allrun-parallel b/tutorials/wolfsgrube_mixed/Allrun-parallel new file mode 100755 index 0000000..d8e6fe3 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/Allrun-parallel @@ -0,0 +1,39 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication gridToSTL + +if [ "$WM_LABEL_SIZE" = 64 ] +then + echo "Skip tutorial - known issues with pMesh and 64-bit labels" + echo End + exit 0 +elif command -v pMesh > /dev/null +then + runApplication pMesh +else + echo "Skip tutorial - no pMesh found" + echo End + exit 0 +fi + +runApplication makeFaMesh + +# Restore initial fields (prior to decompose) +restore0Dir + +# Use alternative decomposeParDict +decompDict="-decomposeParDict system/decomposeParDict.8" + +# Or unset to use default system/decomposeParDict +#unset decompDict + +runApplication $decompDict decomposePar + +runParallel $decompDict releaseAreaMapping + +runParallel $decompDict $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/wolfsgrube_mixed/Allrun-redistribute b/tutorials/wolfsgrube_mixed/Allrun-redistribute new file mode 100755 index 0000000..a17e137 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/Allrun-redistribute @@ -0,0 +1,40 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication gridToSTL + +if [ "$WM_LABEL_SIZE" = 64 ] +then + echo "Skip tutorial - known issues with pMesh and 64-bit labels" + echo End + exit 0 +elif command -v pMesh > /dev/null +then + runApplication pMesh +else + echo "Skip tutorial - no pMesh found" + echo End + exit 0 +fi + +runApplication makeFaMesh + +# Restore initial fields (prior to decompose) +restore0Dir + +runApplication decomposePar + +runParallel releaseAreaMapping + +# Redistribute onto more cpus - currently not working for faMesh +# These are unnecessary intermediate steps, but checks that everything works + +decompDict="-decomposeParDict system/decomposeParDict.16" + +runParallel $decompDict redistributePar -overwrite + +runParallel $decompDict $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/wolfsgrube_mixed/Allrun-serial b/tutorials/wolfsgrube_mixed/Allrun-serial new file mode 100755 index 0000000..9619f6a --- /dev/null +++ b/tutorials/wolfsgrube_mixed/Allrun-serial @@ -0,0 +1,31 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication gridToSTL + +if [ "$WM_LABEL_SIZE" = 64 ] +then + echo "Skip tutorial - known issues with pMesh and 64-bit labels" + echo End + exit 0 +elif command -v pMesh > /dev/null +then + runApplication pMesh +else + echo "Skip tutorial - no pMesh found" + echo End + exit 0 +fi + +runApplication makeFaMesh + +# Restore initial fields +restore0Dir + +runApplication releaseAreaMapping + +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/wolfsgrube_mixed/COPYRIGHT.md b/tutorials/wolfsgrube_mixed/COPYRIGHT.md new file mode 100644 index 0000000..77de542 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/COPYRIGHT.md @@ -0,0 +1 @@ +See Wolfsgrube case. \ No newline at end of file diff --git a/tutorials/wolfsgrube_mixed/constant/g b/tutorials/wolfsgrube_mixed/constant/g new file mode 100644 index 0000000..3070ab7 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/constant/g @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 0 -9.81); + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/constant/gisdata/aoi.dbf b/tutorials/wolfsgrube_mixed/constant/gisdata/aoi.dbf new file mode 100644 index 0000000000000000000000000000000000000000..629ab1d93ee82d195319a239e2938713e77750b9 GIT binary patch literal 88 pcmZRs;^AUqU|?`$;AX%EGE?B9ejpYXh(N-;3UFWmXDJv;0RXDt1rGoK literal 0 HcmV?d00001 diff --git a/tutorials/wolfsgrube_mixed/constant/gisdata/aoi.shp b/tutorials/wolfsgrube_mixed/constant/gisdata/aoi.shp new file mode 100644 index 0000000000000000000000000000000000000000..34420008cfeac3d080b2602ed0832d02f10bf58b GIT binary patch literal 864 zcmZQzQ0HR63K%!MU}j)oWnf@1S8w6r;oo)O*89oPt(UnR)1*s1Y7b35(9NOH_RW;r z5vz7oK}H4!Mh%czZ&PKiYjvzS&>*x(==(h`N8_ptv5ccD4k&zlx0L-Imm?zs1A`J& z@0`0wBYa&~A9%nhd2q!8F30104rKCdS$)9a?Y3f`$6Ssdj}^>#%dzG_!*A1~@~2#m z4~i-ewdbrk(7-J7MfW9_Bg`&_#kbeKe#Paeov`LOgW8${3VsS3roHBJ{Ix$jNO0Ne z0}uB8Vtw$M%aN@#u3&N4>H`V3`*xmu&E<IP(?d^ox77z0EWcu#_L|F4-8E?Ej$f+| z91vHN)PBR|D3i3zdEdrW2N+_irj)$la(o$8_CT#>)qw-2FYNg9hRgA~qWRn7p{wA2 zdsO23)!t&&fd`Y5t|z|ba(pm@ZNeVDRR<D|zL_fYhRf0N$%a;e=PM5+EI6b2;uV+U zAJ30p7H(L1Kq39cX`7c^jsi?`=9{*yJm9eR@{XqGT#hUHK877nUwI&5p^}`=GcLz< z#?H5wTdq8CfM>z^?k8N1H7O5&sh?PJK%w$OSouRlSU2>X4t(%{%W>nJNdhaBR~~5K z(W(7$pUd&cAJ;?tJu43^FtU7PbDzs`j*hN3_tll~xMDk*eZF6R)d7ad1_cuLxg00= zrfAA%uR5Th_w>i)`&^C>8L#a<*R$$Cg7==O!4J3`UoBR<{dLi*0|}r1ZP@*Q%kk?2 zGXvw@s}4M{6<YNA0hi;lwHw2gudh1r;NGPjOb@vnL(f>LY++b^fMK!8G}eb)jxzUz zJ~&CNKA^B)W6RqIT#o4Jfq{Vmlw6pg$pu7vfYR8sM<N`j|86;u>{BJ#b(_nPf8YJu zZ!?x3@Va|vv5p2eIE}GEHNn)Lv+?PeD#7i@rlfq4!+H~3?G)h;z44Lj;Cz@_%JzBN V4&UK&^mufW>rcrVxLxSx0RV#Aa;N|R literal 0 HcmV?d00001 diff --git a/tutorials/wolfsgrube_mixed/constant/gisdata/aoi.shx b/tutorials/wolfsgrube_mixed/constant/gisdata/aoi.shx new file mode 100644 index 0000000000000000000000000000000000000000..2d654195ffb62b3196f9d70e62d3ac82f33923ad GIT binary patch literal 116 zcmZQzQ0HR64y;}<Gcd3+Fff>_xA5@r?>cbn{p9G@%Uq6W(xo1?hbABB=1^$+X3Fh| WT|2TUV;lnm0}}%SV+sQUg9iZN4G+fv literal 0 HcmV?d00001 diff --git a/tutorials/wolfsgrube_mixed/constant/offset b/tutorials/wolfsgrube_mixed/constant/offset new file mode 100644 index 0000000..cf6dccc --- /dev/null +++ b/tutorials/wolfsgrube_mixed/constant/offset @@ -0,0 +1 @@ +offset (5373.79 -220017 0); \ No newline at end of file diff --git a/tutorials/wolfsgrube_mixed/constant/releaseArea b/tutorials/wolfsgrube_mixed/constant/releaseArea new file mode 100644 index 0000000..6ec93dd --- /dev/null +++ b/tutorials/wolfsgrube_mixed/constant/releaseArea @@ -0,0 +1,67 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object releaseArea; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fields +{ + hentrain + { + regions + ( + base + { + type shapefile; + filename "constant/gisdata/aoi"; + #include "../constant/offset"; + + filltype linear; + valueAtZero 1.6; + z0 1289; + dfdz 0.0008; + projectToNormal yes; + } + + releaseArea1 + { + type shapefile; + filename "../wolfsgrube/constant/gisdata/release"; + #include "../constant/offset"; + + filltype linear; + valueAtZero 0; + projectToNormal yes; + } + ); + } + h1 + { + default h0 [0 1 0 0 0 0 0] 1e-5; + regions + ( + releaseArea1 + { + type shapefile; + filename "../wolfsgrube/constant/gisdata/release"; + #include "../constant/offset"; + + filltype linear; + valueAtZero 1.6; + z0 1289; + dfdz 0.0008; + projectToNormal yes; + } + ); + } +} diff --git a/tutorials/wolfsgrube_mixed/constant/transportProperties b/tutorials/wolfsgrube_mixed/constant/transportProperties new file mode 100644 index 0000000..7e8bcec --- /dev/null +++ b/tutorials/wolfsgrube_mixed/constant/transportProperties @@ -0,0 +1,121 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +denseFlow +{ + bindHeight on; + + pressureFeedback off; + + hmin hmin [ 0 1 0 0 0 0 0] 1e-9; + + rho rho [ 1 -3 0 0 0 0 0 ] 200.; + + phi phi [ 0 0 0 0 0 0 0] 0.25; + + u0 u0 [ 0 1 -1 0 0 0 0] 1e-5; + + h0 h0 [ 0 1 0 0 0 0 0] 1e-8; + + xi xi [ 0 0 0 0 0 0 0] 1.25; + + xit xit [ 0 0 0 0 0 0 0] 1.67; + + frictionModel kt; + + entrainmentModel Erosionenergy; + + depositionModel depositionOff; + + + ktCoeffs + { + mu mu [0 0 0 0 0 0 0] 0.26; + + chi chi [0 -1 -2 0 0 0 0] 8700; + } + + ErosionenergyCoeffs + { + eb eb [0 2 -2 0 0 0 0] 1000; + } +} + +powderCloud +{ + waterSink off; + + bindHeight on; + + hmin hmin [ 0 1 0 0 0 0 0] 1e-9; + + cmin cmin [ 0 0 0 0 0 0 0] 1e-10; + + h0 h0 [ 0 1 0 0 0 0 0] 1e-8; + + u0 u0 [0 1 -1 0 0 0 0] 1e-5; + + xi xi [ 0 0 0 0 0 0 0] 1.25; + + nu nu [0 2 -1 0 0 0 0] 1.5e-5; + + hwem hwem [ 0 1 0 0 0 0 0] 1000.; + + hentmin hentmin [ 0 1 0 0 0 0 0] 0.1; + + R R [ 0 0 0 0 0 0 0] 800; + + Ds Ds [ 0 1 0 0 0 0 0] 0.0001; + + Zc Zc [ 0 0 0 0 0 0 0] 0.5; + + Zm Zm [ 0 0 0 0 0 0 0] 13.2; + + ewf ewf [ 0 0 0 0 0 0 0] 0.00153; + + Ri0 Ri0 [ 0 0 0 0 0 0 0] 0.0204; + + phi0 phi0 [ 0 0 0 0 0 0 0] 0.25; + + suspensionFrictionModel laminarSuspension; + + suspensionEntrainmentModel ParkerFukushimaEntrainment; + + suspensionDepositionModel ParkerFukushimaDeposition; + + ambientEntrainmentModel ParkerFukushimaEntrainment; + + laminarSuspensionCoeffs + { + cd cd [0 0 0 0 0 0 0] 0.5; + } +} + +couplingModel couplingInertial; + +couplingInertialCoeffs +{ + I0 I0 [ 0 0 0 0 0 0 0] 0.5; + + u0 u0 [ 0 0 0 0 0 0 0] 1e-5; + + d d [ 0 1 0 0 0 0 0] 0.01; + + rhos rhos [ 1 -3 0 0 0 0 0] 800; + +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/autoAreaToVolumeMapping b/tutorials/wolfsgrube_mixed/system/autoAreaToVolumeMapping new file mode 100644 index 0000000..e520b5d --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/autoAreaToVolumeMapping @@ -0,0 +1,18 @@ +// -*- C++ -*- +// Use autoAreaToVolumeMapping function object + +autoAreaToVolumeMapping +{ + type autoAreaToVolumeMapping; + libs (faAvalanche); + + fields (".*"); + + writeOption autoWrite; + //writeOption noWrite; + //writeOption anyWrite; + + prefix "fa_"; +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/controlDict b/tutorials/wolfsgrube_mixed/system/controlDict new file mode 100644 index 0000000..b957f39 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/controlDict @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application faTwoLayerAvalancheFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 90; + +deltaT 0.002; + +writeControl adjustableRunTime; + +writeInterval 2; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +initDeltaT no; + +maxCo 0.7; + +functions +{ + #include "autoAreaToVolumeMapping" +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/decomposeParDict b/tutorials/wolfsgrube_mixed/system/decomposeParDict new file mode 100644 index 0000000..532cc8e --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/decomposeParDict @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +coeffs +{ + n (2 2 1); +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/decomposeParDict.16 b/tutorials/wolfsgrube_mixed/system/decomposeParDict.16 new file mode 100644 index 0000000..fecf156 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/decomposeParDict.16 @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 16; + +method hierarchical; + +coeffs +{ + n (4 4 1); +} + + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/decomposeParDict.8 b/tutorials/wolfsgrube_mixed/system/decomposeParDict.8 new file mode 100644 index 0000000..c81ae08 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/decomposeParDict.8 @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method hierarchical; + +coeffs +{ + n (8 1 1); +} + + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/faMeshDefinition b/tutorials/wolfsgrube_mixed/system/faMeshDefinition new file mode 100644 index 0000000..af27143 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/faMeshDefinition @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faMeshDefinition; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +polyMeshPatches 1( terrain ); + +boundary +{ + wall + { + type patch; + ownerPolyPatch terrain; + neighbourPolyPatch wall; + } +} + +// ************************************************************************** // diff --git a/tutorials/wolfsgrube_mixed/system/faSchemes b/tutorials/wolfsgrube_mixed/system/faSchemes new file mode 100644 index 0000000..4b1617b --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/faSchemes @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + ddt(hentrain) backward; + ddt(h1,Us1) backward; + ddt(h1) backward; + ddt(hentrain2) backward; + ddt(h2,Us2) backward; + ddt(h2,c2) backward; + ddt(h2) backward; + ddt(h2,k) backward; + ddt(c2,Us2) backward; + ddt(c2) backward; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phis1,h1) Gauss upwind; + div(phi2s1,Us1) Gauss upwind; + div(phis2,h2) Gauss upwind; + div(phi2s2,Us2) Gauss upwind; + div(phi2s2,c2) Gauss upwind; + div(phi2s2,k) Gauss upwind; + div(phis2,Us2) Gauss upwind; + div((interpolate(c2)*phi2s2),Us2) Gauss upwind; +} + +laplacianSchemes +{ + default none; + laplacian(h1) Gauss linear corrected; + laplacian(h2) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + h1; + h2; +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/faSolution b/tutorials/wolfsgrube_mixed/system/faSolution new file mode 100644 index 0000000..5f79d7e --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/faSolution @@ -0,0 +1,75 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "hentrain.*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-10; + relTol 0.01; + } + + "Us.*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-10; + relTol 0.01; + } + + "h.*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-10; + relTol 0.01; + } + + "c.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-09; + relTol 0.01; + } + + "k.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-09; + relTol 0.01; + } + +} + +nOuterCorrectors 25; +minCorrectors 2; +hResidualMax 1e-4; +UsResidualMax 1e-4; + +relaxationFactors +{ + h1 0.78; + Us1 0.5; + h2 0.8; + Us2 0.5; + c2 0.9; +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/fvSchemes b/tutorials/wolfsgrube_mixed/system/fvSchemes new file mode 100644 index 0000000..0f06cb3 --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default none; +} + +gradSchemes +{ + default none; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; +} + +interpolationSchemes +{ + default none; +} + +snGradSchemes +{ + default none; +} + +fluxRequired +{ +} + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/fvSolution b/tutorials/wolfsgrube_mixed/system/fvSolution new file mode 100644 index 0000000..7d70a0b --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/fvSolution @@ -0,0 +1,17 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/gridToSTLDict b/tutorials/wolfsgrube_mixed/system/gridToSTLDict new file mode 100644 index 0000000..0c86a8d --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/gridToSTLDict @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object meshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//Output file +stlname "constant/surface.stl"; + +//Topography file +gridname "../wolfsgrube/constant/gisdata/dem.asc"; + +//Choose between boundary: fromShape or fromPoints: + +//Read Boundary from Shapefile +boundary fromShape; +shapeBoundary "constant/gisdata/aoi"; + +//Read Boundary form this dictionary + +// boundary fromPoints; +// boundaryPoints +// ( +// (-4666.57 221593 0) +// (-4259.78 222062 0) +// (-3749.64 221983 0) +// (-3020.48 220056 0) +// (-3642.49 220017 0) +// ); + +//Division of an edge of the boundary polygon +divisions 300; + +//Height of the Domain +domainHeight 500.0; + +//Offset to reduce coordinate size +offset (5000.0 -220000.0 0); + + +// ************************************************************************* // diff --git a/tutorials/wolfsgrube_mixed/system/meshDict b/tutorials/wolfsgrube_mixed/system/meshDict new file mode 100644 index 0000000..219ce7a --- /dev/null +++ b/tutorials/wolfsgrube_mixed/system/meshDict @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: avalanche | +| \\ / A nd | https://develop.openfoam.com/Community/avalanche| +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object meshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +maxCellSize 40; + +surfaceFile "constant/surface.stl"; + +localRefinement +{ + terrain + { + additionalRefinementLevels 2; + } +} + +renameBoundary +{ + newPatchNames + { + "wall.*" + { + newName wall; + type patch; + } + } +} + +// ************************************************************************* // -- GitLab