diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict index cbb64949946e848990f34fa963e33ccda7126874..3a9e609aca1f0f4da81a78b0f7836aa69e322a49 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict @@ -32,7 +32,7 @@ geometry { type sphere; origin (3 3 0); - radius 4; + radius (3.5 3.5 4); } box1 diff --git a/tutorials/mesh/blockMesh/sphere7/system/blockMeshDict b/tutorials/mesh/blockMesh/sphere7/system/blockMeshDict index 6d19d4a536eb004a4b18efb48edcbf3c41c887d0..292821be3879021ec6fbd2ccf5a1e773068574c9 100644 --- a/tutorials/mesh/blockMesh/sphere7/system/blockMeshDict +++ b/tutorials/mesh/blockMesh/sphere7/system/blockMeshDict @@ -42,8 +42,8 @@ vo #eval{ sqrt($outerRadius/3) }; mvo #eval{ -$vo }; // Inner box sizes - % of overall dimension -vi #eval{ $innerRatio*$vo }; -mvi #eval{ $innerRatio*$mvo }; +vi #eval{ $vo * $innerRatio }; +mvi #eval{ -$vi }; vertices ( diff --git a/tutorials/mesh/blockMesh/sphere7ProjectedEdges/system/blockMeshDict b/tutorials/mesh/blockMesh/sphere7ProjectedEdges/system/blockMeshDict index 6f7108118ffc581c11a3823e5aebad685a7b0c78..727da905fc4e4a244144f7d4ac2d7db33f6e788b 100644 --- a/tutorials/mesh/blockMesh/sphere7ProjectedEdges/system/blockMeshDict +++ b/tutorials/mesh/blockMesh/sphere7ProjectedEdges/system/blockMeshDict @@ -31,16 +31,15 @@ geometry { sphere { - type sphere; - origin (0 0 0); - radius $outerRadius; + type sphere; + origin (0 0 0); + radius $outerRadius; } innerSphere { - type sphere; - origin (0 0 0); - radius #eval{ $innerRatio * $outerRadius }; + $sphere + radius #eval{ $outerRadius * $innerRatio }; } } @@ -50,8 +49,8 @@ vo #eval{ sqrt($outerRadius/3) }; mvo #eval{ -$vo }; // Inner box sizes - % of overall dimension -vi #eval{ $innerRatio*$vo }; -mvi #eval{ $innerRatio*$mvo }; +vi #eval{ $vo * $innerRatio }; +mvi #eval{ -$mvo }; vertices ( diff --git a/tutorials/mesh/blockMesh/spheroid7Projected/Allrun b/tutorials/mesh/blockMesh/spheroid7Projected/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..c0ee92beedf30f397cf3c31f146983b44bf406d5 --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroid7Projected/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/blockMesh/spheroid7Projected/system/blockMeshDict b/tutorials/mesh/blockMesh/spheroid7Projected/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..e7b9213b86325a1d853c1382b27db782ef1bc0e0 --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroid7Projected/system/blockMeshDict @@ -0,0 +1,166 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; +verbose no; + +// Geometric parameters +rxo 2; +ryo 3; +rzo 4; + +// Geometric parameters +outerRadius 1; +innerRatio 0.75; + +// Divisions in x/y/z and radial directions. Can be unequal. +nx 30; +ny 24; +nz 20; +nr 6; + +geometry +{ + sphere + { + type sphere; + origin (0 0 0); + radius ($rxo $ryo $rzo); + } + + innerSphere + { + $sphere + radius + ( + #eval{ $rxo * $innerRatio } + #eval{ $ryo * $innerRatio } + #eval{ $rzo * $innerRatio } + ); + } +} + + +// Outer box sizes (approximate) +vxo #eval{ sqrt(1.0/3.0) * $rxo }; mvxo #eval{ -$vxo }; +vyo #eval{ sqrt(1.0/3.0) * $ryo }; mvyo #eval{ -$vyo }; +vzo #eval{ sqrt(1.0/3.0) * $rzo }; mvzo #eval{ -$vzo }; + +// Inner box sizes - % of overall dimension +vxi #eval{ $vxo * $innerRatio }; mvxi #eval{ -$vxi }; +vyi #eval{ $vyo * $innerRatio }; mvyi #eval{ -$vyi }; +vzi #eval{ $vzo * $innerRatio }; mvzi #eval{ -$vzi }; + +vertices +( + // Inner block points + project ($mvxi $mvyi $mvzi) (innerSphere) + project ( $vxi $mvyi $mvzi) (innerSphere) + project ( $vxi $vyi $mvzi) (innerSphere) + project ($mvxi $vyi $mvzi) (innerSphere) + project ($mvxi $mvyi $vzi) (innerSphere) + project ( $vxi $mvyi $vzi) (innerSphere) + project ( $vxi $vyi $vzi) (innerSphere) + project ($mvxi $vyi $vzi) (innerSphere) + + // Outer block points + project ($mvxo $mvyo $mvzo) (sphere) + project ( $vxo $mvyo $mvzo) (sphere) + project ( $vxo $vyo $mvzo) (sphere) + project ($mvxo $vyo $mvzo) (sphere) + project ($mvxo $mvyo $vzo) (sphere) + project ( $vxo $mvyo $vzo) (sphere) + project ( $vxo $vyo $vzo) (sphere) + project ($mvxo $vyo $vzo) (sphere) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) grading (1 1 1) // Inner block + + // Outer blocks + hex ( 8 0 3 11 12 4 7 15) ($nr $ny $nz) grading (1 1 1) // x-min + hex ( 1 9 10 2 5 13 14 6) ($nr $ny $nz) grading (1 1 1) // x-max + hex ( 8 9 1 0 12 13 5 4) ($nx $nr $nz) grading (1 1 1) // y-min + hex ( 3 2 10 11 7 6 14 15) ($nx $nr $nz) grading (1 1 1) // y-max + hex ( 8 9 10 11 0 1 2 3) ($nx $ny $nr) grading (1 1 1) // z-min + hex ( 4 5 6 7 12 13 14 15) ($nx $ny $nr) grading (1 1 1) // z-max +); + +edges +( + // Outer blocks + project 8 9 (sphere) + project 10 11 (sphere) + project 14 15 (sphere) + project 12 13 (sphere) + + project 8 11 (sphere) + project 9 10 (sphere) + project 13 14 (sphere) + project 12 15 (sphere) + + project 8 12 (sphere) + project 9 13 (sphere) + project 10 14 (sphere) + project 11 15 (sphere) + + // Inner block + project 0 1 (innerSphere) + project 2 3 (innerSphere) + project 6 7 (innerSphere) + project 4 5 (innerSphere) + + project 0 3 (innerSphere) + project 1 2 (innerSphere) + project 5 6 (innerSphere) + project 4 7 (innerSphere) + + project 0 4 (innerSphere) + project 1 5 (innerSphere) + project 2 6 (innerSphere) + project 3 7 (innerSphere) +); + +faces +( + // Outer blocks + project ( 8 12 15 11) sphere // x-min + project ( 9 10 14 13) sphere // x-max + project ( 8 9 13 12) sphere // y-min + project (11 15 14 10) sphere // y-max + project ( 8 11 10 9) sphere // z-min + project (12 13 14 15) sphere // z-max +); + +boundary +( + walls + { + type wall; + faces + ( + ( 8 12 15 11) // x-min + ( 9 10 14 13) // x-max + ( 8 9 13 12) // y-min + (11 15 14 10) // y-max + ( 8 11 10 9) // z-min + (12 13 14 15) // z-max + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroid7Projected/system/controlDict b/tutorials/mesh/blockMesh/spheroid7Projected/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..99b9a2cdece4f8018b62bac39749152ac807e0af --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroid7Projected/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application blockMesh; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0; + +deltaT 0; + +writeControl timeStep; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroid7Projected/system/fvSchemes b/tutorials/mesh/blockMesh/spheroid7Projected/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..818663ef79e51b8a2ca79fc067d2a84535b493d5 --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroid7Projected/system/fvSchemes @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{} + +gradSchemes +{} + +divSchemes +{} + +laplacianSchemes +{} + +interpolationSchemes +{} + +snGradSchemes +{} + + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroid7Projected/system/fvSolution b/tutorials/mesh/blockMesh/spheroid7Projected/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..22f91c36584fde4c6903801e9351dae822b4ec5a --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroid7Projected/system/fvSolution @@ -0,0 +1,18 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroidProjected/Allrun b/tutorials/mesh/blockMesh/spheroidProjected/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..c0ee92beedf30f397cf3c31f146983b44bf406d5 --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroidProjected/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/blockMesh/spheroidProjected/system/blockMeshDict b/tutorials/mesh/blockMesh/spheroidProjected/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..106cf7cd8c62a55a8a5d35fd36e3e8d5eba15e4e --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroidProjected/system/blockMeshDict @@ -0,0 +1,108 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +// Geometric parameters +rxo 2; +ryo 3; +rzo 4; + +// Divisions in x/y/z directions. Can be unequal. +nx 30; +ny 24; +nz 20; + +geometry +{ + sphere + { + type sphere; + origin (0 0 0); + radius ($rxo $ryo $rzo); + } +} + +// Box sizes +vxo #eval{sqrt(1.0/3.0) * $rxo}; mvxo #eval{-$vxo}; +vyo #eval{sqrt(1.0/3.0) * $ryo}; mvyo #eval{-$vyo}; +vzo #eval{sqrt(1.0/3.0) * $rzo}; mvzo #eval{-$vzo}; + +vertices +( + // Outer block points + project ($mvxo $mvyo $mvzo) (sphere) + project ( $vxo $mvyo $mvzo) (sphere) + project ( $vxo $vyo $mvzo) (sphere) + project ($mvxo $vyo $mvzo) (sphere) + project ($mvxo $mvyo $vzo) (sphere) + project ( $vxo $mvyo $vzo) (sphere) + project ( $vxo $vyo $vzo) (sphere) + project ($mvxo $vyo $vzo) (sphere) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) grading (1 1 1) +); + +edges +( + // Outer edges + project 0 1 (sphere) + project 2 3 (sphere) + project 6 7 (sphere) + project 4 5 (sphere) + + project 0 3 (sphere) + project 1 2 (sphere) + project 5 6 (sphere) + project 4 7 (sphere) + + project 0 4 (sphere) + project 1 5 (sphere) + project 2 6 (sphere) + project 3 7 (sphere) +); + +faces +( + project (0 4 7 3) sphere // x-min + project (1 2 6 5) sphere // x-max + project (0 1 5 4) sphere // y-min + project (3 7 6 2) sphere // y-max + project (0 3 2 1) sphere // z-min + project (4 5 6 7) sphere // z-max +); + +boundary +( + walls + { + type wall; + faces + ( + (0 4 7 3) // x-min + (1 2 6 5) // x-max + (0 1 5 4) // y-min + (3 7 6 2) // y-max + (0 3 2 1) // z-min + (4 5 6 7) // z-max + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroidProjected/system/controlDict b/tutorials/mesh/blockMesh/spheroidProjected/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..99b9a2cdece4f8018b62bac39749152ac807e0af --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroidProjected/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application blockMesh; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0; + +deltaT 0; + +writeControl timeStep; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroidProjected/system/fvSchemes b/tutorials/mesh/blockMesh/spheroidProjected/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..818663ef79e51b8a2ca79fc067d2a84535b493d5 --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroidProjected/system/fvSchemes @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{} + +gradSchemes +{} + +divSchemes +{} + +laplacianSchemes +{} + +interpolationSchemes +{} + +snGradSchemes +{} + + +// ************************************************************************* // diff --git a/tutorials/mesh/blockMesh/spheroidProjected/system/fvSolution b/tutorials/mesh/blockMesh/spheroidProjected/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..22f91c36584fde4c6903801e9351dae822b4ec5a --- /dev/null +++ b/tutorials/mesh/blockMesh/spheroidProjected/system/fvSolution @@ -0,0 +1,18 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict index 7a03d4e12ec70e2ac4482baee2909b2a276d41e3..0ba5c86424b98117c9c2d4ba01fdc56037685e98 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict @@ -32,7 +32,7 @@ geometry { type sphere; origin (3 3 0); - radius 4; + radius (3.5 3.5 4); } box1 @@ -51,7 +51,7 @@ geometry seal { surface box1; - scale (1.0 1.0 2.1); + scale (1.0 1.0 2.1); // Old syntax transform