Commit 4ade5116 authored by Matti Rauter's avatar Matti Rauter Committed by Mark Olesen

TUT: added real-world example Wolfsgrube, Austria

- mesh generated with pMesh (cfmesh) from stl data
parent ec58d035
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ 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;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ 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;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ 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;
}
}
// ************************************************************************* //
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cleanCase0
cleanFaMesh
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
if 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)
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
if 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
runParallel $(getApplication)
#------------------------------------------------------------------------------
# Rawdata
All data are publicly available.
## DEM (constant/triSurface/wolfsgrube.obj):
The digital elevation model (conversion from *.asc to *.stl) provided by
AMT DER TIROLER LANDESREGIERUNG (AdTLR)
Abteilung Geoinformation
Source:
https://gis.tirol.gv.at/ogd/geografie_planung/DGM/LA_DGM10.zip
Licence: CC BY 3.0
Subsequently converted to obj format with the OpenFOAM
surfaceMeshConvert utility.
## Release Area (constant/releaseArea):
Digitalized and georeferenced from
Fischer et al. (2015):
Multivariate parameter optimization for computational snow avalanche
simulation
Source:
www.researchgate.net/publication/286843194_Multivariate_parameter_optimization_for_computational_snow_avalanche_simulation
Parameters are taken from Fischer et al. (2015).
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant/faMesh";
object faMeshDefinition;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
polyMeshPatches 1( terrain );
boundary
{
minX
{
type patch;
ownerPolyPatch terrain;
neighbourPolyPatch minX;
}
maxX
{
type patch;
ownerPolyPatch terrain;
neighbourPolyPatch maxX;
}
minY
{
type patch;
ownerPolyPatch terrain;
neighbourPolyPatch minY;
}
maxY
{
type patch;
ownerPolyPatch terrain;
neighbourPolyPatch maxY;
}
}
// ************************************************************************** //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ 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);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object releaseArea;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
fields
(
hentrain
{
regions
(
base
{
type polygonlinear;
offset (2000 -221000 0);
vertices
(
(-3609. 219911. 0)
(-4800. 221820. 0)
(-4100. 222350. 0)
(-2880. 220200. 0)
);
valueAtZero 1.6;
z0 1289;
dfdz 0.0008;
projectToNormal yes;
}
releaseArea1
{
type polygonlinear;
offset (2000.0 -221000.0 0);
vertices
(
(-3490.65106791 220181.094286 0)
(-3546.02424433 220257.556501 0)
(-3588.46405365 220334.930767 0)
(-3638.2651556 220453.744194 0)
(-3652.08367242 220509.459892 0)
(-3603.00152339 220530.835999 0)
(-3539.03383195 220540.00292 0)
(-3499.31921668 220537.215695 0)
(-3491.01423555 220524.780191 0)
(-3453.36078889 220549.38728 0)
(-3416.87160988 220558.572499 0)
(-3390.07593126 220575.590242 0)
(-3370.89048168 220608.956022 0)
(-3356.12491815 220588.230168 0)
(-3335.36828633 220546.323206 0)
(-3315.53226998 220509.02041 0)
(-3288.31632189 220455.599534 0)
(-3267.10473335 220400.340248 0)
(-3251.8893352 220357.514714 0)
(-3228.82784472 220305.476379 0)
(-3172.07808594 220206.917451 0)
(-3170.70329596 220188.039939 0)
(-3217.82825144 220159.061119 0)
(-3270.03077906 220135.610461 0)
(-3306.52205793 220126.884098 0)
(-3351.78087937 220131.05478 0)
(-3381.56086268 220146.496531 0)
(-3398.40379208 220170.448113 0)
(-3409.48018761 220183.461424 0)
(-3421.59997722 220189.454136 0)
(-3435.56902843 220192.340246 0)
(-3456.35183891 220192.698343 0)
(-3468.13073787 220189.712968 0)
(-3490.65106791 220181.094286 0)
);
valueAtZero 0;
projectToNormal yes;
}
);
}
h
{
default h0 [0 1 0 0 0 0 0] 1e-5;
regions
(
releaseArea1
{
type polygonlinear;
offset (2000.0 -221000.0 0);
vertices
(
(-3490.65106791 220181.094286 0)
(-3546.02424433 220257.556501 0)
(-3588.46405365 220334.930767 0)
(-3638.2651556 220453.744194 0)
(-3652.08367242 220509.459892 0)
(-3603.00152339 220530.835999 0)
(-3539.03383195 220540.00292 0)
(-3499.31921668 220537.215695 0)
(-3491.01423555 220524.780191 0)
(-3453.36078889 220549.38728 0)
(-3416.87160988 220558.572499 0)
(-3390.07593126 220575.590242 0)
(-3370.89048168 220608.956022 0)
(-3356.12491815 220588.230168 0)
(-3335.36828633 220546.323206 0)
(-3315.53226998 220509.02041 0)
(-3288.31632189 220455.599534 0)
(-3267.10473335 220400.340248 0)
(-3251.8893352 220357.514714 0)
(-3228.82784472 220305.476379 0)
(-3172.07808594 220206.917451 0)
(-3170.70329596 220188.039939 0)
(-3217.82825144 220159.061119 0)
(-3270.03077906 220135.610461 0)
(-3306.52205793 220126.884098 0)
(-3351.78087937 220131.05478 0)
(-3381.56086268 220146.496531 0)
(-3398.40379208 220170.448113 0)
(-3409.48018761 220183.461424 0)
(-3421.59997722 220189.454136 0)
(-3435.56902843 220192.340246 0)
(-3456.35183891 220192.698343 0)
(-3468.13073787 220189.712968 0)
(-3490.65106791 220181.094286 0)
);
valueAtZero 1.6;
z0 1289;
dfdz 0.0008;
projectToNormal yes;
}
);
}
);
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pressureFeedback off;
explicitDryAreas on;
hmin hmin [ 0 1 0 0 0 0 0] 1e-5;
rho rho [ 1 -3 0 0 0 0 0 ] 200.;
u0 u0 [ 0 1 -1 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;
frictionModel Voellmy;
entrainmentModel Erosionenergy;
depositionModel depositionOff;
VoellmyCoeffs
{
mu mu [0 0 0 0 0 0 0] 0.26;
xi xi [0 1 -2 0 0 0 0] 8650;
}
ErosionenergyCoeffs
{
eb eb [0 2 -2 0 0 0 0] 11500;
}
// ************************************************************************* //
This diff is collapsed.
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application faSavageHutterFoam;
startFrom firstTime;
startTime 0;
stopAt endTime;
endTime 90;
deltaT 0.2;
writeControl adjustableRunTime;
writeInterval 2;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
initDeltaT no;
maxCo 1.0;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
coeffs
{
n (2 2 1);
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object faSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
ddt(hentrain) backward;
ddt(h,Us) backward;
ddt(h) backward;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phis,h) Gauss upwind;
div(phi2s,Us) Gauss upwind;
}
laplacianSchemes
{
default none;
laplacian(h) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
h;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
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;
}
}
nOuterCorrectors 15;
minCorrectors 2;
hResidualMax 1e-4;
UsResidualMax 1e-4;
relaxationFactors
{
h 0.9;
Us 0.6;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default none;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default none;
}
snGradSchemes
{
default none;
}
fluxRequired
{
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | faSavageHutterFOAM |
| \\ / A nd | Copyright (C) 2017 Matthias Rauter |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object meshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //