Permalink
Browse files

Template case files to help general setup of OpenFOAM cases

The templates include a stategy to simplify meshing with snappyHexMesh,
particularly to help generate an initial mesh quickly that can subsequently be
improved.  The templates are setup to enable rapid initial simulations, typically
with simpleFoam.  The initial templates cover simple inflow-outflow and closed
domains, including rotating geometry, and an example axisymmetric flow.  For
more details, consult the README file accompanying each template case.
The cases are located in $FOAM_ETC/templates
  • Loading branch information...
1 parent 8277c32 commit 13910e4c7ad3dce1c47404b1a97bf84c4b51081a Chris Greenshields committed May 18, 2015
Showing with 4,394 additions and 0 deletions.
  1. +40 −0 etc/templates/axisymmetricJet/0/U
  2. +35 −0 etc/templates/axisymmetricJet/0/epsilon
  3. +42 −0 etc/templates/axisymmetricJet/0/k
  4. +38 −0 etc/templates/axisymmetricJet/0/nut
  5. +35 −0 etc/templates/axisymmetricJet/0/omega
  6. +38 −0 etc/templates/axisymmetricJet/0/p
  7. +8 −0 etc/templates/axisymmetricJet/Allclean
  8. +14 −0 etc/templates/axisymmetricJet/Allrun
  9. +25 −0 etc/templates/axisymmetricJet/README
  10. +23 −0 etc/templates/axisymmetricJet/constant/RASProperties
  11. +109 −0 etc/templates/axisymmetricJet/constant/polyMesh/blockMeshDict
  12. +21 −0 etc/templates/axisymmetricJet/constant/transportProperties
  13. +19 −0 etc/templates/axisymmetricJet/constant/turbulenceProperties
  14. +56 −0 etc/templates/axisymmetricJet/system/controlDict
  15. +35 −0 etc/templates/axisymmetricJet/system/extrudeMeshDict
  16. +67 −0 etc/templates/axisymmetricJet/system/fvSchemes
  17. +93 −0 etc/templates/axisymmetricJet/system/fvSolution
  18. +42 −0 etc/templates/axisymmetricJet/system/graph
  19. +36 −0 etc/templates/closedVolume/0/T
  20. +30 −0 etc/templates/closedVolume/0/U
  21. +31 −0 etc/templates/closedVolume/0/alphat
  22. +32 −0 etc/templates/closedVolume/0/epsilon
  23. +32 −0 etc/templates/closedVolume/0/k
  24. +30 −0 etc/templates/closedVolume/0/nut
  25. +32 −0 etc/templates/closedVolume/0/omega
  26. +29 −0 etc/templates/closedVolume/0/p
  27. +31 −0 etc/templates/closedVolume/0/p_rgh
  28. +24 −0 etc/templates/closedVolume/README
  29. +23 −0 etc/templates/closedVolume/constant/RASProperties
  30. +20 −0 etc/templates/closedVolume/constant/g
  31. +68 −0 etc/templates/closedVolume/constant/polyMesh/blockMeshDict
  32. +34 −0 etc/templates/closedVolume/constant/transportProperties
  33. 0 etc/templates/closedVolume/constant/triSurface/.keep
  34. +19 −0 etc/templates/closedVolume/constant/turbulenceProperties
  35. +55 −0 etc/templates/closedVolume/system/controlDict
  36. +69 −0 etc/templates/closedVolume/system/fvSchemes
  37. +95 −0 etc/templates/closedVolume/system/fvSolution
  38. +22 −0 etc/templates/closedVolume/system/meshQualityDict
  39. +104 −0 etc/templates/closedVolume/system/snappyHexMeshDict
  40. +35 −0 etc/templates/closedVolume/system/surfaceFeatureExtractDict
  41. +35 −0 etc/templates/closedVolumeRotating/0/U
  42. +32 −0 etc/templates/closedVolumeRotating/0/k
  43. +30 −0 etc/templates/closedVolumeRotating/0/nut
  44. +32 −0 etc/templates/closedVolumeRotating/0/omega
  45. +29 −0 etc/templates/closedVolumeRotating/0/p
  46. +7 −0 etc/templates/closedVolumeRotating/README
  47. +23 −0 etc/templates/closedVolumeRotating/constant/RASProperties
  48. +30 −0 etc/templates/closedVolumeRotating/constant/dynamicMeshDict
  49. +68 −0 etc/templates/closedVolumeRotating/constant/polyMesh/blockMeshDict
  50. +22 −0 etc/templates/closedVolumeRotating/constant/rotatingZoneProperties
  51. +21 −0 etc/templates/closedVolumeRotating/constant/transportProperties
  52. 0 etc/templates/closedVolumeRotating/constant/triSurface/.keep
  53. +19 −0 etc/templates/closedVolumeRotating/constant/turbulenceProperties
  54. +55 −0 etc/templates/closedVolumeRotating/system/controlDict
  55. +46 −0 etc/templates/closedVolumeRotating/system/createBafflesDict
  56. +30 −0 etc/templates/closedVolumeRotating/system/fvOptions
  57. +67 −0 etc/templates/closedVolumeRotating/system/fvSchemes
  58. +93 −0 etc/templates/closedVolumeRotating/system/fvSolution
  59. +22 −0 etc/templates/closedVolumeRotating/system/meshQualityDict
  60. +126 −0 etc/templates/closedVolumeRotating/system/snappyHexMeshDict
  61. +32 −0 etc/templates/closedVolumeRotating/system/surfaceFeatureExtractDict
  62. +46 −0 etc/templates/inflowOutflow/0/U
  63. +47 −0 etc/templates/inflowOutflow/0/k
  64. +44 −0 etc/templates/inflowOutflow/0/nut
  65. +47 −0 etc/templates/inflowOutflow/0/omega
  66. +42 −0 etc/templates/inflowOutflow/0/p
  67. +54 −0 etc/templates/inflowOutflow/README
  68. +23 −0 etc/templates/inflowOutflow/constant/RASProperties
  69. +68 −0 etc/templates/inflowOutflow/constant/polyMesh/blockMeshDict
  70. +121 −0 etc/templates/inflowOutflow/constant/polyMesh/blockMeshDict.extPatches
  71. +21 −0 etc/templates/inflowOutflow/constant/transportProperties
  72. 0 etc/templates/inflowOutflow/constant/triSurface/.keep
  73. +19 −0 etc/templates/inflowOutflow/constant/turbulenceProperties
  74. +55 −0 etc/templates/inflowOutflow/system/controlDict
  75. +67 −0 etc/templates/inflowOutflow/system/fvSchemes
  76. +93 −0 etc/templates/inflowOutflow/system/fvSolution
  77. +22 −0 etc/templates/inflowOutflow/system/meshQualityDict
  78. +120 −0 etc/templates/inflowOutflow/system/snappyHexMeshDict
  79. +35 −0 etc/templates/inflowOutflow/system/surfaceFeatureExtractDict
  80. +52 −0 etc/templates/inflowOutflowRotating/0/U
  81. +47 −0 etc/templates/inflowOutflowRotating/0/k
  82. +44 −0 etc/templates/inflowOutflowRotating/0/nut
  83. +47 −0 etc/templates/inflowOutflowRotating/0/omega
  84. +42 −0 etc/templates/inflowOutflowRotating/0/p
  85. +32 −0 etc/templates/inflowOutflowRotating/README
  86. +23 −0 etc/templates/inflowOutflowRotating/constant/RASProperties
  87. +30 −0 etc/templates/inflowOutflowRotating/constant/dynamicMeshDict
  88. +68 −0 etc/templates/inflowOutflowRotating/constant/polyMesh/blockMeshDict
  89. +121 −0 etc/templates/inflowOutflowRotating/constant/polyMesh/blockMeshDict.extPatches
  90. +22 −0 etc/templates/inflowOutflowRotating/constant/rotatingZoneProperties
  91. +21 −0 etc/templates/inflowOutflowRotating/constant/transportProperties
  92. 0 etc/templates/inflowOutflowRotating/constant/triSurface/.keep
  93. +19 −0 etc/templates/inflowOutflowRotating/constant/turbulenceProperties
  94. +55 −0 etc/templates/inflowOutflowRotating/system/controlDict
  95. +46 −0 etc/templates/inflowOutflowRotating/system/createBafflesDict
  96. +30 −0 etc/templates/inflowOutflowRotating/system/fvOptions
  97. +67 −0 etc/templates/inflowOutflowRotating/system/fvSchemes
  98. +93 −0 etc/templates/inflowOutflowRotating/system/fvSolution
  99. +22 −0 etc/templates/inflowOutflowRotating/system/meshQualityDict
  100. +147 −0 etc/templates/inflowOutflowRotating/system/snappyHexMeshDict
  101. +32 −0 etc/templates/inflowOutflowRotating/system/surfaceFeatureExtractDict
