From cfb19010a7690a0a340853916003e2e78738a5fa Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 23 Jan 2022 12:27:04 +0100 Subject: [PATCH] Added OpenFoam running --- openfoam/artha/0.org/U | 68 ++ openfoam/artha/0.org/alpha.water | 61 ++ openfoam/artha/0.org/alpha.water.org | 61 ++ openfoam/artha/0.org/epsilon | 68 ++ openfoam/artha/0.org/k | 69 ++ openfoam/artha/0.org/nut | 78 ++ openfoam/artha/0.org/omega | 68 ++ openfoam/artha/0.org/p_rgh | 71 ++ openfoam/artha/0.org/porosityIndex | 59 ++ openfoam/artha/0.org/porosityIndex.org | 59 ++ openfoam/artha/artha.OpenFOAM | 0 openfoam/artha/cleanCase | 21 + openfoam/artha/constant/g | 22 + openfoam/artha/constant/porosityDict | 29 + openfoam/artha/constant/transportProperties | 37 + openfoam/artha/constant/triSurface/bathy.stl | 352 +++++++++ openfoam/artha/constant/triSurface/bloc0.stl | 170 ++++ openfoam/artha/constant/triSurface/bloc1.stl | 86 +++ openfoam/artha/constant/triSurface/rub.stl | 730 ++++++++++++++++++ openfoam/artha/constant/turbulenceProperties | 29 + .../artha/constant/turbulenceProperties_keps | 29 + .../artha/constant/turbulenceProperties_sst | 29 + openfoam/artha/constant/waveDict | 38 + openfoam/artha/runCaseKEpsilon | 28 + openfoam/artha/runCaseSST | 26 + openfoam/artha/system/blockMeshDict | 81 ++ openfoam/artha/system/controlDict | 138 ++++ openfoam/artha/system/decomposeParDict | 50 ++ openfoam/artha/system/fvSchemes | 79 ++ openfoam/artha/system/fvSolution | 95 +++ openfoam/artha/system/setFieldsDict | 53 ++ openfoam/artha/system/snappyHexMeshDict | 359 +++++++++ openfoam/config.example.ini | 19 + openfoam/run/__main__.py | 191 +++++ 34 files changed, 3353 insertions(+) create mode 100644 openfoam/artha/0.org/U create mode 100644 openfoam/artha/0.org/alpha.water create mode 100644 openfoam/artha/0.org/alpha.water.org create mode 100644 openfoam/artha/0.org/epsilon create mode 100644 openfoam/artha/0.org/k create mode 100644 openfoam/artha/0.org/nut create mode 100644 openfoam/artha/0.org/omega create mode 100644 openfoam/artha/0.org/p_rgh create mode 100644 openfoam/artha/0.org/porosityIndex create mode 100644 openfoam/artha/0.org/porosityIndex.org create mode 100644 openfoam/artha/artha.OpenFOAM create mode 100644 openfoam/artha/cleanCase create mode 100644 openfoam/artha/constant/g create mode 100644 openfoam/artha/constant/porosityDict create mode 100644 openfoam/artha/constant/transportProperties create mode 100644 openfoam/artha/constant/triSurface/bathy.stl create mode 100644 openfoam/artha/constant/triSurface/bloc0.stl create mode 100644 openfoam/artha/constant/triSurface/bloc1.stl create mode 100644 openfoam/artha/constant/triSurface/rub.stl create mode 100644 openfoam/artha/constant/turbulenceProperties create mode 100644 openfoam/artha/constant/turbulenceProperties_keps create mode 100644 openfoam/artha/constant/turbulenceProperties_sst create mode 100644 openfoam/artha/constant/waveDict create mode 100644 openfoam/artha/runCaseKEpsilon create mode 100644 openfoam/artha/runCaseSST create mode 100644 openfoam/artha/system/blockMeshDict create mode 100644 openfoam/artha/system/controlDict create mode 100644 openfoam/artha/system/decomposeParDict create mode 100644 openfoam/artha/system/fvSchemes create mode 100644 openfoam/artha/system/fvSolution create mode 100644 openfoam/artha/system/setFieldsDict create mode 100644 openfoam/artha/system/snappyHexMeshDict create mode 100644 openfoam/config.example.ini create mode 100644 openfoam/run/__main__.py diff --git a/openfoam/artha/0.org/U b/openfoam/artha/0.org/U new file mode 100644 index 0000000..9864770 --- /dev/null +++ b/openfoam/artha/0.org/U @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.7.x | +| \\ / 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 waveVelocity; + waveDictName waveDict; + value uniform (0 0 0); + } + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + "wall." + { + type fixedValue; + value uniform (0 0 0); + } + bathy + { + type fixedValue; + value uniform (0 0 0); + } + bloc0 + { + type fixedValue; + value uniform (0 0 0); + } + bloc1 + { + type fixedValue; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } + outlet + { + type waveAbsorption2DVelocity; + absorptionDir 666.0; + value uniform (0 0 0); + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/alpha.water b/openfoam/artha/0.org/alpha.water new file mode 100644 index 0000000..49520af --- /dev/null +++ b/openfoam/artha/0.org/alpha.water @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5-dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ 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 waveAlpha; + waveDictName waveDict; + value uniform 0; + } + outlet + { + type zeroGradient; + } + "wall." + { + type zeroGradient; + } + bathy + { + type zeroGradient; + } + bloc0 + { + type zeroGradient; + } + bloc1 + { + type zeroGradient; + } + defaultFaces + { + type empty; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/alpha.water.org b/openfoam/artha/0.org/alpha.water.org new file mode 100644 index 0000000..49520af --- /dev/null +++ b/openfoam/artha/0.org/alpha.water.org @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5-dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ 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 waveAlpha; + waveDictName waveDict; + value uniform 0; + } + outlet + { + type zeroGradient; + } + "wall." + { + type zeroGradient; + } + bathy + { + type zeroGradient; + } + bloc0 + { + type zeroGradient; + } + bloc1 + { + type zeroGradient; + } + defaultFaces + { + type empty; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/epsilon b/openfoam/artha/0.org/epsilon new file mode 100644 index 0000000..706ec43 --- /dev/null +++ b/openfoam/artha/0.org/epsilon @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.0001; + +boundaryField +{ + inlet + { + type inletOutlet; + inletValue uniform 0.0001; + value uniform 0.0001; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0001; + value uniform 0.0001; + } + "wall." + { + type epsilonWallFunction; + value uniform 0.0001; + } + bathy + { + type epsilonWallFunction; + value uniform 0.0001; + } + bloc0 + { + type epsilonWallFunction; + value uniform 0.0001; + } + bloc1 + { + type epsilonWallFunction; + value uniform 0.0001; + } + defaultFaces + { + type empty; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.0001; + value uniform 0.0001; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/k b/openfoam/artha/0.org/k new file mode 100644 index 0000000..83de11c --- /dev/null +++ b/openfoam/artha/0.org/k @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.7.1 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.00000001; + +boundaryField +{ + inlet + { + type inletOutlet; + inletValue uniform 0.00000001; + value uniform 0.00000001; + } + outlet + { + type inletOutlet; + inletValue uniform 0.00000001; + value uniform 0.00000001; + } + "wall." + { + type kqRWallFunction; + value uniform 0.00000001; + } + bathy + { + type kqRWallFunction; + value uniform 0.00000001; + } + bloc0 + { + type kqRWallFunction; + value uniform 0.00000001; + } + bloc1 + { + type kqRWallFunction; + value uniform 0.00000001; + } + defaultFaces + { + type empty; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.00000001; + value uniform 0.00000001; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/nut b/openfoam/artha/0.org/nut new file mode 100644 index 0000000..29da2ca --- /dev/null +++ b/openfoam/artha/0.org/nut @@ -0,0 +1,78 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + "wall." + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + atmosphere + { + type calculated; + value uniform 0; + } + defaultFaces + { + type empty; + } + bathy + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + bloc0 + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + bloc1 + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/omega b/openfoam/artha/0.org/omega new file mode 100644 index 0000000..98f8314 --- /dev/null +++ b/openfoam/artha/0.org/omega @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.7.1 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 0.001; + +boundaryField +{ + inlet + { + type inletOutlet; + inletValue uniform 0.001; + value uniform 0.001; + } + outlet + { + type inletOutlet; + inletValue uniform 0.001; + value uniform 0.001; + } + "wall." + { + type omegaWallFunction; + value uniform 0.001; + } + bathy + { + type omegaWallFunction; + value uniform 0.001; + } + bloc0 + { + type omegaWallFunction; + value uniform 0.001; + } + bloc1 + { + type omegaWallFunction; + value uniform 0.001; + } + defaultFaces + { + type empty; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.001; + value uniform 0.001; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/p_rgh b/openfoam/artha/0.org/p_rgh new file mode 100644 index 0000000..eb45d1a --- /dev/null +++ b/openfoam/artha/0.org/p_rgh @@ -0,0 +1,71 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5-dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ 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 +{ + "wall." + { + type fixedFluxPressure; + value uniform 0; + } + bathy + { + type fixedFluxPressure; + value uniform 0; + } + bloc0 + { + type fixedFluxPressure; + value uniform 0; + } + bloc1 + { + type fixedFluxPressure; + value uniform 0; + } + defaultFaces + { + type empty; + } + outlet + { + type fixedFluxPressure; + value uniform 0; + } + inlet + { + type fixedFluxPressure; + value uniform 0; + } + atmosphere + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/porosityIndex b/openfoam/artha/0.org/porosityIndex new file mode 100644 index 0000000..b9c5790 --- /dev/null +++ b/openfoam/artha/0.org/porosityIndex @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object porosityIndex; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + "wall." + { + type zeroGradient; + } + bathy + { + type zeroGradient; + } + bloc0 + { + type zeroGradient; + } + bloc1 + { + type zeroGradient; + } + defaultFaces + { + type empty; + } + atmosphere + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/0.org/porosityIndex.org b/openfoam/artha/0.org/porosityIndex.org new file mode 100644 index 0000000..b9c5790 --- /dev/null +++ b/openfoam/artha/0.org/porosityIndex.org @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object porosityIndex; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + "wall." + { + type zeroGradient; + } + bathy + { + type zeroGradient; + } + bloc0 + { + type zeroGradient; + } + bloc1 + { + type zeroGradient; + } + defaultFaces + { + type empty; + } + atmosphere + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/artha.OpenFOAM b/openfoam/artha/artha.OpenFOAM new file mode 100644 index 0000000..e69de29 diff --git a/openfoam/artha/cleanCase b/openfoam/artha/cleanCase new file mode 100644 index 0000000..4986447 --- /dev/null +++ b/openfoam/artha/cleanCase @@ -0,0 +1,21 @@ +#!/bin/bash +shopt -s extglob + +directory=`pwd` + +read -p "Clearing case. Are you sure? (y/N) " -n 1 -r +echo ' ' +if ! [[ $REPLY =~ ^[Yy]$ ]] +then + exit +fi + +if [ -d "./constant/polyMesh" ]; then + cd ./constant/polyMesh + rm -fr !(blockMeshDict) + cd $directory +fi + +rm -fr *[0-9].[0-9]* [0-9] [1-9]* gaugesVOF gaugesP postProcessing processor* +rm -f *.log +#rm -f constant/turbulenceProperties diff --git a/openfoam/artha/constant/g b/openfoam/artha/constant/g new file mode 100644 index 0000000..c1dbc16 --- /dev/null +++ b/openfoam/artha/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ 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/openfoam/artha/constant/porosityDict b/openfoam/artha/constant/porosityDict new file mode 100644 index 0000000..6fbce5d --- /dev/null +++ b/openfoam/artha/constant/porosityDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object porosityDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Materials: clear region, core, secondary armour layer, primary armour layer +// a,b,c: tuning parameters +a 2(0 50); +b 2(0 1.2); +c 2(0 0.34); + +// D50: mean nominal diameter +D50 2(1 4); +// porosity (phi) +porosity 2(1 0.5); + +// ************************************************************************* // diff --git a/openfoam/artha/constant/transportProperties b/openfoam/artha/constant/transportProperties new file mode 100644 index 0000000..d3edb56 --- /dev/null +++ b/openfoam/artha/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ 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/openfoam/artha/constant/triSurface/bathy.stl b/openfoam/artha/constant/triSurface/bathy.stl new file mode 100644 index 0000000..3f2c4a9 --- /dev/null +++ b/openfoam/artha/constant/triSurface/bathy.stl @@ -0,0 +1,352 @@ +solid OpenSCAD_Model + facet normal -0 1 0 + outer loop + vertex 38.4164 10 -15 + vertex 150 10 -15 + vertex 150 10 -16.3135 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 38.4164 10 -15 + vertex 150 10 -16.3135 + vertex 28.4457 10 -16.3131 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 38.4164 10 -15 + vertex 28.4457 10 -16.3131 + vertex 38.2698 10 -15.0111 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 28.4457 10 -16.3131 + vertex 150 10 -16.3135 + vertex 28.2991 10 -16.3135 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 26.9795 10 -16.2961 + vertex 0 10 -16.3135 + vertex 26.8328 10 -16.2938 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 26.8328 10 -16.2938 + vertex 0 10 -16.3135 + vertex 9.97067 10 -16.0175 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 9.97067 10 -16.0175 + vertex 0 10 -16.3135 + vertex 9.82404 10 -16.0111 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 0 10 -16.3135 + vertex 0 10 -15.9939 + vertex 5.71846 10 -15.8379 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 5.8651 10 -15.8351 + vertex 9.82404 10 -16.0111 + vertex 5.71846 10 -15.8379 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 9.82404 10 -16.0111 + vertex 0 10 -16.3135 + vertex 5.71846 10 -15.8379 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 26.9795 10 -16.2961 + vertex 28.2991 10 -16.3135 + vertex 0 10 -16.3135 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 150 -10 -16.3135 + vertex 150 -10 -15 + vertex 38.4164 -10 -15 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 28.4457 -10 -16.3131 + vertex 150 -10 -16.3135 + vertex 38.4164 -10 -15 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 38.2698 -10 -15.0111 + vertex 28.4457 -10 -16.3131 + vertex 38.4164 -10 -15 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 28.2991 -10 -16.3135 + vertex 150 -10 -16.3135 + vertex 28.4457 -10 -16.3131 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 26.8328 -10 -16.2938 + vertex 0 -10 -16.3135 + vertex 26.9795 -10 -16.2961 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 9.97067 -10 -16.0175 + vertex 0 -10 -16.3135 + vertex 26.8328 -10 -16.2938 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 9.82404 -10 -16.0111 + vertex 0 -10 -16.3135 + vertex 9.97067 -10 -16.0175 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 5.71846 -10 -15.8379 + vertex 0 -10 -15.9939 + vertex 0 -10 -16.3135 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 5.71846 -10 -15.8379 + vertex 9.82404 -10 -16.0111 + vertex 5.8651 -10 -15.8351 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 5.71846 -10 -15.8379 + vertex 0 -10 -16.3135 + vertex 9.82404 -10 -16.0111 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 0 -10 -16.3135 + vertex 28.2991 -10 -16.3135 + vertex 26.9795 -10 -16.2961 + endloop + endfacet + facet normal -0 0 1 + outer loop + vertex 38.4164 10 -15 + vertex 150 -10 -15 + vertex 150 10 -15 + endloop + endfacet + facet normal 0 0 1 + outer loop + vertex 38.4164 10 -15 + vertex 38.4164 -10 -15 + vertex 150 -10 -15 + endloop + endfacet + facet normal -0.0755001 0 0.997146 + outer loop + vertex 38.2698 10 -15.0111 + vertex 38.4164 -10 -15 + vertex 38.4164 10 -15 + endloop + endfacet + facet normal -0.0755001 0 0.997146 + outer loop + vertex 38.2698 10 -15.0111 + vertex 38.2698 -10 -15.0111 + vertex 38.4164 -10 -15 + endloop + endfacet + facet normal -0.131382 0 0.991332 + outer loop + vertex 28.4457 10 -16.3131 + vertex 38.2698 -10 -15.0111 + vertex 38.2698 10 -15.0111 + endloop + endfacet + facet normal -0.131382 0 0.991332 + outer loop + vertex 28.4457 10 -16.3131 + vertex 28.4457 -10 -16.3131 + vertex 38.2698 -10 -15.0111 + endloop + endfacet + facet normal -0.0027285 0 0.999996 + outer loop + vertex 28.2991 10 -16.3135 + vertex 28.4457 -10 -16.3131 + vertex 28.4457 10 -16.3131 + endloop + endfacet + facet normal -0.0027285 0 0.999996 + outer loop + vertex 28.2991 10 -16.3135 + vertex 28.2991 -10 -16.3135 + vertex 28.4457 -10 -16.3131 + endloop + endfacet + facet normal 0.0131847 0 0.999913 + outer loop + vertex 26.9795 10 -16.2961 + vertex 28.2991 -10 -16.3135 + vertex 28.2991 10 -16.3135 + endloop + endfacet + facet normal 0.0131847 0 0.999913 + outer loop + vertex 26.9795 10 -16.2961 + vertex 26.9795 -10 -16.2961 + vertex 28.2991 -10 -16.3135 + endloop + endfacet + facet normal 0.0156763 0 0.999877 + outer loop + vertex 26.8328 10 -16.2938 + vertex 26.9795 -10 -16.2961 + vertex 26.9795 10 -16.2961 + endloop + endfacet + facet normal 0.0156763 0 0.999877 + outer loop + vertex 26.8328 10 -16.2938 + vertex 26.8328 -10 -16.2938 + vertex 26.9795 -10 -16.2961 + endloop + endfacet + facet normal 0.0163836 0 0.999866 + outer loop + vertex 9.97067 10 -16.0175 + vertex 26.8328 -10 -16.2938 + vertex 26.8328 10 -16.2938 + endloop + endfacet + facet normal 0.0163836 0 0.999866 + outer loop + vertex 9.97067 10 -16.0175 + vertex 9.97067 -10 -16.0175 + vertex 26.8328 -10 -16.2938 + endloop + endfacet + facet normal 0.0436058 0 0.999049 + outer loop + vertex 9.82404 10 -16.0111 + vertex 9.97067 -10 -16.0175 + vertex 9.97067 10 -16.0175 + endloop + endfacet + facet normal 0.0436058 0 0.999049 + outer loop + vertex 9.82404 10 -16.0111 + vertex 9.82404 -10 -16.0111 + vertex 9.97067 -10 -16.0175 + endloop + endfacet + facet normal 0.0444125 0 0.999013 + outer loop + vertex 5.8651 10 -15.8351 + vertex 9.82404 -10 -16.0111 + vertex 9.82404 10 -16.0111 + endloop + endfacet + facet normal 0.0444125 0 0.999013 + outer loop + vertex 5.8651 10 -15.8351 + vertex 5.8651 -10 -15.8351 + vertex 9.82404 -10 -16.0111 + endloop + endfacet + facet normal -0.0190909 0 0.999818 + outer loop + vertex 5.71846 10 -15.8379 + vertex 5.8651 -10 -15.8351 + vertex 5.8651 10 -15.8351 + endloop + endfacet + facet normal -0.0190909 0 0.999818 + outer loop + vertex 5.71846 10 -15.8379 + vertex 5.71846 -10 -15.8379 + vertex 5.8651 -10 -15.8351 + endloop + endfacet + facet normal -0.0272699 0 0.999628 + outer loop + vertex 0 10 -15.9939 + vertex 5.71846 -10 -15.8379 + vertex 5.71846 10 -15.8379 + endloop + endfacet + facet normal -0.0272699 0 0.999628 + outer loop + vertex 0 10 -15.9939 + vertex 0 -10 -15.9939 + vertex 5.71846 -10 -15.8379 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0 10 -16.3135 + vertex 0 -10 -15.9939 + vertex 0 10 -15.9939 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0 10 -16.3135 + vertex 0 -10 -16.3135 + vertex 0 -10 -15.9939 + endloop + endfacet + facet normal -0 0 -1 + outer loop + vertex 150 10 -16.3135 + vertex 0 -10 -16.3135 + vertex 0 10 -16.3135 + endloop + endfacet + facet normal 0 -0 -1 + outer loop + vertex 150 10 -16.3135 + vertex 150 -10 -16.3135 + vertex 0 -10 -16.3135 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 150 10 -15 + vertex 150 -10 -16.3135 + vertex 150 10 -16.3135 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 150 10 -15 + vertex 150 -10 -15 + vertex 150 -10 -16.3135 + endloop + endfacet +endsolid OpenSCAD_Model diff --git a/openfoam/artha/constant/triSurface/bloc0.stl b/openfoam/artha/constant/triSurface/bloc0.stl new file mode 100644 index 0000000..e22f53c --- /dev/null +++ b/openfoam/artha/constant/triSurface/bloc0.stl @@ -0,0 +1,170 @@ +solid OpenSCAD_Model + facet normal -0 1 0 + outer loop + vertex 120 10 2.5 + vertex 124 10 2.5 + vertex 124 10 -0.5 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 120 10 2.5 + vertex 108.3 10 2.5 + vertex 110.75 10 8.2 + endloop + endfacet + facet normal 0 1 -0 + outer loop + vertex 120 10 2.5 + vertex 110.75 10 8.2 + vertex 120 10 8.2 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 108.3 10 -0.5 + vertex 108.3 10 2.5 + vertex 120 10 2.5 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 124 10 -0.5 + vertex 108.3 10 -0.5 + vertex 120 10 2.5 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 124 -10 -0.5 + vertex 124 -10 2.5 + vertex 120 -10 2.5 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 110.75 -10 8.2 + vertex 108.3 -10 2.5 + vertex 120 -10 2.5 + endloop + endfacet + facet normal -0 -1 -0 + outer loop + vertex 120 -10 8.2 + vertex 110.75 -10 8.2 + vertex 120 -10 2.5 + endloop + endfacet + facet normal -0 -1 0 + outer loop + vertex 120 -10 2.5 + vertex 108.3 -10 2.5 + vertex 108.3 -10 -0.5 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 120 -10 2.5 + vertex 108.3 -10 -0.5 + vertex 124 -10 -0.5 + endloop + endfacet + facet normal -0 0 1 + outer loop + vertex 120 10 2.5 + vertex 124 -10 2.5 + vertex 124 10 2.5 + endloop + endfacet + facet normal 0 0 1 + outer loop + vertex 120 10 2.5 + vertex 120 -10 2.5 + vertex 124 -10 2.5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 120 10 8.2 + vertex 120 -10 2.5 + vertex 120 10 2.5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 120 10 8.2 + vertex 120 -10 8.2 + vertex 120 -10 2.5 + endloop + endfacet + facet normal -0 0 1 + outer loop + vertex 110.75 10 8.2 + vertex 120 -10 8.2 + vertex 120 10 8.2 + endloop + endfacet + facet normal 0 0 1 + outer loop + vertex 110.75 10 8.2 + vertex 110.75 -10 8.2 + vertex 120 -10 8.2 + endloop + endfacet + facet normal -0.918728 0 0.394892 + outer loop + vertex 108.3 10 2.5 + vertex 110.75 -10 8.2 + vertex 110.75 10 8.2 + endloop + endfacet + facet normal -0.918728 0 0.394892 + outer loop + vertex 108.3 10 2.5 + vertex 108.3 -10 2.5 + vertex 110.75 -10 8.2 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 108.3 10 -0.5 + vertex 108.3 -10 2.5 + vertex 108.3 10 2.5 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 108.3 10 -0.5 + vertex 108.3 -10 -0.5 + vertex 108.3 -10 2.5 + endloop + endfacet + facet normal -0 0 -1 + outer loop + vertex 124 10 -0.5 + vertex 108.3 -10 -0.5 + vertex 108.3 10 -0.5 + endloop + endfacet + facet normal 0 -0 -1 + outer loop + vertex 124 10 -0.5 + vertex 124 -10 -0.5 + vertex 108.3 -10 -0.5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 124 10 2.5 + vertex 124 -10 -0.5 + vertex 124 10 -0.5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 124 10 2.5 + vertex 124 -10 2.5 + vertex 124 -10 -0.5 + endloop + endfacet +endsolid OpenSCAD_Model diff --git a/openfoam/artha/constant/triSurface/bloc1.stl b/openfoam/artha/constant/triSurface/bloc1.stl new file mode 100644 index 0000000..b5a2464 --- /dev/null +++ b/openfoam/artha/constant/triSurface/bloc1.stl @@ -0,0 +1,86 @@ +solid OpenSCAD_Model + facet normal -0 1 0 + outer loop + vertex 103.3 10 4.75 + vertex 110.75 10 4.75 + vertex 103.4 10 -0.5 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 110.75 10 4.75 + vertex 110.75 10 -0.5 + vertex 103.4 10 -0.5 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 103.4 -10 -0.5 + vertex 110.75 -10 4.75 + vertex 103.3 -10 4.75 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 103.4 -10 -0.5 + vertex 110.75 -10 -0.5 + vertex 110.75 -10 4.75 + endloop + endfacet + facet normal -0 0 1 + outer loop + vertex 103.3 10 4.75 + vertex 110.75 -10 4.75 + vertex 110.75 10 4.75 + endloop + endfacet + facet normal 0 0 1 + outer loop + vertex 103.3 10 4.75 + vertex 103.3 -10 4.75 + vertex 110.75 -10 4.75 + endloop + endfacet + facet normal -0.999819 0 -0.0190442 + outer loop + vertex 103.4 10 -0.5 + vertex 103.3 -10 4.75 + vertex 103.3 10 4.75 + endloop + endfacet + facet normal -0.999819 -0 -0.0190442 + outer loop + vertex 103.4 10 -0.5 + vertex 103.4 -10 -0.5 + vertex 103.3 -10 4.75 + endloop + endfacet + facet normal -0 0 -1 + outer loop + vertex 110.75 10 -0.5 + vertex 103.4 -10 -0.5 + vertex 103.4 10 -0.5 + endloop + endfacet + facet normal 0 -0 -1 + outer loop + vertex 110.75 10 -0.5 + vertex 110.75 -10 -0.5 + vertex 103.4 -10 -0.5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 110.75 10 4.75 + vertex 110.75 -10 -0.5 + vertex 110.75 10 -0.5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 110.75 10 4.75 + vertex 110.75 -10 4.75 + vertex 110.75 -10 -0.5 + endloop + endfacet +endsolid OpenSCAD_Model diff --git a/openfoam/artha/constant/triSurface/rub.stl b/openfoam/artha/constant/triSurface/rub.stl new file mode 100644 index 0000000..3553de9 --- /dev/null +++ b/openfoam/artha/constant/triSurface/rub.stl @@ -0,0 +1,730 @@ +solid OpenSCAD_Model + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 141.202 10 -3.22797 + vertex 141.349 10 -3.27231 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 149.707 10 -4.99396 + vertex 150 10 -5.02534 + vertex 150 10 -14.9917 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 120.088 10 3.28799 + vertex 141.202 10 -3.22797 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 149.707 10 -4.99396 + vertex 150 10 -14.9917 + vertex 149.56 10 -4.97726 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 141.349 10 -3.27231 + vertex 149.56 10 -4.97726 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 96.041 10 -0.6138 + vertex 96.1877 10 -0.582169 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 119.062 10 3.5882 + vertex 119.941 10 3.33221 + vertex 118.622 10 3.65181 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 118.622 10 3.65181 + vertex 119.941 10 3.33221 + vertex 120.088 10 3.28799 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 118.768 10 3.67213 + vertex 118.915 10 3.63036 + vertex 118.622 10 3.65181 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 118.622 10 3.65181 + vertex 118.915 10 3.63036 + vertex 119.062 10 3.5882 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 100.88 10 0.622452 + vertex 118.622 10 3.65181 + vertex 120.088 10 3.28799 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 100.88 10 0.622452 + vertex 120.088 10 3.28799 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 100.733 10 0.589142 + vertex 100.88 10 0.622452 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 96.1877 10 -0.582169 + vertex 100.733 10 0.589142 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 88.563 10 -2.19974 + vertex 96.041 10 -0.6138 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 58.651 10 -10.9039 + vertex 58.7977 10 -10.8579 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 88.4164 10 -2.23454 + vertex 88.563 10 -2.19974 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 73.607 10 -5.81238 + vertex 88.4164 10 -2.23454 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 73.4604 10 -5.86104 + vertex 73.607 10 -5.81238 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 46.3343 10 -13.9412 + vertex 50.8798 10 -13.1112 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 58.7977 10 -10.8579 + vertex 73.4604 10 -5.86104 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 51.0264 10 -13.0829 + vertex 58.651 10 -10.9039 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 50.8798 10 -13.1112 + vertex 51.0264 10 -13.0829 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 46.1877 10 -13.9617 + vertex 46.3343 10 -13.9412 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 150 10 -14.9917 + vertex 38.4164 10 -14.9917 + vertex 46.1877 10 -13.9617 + endloop + endfacet + facet normal -0 -1 -0 + outer loop + vertex 141.349 -10 -3.27231 + vertex 141.202 -10 -3.22797 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 150 -10 -14.9917 + vertex 150 -10 -5.02534 + vertex 149.707 -10 -4.99396 + endloop + endfacet + facet normal -0 -1 -0 + outer loop + vertex 141.202 -10 -3.22797 + vertex 120.088 -10 3.28799 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 149.56 -10 -4.97726 + vertex 150 -10 -14.9917 + vertex 149.707 -10 -4.99396 + endloop + endfacet + facet normal -0 -1 -0 + outer loop + vertex 149.56 -10 -4.97726 + vertex 141.349 -10 -3.27231 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 96.1877 -10 -0.582169 + vertex 96.041 -10 -0.6138 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 118.622 -10 3.65181 + vertex 119.941 -10 3.33221 + vertex 119.062 -10 3.5882 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 120.088 -10 3.28799 + vertex 119.941 -10 3.33221 + vertex 118.622 -10 3.65181 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 118.622 -10 3.65181 + vertex 118.915 -10 3.63036 + vertex 118.768 -10 3.67213 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 119.062 -10 3.5882 + vertex 118.915 -10 3.63036 + vertex 118.622 -10 3.65181 + endloop + endfacet + facet normal -0 -1 0 + outer loop + vertex 120.088 -10 3.28799 + vertex 118.622 -10 3.65181 + vertex 100.88 -10 0.622452 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 120.088 -10 3.28799 + vertex 100.88 -10 0.622452 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 100.88 -10 0.622452 + vertex 100.733 -10 0.589142 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 100.733 -10 0.589142 + vertex 96.1877 -10 -0.582169 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 96.041 -10 -0.6138 + vertex 88.563 -10 -2.19974 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 58.7977 -10 -10.8579 + vertex 58.651 -10 -10.9039 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 88.563 -10 -2.19974 + vertex 88.4164 -10 -2.23454 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 88.4164 -10 -2.23454 + vertex 73.607 -10 -5.81238 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 73.607 -10 -5.81238 + vertex 73.4604 -10 -5.86104 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 50.8798 -10 -13.1112 + vertex 46.3343 -10 -13.9412 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 73.4604 -10 -5.86104 + vertex 58.7977 -10 -10.8579 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 58.651 -10 -10.9039 + vertex 51.0264 -10 -13.0829 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 51.0264 -10 -13.0829 + vertex 50.8798 -10 -13.1112 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 46.3343 -10 -13.9412 + vertex 46.1877 -10 -13.9617 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0 -1 -0 + outer loop + vertex 46.1877 -10 -13.9617 + vertex 38.4164 -10 -14.9917 + vertex 150 -10 -14.9917 + endloop + endfacet + facet normal 0.10649 0 0.994314 + outer loop + vertex 149.707 10 -4.99396 + vertex 150 -10 -5.02534 + vertex 150 10 -5.02534 + endloop + endfacet + facet normal 0.10649 0 0.994314 + outer loop + vertex 149.707 10 -4.99396 + vertex 149.707 -10 -4.99396 + vertex 150 -10 -5.02534 + endloop + endfacet + facet normal 0.112879 0 0.993609 + outer loop + vertex 149.56 10 -4.97726 + vertex 149.707 -10 -4.99396 + vertex 149.707 10 -4.99396 + endloop + endfacet + facet normal 0.112879 0 0.993609 + outer loop + vertex 149.56 10 -4.97726 + vertex 149.56 -10 -4.97726 + vertex 149.707 -10 -4.99396 + endloop + endfacet + facet normal 0.203306 0 0.979115 + outer loop + vertex 141.349 10 -3.27231 + vertex 149.56 -10 -4.97726 + vertex 149.56 10 -4.97726 + endloop + endfacet + facet normal 0.203306 0 0.979115 + outer loop + vertex 141.349 10 -3.27231 + vertex 141.349 -10 -3.27231 + vertex 149.56 -10 -4.97726 + endloop + endfacet + facet normal 0.288782 0 0.957395 + outer loop + vertex 141.202 10 -3.22797 + vertex 141.349 -10 -3.27231 + vertex 141.349 10 -3.27231 + endloop + endfacet + facet normal 0.288782 0 0.957395 + outer loop + vertex 141.202 10 -3.22797 + vertex 141.202 -10 -3.22797 + vertex 141.349 -10 -3.27231 + endloop + endfacet + facet normal 0.294885 0 0.955533 + outer loop + vertex 120.088 10 3.28799 + vertex 141.202 -10 -3.22797 + vertex 141.202 10 -3.22797 + endloop + endfacet + facet normal 0.294885 0 0.955533 + outer loop + vertex 120.088 10 3.28799 + vertex 120.088 -10 3.28799 + vertex 141.202 -10 -3.22797 + endloop + endfacet + facet normal 0.288065 0 0.957611 + outer loop + vertex 119.941 10 3.33221 + vertex 120.088 -10 3.28799 + vertex 120.088 10 3.28799 + endloop + endfacet + facet normal 0.288065 0 0.957611 + outer loop + vertex 119.941 10 3.33221 + vertex 119.941 -10 3.33221 + vertex 120.088 -10 3.28799 + endloop + endfacet + facet normal 0.279612 0 0.960113 + outer loop + vertex 119.062 10 3.5882 + vertex 119.941 -10 3.33221 + vertex 119.941 10 3.33221 + endloop + endfacet + facet normal 0.279612 0 0.960113 + outer loop + vertex 119.062 10 3.5882 + vertex 119.062 -10 3.5882 + vertex 119.941 -10 3.33221 + endloop + endfacet + facet normal 0.275688 0 0.961247 + outer loop + vertex 118.915 10 3.63036 + vertex 119.062 -10 3.5882 + vertex 119.062 10 3.5882 + endloop + endfacet + facet normal 0.275688 0 0.961247 + outer loop + vertex 118.915 10 3.63036 + vertex 118.915 -10 3.63036 + vertex 119.062 -10 3.5882 + endloop + endfacet + facet normal 0.273329 0 0.961921 + outer loop + vertex 118.768 10 3.67213 + vertex 118.915 -10 3.63036 + vertex 118.915 10 3.63036 + endloop + endfacet + facet normal 0.273329 0 0.961921 + outer loop + vertex 118.768 10 3.67213 + vertex 118.768 -10 3.67213 + vertex 118.915 -10 3.63036 + endloop + endfacet + facet normal -0.137849 0 0.990453 + outer loop + vertex 118.622 10 3.65181 + vertex 118.768 -10 3.67213 + vertex 118.768 10 3.67213 + endloop + endfacet + facet normal -0.137849 0 0.990453 + outer loop + vertex 118.622 10 3.65181 + vertex 118.622 -10 3.65181 + vertex 118.768 -10 3.67213 + endloop + endfacet + facet normal -0.168309 0 0.985734 + outer loop + vertex 100.88 10 0.622452 + vertex 118.622 -10 3.65181 + vertex 118.622 10 3.65181 + endloop + endfacet + facet normal -0.168309 0 0.985734 + outer loop + vertex 100.88 10 0.622452 + vertex 100.88 -10 0.622452 + vertex 118.622 -10 3.65181 + endloop + endfacet + facet normal -0.220996 0 0.975275 + outer loop + vertex 100.733 10 0.589142 + vertex 100.88 -10 0.622452 + vertex 100.88 10 0.622452 + endloop + endfacet + facet normal -0.220996 0 0.975275 + outer loop + vertex 100.733 10 0.589142 + vertex 100.733 -10 0.589142 + vertex 100.88 -10 0.622452 + endloop + endfacet + facet normal -0.249545 0 0.968363 + outer loop + vertex 96.1877 10 -0.582169 + vertex 100.733 -10 0.589142 + vertex 100.733 10 0.589142 + endloop + endfacet + facet normal -0.249545 0 0.968363 + outer loop + vertex 96.1877 10 -0.582169 + vertex 96.1877 -10 -0.582169 + vertex 100.733 -10 0.589142 + endloop + endfacet + facet normal -0.210773 0 0.977535 + outer loop + vertex 96.041 10 -0.6138 + vertex 96.1877 -10 -0.582169 + vertex 96.1877 10 -0.582169 + endloop + endfacet + facet normal -0.210773 0 0.977535 + outer loop + vertex 96.041 10 -0.6138 + vertex 96.041 -10 -0.6138 + vertex 96.1877 -10 -0.582169 + endloop + endfacet + facet normal -0.207466 0 0.978242 + outer loop + vertex 88.563 10 -2.19974 + vertex 96.041 -10 -0.6138 + vertex 96.041 10 -0.6138 + endloop + endfacet + facet normal -0.207466 0 0.978242 + outer loop + vertex 88.563 10 -2.19974 + vertex 88.563 -10 -2.19974 + vertex 96.041 -10 -0.6138 + endloop + endfacet + facet normal -0.230962 0 0.972963 + outer loop + vertex 88.4164 10 -2.23454 + vertex 88.563 -10 -2.19974 + vertex 88.563 10 -2.19974 + endloop + endfacet + facet normal -0.230962 0 0.972963 + outer loop + vertex 88.4164 10 -2.23454 + vertex 88.4164 -10 -2.23454 + vertex 88.563 -10 -2.19974 + endloop + endfacet + facet normal -0.234836 0 0.972035 + outer loop + vertex 73.607 10 -5.81238 + vertex 88.4164 -10 -2.23454 + vertex 88.4164 10 -2.23454 + endloop + endfacet + facet normal -0.234836 0 0.972035 + outer loop + vertex 73.607 10 -5.81238 + vertex 73.607 -10 -5.81238 + vertex 88.4164 -10 -2.23454 + endloop + endfacet + facet normal -0.315023 0 0.949084 + outer loop + vertex 73.4604 10 -5.86104 + vertex 73.607 -10 -5.81238 + vertex 73.607 10 -5.81238 + endloop + endfacet + facet normal -0.315023 0 0.949084 + outer loop + vertex 73.4604 10 -5.86104 + vertex 73.4604 -10 -5.86104 + vertex 73.607 -10 -5.81238 + endloop + endfacet + facet normal -0.322571 0 0.946545 + outer loop + vertex 58.7977 10 -10.8579 + vertex 73.4604 -10 -5.86104 + vertex 73.4604 10 -5.86104 + endloop + endfacet + facet normal -0.322571 0 0.946545 + outer loop + vertex 58.7977 10 -10.8579 + vertex 58.7977 -10 -10.8579 + vertex 73.4604 -10 -5.86104 + endloop + endfacet + facet normal -0.299201 0 0.95419 + outer loop + vertex 58.651 10 -10.9039 + vertex 58.7977 -10 -10.8579 + vertex 58.7977 10 -10.8579 + endloop + endfacet + facet normal -0.299201 0 0.95419 + outer loop + vertex 58.651 10 -10.9039 + vertex 58.651 -10 -10.9039 + vertex 58.7977 -10 -10.8579 + endloop + endfacet + facet normal -0.274784 0 0.961506 + outer loop + vertex 51.0264 10 -13.0829 + vertex 58.651 -10 -10.9039 + vertex 58.651 10 -10.9039 + endloop + endfacet + facet normal -0.274784 0 0.961506 + outer loop + vertex 51.0264 10 -13.0829 + vertex 51.0264 -10 -13.0829 + vertex 58.651 -10 -10.9039 + endloop + endfacet + facet normal -0.189543 0 0.981872 + outer loop + vertex 50.8798 10 -13.1112 + vertex 51.0264 -10 -13.0829 + vertex 51.0264 10 -13.0829 + endloop + endfacet + facet normal -0.189543 0 0.981872 + outer loop + vertex 50.8798 10 -13.1112 + vertex 50.8798 -10 -13.1112 + vertex 51.0264 -10 -13.0829 + endloop + endfacet + facet normal -0.179628 0 0.983735 + outer loop + vertex 46.3343 10 -13.9412 + vertex 50.8798 -10 -13.1112 + vertex 50.8798 10 -13.1112 + endloop + endfacet + facet normal -0.179628 0 0.983735 + outer loop + vertex 46.3343 10 -13.9412 + vertex 46.3343 -10 -13.9412 + vertex 50.8798 -10 -13.1112 + endloop + endfacet + facet normal -0.138489 0 0.990364 + outer loop + vertex 46.1877 10 -13.9617 + vertex 46.3343 -10 -13.9412 + vertex 46.3343 10 -13.9412 + endloop + endfacet + facet normal -0.138489 0 0.990364 + outer loop + vertex 46.1877 10 -13.9617 + vertex 46.1877 -10 -13.9617 + vertex 46.3343 -10 -13.9412 + endloop + endfacet + facet normal -0.13139 0 0.991331 + outer loop + vertex 38.4164 10 -14.9917 + vertex 46.1877 -10 -13.9617 + vertex 46.1877 10 -13.9617 + endloop + endfacet + facet normal -0.13139 0 0.991331 + outer loop + vertex 38.4164 10 -14.9917 + vertex 38.4164 -10 -14.9917 + vertex 46.1877 -10 -13.9617 + endloop + endfacet + facet normal -0 0 -1 + outer loop + vertex 150 10 -14.9917 + vertex 38.4164 -10 -14.9917 + vertex 38.4164 10 -14.9917 + endloop + endfacet + facet normal 0 -0 -1 + outer loop + vertex 150 10 -14.9917 + vertex 150 -10 -14.9917 + vertex 38.4164 -10 -14.9917 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 150 10 -5.02534 + vertex 150 -10 -14.9917 + vertex 150 10 -14.9917 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 150 10 -5.02534 + vertex 150 -10 -5.02534 + vertex 150 -10 -14.9917 + endloop + endfacet +endsolid OpenSCAD_Model diff --git a/openfoam/artha/constant/turbulenceProperties b/openfoam/artha/constant/turbulenceProperties new file mode 100644 index 0000000..35b1307 --- /dev/null +++ b/openfoam/artha/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/openfoam/artha/constant/turbulenceProperties_keps b/openfoam/artha/constant/turbulenceProperties_keps new file mode 100644 index 0000000..35b1307 --- /dev/null +++ b/openfoam/artha/constant/turbulenceProperties_keps @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/openfoam/artha/constant/turbulenceProperties_sst b/openfoam/artha/constant/turbulenceProperties_sst new file mode 100644 index 0000000..187f845 --- /dev/null +++ b/openfoam/artha/constant/turbulenceProperties_sst @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/openfoam/artha/constant/waveDict b/openfoam/artha/constant/waveDict new file mode 100644 index 0000000..f369017 --- /dev/null +++ b/openfoam/artha/constant/waveDict @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object waveDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +waveType regular; + +waveTheory cnoidal; + +genAbs 1; + +absDir 0.0; + +nPaddles 1; + +wavePeriod 20.0; + +waveHeight 15.0; + +waveDir 0.0; + +wavePhase 0.; + +tSmooth 0.0; + +// ************************************************************************* // diff --git a/openfoam/artha/runCaseKEpsilon b/openfoam/artha/runCaseKEpsilon new file mode 100644 index 0000000..02f0867 --- /dev/null +++ b/openfoam/artha/runCaseKEpsilon @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +cp constant/turbulenceProperties_keps constant/turbulenceProperties + +echo blockMesh meshing... +blockMesh #> blockMesh.log + +echo snappyHexMesh meshing... +snappyHexMesh -overwrite #> snappyHexMesh.log + +echo Preparing 0 folder... +cp -r 0.org/ 0 + +echo Setting the fields... +setFields #> setFields.log + +#olaFlow +echo Decomposing domain... +decomposePar #> decomposePar.log + +echo Running... +mpirun -np 4 olaFlow -parallel #> olaFlow.log + +echo Reconstructing domain... +reconstructPar +echo Simulation complete diff --git a/openfoam/artha/runCaseSST b/openfoam/artha/runCaseSST new file mode 100644 index 0000000..d7c325b --- /dev/null +++ b/openfoam/artha/runCaseSST @@ -0,0 +1,26 @@ +#!/bin/bash + +mkdir -p 0 + +cp constant/turbulenceProperties_sst constant/turbulenceProperties + +echo blockMesh meshing... +blockMesh #> blockMesh.log + +echo snappyHexMesh meshing... +snappyHexMesh -overwrite #> snappyHexMesh.log + +echo Preparing 0 folder... +rm -fr 0 +cp -r 0.org 0 + +echo Setting the fields... +setFields #> setFields.log + +echo Decomposing domain... +decomposePar #> decomposePar.log + +echo Running... +mpirun -np 4 olaFlow -parallel #> olaFlow.log + +echo Simulation complete diff --git a/openfoam/artha/system/blockMeshDict b/openfoam/artha/system/blockMeshDict new file mode 100644 index 0000000..922f7de --- /dev/null +++ b/openfoam/artha/system/blockMeshDict @@ -0,0 +1,81 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.7.1 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (0 0 -30) + (150 0 -30) + (150 0 20) + (0 0 20) + (0 1 -30) + (150 1 -30) + (150 1 20) + (0 1 20) +); + +blocks +( + hex (0 1 5 4 3 2 6 7) (300 1 100) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (1 5 6 2) + ); + } + wall1 + { + type wall; + faces + ( + (0 1 5 4) + ); + } + atmosphere + { + type patch; + faces + ( + (3 2 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/openfoam/artha/system/controlDict b/openfoam/artha/system/controlDict new file mode 100644 index 0000000..08e6876 --- /dev/null +++ b/openfoam/artha/system/controlDict @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + location "system"; + class dictionary; + object controlDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application olaFlow; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.05; + +writeControl adjustableRunTime; + +writeInterval 0.2; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +compression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.45; +maxAlphaCo 0.45; + +maxDeltaT 0.2; +/* +functions +{ + gaugesVOF + { + type sets; + libs ("libsampling.so"); + writeControl outputTime; + writeInterval 1; + setFormat raw; + surfaceFormat raw; + interpolationScheme cell; + fields ( alpha.water ); + sets + ( + GaugeVOF01 + { + type lineCellFace; + axis xyz; + start ( 0.5 0.001 0 ); + end ( 0.5 0.001 1.2 ); + } + GaugeVOF02 + { + type lineCellFace; + axis xyz; + start ( 9.25 0.001 0 ); + end ( 9.25 0.001 1.2 ); + } + GaugeVOF03 + { + type lineCellFace; + axis xyz; + start ( 15.75 0.001 0 ); + end ( 15.75 0.001 1.2 ); + } + GaugeVOF04 + { + type lineCellFace; + axis xyz; + start ( 17.75 0.001 0 ); + end ( 17.75 0.001 1.2 ); + } + GaugeVOF05 + { + type lineCellFace; + axis xyz; + start ( 21.1 0.001 0 ); + end ( 21.1 0.001 1.2 ); + } + ); + } + gaugesP + { + type sets; + libs ("libsampling.so"); + writeControl outputTime; + writeInterval 1; + setFormat raw; + surfaceFormat raw; + interpolationScheme cellPointFace; + fields ( p ); + sets + ( + GaugesP + { + type boundaryPoints; + axis xyz; + patches 1(caisson); + points ((18.0 0.01 0.75) + (18.00 0.01 0.80) + (18.00 0.01 0.85) + (18.00 0.01 0.95) + (18.01 0.01 0.70) + (18.25 0.01 0.70) + (18.50 0.01 0.70) + (18.75 0.01 0.70)); + maxDistance 0.01; + } + ); + } +} +*/ +// ************************************************************************* // diff --git a/openfoam/artha/system/decomposeParDict b/openfoam/artha/system/decomposeParDict new file mode 100644 index 0000000..3407e5d --- /dev/null +++ b/openfoam/artha/system/decomposeParDict @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + location "system"; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots (); + + +// ************************************************************************* // diff --git a/openfoam/artha/system/fvSchemes b/openfoam/artha/system/fvSchemes new file mode 100644 index 0000000..c0ac5b1 --- /dev/null +++ b/openfoam/artha/system/fvSchemes @@ -0,0 +1,79 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ 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 limitedLinearV 1; + div(U) Gauss linear; + div((rhoPhi|interpolate(porosity)),U) Gauss limitedLinearV 1; + div(rhoPhiPor,UPor) Gauss limitedLinearV 1; + div(rhoPhi,UPor) Gauss limitedLinearV 1; + div(rhoPhiPor,U) Gauss limitedLinearV 1; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div((phi|interpolate(porosity)),k) Gauss upwind; + div((phi*interpolate(rho)),k) Gauss upwind; + div((phi|interpolate(porosity)),epsilon) Gauss upwind; + div(phi,omega) Gauss upwind; + div((phi|interpolate(porosity)),omega) Gauss upwind; + div((phi*interpolate(rho)),omega) Gauss upwind; + div((phi*interpolate(rho)),epsilon) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p_rgh; + pcorr; + alpha.water; +} + +wallDist +{ + method meshWave; +} + + +// ************************************************************************* // diff --git a/openfoam/artha/system/fvSolution b/openfoam/artha/system/fvSolution new file mode 100644 index 0000000..ca48d43 --- /dev/null +++ b/openfoam/artha/system/fvSolution @@ -0,0 +1,95 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 1; + nAlphaSubCycles 2; + alphaOuterCorrectors yes; + cAlpha 1; + + MULESCorr no; + nLimiterIter 3; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + "pcorr.*" + { + solver PCG; + preconditioner DIC; + tolerance 1e-5; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0.05; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0; + } + + "(k|epsilon|omega|B|nuTilda).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-08; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nOuterCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/openfoam/artha/system/setFieldsDict b/openfoam/artha/system/setFieldsDict new file mode 100644 index 0000000..30aa755 --- /dev/null +++ b/openfoam/artha/system/setFieldsDict @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 + volScalarFieldValue porosityIndex 0 +); + +regions +( + boxToCell + { + box (-10 -10 -100) (500 10 5); + + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } + surfaceToCell + { + file "./constant/triSurface/rub.stl"; + outsidePoints ((0 0 0)); // definition of outside + includeCut true; // cells cut by surface + includeInside true; // cells not on outside of surf + includeOutside false; // cells on outside of surf + nearDistance -1; // cells with centre near surf + // (set to -1 if not used) + curvature -100; // cells within nearDistance + // and near surf curvature + // (set to -100 if not used) + + fieldValues + ( + volScalarFieldValue porosityIndex 1 + ); + } +); diff --git a/openfoam/artha/system/snappyHexMeshDict b/openfoam/artha/system/snappyHexMeshDict new file mode 100644 index 0000000..489169b --- /dev/null +++ b/openfoam/artha/system/snappyHexMeshDict @@ -0,0 +1,359 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.7.1 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object snappyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Which of the steps to run +castellatedMesh true; +snap false; +addLayers false; + + +// Geometry. Definition of all surfaces. All surfaces are of class +// searchableSurface. +// Surfaces are used +// - to specify refinement for any mesh cell intersecting it +// - to specify refinement for any mesh cell inside/outside/near +// - to 'snap' the mesh boundary to the surface +geometry +{ + + bloc0.stl + { + type triSurfaceMesh; + name bloc0; + } + bloc1.stl + { + type triSurfaceMesh; + name bloc1; + } + + bathy.stl + { + type triSurfaceMesh; + name bathy; + } + +}; + + + +// Settings for the castellatedMesh generation. +castellatedMeshControls +{ + + // Refinement parameters + // ~~~~~~~~~~~~~~~~~~~~~ + + // If local number of cells is >= maxLocalCells on any processor + // switches from from refinement followed by balancing + // (current method) to (weighted) balancing before refinement. + maxLocalCells 10000000; + + // Overall cell limit (approximately). Refinement will stop immediately + // upon reaching this number so a refinement level might not complete. + // Note that this is the number of cells before removing the part which + // is not 'visible' from the keepPoint. The final number of cells might + // actually be a lot less. + maxGlobalCells 10000000; + + // The surface refinement loop might spend lots of iterations refining just a + // few cells. This setting will cause refinement to stop if <= minimumRefine + // are selected for refinement. Note: it will at least do one iteration + // (unless the number of cells to refine is 0) + minRefinementCells 10; + + // Allow a certain level of imbalance during refining + // (since balancing is quite expensive) + // Expressed as fraction of perfect balance (= overall number of cells / + // nProcs). 0=balance always. + maxLoadUnbalance 0.10; + + + // Number of buffer layers between different levels. + // 1 means normal 2:1 refinement restriction, larger means slower + // refinement. + nCellsBetweenLevels 3; + + + + // Explicit feature edge refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies a level for any cell intersected by its edges. + // This is a featureEdgeMesh, read from constant/triSurface for now. + features + ( + //{ + // file "tanque.stl"; + // level 2; + //} + ); + + + + // Surface based refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies two levels for every surface. The first is the minimum level, + // every cell intersecting a surface gets refined up to the minimum level. + // The second level is the maximum level. Cells that 'see' multiple + // intersections where the intersections make an + // angle > resolveFeatureAngle get refined up to the maximum level. + + refinementSurfaces + { + + //caisson + //{ + // // Surface-wise min and max refinement level + // level ( 1 1 ); + //} + bathy + { + level ( 0 0 ); + } + bloc0 + { + level ( 0 0 ); + } + bloc1 + { + level ( 0 0 ); + } + + } + + // Resolve sharp angles + resolveFeatureAngle 65; + + + // Region-wise refinement + // ~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies refinement level for cells in relation to a surface. One of + // three modes + // - distance. 'levels' specifies per distance to the surface the + // wanted refinement level. The distances need to be specified in + // descending order. + // - inside. 'levels' is only one entry and only the level is used. All + // cells inside the surface get refined up to the level. The surface + // needs to be closed for this to be possible. + // - outside. Same but cells outside. + + refinementRegions + { + //mode distance; + //levels + //( + // (1.0 4) + // (2.0 3) + //); + } + + + // Mesh selection + // ~~~~~~~~~~~~~~ + + // After refinement patches get added for all refinementSurfaces and + // all cells intersecting the surfaces get put into these patches. The + // section reachable from the locationInMesh is kept. + // NOTE: This point should never be on a face, always inside a cell, even + // after refinement. + locationInMesh (0.25 0.01 0.25); + + // Whether any faceZones (as specified in the refinementSurfaces) + // are only on the boundary of corresponding cellZones or also allow + // free-standing zone faces. Not used if there are no faceZones. + allowFreeStandingZoneFaces true; +} + + + +// Settings for the snapping. +snapControls +{ + //- Number of patch smoothing iterations before finding correspondence + // to surface + nSmoothPatch 3; + + //- Relative distance for points to be attracted by surface feature point + // or edge. True distance is this factor times local + // maximum edge length. + tolerance 4.0; + + //- Number of mesh displacement relaxation iterations. + nSolveIter 30; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 5; +} + + + +// Settings for the layer addition. +addLayersControls +{ + // Are the thickness parameters below relative to the undistorted + // size of the refined cell outside layer (true) or absolute sizes (false). + relativeSizes true; + + // Per final patch (so not geometry!) the layer information + layers + { + //batimetria_patch0 + //{ + // nSurfaceLayers 2; //was 1 //was 4 + //} + } + + // Expansion factor for layer mesh + expansionRatio 1.0; + + //- Wanted thickness of final added cell layer. If multiple layers + // is the thickness of the layer furthest away from the wall. + // See relativeSizes parameter. + finalLayerThickness 0.3; + + //- Minimum thickness of cell layer. If for any reason layer + // cannot be above minThickness do not add layer. + // Relative to undistorted size of cell outside layer. + minThickness 0.1; + + //- If points get not extruded do nGrow layers of connected faces that are + // also not grown. This helps convergence of the layer addition process + // close to features. + nGrow 1; + + + // Advanced settings + + //- When not to extrude surface. 0 is flat surface, 90 is when two faces + // make straight angle. + featureAngle 30; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 3; + + // Number of smoothing iterations of surface normals + nSmoothSurfaceNormals 1; + + // Number of smoothing iterations of interior mesh movement direction + nSmoothNormals 3; + + // Smooth layer thickness over surface patches + nSmoothThickness 10; + + // Stop layer growth on highly warped cells + maxFaceThicknessRatio 0.5; + + // Reduce layer growth where ratio thickness to medial + // distance is large + maxThicknessToMedialRatio 0.3; + + // Angle used to pick up medial axis points + minMedianAxisAngle 130; + + // Create buffer region for new layer terminations + nBufferCellsNoExtrude 0; + + // Overall max number of layer addition iterations + nLayerIter 50; +} + + + +// Generic mesh quality settings. At any undoable phase these determine +// where to undo. +meshQualityControls +{ + //- Maximum non-orthogonality allowed. Set to 180 to disable. + maxNonOrtho 65; + + //- Max skewness allowed. Set to <0 to disable. + maxBoundarySkewness 20; + maxInternalSkewness 4; + + //- Max concaveness allowed. Is angle (in degrees) below which concavity + // is allowed. 0 is straight face, <0 would be convex face. + // Set to 180 to disable. + maxConcave 80; + + //- Minimum projected area v.s. actual area. Set to -1 to disable. + minFlatness 0.5; + + //- Minimum pyramid volume. Is absolute volume of cell pyramid. + // Set to a sensible fraction of the smallest cell volume expected. + // Set to very negative number (e.g. -1E30) to disable. + minVol 1e-13; + + //- Minimum quality of the tet formed by the face-centre + // and variable base point minimum decomposition triangles and + // the cell centre. This has to be a positive number for tracking + // to work. Set to very negative number (e.g. -1E30) to + // disable. + // <0 = inside out tet, + // 0 = flat tet + // 1 = regular tet + minTetQuality 1e-30; + + //- Minimum face area. Set to <0 to disable. + minArea -1; + + //- Minimum face twist. Set to <-1 to disable. dot product of face normal + //- and face centre triangles normal + minTwist 0.02; + + //- minimum normalised cell determinant + //- 1 = hex, <= 0 = folded or flattened illegal cell + minDeterminant 0.001; + + //- minFaceWeight (0 -> 0.5) + minFaceWeight 0.02; + + //- minVolRatio (0 -> 1) + minVolRatio 0.01; + + //must be >0 for Fluent compatibility + minTriangleTwist -1; + + + // Advanced + + //- Number of error distribution iterations + nSmoothScale 4; + //- amount to scale back displacement at error points + errorReduction 0.75; +} + + +// Advanced + +// Flags for optional output +// 0 : only write final meshes +// 1 : write intermediate meshes +// 2 : write volScalarField with cellLevel for postprocessing +// 4 : write current intersections as .obj files +debug 0; + + +// Merge tolerance. Is fraction of overall bounding box of initial mesh. +// Note: the write tolerance needs to be higher than this. +mergeTolerance 1E-6; + + +// ************************************************************************* // diff --git a/openfoam/config.example.ini b/openfoam/config.example.ini new file mode 100644 index 0000000..f797a64 --- /dev/null +++ b/openfoam/config.example.ini @@ -0,0 +1,19 @@ +[main] +input_dir = . +work_dir = /home/masterccce/OpenFOAM/work +case = artha +#log_file = openfoam.log + +[blockMesh] +enable = True +[snappyHexMesh] +enable = True +[setFields] +enable = True +[olaFlow] +enable = True +[parallel] +enable = False +threads = 4 +[reconstructPar] +enable = True diff --git a/openfoam/run/__main__.py b/openfoam/run/__main__.py new file mode 100644 index 0000000..be2b1cf --- /dev/null +++ b/openfoam/run/__main__.py @@ -0,0 +1,191 @@ +import sys +import argparse +import logging +import configparser +from pprint import pp + +from time import time +from datetime import timedelta + +from pathlib import Path +from distutils import dir_util +import subprocess as sp + +_t0 = time() +parser = argparse.ArgumentParser( + description='Run the OpenFoam simulation' +) +parser.add_argument('-c', '--config', default='config.ini', type=Path, + help='Configuration file (default config.ini)') +parser.add_argument('-l', '--log-level', default='INFO', type=str, + help='Log level') + +args = parser.parse_args() + +config = configparser.ConfigParser() +config.read(args.config) + +logging.basicConfig( + filename=config['main'].get('log_file', None), + level=args.log_level +) +log = logging.getLogger('openfoam') + +log.info('Starting program') + +input_dir = Path(config['main']['input_dir'], config['main']['case']) +work_dir = Path(config['main']['work_dir']) + +if not work_dir.exists(): + log.error(f'Work directory ({work_dir}) not found') + sys.exit(1) + +case_dir = work_dir.joinpath(config['main']['case']) +if case_dir.exists(): + log.info(f'Deleting case ({case_dir})') + dir_util.remove_tree(str(case_dir)) + +log.info(f'Copying case ({input_dir} -> {case_dir})') +dir_util.copy_tree( + str(input_dir), + str(case_dir), +) + +if config['blockMesh'].getboolean('enable'): + log.info('Running blockMesh') + blockmesh_log = logging.getLogger('blockMesh') + proc = sp.Popen( + ('blockMesh'), + cwd=case_dir, + stdout=sp.PIPE, + stderr=sp.PIPE, + text=True, + ) + for line in proc.stdout: + blockmesh_log.info(line[:-1]) + for line in proc.stderr: + blockmesh_log.error(line[:-1]) + code = proc.wait() + if code != 0: + log.error('blockMesh failed') + sys.exit(code) + log.info(f'blockMesh finished successfully') + +if config['snappyHexMesh'].getboolean('enable'): + log.info('Running snappyHexMesh') + snappy_log = logging.getLogger('snappyHexMesh') + proc = sp.Popen( + ('snappyHexMesh', '-overwrite'), + cwd=case_dir, + stdout=sp.PIPE, + stderr=sp.PIPE, + text=True, + ) + for line in proc.stdout: + snappy_log.info(line[:-1]) + for line in proc.stderr: + snappy_log.error(line[:-1]) + code = proc.wait() + if code != 0: + log.error('snappyHexMesh failed') + sys.exit(code) + log.info(f'snappyHexMesh finished successfully') + +log.info('Copying 0.org -> 0') +dir_util.copy_tree( + str(case_dir.joinpath('0.org')), + str(case_dir.joinpath('0')), +) + +if config['setFields'].getboolean('enable'): + log.info('Running setFields') + setfields_log = logging.getLogger('setFields') + proc = sp.Popen( + ('setFields'), + cwd=case_dir, + stdout=sp.PIPE, + stderr=sp.PIPE, + text=True, + ) + for line in proc.stdout: + setfields_log.info(line[:-1]) + for line in proc.stderr: + setfields_log.info(line[:-1]) + code = proc.wait() + if code != 0: + log.error('setFields failed') + sys.exit(code) + log.info(f'setFields finished successfully') + +if config['olaFlow'].getboolean('enable'): + cmd = ('olaFlow') + if config['parallel'].getboolean('enable'): + cmd = ( + 'mpirun', + '-np', config['parallel'].getint('threads'), + 'olaFlow', '-parallel' + ) + decpar_log = logging.getLogger('decomposePar') + proc = sp.Popen( + ('decomposePar'), + cwd=case_dir, + stdout=sp.PIPE, + stderr=sp.PIPE, + text=True, + ) + for line in proc.stdout: + decpar_log.info(line[:-1]) + for line in proc.stderr: + decpar_log.error(line[:-1]) + code = proc.wait() + if code != 0: + log.error('decomposePar failed') + sys.exit(code) + log.info(f'decomposePar finished successfully') + + log.info('Running olaFlow') + olaflow_log = logging.getLogger('olaFlow') + proc = sp.Popen( + cmd, + cwd=case_dir, + stdout=sp.PIPE, + stderr=sp.PIPE, + text=True, + ) + for line in proc.stdout: + olaflow_log.info(line[:-1]) + for line in proc.stderr: + olaflow_log.error(line[:-1]) + code = proc.wait() + if code != 0: + log.error('olaFlow failed') + sys.exit(code) + log.info(f'olaFlow finished successfully') + + if config['parallel'].getboolean('enable') \ + and config['reconstructPar'].getboolean('enable'): + recpar_log = logging.getLogger('reconstructPar') + proc = sp.Popen( + ('reconstructPar'), + cwd=case_dir, + stdout=sp.PIPE, + stderr=sp.PIPE, + text=True, + ) + for line in proc.stdout: + recpar_log.info(line[:-1]) + for line in proc.stderr: + recpar_log.error(line[:-1]) + code = proc.wait() + if code != 0: + log.error('reconstructPar failed') + sys.exit(code) + log.info(f'reconstructPar finished successfully') + + log.info(f'Deleting processor directories') + for proc_dir in case_dir.glob(r'processor*'): + log.info(f'Deleting {proc_dir}') + dir_util.remove_tree(str(proc_dir)) + +_t1 = time() +log.info(f'Program ended successfully after {timedelta(seconds=_t1-_t0)}')