Skip to content

Commit

Permalink
Template case files to help general setup of OpenFOAM cases
Browse files Browse the repository at this point in the history
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
Chris Greenshields committed May 18, 2015
1 parent 8277c32 commit 13910e4
Show file tree
Hide file tree
Showing 101 changed files with 4,394 additions and 0 deletions.
40 changes: 40 additions & 0 deletions etc/templates/axisymmetricJet/0/U
@@ -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"
}

// ************************************************************************* //
35 changes: 35 additions & 0 deletions etc/templates/axisymmetricJet/0/epsilon
@@ -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"
}

// ************************************************************************* //
42 changes: 42 additions & 0 deletions etc/templates/axisymmetricJet/0/k
@@ -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"
}

// ************************************************************************* //
38 changes: 38 additions & 0 deletions etc/templates/axisymmetricJet/0/nut
@@ -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"
}

// ************************************************************************* //
35 changes: 35 additions & 0 deletions etc/templates/axisymmetricJet/0/omega
@@ -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"
}

// ************************************************************************* //
38 changes: 38 additions & 0 deletions etc/templates/axisymmetricJet/0/p
@@ -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"
}

// ************************************************************************* //
8 changes: 8 additions & 0 deletions etc/templates/axisymmetricJet/Allclean
@@ -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
14 changes: 14 additions & 0 deletions etc/templates/axisymmetricJet/Allrun
@@ -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
25 changes: 25 additions & 0 deletions etc/templates/axisymmetricJet/README
@@ -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
23 changes: 23 additions & 0 deletions etc/templates/axisymmetricJet/constant/RASProperties
@@ -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;

// ************************************************************************* //

0 comments on commit 13910e4

Please sign in to comment.