From 830a21735396b5dd0161bc1865bae4a5df5a6609 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Wed, 5 May 2021 13:29:00 +0200 Subject: [PATCH] TUT: use system/ location instead of constant/faMesh/ for faMeshDefinition - adjust surfactantFoam/planeTransport tutorial to have partial coverage of the plate by the finiteArea mesh. Depending on the decomposition, the outflow boundary may coincide with a processor patch (good for testing purposes). - additional Allrun-parallel versions for targetted future behaviour --- .../faMesh => system}/faMeshDefinition | 2 +- .../liquidFilmFoam/cylinder/Allrun-parallel | 14 ++++ .../faMesh => system}/faMeshDefinition | 10 ++- .../faMesh => system}/faMeshDefinition | 2 +- .../planeTransport/Allrun-parallel | 19 ++++++ .../planeTransport/system/blockMeshDict | 67 +++++++++++++------ .../planeTransport/system/decomposeParDict | 1 - .../system/decomposeParDict-procBoundary4 | 28 ++++++++ .../system/decomposeParDict-procBoundary8 | 28 ++++++++ .../faMesh => system}/faMeshDefinition | 5 +- .../faMesh => system}/faMeshDefinition | 0 .../faMesh => system}/faMeshDefinition | 0 .../faMesh => system}/faMeshDefinition | 0 13 files changed, 149 insertions(+), 27 deletions(-) rename tutorials/compressible/acousticFoam/obliqueAirJet/main/{constant/faMesh => system}/faMeshDefinition (97%) create mode 100755 tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun-parallel rename tutorials/finiteArea/liquidFilmFoam/cylinder/{constant/faMesh => system}/faMeshDefinition (94%) rename tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/{constant/faMesh => system}/faMeshDefinition (96%) create mode 100755 tutorials/finiteArea/surfactantFoam/planeTransport/Allrun-parallel create mode 100644 tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary4 create mode 100644 tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary8 rename tutorials/finiteArea/surfactantFoam/planeTransport/{constant/faMesh => system}/faMeshDefinition (91%) rename tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/{constant/faMesh => system}/faMeshDefinition (100%) rename tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/{constant/faMesh => system}/faMeshDefinition (100%) rename tutorials/incompressible/pimpleFoam/laminar/sloshing2D/{constant/faMesh => system}/faMeshDefinition (100%) diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/constant/faMesh/faMeshDefinition b/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faMeshDefinition similarity index 97% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/constant/faMesh/faMeshDefinition rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faMeshDefinition index 1c7878defd4..7bc2d201aca 100644 --- a/tutorials/compressible/acousticFoam/obliqueAirJet/main/constant/faMesh/faMeshDefinition +++ b/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faMeshDefinition @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -polyMeshPatches 1(window); +polyMeshPatches ( window ); boundary { diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun-parallel b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun-parallel new file mode 100755 index 00000000000..3f019bcaa24 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun-parallel @@ -0,0 +1,14 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +runApplication decomposePar + +runParallel makeFaMesh + +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faMeshDefinition b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faMeshDefinition similarity index 94% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faMeshDefinition rename to tutorials/finiteArea/liquidFilmFoam/cylinder/system/faMeshDefinition index 12c4767c8d1..66da6e5c0e5 100644 --- a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faMeshDefinition +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faMeshDefinition @@ -10,12 +10,11 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant/faMesh"; object faMeshDefinition; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -polyMeshPatches 1( film ); +polyMeshPatches ( film ); boundary { @@ -56,4 +55,11 @@ boundary } +defaultPatch +{ + name empty; + type empty; +} + + // ************************************************************************** // diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/constant/faMesh/faMeshDefinition b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faMeshDefinition similarity index 96% rename from tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/constant/faMesh/faMeshDefinition rename to tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faMeshDefinition index a9d4ea6d560..ce76df0f704 100644 --- a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/constant/faMesh/faMeshDefinition +++ b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faMeshDefinition @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -polyMeshPatches 1( outer ); +polyMeshPatches ( outer ); boundary { diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/Allrun-parallel b/tutorials/finiteArea/surfactantFoam/planeTransport/Allrun-parallel new file mode 100755 index 00000000000..93e66772a9e --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/Allrun-parallel @@ -0,0 +1,19 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +decompDict="-decomposeParDict system/decomposeParDict-procBoundary8" +fileHandler="-fileHandler collated" + +runApplication $decompDict decomposePar $fileHandler + +runParallel $decompDict makeFaMesh $fileHandler + +runParallel $decompDict $(getApplication) $fileHandler + +runApplication reconstructPar $fileHandler + +#------------------------------------------------------------------------------ diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/blockMeshDict b/tutorials/finiteArea/surfactantFoam/planeTransport/system/blockMeshDict index fabc18b264b..6f5e501b6be 100644 --- a/tutorials/finiteArea/surfactantFoam/planeTransport/system/blockMeshDict +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/blockMeshDict @@ -14,27 +14,44 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// A flat plate that is only partial covered by the finiteArea mesh. +// Depending on the decomposition, the outflow boundary may +// coincide with a processor patch. + scale 0.1; +height 0.1; +width 1; +len 3; +out 1; +out #eval{ $out + $len }; + +nx 60; +ny 20; +nz 1; +nout 20; + vertices ( - (0 0 0) - (3 0 0) - (3 1 0) - (0 1 0) - (0 0 0.1) - (3 0 0.1) - (3 1 0.1) - (0 1 0.1) -); + /* 0*/ (0 0 0) + /* 1*/ ($len 0 0) + /* 2*/ ($len $width 0) + /* 3*/ (0 $width 0) + /* 4*/ (0 0 $height) + /* 5*/ ($len 0 $height) + /* 6*/ ($len $width $height) + /* 7*/ (0 $width $height) -blocks -( - hex (0 1 2 3 4 5 6 7) (60 20 1) simpleGrading (1 1 1) + /* 8*/ ($out 0 0) + /* 9*/ ($out 1 0) + /*10*/ ($out 0 $height) + /*11*/ ($out 1 $height) ); -edges +blocks ( + hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) grading (1 1 1) + hex (1 8 9 2 5 10 11 6) ($nout $ny $nz) grading (1 1 1) ); boundary @@ -44,7 +61,7 @@ boundary type patch; faces ( - (0 4 7 3) + (0 4 7 3) ); } @@ -53,8 +70,12 @@ boundary type wall; faces ( - (3 7 6 2) - (1 5 4 0) + (3 7 6 2) + (1 5 4 0) + + // outflow + (1 8 10 5) + (2 6 11 9) ); } @@ -63,7 +84,7 @@ boundary type patch; faces ( - (2 6 5 1) + (8 9 10 11) ); } @@ -73,6 +94,7 @@ boundary faces ( (0 3 2 1) + (1 8 9 2) ); } @@ -84,10 +106,15 @@ boundary (4 5 6 7) ); } -); -mergePatchPairs -( + outflow + { + type patch; + faces + ( + (5 10 11 6) + ); + } ); diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict index 792ca5965b6..bf5148c5d80 100644 --- a/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object decomposeParDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary4 b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary4 new file mode 100644 index 00000000000..30e0dbd4ae6 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary4 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// With 4 divisions in x-direction (coincides with finiteArea boundary) + +numberOfSubdomains 4; + +method simple; + +coeffs +{ + n ( 4 1 1 ); +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary8 b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary8 new file mode 100644 index 00000000000..bc6a1ae7b79 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict-procBoundary8 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// With 4 divisions in x-direction (coincides with finiteArea boundary) + +numberOfSubdomains 8; + +method simple; + +coeffs +{ + n ( 4 2 1 ); +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faMeshDefinition b/tutorials/finiteArea/surfactantFoam/planeTransport/system/faMeshDefinition similarity index 91% rename from tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faMeshDefinition rename to tutorials/finiteArea/surfactantFoam/planeTransport/system/faMeshDefinition index de49f774744..9558287443a 100644 --- a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faMeshDefinition +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/faMeshDefinition @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -polyMeshPatches 1( top ); +polyMeshPatches ( top ); boundary { @@ -28,7 +28,8 @@ boundary { type patch; ownerPolyPatch top; - neighbourPolyPatch outlet; + // neighbourPolyPatch outlet; + neighbourPolyPatch outflow; } bound { diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/constant/faMesh/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/constant/faMesh/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/constant/faMesh/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/constant/faMesh/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/constant/faMesh/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/sloshing2D/constant/faMesh/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faMeshDefinition -- GitLab