From 27a2b2264523e396cb0e0dbdd891f9de234743f5 Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 22 Jul 2011 17:58:41 +0100 Subject: [PATCH 01/12] ENH: Adding tutorial for porous baffle --- .../porousBafflePressureFvPatchFields.C | 2 +- tutorials/multiphase/interFoam/ras/Allclean | 8 +- tutorials/multiphase/interFoam/ras/Allrun | 3 + .../interFoam/ras/damBreakPorousBaffle/0/U | 59 +++++++++ .../ras/damBreakPorousBaffle/0/alpha1 | 57 ++++++++ .../ras/damBreakPorousBaffle/0/alpha1.org | 57 ++++++++ .../ras/damBreakPorousBaffle/0/epsilon | 60 +++++++++ .../interFoam/ras/damBreakPorousBaffle/0/k | 60 +++++++++ .../ras/damBreakPorousBaffle/0/nuTilda | 57 ++++++++ .../interFoam/ras/damBreakPorousBaffle/0/nut | 59 +++++++++ .../ras/damBreakPorousBaffle/0/p_rgh | 78 +++++++++++ .../interFoam/ras/damBreakPorousBaffle/Allrun | 25 ++++ .../constant/RASProperties | 25 ++++ .../ras/damBreakPorousBaffle/constant/g | 22 ++++ .../constant/polyMesh/blockMeshDict | 122 ++++++++++++++++++ .../constant/polyMesh/boundary | 68 ++++++++++ .../constant/transportProperties | 72 +++++++++++ .../constant/turbulenceProperties | 21 +++ .../damBreakPorousBaffle/selectCyclics.setSet | 3 + .../system/changeDictionaryDict | 47 +++++++ .../damBreakPorousBaffle/system/controlDict | 60 +++++++++ .../ras/damBreakPorousBaffle/system/fvSchemes | 65 ++++++++++ .../damBreakPorousBaffle/system/fvSolution | 78 +++++++++++ .../damBreakPorousBaffle/system/setFieldsDict | 36 ++++++ 24 files changed, 1142 insertions(+), 2 deletions(-) create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh create mode 100755 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C index 1652ab878e..d0eeb86f50 100644 --- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C +++ b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C @@ -110,7 +110,7 @@ void Foam::porousBafflePressureFvPatchField::updateCoeffs() << endl; } - jumpCyclicFvPatchField::updateCoeffs(); + fixedJumpFvPatchField::updateCoeffs(); } diff --git a/tutorials/multiphase/interFoam/ras/Allclean b/tutorials/multiphase/interFoam/ras/Allclean index d2955370a9..fdd2e7c83e 100755 --- a/tutorials/multiphase/interFoam/ras/Allclean +++ b/tutorials/multiphase/interFoam/ras/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -keepCases="damBreak" +keepCases="damBreak damBreakPorousBaffle" loseCases="damBreakFine" for case in $keepCases @@ -15,6 +15,12 @@ do then cp $case/0/alpha1.org $case/0/alpha1 fi + + if [ "$case" = "damBreakPorousBaffle" ] + then + cp $case/0/alpha1.org $case/0/alpha1 + fi + done for case in $loseCases diff --git a/tutorials/multiphase/interFoam/ras/Allrun b/tutorials/multiphase/interFoam/ras/Allrun index 2e138973f2..86d4aaf568 100755 --- a/tutorials/multiphase/interFoam/ras/Allrun +++ b/tutorials/multiphase/interFoam/ras/Allrun @@ -23,6 +23,9 @@ setDamBreakFine () mv temp.$$ $controlDict } +# Do damBreakPorousBaffle +(cd damBreakPorousBaffle && foamRunTutorials) + # Do damBreak (cd damBreak && foamRunTutorials) diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U new file mode 100644 index 0000000000..6bbba7a74d --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 new file mode 100644 index 0000000000..7d4917a948 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1.org; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org new file mode 100644 index 0000000000..7d4917a948 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1.org; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon new file mode 100644 index 0000000000..a74dcf6c09 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + leftWall + { + type epsilonWallFunction; + value uniform 0.1; + } + rightWall + { + type epsilonWallFunction; + value uniform 0.1; + } + lowerWall + { + type epsilonWallFunction; + value uniform 0.1; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k new file mode 100644 index 0000000000..8cc32ce1a7 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + leftWall + { + type kqRWallFunction; + value uniform 0.1; + } + rightWall + { + type kqRWallFunction; + value uniform 0.1; + } + lowerWall + { + type kqRWallFunction; + value uniform 0.1; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda new file mode 100644 index 0000000000..5e86d3a685 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut new file mode 100644 index 0000000000..8a78bea527 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type nutkWallFunction; + value uniform 0; + } + rightWall + { + type nutkWallFunction; + value uniform 0; + } + lowerWall + { + type nutkWallFunction; + value uniform 0; + } + atmosphere + { + type calculated; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh new file mode 100644 index 0000000000..04dd91e6ef --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh @@ -0,0 +1,78 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 1 -1 -2 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type buoyantPressure; + gradient uniform 0; + value uniform 0; + } + rightWall + { + type buoyantPressure; + gradient uniform 0; + value uniform 0; + } + lowerWall + { + type buoyantPressure; + gradient uniform 0; + value uniform 0; + } + atmosphere + { + type totalPressure; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } + porous_half0 + { + type porousBafflePressure; + patchType cyclic; + jump uniform 0 value uniform 0; + D 700; + I 500; + length 1.05; + value uniform 0; + } + porous_half1 + { + type porousBafflePressure; + patchType cyclic; + jump uniform 0; + D 700; + I 500; + length 1.05; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun new file mode 100755 index 0000000000..0a6076a61e --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun @@ -0,0 +1,25 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Get application name +application=`getApplication` + +runApplication blockMesh +runApplication setFields + +unset FOAM_SIGFPE +unset FOAM_SETNAN + +# Add cyclic baffles for fan +runApplication setSet -batch selectCyclics.setSet + +createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite > log.createBaffles 2>&1 + +runApplication changeDictionary + +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties new file mode 100644 index 0000000000..d0fb72da9a --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g new file mode 100644 index 0000000000..12352d5719 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..4eb2059275 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict @@ -0,0 +1,122 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } + + porous_half0 + { + type cyclic; + faces (); + neighbourPatch porous_half1; + } + + porous_half1 + { + type cyclic; + faces (); + neighbourPatch porous_half0; + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary new file mode 100644 index 0000000000..54300aba0b --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.x | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +7 +( + leftWall + { + type wall; + nFaces 50; + startFace 4419; + } + rightWall + { + type wall; + nFaces 50; + startFace 4469; + } + lowerWall + { + type wall; + nFaces 62; + startFace 4519; + } + atmosphere + { + type patch; + nFaces 46; + startFace 4581; + } + porous_half0 + { + type cyclic; + nFaces 13; + startFace 4627; + matchTolerance 0.0001; + neighbourPatch porous_half1; + } + porous_half1 + { + type cyclic; + nFaces 13; + startFace 4640; + matchTolerance 0.0001; + neighbourPatch porous_half0; + } + defaultFaces + { + type empty; + nFaces 4536; + startFace 4653; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties new file mode 100644 index 0000000000..f538437052 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +twoPhase +{ + transportModel twoPhase; + phase1 phase1; + phase2 phase2; +} + +phase1 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; + rho rho [ 1 -3 0 0 0 0 0 ] 1000; + CrossPowerLawCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + m m [ 0 0 1 0 0 0 0 ] 1; + n n [ 0 0 0 0 0 0 0 ] 0; + } + + BirdCarreauCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + k k [ 0 0 1 0 0 0 0 ] 99.6; + n n [ 0 0 0 0 0 0 0 ] 0.1003; + } +} + +phase2 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05; + rho rho [ 1 -3 0 0 0 0 0 ] 1; + CrossPowerLawCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + m m [ 0 0 1 0 0 0 0 ] 1; + n n [ 0 0 0 0 0 0 0 ] 0; + } + + BirdCarreauCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + k k [ 0 0 1 0 0 0 0 ] 99.6; + n n [ 0 0 0 0 0 0 0 ] 0.1003; + } +} + +sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties new file mode 100644 index 0000000000..657622cb43 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet new file mode 100644 index 0000000000..95bacaa24f --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet @@ -0,0 +1,3 @@ +faceSet cyclicFaces new boxToFace (0.3015 0.0493 -1) (0.3069 0.2077 1); +cellSet cyclicFacesSlaveCells new boxToCell (-1 0 -1) (0.305 0.31 1) +faceZoneSet cyclicZoneFaces new setsToFaceZone cyclicFaces cyclicFacesSlaveCells diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict new file mode 100644 index 0000000000..2f655e798e --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dictionaryReplacement +{ + p_rgh + { + boundaryField + { + porous_half0 + { + type porousBafflePressure; + patchType cyclic; + D 700; + I 500; + length 1.05; + jump uniform 0 + value uniform 0; + } + porous_half1 + { + type porousBafflePressure; + patchType cyclic; + D 700; + I 500; + length 1.05; + jump uniform 0; + value uniform 0; + } + } + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict new file mode 100644 index 0000000000..bc5b46bee2 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep on; + +maxCo 0.1; +maxAlphaCo 0.1; + +maxDeltaT 1; + +libs +( + "libturbulenceDerivedFvPatchFields.so" +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes new file mode 100644 index 0000000000..3f57b24061 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rho*phi,U) Gauss linear; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss interfaceCompression; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(phi,nuTilda) Gauss upwind; + div((nuEff*dev(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p_rgh; + pcorr; + alpha; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution new file mode 100644 index 0000000000..1fad093d75 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution @@ -0,0 +1,78 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + pcorr + { + solver PCG; + preconditioner DIC; + tolerance 1e-10; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0.05; + } + + p_rghFinal + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } + + "(U|k|epsilon)" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + + "(U|k|epsilon)Final" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-07; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + nAlphaCorr 1; + nAlphaSubCycles 4; + cAlpha 2; +} + +relaxation +{ + U 1; + k 1; + epsilon 1; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict new file mode 100644 index 0000000000..3d25b54822 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.0.0 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha1 0 +); + +regions +( + boxToCell + { + box (0 0 -1) (0.1461 0.292 1); + fieldValues + ( + volScalarFieldValue alpha1 1 + ); + } +); + + +// ************************************************************************* // From 01d07b67722e29b199de0a34106d021cbf831c53 Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 22 Jul 2011 18:03:26 +0100 Subject: [PATCH 02/12] STY: Changing versions --- tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U | 2 +- .../multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 | 2 +- .../multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org | 2 +- .../multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon | 2 +- tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k | 2 +- .../multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda | 2 +- tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut | 2 +- tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh | 2 +- .../interFoam/ras/damBreakPorousBaffle/constant/RASProperties | 2 +- .../multiphase/interFoam/ras/damBreakPorousBaffle/constant/g | 2 +- .../ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict | 2 +- .../ras/damBreakPorousBaffle/constant/polyMesh/boundary | 2 +- .../ras/damBreakPorousBaffle/constant/transportProperties | 2 +- .../ras/damBreakPorousBaffle/constant/turbulenceProperties | 2 +- .../ras/damBreakPorousBaffle/system/changeDictionaryDict | 2 +- .../interFoam/ras/damBreakPorousBaffle/system/controlDict | 2 +- .../interFoam/ras/damBreakPorousBaffle/system/fvSchemes | 2 +- .../interFoam/ras/damBreakPorousBaffle/system/fvSolution | 2 +- .../interFoam/ras/damBreakPorousBaffle/system/setFieldsDict | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U index 6bbba7a74d..ac751fa982 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 index 7d4917a948..e80cfd6806 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org index 7d4917a948..e80cfd6806 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon index a74dcf6c09..fada9be354 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k index 8cc32ce1a7..b9af9b351d 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda index 5e86d3a685..cc7a1b5843 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut index 8a78bea527..4bd13a3b19 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh index 04dd91e6ef..ef9a9fcfb2 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties index d0fb72da9a..67d4d8212c 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g index 12352d5719..4fea433a00 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict index 4eb2059275..1ec5641e4a 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary index 54300aba0b..c728438132 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.x | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties index f538437052..ad16f48d5c 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties index 657622cb43..3e945495c5 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict index 2f655e798e..b1bec7ddde 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict index bc5b46bee2..78d65e3636 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes index 3f57b24061..ef617145e1 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution index 1fad093d75..9e65f5d354 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict index 3d25b54822..de5e8f7b0f 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.0.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From bae831d7cbfd611891ec0dee969e278e157c721f Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 22 Jul 2011 18:39:27 +0100 Subject: [PATCH 03/12] ENH: Adding topo set to tutorial --- .../interFoam/ras/damBreakPorousBaffle/Allrun | 4 +- .../damBreakPorousBaffle/system/topoSetDict | 55 +++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun index 0a6076a61e..29758935af 100755 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun @@ -13,8 +13,8 @@ runApplication setFields unset FOAM_SIGFPE unset FOAM_SETNAN -# Add cyclic baffles for fan -runApplication setSet -batch selectCyclics.setSet +# Create faceZones for porous baffles +runApplication topoSet createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite > log.createBaffles 2>&1 diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict new file mode 100644 index 0000000000..cb01338cff --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name cyclicFaces; + type faceSet; + action new; + source boxToFace; + sourceInfo + { + box (0.3015 0.0493 -1) (0.3069 0.2077 1); + } + } + + { + name cyclicFacesSlaveCells; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-1 0 -1) (0.305 0.31 1); + } + } + + { + name cyclicZoneFaces; + type faceZoneSet; + action new; + source setsToFaceZone; + sourceInfo + { + faceSet cyclicFaces; + cellSet cyclicFacesSlaveCells; + } + } +); + +// ************************************************************************* // From 53d2d83b4bd0f64bf3189e8cad52c003572a40ed Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:49:35 +0100 Subject: [PATCH 04/12] kOmegaSSTSAS: Merged changes from OpenFOAM-2.0.x --- .../incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H index 9fea19fe8e..39c0cad9c2 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H @@ -25,7 +25,7 @@ Class Foam::incompressible::LESModels::kOmegaSSTSAS Description - kOmegaSSTSAS LES turbulence model for incompressible flows + kOmegaSSTSAS LES turbulence model for incompressible flows based on: "Evaluation of the SST-SAS model: channel flow, asymmetric diffuser @@ -44,6 +44,7 @@ Description Heidelberg 2009. F. R. Menter and Y. Egorov. + SourceFiles kOmegaSSTSAS.C From 855aa199fb4f0390be0e325106f3751181b20b94 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:49:57 +0100 Subject: [PATCH 05/12] cfx4ToFoam: Removed unused files --- .../mesh/conversion/cfx4ToFoam/block.C | 126 ---------------- .../mesh/conversion/cfx4ToFoam/block.H | 138 ------------------ 2 files changed, 264 deletions(-) delete mode 100644 applications/utilities/mesh/conversion/cfx4ToFoam/block.C delete mode 100644 applications/utilities/mesh/conversion/cfx4ToFoam/block.H diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/block.C b/applications/utilities/mesh/conversion/cfx4ToFoam/block.C deleted file mode 100644 index 1bb776c57f..0000000000 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/block.C +++ /dev/null @@ -1,126 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "error.H" -#include "block.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - -label block::vtxLabel(label a, label b, label c) -{ - return (a + b*(BlockDef.xDim() + 1) - + c*(BlockDef.xDim() + 1)*(BlockDef.yDim() + 1)); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from description -block::block(const blockDescriptor& definition) -: - BlockDef(definition), - Vertices - ( - ((BlockDef.xDim() + 1)*(BlockDef.yDim() + 1)*(BlockDef.zDim() + 1)) - ), - Cells - ( - (BlockDef.xDim()*BlockDef.yDim()*BlockDef.zDim()) - ), - BoundaryPatches(6) -{ - // create points - blockPoints(); - - // generate internal cells - blockCells(); - - // generate boundary patches - blockBoundary(); -} - -// as copy -block::block(const block& original) -: - BlockDef(original.blockDef()), - Vertices(original.points()), - Cells(original.cells()), - BoundaryPatches(original.boundaryPatches()) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -block::~block() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -const blockDescriptor& block::blockDef() const -{ - return BlockDef; -} - -const pointField& block::points() const -{ - return Vertices; -} - -const labelListList& block::cells() const -{ - return Cells; -} - -const labelListListList& block::boundaryPatches() const -{ - return BoundaryPatches; -} - - -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // - -Ostream& operator<<(Ostream& os, const block& b) -{ - os << b.Vertices << nl - << b.Cells << nl - << b.BoundaryPatches << endl; - - return os; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // - diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/block.H b/applications/utilities/mesh/conversion/cfx4ToFoam/block.H deleted file mode 100644 index 7d6bc4b95d..0000000000 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/block.H +++ /dev/null @@ -1,138 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::block - -Description - Creates a single block of cells from point coordinates, - numbers of cells in each direction and expansion ratio - - -SourceFiles - block.C - blockIO.C - - -\*---------------------------------------------------------------------------*/ - -#ifndef block_H -#define block_H - -#include "pointField.H" -#include "labelList.H" - -#include "blockDescriptor.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class Istream; -class Ostream; - -/*---------------------------------------------------------------------------*\ - Class block Declaration -\*---------------------------------------------------------------------------*/ - -class block -{ - // Private data - - //- block definition - blockDescriptor BlockDef; - - //- list of vertices - pointField Vertices; - - //- list of cells - labelListList Cells; - - //- boundary patches - labelListListList BoundaryPatches; - - - // Private Member Functions - - label vtxLabel(label i, label j, label k); - - void blockPoints(); - - void blockCells(); - - void blockBoundary(); - -public: - - // Constructors - - //- from the block definition - block(const blockDescriptor&); - - //- as copy - block(const block&); - - //- clone function - autoPtr clone() const - { - notImplemented("block::clone()"); - return autoPtr(NULL); - } - - //- Destructor - ~block(); - - - // Member Functions - - // Access - - const blockDescriptor& blockDef() const; - const pointField& points() const; - const labelListList& cells() const; - const labelListListList& boundaryPatches() const; - - - // IOstream Operators - - friend Ostream& operator<<(Ostream&, const block&); -}; - - -inline Istream& operator>>(Istream& is, block*) -{ - notImplemented("Istream& operator>>(Istream& is, block*)"); - return is; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // From 6924b159b88d7a063eb541533e7ef6e4c94d5c49 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:50:40 +0100 Subject: [PATCH 06/12] damBreakPorousBaffle: New tutorial to test porousBaffle BC --- tutorials/multiphase/interFoam/ras/Allclean | 8 +- tutorials/multiphase/interFoam/ras/Allrun | 3 + .../interFoam/ras/damBreakPorousBaffle/0/U | 59 +++++++++ .../ras/damBreakPorousBaffle/0/alpha1 | 57 ++++++++ .../ras/damBreakPorousBaffle/0/alpha1.org | 57 ++++++++ .../ras/damBreakPorousBaffle/0/epsilon | 60 +++++++++ .../interFoam/ras/damBreakPorousBaffle/0/k | 60 +++++++++ .../ras/damBreakPorousBaffle/0/nuTilda | 57 ++++++++ .../interFoam/ras/damBreakPorousBaffle/0/nut | 59 +++++++++ .../ras/damBreakPorousBaffle/0/p_rgh | 78 +++++++++++ .../interFoam/ras/damBreakPorousBaffle/Allrun | 22 ++++ .../constant/RASProperties | 25 ++++ .../ras/damBreakPorousBaffle/constant/g | 22 ++++ .../constant/polyMesh/blockMeshDict | 122 ++++++++++++++++++ .../constant/polyMesh/boundary | 68 ++++++++++ .../constant/transportProperties | 72 +++++++++++ .../constant/turbulenceProperties | 21 +++ .../system/changeDictionaryDict | 47 +++++++ .../damBreakPorousBaffle/system/controlDict | 60 +++++++++ .../ras/damBreakPorousBaffle/system/fvSchemes | 65 ++++++++++ .../damBreakPorousBaffle/system/fvSolution | 78 +++++++++++ .../damBreakPorousBaffle/system/setFieldsDict | 36 ++++++ .../damBreakPorousBaffle/system/topoSetDict | 55 ++++++++ 23 files changed, 1190 insertions(+), 1 deletion(-) create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh create mode 100755 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict diff --git a/tutorials/multiphase/interFoam/ras/Allclean b/tutorials/multiphase/interFoam/ras/Allclean index d2955370a9..fdd2e7c83e 100755 --- a/tutorials/multiphase/interFoam/ras/Allclean +++ b/tutorials/multiphase/interFoam/ras/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -keepCases="damBreak" +keepCases="damBreak damBreakPorousBaffle" loseCases="damBreakFine" for case in $keepCases @@ -15,6 +15,12 @@ do then cp $case/0/alpha1.org $case/0/alpha1 fi + + if [ "$case" = "damBreakPorousBaffle" ] + then + cp $case/0/alpha1.org $case/0/alpha1 + fi + done for case in $loseCases diff --git a/tutorials/multiphase/interFoam/ras/Allrun b/tutorials/multiphase/interFoam/ras/Allrun index 2e138973f2..9c802ee3cc 100755 --- a/tutorials/multiphase/interFoam/ras/Allrun +++ b/tutorials/multiphase/interFoam/ras/Allrun @@ -43,4 +43,7 @@ cloneCase damBreak damBreakFine runApplication reconstructPar ) +# Do damBreakPorousBaffle +(cd damBreakPorousBaffle && foamRunTutorials) + # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U new file mode 100644 index 0000000000..ac751fa982 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 new file mode 100644 index 0000000000..e80cfd6806 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1.org; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org new file mode 100644 index 0000000000..e80cfd6806 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1.org @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1.org; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon new file mode 100644 index 0000000000..fada9be354 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/epsilon @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + leftWall + { + type epsilonWallFunction; + value uniform 0.1; + } + rightWall + { + type epsilonWallFunction; + value uniform 0.1; + } + lowerWall + { + type epsilonWallFunction; + value uniform 0.1; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k new file mode 100644 index 0000000000..b9af9b351d --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/k @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + leftWall + { + type kqRWallFunction; + value uniform 0.1; + } + rightWall + { + type kqRWallFunction; + value uniform 0.1; + } + lowerWall + { + type kqRWallFunction; + value uniform 0.1; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda new file mode 100644 index 0000000000..cc7a1b5843 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nuTilda @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut new file mode 100644 index 0000000000..4bd13a3b19 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/nut @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type nutkWallFunction; + value uniform 0; + } + rightWall + { + type nutkWallFunction; + value uniform 0; + } + lowerWall + { + type nutkWallFunction; + value uniform 0; + } + atmosphere + { + type calculated; + value uniform 0; + } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh new file mode 100644 index 0000000000..e760b71ca3 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh @@ -0,0 +1,78 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 1 -1 -2 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type buoyantPressure; + gradient uniform 0; + value uniform 0; + } + rightWall + { + type buoyantPressure; + gradient uniform 0; + value uniform 0; + } + lowerWall + { + type buoyantPressure; + gradient uniform 0; + value uniform 0; + } + atmosphere + { + type totalPressure; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } + porous_half0 + { + type porousBafflePressure; + patchType cyclic; + jump uniform 0; + D 700; + I 500; + length 1.05; + value uniform 0; + } + porous_half1 + { + type porousBafflePressure; + patchType cyclic; + jump uniform 0; + D 700; + I 500; + length 1.05; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun new file mode 100755 index 0000000000..b5a60a55fa --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun @@ -0,0 +1,22 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Get application name +application=`getApplication` + +runApplication blockMesh +runApplication setFields + +# Create faceZones for porous baffles +runApplication topoSet + +createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite > log.createBaffles 2>&1 + +runApplication changeDictionary + +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties new file mode 100644 index 0000000000..67d4d8212c --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g new file mode 100644 index 0000000000..4fea433a00 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..1ec5641e4a --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict @@ -0,0 +1,122 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } + + porous_half0 + { + type cyclic; + faces (); + neighbourPatch porous_half1; + } + + porous_half1 + { + type cyclic; + faces (); + neighbourPatch porous_half0; + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary new file mode 100644 index 0000000000..c728438132 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +7 +( + leftWall + { + type wall; + nFaces 50; + startFace 4419; + } + rightWall + { + type wall; + nFaces 50; + startFace 4469; + } + lowerWall + { + type wall; + nFaces 62; + startFace 4519; + } + atmosphere + { + type patch; + nFaces 46; + startFace 4581; + } + porous_half0 + { + type cyclic; + nFaces 13; + startFace 4627; + matchTolerance 0.0001; + neighbourPatch porous_half1; + } + porous_half1 + { + type cyclic; + nFaces 13; + startFace 4640; + matchTolerance 0.0001; + neighbourPatch porous_half0; + } + defaultFaces + { + type empty; + nFaces 4536; + startFace 4653; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties new file mode 100644 index 0000000000..ad16f48d5c --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/transportProperties @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +twoPhase +{ + transportModel twoPhase; + phase1 phase1; + phase2 phase2; +} + +phase1 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; + rho rho [ 1 -3 0 0 0 0 0 ] 1000; + CrossPowerLawCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + m m [ 0 0 1 0 0 0 0 ] 1; + n n [ 0 0 0 0 0 0 0 ] 0; + } + + BirdCarreauCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + k k [ 0 0 1 0 0 0 0 ] 99.6; + n n [ 0 0 0 0 0 0 0 ] 0.1003; + } +} + +phase2 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05; + rho rho [ 1 -3 0 0 0 0 0 ] 1; + CrossPowerLawCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + m m [ 0 0 1 0 0 0 0 ] 1; + n n [ 0 0 0 0 0 0 0 ] 0; + } + + BirdCarreauCoeffs + { + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + k k [ 0 0 1 0 0 0 0 ] 99.6; + n n [ 0 0 0 0 0 0 0 ] 0.1003; + } +} + +sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties new file mode 100644 index 0000000000..3e945495c5 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict new file mode 100644 index 0000000000..b1bec7ddde --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/changeDictionaryDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dictionaryReplacement +{ + p_rgh + { + boundaryField + { + porous_half0 + { + type porousBafflePressure; + patchType cyclic; + D 700; + I 500; + length 1.05; + jump uniform 0 + value uniform 0; + } + porous_half1 + { + type porousBafflePressure; + patchType cyclic; + D 700; + I 500; + length 1.05; + jump uniform 0; + value uniform 0; + } + } + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict new file mode 100644 index 0000000000..78d65e3636 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep on; + +maxCo 0.1; +maxAlphaCo 0.1; + +maxDeltaT 1; + +libs +( + "libturbulenceDerivedFvPatchFields.so" +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes new file mode 100644 index 0000000000..ef617145e1 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rho*phi,U) Gauss linear; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss interfaceCompression; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(phi,nuTilda) Gauss upwind; + div((nuEff*dev(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p_rgh; + pcorr; + alpha; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution new file mode 100644 index 0000000000..9e65f5d354 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution @@ -0,0 +1,78 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + pcorr + { + solver PCG; + preconditioner DIC; + tolerance 1e-10; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0.05; + } + + p_rghFinal + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } + + "(U|k|epsilon)" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + + "(U|k|epsilon)Final" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-07; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + nAlphaCorr 1; + nAlphaSubCycles 4; + cAlpha 2; +} + +relaxation +{ + U 1; + k 1; + epsilon 1; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict new file mode 100644 index 0000000000..de5e8f7b0f --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha1 0 +); + +regions +( + boxToCell + { + box (0 0 -1) (0.1461 0.292 1); + fieldValues + ( + volScalarFieldValue alpha1 1 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict new file mode 100644 index 0000000000..cb01338cff --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/topoSetDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name cyclicFaces; + type faceSet; + action new; + source boxToFace; + sourceInfo + { + box (0.3015 0.0493 -1) (0.3069 0.2077 1); + } + } + + { + name cyclicFacesSlaveCells; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-1 0 -1) (0.305 0.31 1); + } + } + + { + name cyclicZoneFaces; + type faceZoneSet; + action new; + source setsToFaceZone; + sourceInfo + { + faceSet cyclicFaces; + cellSet cyclicFacesSlaveCells; + } + } +); + +// ************************************************************************* // From 7ea0e85acab90b0acaea59da8343a9ff7a363397 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:51:03 +0100 Subject: [PATCH 07/12] homogeneousDynSmagorinsky: Corrected cD coefficient --- .../LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C | 2 +- .../LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C b/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C index e62de890f9..4e39627742 100644 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C +++ b/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C @@ -69,7 +69,7 @@ dimensionedScalar homogeneousDynSmagorinsky::cD tmp LL = dev(filter_(sqr(U())) - (sqr(filter_(U())))); - return average(LL && MM)/MMMM; + return 0.5*average(LL && MM)/MMMM; } else { diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H b/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H index 2a25f48fe0..d25f0e19f1 100644 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H @@ -48,7 +48,7 @@ Description and - cD=/, + cD=1/2*/, where From 3f704d97abb43aca596e2c74e9eb45e52df9f1a3 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:51:31 +0100 Subject: [PATCH 08/12] Dynamic LES models: Rationalize naming --- .../compressible/LES/Make/files | 2 +- .../homogeneousDynOneEqEddy.C} | 18 +-- .../homogeneousDynOneEqEddy.H} | 22 ++-- .../incompressible/LES/Make/files | 2 +- .../LES/dynLagrangian/dynLagrangian.H | 14 ++- .../LES/dynOneEqEddy/dynOneEqEddy.C | 96 ++++++++-------- .../LES/dynOneEqEddy/dynOneEqEddy.H | 50 ++++++--- .../homogeneousDynOneEqEddy.C} | 106 +++++++++--------- .../homogeneousDynOneEqEddy.H} | 72 +++++------- 9 files changed, 193 insertions(+), 189 deletions(-) rename src/turbulenceModels/compressible/LES/{dynOneEqEddy/dynOneEqEddy.C => homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C} (88%) rename src/turbulenceModels/compressible/LES/{dynOneEqEddy/dynOneEqEddy.H => homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H} (87%) rename src/turbulenceModels/incompressible/LES/{locDynOneEqEddy/locDynOneEqEddy.C => homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C} (63%) rename src/turbulenceModels/incompressible/LES/{locDynOneEqEddy/locDynOneEqEddy.H => homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H} (70%) diff --git a/src/turbulenceModels/compressible/LES/Make/files b/src/turbulenceModels/compressible/LES/Make/files index 27beea2967..653eb2b28f 100644 --- a/src/turbulenceModels/compressible/LES/Make/files +++ b/src/turbulenceModels/compressible/LES/Make/files @@ -5,7 +5,7 @@ GenSGSStress/GenSGSStress.C Smagorinsky/Smagorinsky.C oneEqEddy/oneEqEddy.C lowReOneEqEddy/lowReOneEqEddy.C -dynOneEqEddy/dynOneEqEddy.C +homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C DeardorffDiffStress/DeardorffDiffStress.C SpalartAllmaras/SpalartAllmaras.C diff --git a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C similarity index 88% rename from src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C rename to src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C index 56df500db1..3bbeba4f10 100644 --- a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "dynOneEqEddy.H" +#include "homogeneousDynOneEqEddy.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -37,12 +37,12 @@ namespace LESModels // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(dynOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, dynOneEqEddy, dictionary); +defineTypeNameAndDebug(homogeneousDynOneEqEddy, 0); +addToRunTimeSelectionTable(LESModel, homogeneousDynOneEqEddy, dictionary); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void dynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) +void homogeneousDynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) { muSgs_ = ck_(D)*rho()*sqrt(k_)*delta(); muSgs_.correctBoundaryConditions(); @@ -52,7 +52,7 @@ void dynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) } -dimensionedScalar dynOneEqEddy::ck_(const volSymmTensorField& D) const +dimensionedScalar homogeneousDynOneEqEddy::ck_(const volSymmTensorField& D) const { volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); @@ -67,7 +67,7 @@ dimensionedScalar dynOneEqEddy::ck_(const volSymmTensorField& D) const } -dimensionedScalar dynOneEqEddy::ce_(const volSymmTensorField& D) const +dimensionedScalar homogeneousDynOneEqEddy::ce_(const volSymmTensorField& D) const { volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); @@ -91,7 +91,7 @@ dimensionedScalar dynOneEqEddy::ce_(const volSymmTensorField& D) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -dynOneEqEddy::dynOneEqEddy +homogeneousDynOneEqEddy::homogeneousDynOneEqEddy ( const volScalarField& rho, const volVectorField& U, @@ -128,7 +128,7 @@ dynOneEqEddy::dynOneEqEddy // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void dynOneEqEddy::correct(const tmp& tgradU) +void homogeneousDynOneEqEddy::correct(const tmp& tgradU) { const volTensorField& gradU = tgradU(); @@ -158,7 +158,7 @@ void dynOneEqEddy::correct(const tmp& tgradU) } -bool dynOneEqEddy::read() +bool homogeneousDynOneEqEddy::read() { if (GenEddyVisc::read()) { diff --git a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H similarity index 87% rename from src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H rename to src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H index b9c574ca59..de8870e6d7 100644 --- a/src/turbulenceModels/compressible/LES/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::compressible::LESModels::dynOneEqEddy + Foam::compressible::LESModels::homogeneousDynOneEqEddy Description One Equation Eddy Viscosity Model for compressible flows. @@ -46,12 +46,12 @@ Description \endverbatim SourceFiles - dynOneEqEddy.C + homogeneousDynOneEqEddy.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleDynOneEqEddy_H -#define compressibleDynOneEqEddy_H +#ifndef compressibleHomogeneousDynOneEqEddy_H +#define compressibleHomogeneousDynOneEqEddy_H #include "GenEddyVisc.H" #include "LESfilter.H" @@ -66,10 +66,10 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class dynOneEqEddy Declaration + Class homogeneousDynOneEqEddy Declaration \*---------------------------------------------------------------------------*/ -class dynOneEqEddy +class homogeneousDynOneEqEddy : public GenEddyVisc { @@ -91,20 +91,20 @@ class dynOneEqEddy dimensionedScalar ce_(const volSymmTensorField& D) const; // Disallow default bitwise copy construct and assignment - dynOneEqEddy(const dynOneEqEddy&); - dynOneEqEddy& operator=(const dynOneEqEddy&); + homogeneousDynOneEqEddy(const homogeneousDynOneEqEddy&); + homogeneousDynOneEqEddy& operator=(const homogeneousDynOneEqEddy&); public: //- Runtime type information - TypeName("dynOneEqEddy"); + TypeName("homogeneousDynOneEqEddy"); // Constructors //- Constructor from components - dynOneEqEddy + homogeneousDynOneEqEddy ( const volScalarField& rho, const volVectorField& U, @@ -116,7 +116,7 @@ public: //- Destructor - virtual ~dynOneEqEddy() + virtual ~homogeneousDynOneEqEddy() {} diff --git a/src/turbulenceModels/incompressible/LES/Make/files b/src/turbulenceModels/incompressible/LES/Make/files index 02a58fff0b..ff2bde02f2 100644 --- a/src/turbulenceModels/incompressible/LES/Make/files +++ b/src/turbulenceModels/incompressible/LES/Make/files @@ -12,8 +12,8 @@ SpalartAllmarasIDDES/SpalartAllmarasIDDES.C SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C oneEqEddy/oneEqEddy.C +homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C dynOneEqEddy/dynOneEqEddy.C -locDynOneEqEddy/locDynOneEqEddy.C Smagorinsky/Smagorinsky.C homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C LRRDiffStress/LRRDiffStress.C diff --git a/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H b/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H index 900adbdd59..5cdbfcf107 100644 --- a/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H +++ b/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H @@ -25,8 +25,8 @@ Class Foam::incompressible::LESModels::dynLagrangian Description - Lagrangian Two Equations Eddy Viscosity Model for incompressible - flows + Dynamic eddy-viscosity model with Lagrangian averaging for incompressible + flow \verbatim B = 2/3*k*I - 2*nuSgs*dev(D) @@ -57,9 +57,13 @@ Description \endverbatim Reference: - 1. Charles Meneveau, Thomas Lund and William Cabot - "A Lagrangian dynamic subgrid-scale model of turbulence" - J. Fluid Mech (1996), vol 319, pp. 353-385 + \verbatim + "A Lagrangian dynamic subgrid-scale model of turbulence" + Charles Meneveau, + Thomas Lund, + William Cabot, + J. Fluid Mech (1996), vol 319, pp. 353-385 + \endverbatim SourceFiles dynLagrangian.C diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C index ab15166c8f..e4c31cd821 100644 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C @@ -42,68 +42,61 @@ addToRunTimeSelectionTable(LESModel, dynOneEqEddy, dictionary); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void dynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) +void dynOneEqEddy::updateSubGridScaleFields +( + const volSymmTensorField& D, + const volScalarField& KK +) { - nuSgs_ = ck(D)*sqrt(k_)*delta(); + nuSgs_ = ck(D, KK)*sqrt(k_)*delta(); nuSgs_.correctBoundaryConditions(); } -dimensionedScalar dynOneEqEddy::ck(const volSymmTensorField& D) const +volScalarField dynOneEqEddy::ck +( + const volSymmTensorField& D, + const volScalarField& KK +) const { - tmp KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); + const volSymmTensorField LL + ( + simpleFilter_(dev(filter_(sqr(U())) - (sqr(filter_(U()))))) + ); const volSymmTensorField MM ( - delta()*(filter_(sqrt(k_)*D) - 2*sqrt(KK + filter_(k_))*filter_(D)) + simpleFilter_(-2.0*delta()*pow(KK, 0.5)*filter_(D)) ); - dimensionedScalar MMMM = average(magSqr(MM)); + const volScalarField ck + ( + simpleFilter_(0.5*(LL && MM)) + /( + simpleFilter_(magSqr(MM)) + + dimensionedScalar("small", sqr(MM.dimensions()), VSMALL) + ) + ); - if (MMMM.value() > VSMALL) - { - tmp LL = dev(filter_(sqr(U())) - sqr(filter_(U()))); - - return average(LL && MM)/MMMM; - } - else - { - return 0.0; - } + tmp tfld = 0.5*(mag(ck) + ck); + return tfld(); } -dimensionedScalar dynOneEqEddy::ce(const volSymmTensorField& D) const +volScalarField dynOneEqEddy::ce +( + const volSymmTensorField& D, + const volScalarField& KK +) const { - const volScalarField KK + const volScalarField ce ( - 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))) + simpleFilter_(nuEff()*(filter_(magSqr(D)) - magSqr(filter_(D)))) + /simpleFilter_(pow(KK, 1.5)/(2.0*delta())) ); - const volScalarField mm - ( - pow(KK + filter_(k_), 1.5)/(2*delta()) - filter_(pow(k_, 1.5))/delta() - ); - - dimensionedScalar mmmm = average(magSqr(mm)); - - if (mmmm.value() > VSMALL) - { - tmp ee = - ( - 2*delta()*ck(D) - * ( - filter_(sqrt(k_)*magSqr(D)) - - 2*sqrt(KK + filter_(k_))*magSqr(filter_(D)) - ) - ); - - return average(ee*mm)/mmmm; - } - else - { - return 0.0; - } + tmp tfld = 0.5*(mag(ce) + ce); + return tfld(); } @@ -134,12 +127,14 @@ dynOneEqEddy::dynOneEqEddy mesh_ ), + simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()) { bound(k_, kMin_); - updateSubGridScaleFields(symm(fvc::grad(U))); + const volScalarField KK(0.5*(filter_(magSqr(U)) - magSqr(filter_(U)))); + updateSubGridScaleFields(symm(fvc::grad(U)), KK); printCoeffs(); } @@ -147,14 +142,15 @@ dynOneEqEddy::dynOneEqEddy // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void dynOneEqEddy::correct(const tmp& tgradU) +void dynOneEqEddy::correct(const tmp& gradU) { - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); + LESModel::correct(gradU); const volSymmTensorField D(symm(gradU)); + volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); + KK.max(dimensionedScalar("small", KK.dimensions(), SMALL)); + const volScalarField P(2.0*nuSgs_*magSqr(D)); tmp kEqn @@ -164,7 +160,7 @@ void dynOneEqEddy::correct(const tmp& tgradU) - fvm::laplacian(DkEff(), k_) == P - - fvm::Sp(ce(D)*sqrt(k_)/delta(), k_) + - fvm::Sp(ce(D, KK)*sqrt(k_)/delta(), k_) ); kEqn().relax(); @@ -172,7 +168,7 @@ void dynOneEqEddy::correct(const tmp& tgradU) bound(k_, kMin_); - updateSubGridScaleFields(D); + updateSubGridScaleFields(D, KK); } diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H index c8fbb2ce41..1579962a7f 100644 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H @@ -25,29 +25,36 @@ Class Foam::incompressible::LESModels::dynOneEqEddy Description - One Equation Eddy Viscosity Model for incompressible flows. + Localised Dynamic One Equation Eddy Viscosity Model for incompressible + flows Eddy viscosity SGS model using a modeled balance equation to simulate - the behaviour of k. - - Thus + the behaviour of k, hence \verbatim d/dt(k) + div(U*k) - div(nuSgs*grad(k)) = - -B*L - ce*k^3/2/delta - + -B*L - ce*rho*k^3/2/delta and - B = 2/3*k*I - 2*nuSgs*dev(D) Beff = 2/3*k*I - 2*nuEff*dev(D) - where - - D = symm(grad(U)); - nuSgs = ck*sqrt(k)*delta + nuSgs = cD*delta^2*||D|| nuEff = nuSgs + nu \endverbatim + A dynamic procedure is here applied to evaluate ck and ce + \verbatim + ck=/ + and + ce=/ + where + K = 0.5*(F(U.U) - F(U).F(U)) + L = (F(U*U) - F(U)*F(U) - 0.33*K*I) + M = delta*(F(sqrt(k)*D) - 2*sqrt(K + filter(k))*F(D)) + m = pow(K + F(k), 3.0/2.0)/(2*delta) - F(pow(k, 3.0/2.0))/delta + e = 2*delta*ck*(F(sqrt(k)*(D && D)) - 2*sqrt(K + F(k))*(F(D) && F(D)))/ + \endverbatim + SourceFiles dynOneEqEddy.C @@ -57,6 +64,7 @@ SourceFiles #define dynOneEqEddy_H #include "GenEddyVisc.H" +#include "simpleFilter.H" #include "LESfilter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -80,6 +88,7 @@ class dynOneEqEddy volScalarField k_; + simpleFilter simpleFilter_; autoPtr filterPtr_; LESfilter& filter_; @@ -87,11 +96,24 @@ class dynOneEqEddy // Private Member Functions //- Update sub-grid scale fields - void updateSubGridScaleFields(const volSymmTensorField& D); + void updateSubGridScaleFields + ( + const volSymmTensorField& D, + const volScalarField& KK + ); //- Calculate ck, ce by filtering the velocity field U. - dimensionedScalar ck(const volSymmTensorField& D) const; - dimensionedScalar ce(const volSymmTensorField& D) const; + volScalarField ck + ( + const volSymmTensorField&, + const volScalarField& + ) const; + + volScalarField ce + ( + const volSymmTensorField&, + const volScalarField& + ) const; // Disallow default bitwise copy construct and assignment dynOneEqEddy(const dynOneEqEddy&); diff --git a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C similarity index 63% rename from src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C rename to src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C index 868796683c..36c29e6f08 100644 --- a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "locDynOneEqEddy.H" +#include "homogeneousDynOneEqEddy.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -37,72 +37,79 @@ namespace LESModels // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(locDynOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, locDynOneEqEddy, dictionary); +defineTypeNameAndDebug(homogeneousDynOneEqEddy, 0); +addToRunTimeSelectionTable(LESModel, homogeneousDynOneEqEddy, dictionary); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void locDynOneEqEddy::updateSubGridScaleFields -( - const volSymmTensorField& D, - const volScalarField& KK -) +void homogeneousDynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) { - nuSgs_ = ck(D, KK)*sqrt(k_)*delta(); + nuSgs_ = ck(D)*sqrt(k_)*delta(); nuSgs_.correctBoundaryConditions(); } -volScalarField locDynOneEqEddy::ck -( - const volSymmTensorField& D, - const volScalarField& KK -) const +dimensionedScalar homogeneousDynOneEqEddy::ck(const volSymmTensorField& D) const { - const volSymmTensorField LL - ( - simpleFilter_(dev(filter_(sqr(U())) - (sqr(filter_(U()))))) - ); + tmp KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); const volSymmTensorField MM ( - simpleFilter_(-2.0*delta()*pow(KK, 0.5)*filter_(D)) + delta()*(filter_(sqrt(k_)*D) - 2*sqrt(KK + filter_(k_))*filter_(D)) ); - const volScalarField ck - ( - simpleFilter_(0.5*(LL && MM)) - /( - simpleFilter_(magSqr(MM)) - + dimensionedScalar("small", sqr(MM.dimensions()), VSMALL) - ) - ); + dimensionedScalar MMMM = average(magSqr(MM)); - tmp tfld = 0.5*(mag(ck) + ck); - return tfld(); + if (MMMM.value() > VSMALL) + { + tmp LL = dev(filter_(sqr(U())) - sqr(filter_(U()))); + + return average(LL && MM)/MMMM; + } + else + { + return 0.0; + } } -volScalarField locDynOneEqEddy::ce -( - const volSymmTensorField& D, - const volScalarField& KK -) const +dimensionedScalar homogeneousDynOneEqEddy::ce(const volSymmTensorField& D) const { - const volScalarField ce + const volScalarField KK ( - simpleFilter_(nuEff()*(filter_(magSqr(D)) - magSqr(filter_(D)))) - /simpleFilter_(pow(KK, 1.5)/(2.0*delta())) + 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))) ); - tmp tfld = 0.5*(mag(ce) + ce); - return tfld(); + const volScalarField mm + ( + pow(KK + filter_(k_), 1.5)/(2*delta()) - filter_(pow(k_, 1.5))/delta() + ); + + dimensionedScalar mmmm = average(magSqr(mm)); + + if (mmmm.value() > VSMALL) + { + tmp ee = + ( + 2*delta()*ck(D) + * ( + filter_(sqrt(k_)*magSqr(D)) + - 2*sqrt(KK + filter_(k_))*magSqr(filter_(D)) + ) + ); + + return average(ee*mm)/mmmm; + } + else + { + return 0.0; + } } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -locDynOneEqEddy::locDynOneEqEddy +homogeneousDynOneEqEddy::homogeneousDynOneEqEddy ( const volVectorField& U, const surfaceScalarField& phi, @@ -127,14 +134,12 @@ locDynOneEqEddy::locDynOneEqEddy mesh_ ), - simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()) { bound(k_, kMin_); - const volScalarField KK(0.5*(filter_(magSqr(U)) - magSqr(filter_(U)))); - updateSubGridScaleFields(symm(fvc::grad(U)), KK); + updateSubGridScaleFields(symm(fvc::grad(U))); printCoeffs(); } @@ -142,15 +147,14 @@ locDynOneEqEddy::locDynOneEqEddy // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void locDynOneEqEddy::correct(const tmp& gradU) +void homogeneousDynOneEqEddy::correct(const tmp& tgradU) { - LESModel::correct(gradU); + const volTensorField& gradU = tgradU(); + + GenEddyVisc::correct(gradU); const volSymmTensorField D(symm(gradU)); - volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); - KK.max(dimensionedScalar("small", KK.dimensions(), SMALL)); - const volScalarField P(2.0*nuSgs_*magSqr(D)); tmp kEqn @@ -160,7 +164,7 @@ void locDynOneEqEddy::correct(const tmp& gradU) - fvm::laplacian(DkEff(), k_) == P - - fvm::Sp(ce(D, KK)*sqrt(k_)/delta(), k_) + - fvm::Sp(ce(D)*sqrt(k_)/delta(), k_) ); kEqn().relax(); @@ -168,11 +172,11 @@ void locDynOneEqEddy::correct(const tmp& gradU) bound(k_, kMin_); - updateSubGridScaleFields(D, KK); + updateSubGridScaleFields(D); } -bool locDynOneEqEddy::read() +bool homogeneousDynOneEqEddy::read() { if (GenEddyVisc::read()) { diff --git a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H similarity index 70% rename from src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H rename to src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H index 97e6c481c1..e2e3e25b1c 100644 --- a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H @@ -22,49 +22,41 @@ License along with OpenFOAM. If not, see . Class - Foam::incompressible::LESModels::locDynOneEqEddy + Foam::incompressible::LESModels::homogeneousDynOneEqEddy Description - Localised Dynamic One Equation Eddy Viscosity Model for incompressible - flows + One Equation Eddy Viscosity Model for incompressible flows. Eddy viscosity SGS model using a modeled balance equation to simulate - the behaviour of k, hence + the behaviour of k. + + Thus \verbatim d/dt(k) + div(U*k) - div(nuSgs*grad(k)) = - -B*L - ce*rho*k^3/2/delta + -B*L - ce*k^3/2/delta + and + B = 2/3*k*I - 2*nuSgs*dev(D) Beff = 2/3*k*I - 2*nuEff*dev(D) + where - nuSgs = cD*delta^2*||D|| + + D = symm(grad(U)); + nuSgs = ck*sqrt(k)*delta nuEff = nuSgs + nu \endverbatim - A dynamic procedure is here applied to evaluate ck and ce - \verbatim - ck=/ - and - ce=/ - where - K = 0.5*(F(U.U) - F(U).F(U)) - L = (F(U*U) - F(U)*F(U) - 0.33*K*I) - M = delta*(F(sqrt(k)*D) - 2*sqrt(K + filter(k))*F(D)) - m = pow(K + F(k), 3.0/2.0)/(2*delta) - F(pow(k, 3.0/2.0))/delta - e = 2*delta*ck*(F(sqrt(k)*(D && D)) - 2*sqrt(K + F(k))*(F(D) && F(D)))/ - \endverbatim - SourceFiles - locDynOneEqEddy.C + homogeneousDynOneEqEddy.C \*---------------------------------------------------------------------------*/ -#ifndef locDynOneEqEddy_H -#define locDynOneEqEddy_H +#ifndef homogeneousDynOneEqEddy_H +#define homogeneousDynOneEqEddy_H #include "GenEddyVisc.H" -#include "simpleFilter.H" #include "LESfilter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -77,10 +69,10 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class locDynOneEqEddy Declaration + Class homogeneousDynOneEqEddy Declaration \*---------------------------------------------------------------------------*/ -class locDynOneEqEddy +class homogeneousDynOneEqEddy : public GenEddyVisc { @@ -88,7 +80,6 @@ class locDynOneEqEddy volScalarField k_; - simpleFilter simpleFilter_; autoPtr filterPtr_; LESfilter& filter_; @@ -96,39 +87,26 @@ class locDynOneEqEddy // Private Member Functions //- Update sub-grid scale fields - void updateSubGridScaleFields - ( - const volSymmTensorField& D, - const volScalarField& KK - ); + void updateSubGridScaleFields(const volSymmTensorField& D); //- Calculate ck, ce by filtering the velocity field U. - volScalarField ck - ( - const volSymmTensorField&, - const volScalarField& - ) const; - - volScalarField ce - ( - const volSymmTensorField&, - const volScalarField& - ) const; + dimensionedScalar ck(const volSymmTensorField& D) const; + dimensionedScalar ce(const volSymmTensorField& D) const; // Disallow default bitwise copy construct and assignment - locDynOneEqEddy(const locDynOneEqEddy&); - locDynOneEqEddy& operator=(const locDynOneEqEddy&); + homogeneousDynOneEqEddy(const homogeneousDynOneEqEddy&); + homogeneousDynOneEqEddy& operator=(const homogeneousDynOneEqEddy&); public: //- Runtime type information - TypeName("locDynOneEqEddy"); + TypeName("homogeneousDynOneEqEddy"); // Constructors //- Construct from components - locDynOneEqEddy + homogeneousDynOneEqEddy ( const volVectorField& U, const surfaceScalarField& phi, @@ -139,7 +117,7 @@ public: //- Destructor - virtual ~locDynOneEqEddy() + virtual ~homogeneousDynOneEqEddy() {} From 2bd84d2be35ba33eca12747d04389544eeeac032 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:54:17 +0100 Subject: [PATCH 09/12] dynOneEqEddy: Corrected date --- .../incompressible/LES/dynOneEqEddy/dynOneEqEddy.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C index e4c31cd821..c8537b9e7a 100644 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License From 8040e8bdace1ae0c335c524b24c62119191d0ffb Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:54:49 +0100 Subject: [PATCH 10/12] Corrected date --- .../LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C index 36c29e6f08..7e3d9d47f4 100644 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License From e0d5ed55485e98b94c8f0535cbba0e623bda8981 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:56:02 +0100 Subject: [PATCH 11/12] Corrected line-length --- .../homogeneousDynOneEqEddy.C | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C index 3bbeba4f10..b17bbbe163 100644 --- a/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C +++ b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C @@ -42,7 +42,10 @@ addToRunTimeSelectionTable(LESModel, homogeneousDynOneEqEddy, dictionary); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void homogeneousDynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) +void homogeneousDynOneEqEddy::updateSubGridScaleFields +( + const volSymmTensorField& D +) { muSgs_ = ck_(D)*rho()*sqrt(k_)*delta(); muSgs_.correctBoundaryConditions(); @@ -52,7 +55,10 @@ void homogeneousDynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& } -dimensionedScalar homogeneousDynOneEqEddy::ck_(const volSymmTensorField& D) const +dimensionedScalar homogeneousDynOneEqEddy::ck_ +( + const volSymmTensorField& D +) const { volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); @@ -67,7 +73,10 @@ dimensionedScalar homogeneousDynOneEqEddy::ck_(const volSymmTensorField& D) cons } -dimensionedScalar homogeneousDynOneEqEddy::ce_(const volSymmTensorField& D) const +dimensionedScalar homogeneousDynOneEqEddy::ce_ +( + const volSymmTensorField& D +) const { volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); From 1156717abdcc4743e6f9512d0094729b2c27eb94 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 23 Jul 2011 19:56:46 +0100 Subject: [PATCH 12/12] Corrected line-length --- .../homogeneousDynOneEqEddy.C | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C index 7e3d9d47f4..674eece1d9 100644 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C @@ -42,14 +42,20 @@ addToRunTimeSelectionTable(LESModel, homogeneousDynOneEqEddy, dictionary); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void homogeneousDynOneEqEddy::updateSubGridScaleFields(const volSymmTensorField& D) +void homogeneousDynOneEqEddy::updateSubGridScaleFields +( + const volSymmTensorField& D +) { nuSgs_ = ck(D)*sqrt(k_)*delta(); nuSgs_.correctBoundaryConditions(); } -dimensionedScalar homogeneousDynOneEqEddy::ck(const volSymmTensorField& D) const +dimensionedScalar homogeneousDynOneEqEddy::ck +( + const volSymmTensorField& D +) const { tmp KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); @@ -73,7 +79,10 @@ dimensionedScalar homogeneousDynOneEqEddy::ck(const volSymmTensorField& D) const } -dimensionedScalar homogeneousDynOneEqEddy::ce(const volSymmTensorField& D) const +dimensionedScalar homogeneousDynOneEqEddy::ce +( + const volSymmTensorField& D +) const { const volScalarField KK (