From e20845b31ada3511d20b4e2b30e658788f997a6b Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 23 Jan 2014 13:14:50 +0000 Subject: [PATCH] ENH: createZeroFolder - updated templates --- .../fluid/buoyant/inletOptions | 8 +- .../boundaryConditions/fluid/buoyant/outlet | 5 -- .../fluid/buoyant/outletOptions | 52 +++++++++++++ .../fluid/buoyant/wallOptions | 32 +++++++- .../fluid/compressible/inletOptions | 6 +- .../fluid/compressible/outletOptions | 37 +++++++++ .../fluid/compressible/wallOptions | 34 +++++++- .../fluid/incompressible/inletOptions | 6 +- .../fluid/incompressible/outlet | 9 --- .../boundaryConditions/fluid/inletOptions | 4 +- etc/templates/boundaryConditions/fluid/outlet | 18 ----- .../boundaryConditions/fluid/outletOptions | 77 +++++++++++++++++++ .../boundaryConditions/fluid/wallOptions | 8 ++ etc/templates/models/turbulence/kEpsilon | 5 ++ etc/templates/solvers/pimpleFoam | 41 ++++++++++ etc/templates/solvers/pisoFoam | 41 ++++++++++ etc/templates/solvers/rhoPimpleDyMFoam | 46 +++++++++++ etc/templates/solvers/rhoPimpleFoam | 46 +++++++++++ 18 files changed, 428 insertions(+), 47 deletions(-) create mode 100644 etc/templates/boundaryConditions/fluid/buoyant/outletOptions create mode 100644 etc/templates/boundaryConditions/fluid/compressible/outletOptions create mode 100644 etc/templates/solvers/pimpleFoam create mode 100644 etc/templates/solvers/pisoFoam create mode 100644 etc/templates/solvers/rhoPimpleDyMFoam create mode 100644 etc/templates/solvers/rhoPimpleFoam diff --git a/etc/templates/boundaryConditions/fluid/buoyant/inletOptions b/etc/templates/boundaryConditions/fluid/buoyant/inletOptions index 16788e99ef..1256b51f26 100644 --- a/etc/templates/boundaryConditions/fluid/buoyant/inletOptions +++ b/etc/templates/boundaryConditions/fluid/buoyant/inletOptions @@ -22,17 +22,17 @@ flowSpecification U { type pressureInletVelocity; - value ${:inlet.U}; + value ${:VALUE.U}; } p { type calculated; - value ${:inlet.p}; + value ${:VALUE.p}; } p_rgh { type fixedValue; - value ${:inlet.p_rgh}; + value ${:VALUE.p_rgh}; } } fixedVelocity @@ -45,7 +45,7 @@ flowSpecification p { type calculated; - value ${:inlet.p}; + value ${:VALUE.p}; } p_rgh { diff --git a/etc/templates/boundaryConditions/fluid/buoyant/outlet b/etc/templates/boundaryConditions/fluid/buoyant/outlet index 8161894e00..1ca83b4735 100644 --- a/etc/templates/boundaryConditions/fluid/buoyant/outlet +++ b/etc/templates/boundaryConditions/fluid/buoyant/outlet @@ -28,11 +28,6 @@ subSonic type calculated; value ${:VALUE.p}; } - p_rgh - { - type fixedValue; - value ${:VALUE.p_rgh}; - } mut { type zeroGradient; diff --git a/etc/templates/boundaryConditions/fluid/buoyant/outletOptions b/etc/templates/boundaryConditions/fluid/buoyant/outletOptions new file mode 100644 index 0000000000..268e50efd7 --- /dev/null +++ b/etc/templates/boundaryConditions/fluid/buoyant/outletOptions @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.2.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "templates"; + object outletOptions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +returnFlow +{ + default + { + p_rgh + { + type fixedValue; + value ${:VALUE.p_rgh}; + } + } + wall + { + p_rgh + { + type fixedValue; + value ${:VALUE.p_rgh}; + } + } + atmosphere + { + p_rgh + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 ${:outlet.p_rgh}; + value ${:outlet.p_rgh}; + } + } +} + +// ************************************************************************* // diff --git a/etc/templates/boundaryConditions/fluid/buoyant/wallOptions b/etc/templates/boundaryConditions/fluid/buoyant/wallOptions index 51271ee513..40423888e2 100644 --- a/etc/templates/boundaryConditions/fluid/buoyant/wallOptions +++ b/etc/templates/boundaryConditions/fluid/buoyant/wallOptions @@ -19,9 +19,24 @@ wallFunction { highReynolds { + k + { + type compressible::kqRWallFunction; + value ${:VALUE.k}; + } + epsilon + { + type compressible::epsilonWallFunction; + value ${:VALUE.epsilon}; + } + omega + { + type compressible::omegaWallFunction; + value ${:VALUE.omega}; + } mut { - type compressible::mutkWallFunction; + type mutkWallFunction; value ${:VALUE.mut}; } alphat @@ -32,6 +47,21 @@ wallFunction } lowReynolds { + k + { + type fixedValue; + value uniform 0; + } + epsilon + { + type fixedValue; + value uniform 0; + } + omega + { + type fixedValue; + value uniform 0; + } mut { type fixedValue; diff --git a/etc/templates/boundaryConditions/fluid/compressible/inletOptions b/etc/templates/boundaryConditions/fluid/compressible/inletOptions index 1fe983b2a9..218eec65ad 100644 --- a/etc/templates/boundaryConditions/fluid/compressible/inletOptions +++ b/etc/templates/boundaryConditions/fluid/compressible/inletOptions @@ -22,7 +22,7 @@ flowSpecification U { type pressureInletVelocity; - value ${:inlet.U}; + value ${:VALUE.U}; } p { @@ -32,8 +32,8 @@ flowSpecification rho rho; psi none; gamma 1; - p0 ${:inlet.p}; - value ${:inlet.p}; + p0 ${:VALUE.p}; + value ${:VALUE.p}; } } flowRate diff --git a/etc/templates/boundaryConditions/fluid/compressible/outletOptions b/etc/templates/boundaryConditions/fluid/compressible/outletOptions new file mode 100644 index 0000000000..569da985aa --- /dev/null +++ b/etc/templates/boundaryConditions/fluid/compressible/outletOptions @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.2.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "templates"; + object outlet; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +returnFlow +{ + atmosphere + { + p + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 ${:VALUE.p}; + value ${:VALUE.p}; + } + } +} + + +// ************************************************************************* // diff --git a/etc/templates/boundaryConditions/fluid/compressible/wallOptions b/etc/templates/boundaryConditions/fluid/compressible/wallOptions index 186c0ca1fe..40423888e2 100644 --- a/etc/templates/boundaryConditions/fluid/compressible/wallOptions +++ b/etc/templates/boundaryConditions/fluid/compressible/wallOptions @@ -19,10 +19,25 @@ wallFunction { highReynolds { + k + { + type compressible::kqRWallFunction; + value ${:VALUE.k}; + } + epsilon + { + type compressible::epsilonWallFunction; + value ${:VALUE.epsilon}; + } + omega + { + type compressible::omegaWallFunction; + value ${:VALUE.omega}; + } mut { - type compressible::mutkWallFunction; - value ${:VALUE.nut}; + type mutkWallFunction; + value ${:VALUE.mut}; } alphat { @@ -32,6 +47,21 @@ wallFunction } lowReynolds { + k + { + type fixedValue; + value uniform 0; + } + epsilon + { + type fixedValue; + value uniform 0; + } + omega + { + type fixedValue; + value uniform 0; + } mut { type fixedValue; diff --git a/etc/templates/boundaryConditions/fluid/incompressible/inletOptions b/etc/templates/boundaryConditions/fluid/incompressible/inletOptions index 18ea42d801..9299b12d03 100644 --- a/etc/templates/boundaryConditions/fluid/incompressible/inletOptions +++ b/etc/templates/boundaryConditions/fluid/incompressible/inletOptions @@ -22,7 +22,7 @@ flowSpecification U { type pressureInletVelocity; - value ${:inlet.U}; + value ${:VALUE.U}; } p { @@ -32,8 +32,8 @@ flowSpecification rho none; psi none; gamma 1; - p0 ${:inlet.p}; - value ${:inlet.p}; + p0 ${:VALUE.p}; + value ${:VALUE.p}; } } flowRate diff --git a/etc/templates/boundaryConditions/fluid/incompressible/outlet b/etc/templates/boundaryConditions/fluid/incompressible/outlet index 7634134645..cb2f67dab8 100644 --- a/etc/templates/boundaryConditions/fluid/incompressible/outlet +++ b/etc/templates/boundaryConditions/fluid/incompressible/outlet @@ -24,13 +24,4 @@ subSonic } -subSonicNoReturn -{ - nut - { - type zeroGradient; - } -} - - // ************************************************************************* // diff --git a/etc/templates/boundaryConditions/fluid/inletOptions b/etc/templates/boundaryConditions/fluid/inletOptions index 89230ca19a..e0568cf667 100644 --- a/etc/templates/boundaryConditions/fluid/inletOptions +++ b/etc/templates/boundaryConditions/fluid/inletOptions @@ -22,12 +22,12 @@ flowSpecification U { type pressureInletVelocity; - value ${:inlet.U}; + value ${:VALUE.U}; } p { type fixedValue; - value ${:inlet.p}; + value ${:VALUE.p}; } } fixedVelocity diff --git a/etc/templates/boundaryConditions/fluid/outlet b/etc/templates/boundaryConditions/fluid/outlet index c3d368b89e..4027a99702 100644 --- a/etc/templates/boundaryConditions/fluid/outlet +++ b/etc/templates/boundaryConditions/fluid/outlet @@ -17,24 +17,6 @@ FoamFile subSonic { - p - { - type fixedValue; - value ${:VALUE.p}; - } - k - { - type zeroGradient; - } - epsilon - { - type zeroGradient; - } - omega - { - type zeroGradient; - } - OPTIONS (returnFlow); } diff --git a/etc/templates/boundaryConditions/fluid/outletOptions b/etc/templates/boundaryConditions/fluid/outletOptions index 068aca008e..075b0e8bca 100644 --- a/etc/templates/boundaryConditions/fluid/outletOptions +++ b/etc/templates/boundaryConditions/fluid/outletOptions @@ -19,20 +19,97 @@ returnFlow { default { + p + { + type fixedValue; + value ${:VALUE.p}; + } U { type pressureInletOutletVelocity; value ${:VALUE.U}; } + k + { + type inletOutlet; + inletValue ${:VALUE.k}; + value ${:VALUE.k}; + } + epsilon + { + type inletOutlet; + inletValue ${:VALUE.epsilon}; + value ${:VALUE.epsilon}; + } + omega + { + type inletOutlet; + inletValue ${:VALUE.omega}; + value ${:VALUE.omega}; + } } wall { + p + { + type fixedValue; + value ${:VALUE.p}; + } U { type inletOutlet; inletValue uniform (0 0 0); value ${:VALUE.U}; } + k + { + type zeroGradient; + } + epsilon + { + type zeroGradient; + } + omega + { + type zeroGradient; + } + } + atmosphere + { + p + { + type totalPressure; + U U; + phi phi; + rho none; + psi none; + gamma 1; + p0 ${:VALUE.p}; + value ${:VALUE.p}; + } + U + { + type pressureInletOutletVelocity; + value ${:VALUE.U}; + } + k + { + type inletOutlet; + inletValue ${:VALUE.k}; + value ${:VALUE.k}; + } + epsilon + { + type inletOutlet; + inletValue ${:VALUE.epsilon}; + value ${:VALUE.epsilon}; + } + omega + { + type inletOutlet; + inletValue ${:VALUE.omega}; + value ${:VALUE.omega}; + } } } diff --git a/etc/templates/boundaryConditions/fluid/wallOptions b/etc/templates/boundaryConditions/fluid/wallOptions index 3d3fdabae6..a1f68a5bba 100644 --- a/etc/templates/boundaryConditions/fluid/wallOptions +++ b/etc/templates/boundaryConditions/fluid/wallOptions @@ -73,6 +73,14 @@ motion value ${:VALUE.U}; } } + movingMesh + { + U + { + type movingWallVelocity; + value ${:VALUE.U}; + } + } } diff --git a/etc/templates/models/turbulence/kEpsilon b/etc/templates/models/turbulence/kEpsilon index 0076c15dff..8365d855e2 100644 --- a/etc/templates/models/turbulence/kEpsilon +++ b/etc/templates/models/turbulence/kEpsilon @@ -50,6 +50,11 @@ compressibleFields type scalar; dimensions [1 -1 -1 0 0]; } + alphat + { + type scalar; + dimensions [1 -1 -1 0 0]; + } } // ************************************************************************* // diff --git a/etc/templates/solvers/pimpleFoam b/etc/templates/solvers/pimpleFoam new file mode 100644 index 0000000000..61abf0e14b --- /dev/null +++ b/etc/templates/solvers/pimpleFoam @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.2.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "templates"; + object pimpleFoam; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solverType incompressible; + +multiRegion no; + +fluidModels +{ + turbulenceModel turbulenceModel; +} + +fluidFields +{ + U + { + type vector; + dimensions [0 1 -1 0 0]; + } + p + { + type scalar; + dimensions [0 2 -2 0 0]; + } +} + +// ************************************************************************* // diff --git a/etc/templates/solvers/pisoFoam b/etc/templates/solvers/pisoFoam new file mode 100644 index 0000000000..8cdb267f95 --- /dev/null +++ b/etc/templates/solvers/pisoFoam @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.2.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "templates"; + object pisoFoam; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solverType incompressible; + +multiRegion no; + +fluidModels +{ + turbulenceModel turbulenceModel; +} + +fluidFields +{ + U + { + type vector; + dimensions [0 1 -1 0 0]; + } + p + { + type scalar; + dimensions [0 2 -2 0 0]; + } +} + +// ************************************************************************* // diff --git a/etc/templates/solvers/rhoPimpleDyMFoam b/etc/templates/solvers/rhoPimpleDyMFoam new file mode 100644 index 0000000000..5714246ee4 --- /dev/null +++ b/etc/templates/solvers/rhoPimpleDyMFoam @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.2.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "templates"; + object rhoPimpleDyMFoam; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solverType compressible; + +multiRegion no; + +fluidModels +{ + turbulenceModel turbulenceModel; +} + +fluidFields +{ + U + { + type vector; + dimensions [0 1 -1 0 0]; + } + p + { + type scalar; + dimensions [1 -1 -2 0 0]; + } + T + { + type scalar; + dimensions [0 0 0 1 0]; + } +} + +// ************************************************************************* // diff --git a/etc/templates/solvers/rhoPimpleFoam b/etc/templates/solvers/rhoPimpleFoam new file mode 100644 index 0000000000..016f399c26 --- /dev/null +++ b/etc/templates/solvers/rhoPimpleFoam @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.2.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "templates"; + object rhoPimpleFoam; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solverType compressible; + +multiRegion no; + +fluidModels +{ + turbulenceModel turbulenceModel; +} + +fluidFields +{ + U + { + type vector; + dimensions [0 1 -1 0 0]; + } + p + { + type scalar; + dimensions [1 -1 -2 0 0]; + } + T + { + type scalar; + dimensions [0 0 0 1 0]; + } +} + +// ************************************************************************* //