@@ -0,0 +1,40 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volVectorField;
+ object U;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+Uinlet (10 0 0);
+
+dimensions [0 1 -1 0 0 0 0];
+
+internalField uniform (0 0 0);
+
+boundaryField
+{
+ inlet
+ {
+ type fixedValue;
+ value uniform $Uinlet;
+ }
+
+ atmosphere
+ {
+ type pressureInletOutletVelocity;
+ value uniform (0 0 0);
+ }
+
+ #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,35 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volScalarField;
+ object omega;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+epsilonInlet 0.002;
+
+dimensions [0 2 -3 0 0 0 0];
+
+internalField uniform $epsilonInlet;
+
+boundaryField
+{
+ "(inlet|atmosphere)"
+ {
+ type turbulentMixingLengthDissipationRateInlet;
+ mixingLength 0.1;
+ value uniform $epsilonInlet;
+ }
+
+ #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,42 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volScalarField;
+ object k;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+kInlet 0.01;
+
+dimensions [0 2 -2 0 0 0 0];
+
+internalField uniform $kInlet;
+
+boundaryField
+{
+ inlet
+ {
+ type turbulentIntensityKineticEnergyInlet;
+ intensity 0.02;
+ value uniform $kInlet;
+ }
+
+ atmosphere
+ {
+ type inletOutlet;
+ inletValue uniform $kInlet;
+ value uniform $kInlet;
+ }
+
+ #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,38 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volScalarField;
+ object nut;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions [0 2 -1 0 0 0 0];
+
+internalField uniform 0;
+
+boundaryField
+{
+ inlet
+ {
+ type calculated;
+ value uniform 0;
+ }
+
+ atmosphere
+ {
+ type calculated;
+ value uniform 0;
+ }
+
+ #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,35 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volScalarField;
+ object omega;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+omegaInlet 1.0;
+
+dimensions [0 0 -1 0 0 0 0];
+
+internalField uniform $omegaInlet;
+
+boundaryField
+{
+ "(inlet|atmosphere)"
+ {
+ type turbulentMixingLengthFrequencyInlet;
+ mixingLength 0.1;
+ value uniform $omegaInlet;
+ }
+
+ #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,38 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volScalarField;
+ object p;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions [0 2 -2 0 0 0 0];
+
+internalField uniform 0;
+
+boundaryField
+{
+ inlet
+ {
+ type zeroGradient;
+ }
+
+ atmosphere
+ {
+ type totalPressure;
+ gamma 1.4;
+ p0 uniform 0;
+ }
+
+ #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd ${0%/*} || exit 1 # run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+rm constant/polyMesh/boundary
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd ${0%/*} || exit 1 # run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+application=`getApplication`
+
+runApplication blockMesh
+runApplication extrudeMesh
+
+runApplication $application
+
+# ----------------------------------------------------------------- end-of-file
@@ -0,0 +1,25 @@
+Overview
+========
++ Template case for axisymmetric jet flow
++ The main purpose of this template is to demonstrate a simple, reliable meshing
+ strategy for axisymmetric flow
+
+Meshing
+=======
++ The blockMeshDict file contains a backgroundMesh subditionary
++ In backgroundMesh set the geometry radius and length and jet radius
++ Set the number of cells in the length and radial directions
++ Run blockMesh to generate a 2D "slab" mesh
++ Run extrudeMesh to convert the mesh into a 2D axisymmetric mesh with wedge
+ front and back patches
+
+Initialisation
+==============
++ In the field files in the 0 directory, set inlet values
++ For example, in 0/U, set the inlet velocity Uinlet
++ Set the viscosity in constant/transportProperties
+
+Output
+======
++ Graph data of field values along the centreline are written to files in
+ postProcessing/graph
@@ -0,0 +1,23 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 2.3.x |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ object RASProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+RASModel kOmegaSST;
+
+turbulence on;
+
+printCoeffs on;
+
+// ************************************************************************* //
Oops, something went wrong.

0 comments on commit 13910e4

Please sign in to comment.