From 62a396b33f5ff8a2f76301dac1b6629ac38d83b0 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 17 Aug 2009 23:43:27 +0100 Subject: [PATCH 01/14] Removed unnecessary files. --- .../airFoil2D/constant/turbulenceProperties | 174 ------------------ .../motorBike/constant/turbulenceProperties | 174 ------------------ 2 files changed, 348 deletions(-) delete mode 100644 tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties delete mode 100644 tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties deleted file mode 100644 index eeb06bac7a..0000000000 --- a/tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties +++ /dev/null @@ -1,174 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object turbulenceProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -turbulenceModel SpalartAllmaras; - -turbulence on; - -laminarCoeffs -{ -} - -kEpsilonCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -RNGkEpsilonCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.0845; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.42; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.68; - alphak alphaK [ 0 0 0 0 0 0 0 ] 1.39; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 1.39; - eta0 eta0 [ 0 0 0 0 0 0 0 ] 4.38; - beta beta [ 0 0 0 0 0 0 0 ] 0.012; -} - -NonlinearKEShihCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76932; - A1 A1 [ 0 0 0 0 0 0 0 ] 1.25; - A2 A2 [ 0 0 0 0 0 0 0 ] 1000; - Ctau1 Ctau1 [ 0 0 0 0 0 0 0 ] -4; - Ctau2 Ctau2 [ 0 0 0 0 0 0 0 ] 13; - Ctau3 Ctau3 [ 0 0 0 0 0 0 0 ] -2; - alphaKsi alphaKsi [ 0 0 0 0 0 0 0 ] 0.9; -} - -LienCubicKECoeffs -{ - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - A1 A1 [ 0 0 0 0 0 0 0 ] 1.25; - A2 A2 [ 0 0 0 0 0 0 0 ] 1000; - Ctau1 Ctau1 [ 0 0 0 0 0 0 0 ] -4; - Ctau2 Ctau2 [ 0 0 0 0 0 0 0 ] 13; - Ctau3 Ctau3 [ 0 0 0 0 0 0 0 ] -2; - alphaKsi alphaKsi [ 0 0 0 0 0 0 0 ] 0.9; -} - -QZetaCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaZeta alphaZeta [ 0 0 0 0 0 0 0 ] 0.76923; - anisotropic no; -} - -LaunderSharmaKECoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -LamBremhorstKECoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -LienCubicKELowReCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - A1 A1 [ 0 0 0 0 0 0 0 ] 1.25; - A2 A2 [ 0 0 0 0 0 0 0 ] 1000; - Ctau1 Ctau1 [ 0 0 0 0 0 0 0 ] -4; - Ctau2 Ctau2 [ 0 0 0 0 0 0 0 ] 13; - Ctau3 Ctau3 [ 0 0 0 0 0 0 0 ] -2; - alphaKsi alphaKsi [ 0 0 0 0 0 0 0 ] 0.9; - Am Am [ 0 0 0 0 0 0 0 ] 0.016; - Aepsilon Aepsilon [ 0 0 0 0 0 0 0 ] 0.263; - Amu Amu [ 0 0 0 0 0 0 0 ] 0.00222; -} - -LienLeschzinerLowReCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - Am Am [ 0 0 0 0 0 0 0 ] 0.016; - Aepsilon Aepsilon [ 0 0 0 0 0 0 0 ] 0.263; - Amu Amu [ 0 0 0 0 0 0 0 ] 0.00222; -} - -LRRCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - Clrr1 Clrr1 [ 0 0 0 0 0 0 0 ] 1.8; - Clrr2 Clrr2 [ 0 0 0 0 0 0 0 ] 0.6; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - Cs Cs [ 0 0 0 0 0 0 0 ] 0.25; - Ceps Ceps [ 0 0 0 0 0 0 0 ] 0.15; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -LaunderGibsonRSTMCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - Clg1 Clg1 [ 0 0 0 0 0 0 0 ] 1.8; - Clg2 Clg2 [ 0 0 0 0 0 0 0 ] 0.6; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - C1Ref C1Ref [ 0 0 0 0 0 0 0 ] 0.5; - C2Ref C2Ref [ 0 0 0 0 0 0 0 ] 0.3; - Cs Cs [ 0 0 0 0 0 0 0 ] 0.25; - Ceps Ceps [ 0 0 0 0 0 0 0 ] 0.15; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - alphaR alphaR [ 0 0 0 0 0 0 0 ] 1.22; -} - -SpalartAllmarasCoeffs -{ - alphaNut alphaNut [ 0 0 0 0 0 0 0 ] 1.5; - Cb1 Cb1 [ 0 0 0 0 0 0 0 ] 0.1355; - Cb2 Cb2 [ 0 0 0 0 0 0 0 ] 0.622; - Cw2 Cw2 [ 0 0 0 0 0 0 0 ] 0.3; - Cw3 Cw3 [ 0 0 0 0 0 0 0 ] 2; - Cv1 Cv1 [ 0 0 0 0 0 0 0 ] 7.1; - Cv2 Cv2 [ 0 0 0 0 0 0 0 ] 5; -} - -wallFunctionCoeffs -{ - kappa kappa [ 0 0 0 0 0 0 0 ] 0.4187; - E E [ 0 0 0 0 0 0 0 ] 9; -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties deleted file mode 100644 index eeb06bac7a..0000000000 --- a/tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties +++ /dev/null @@ -1,174 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object turbulenceProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -turbulenceModel SpalartAllmaras; - -turbulence on; - -laminarCoeffs -{ -} - -kEpsilonCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -RNGkEpsilonCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.0845; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.42; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.68; - alphak alphaK [ 0 0 0 0 0 0 0 ] 1.39; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 1.39; - eta0 eta0 [ 0 0 0 0 0 0 0 ] 4.38; - beta beta [ 0 0 0 0 0 0 0 ] 0.012; -} - -NonlinearKEShihCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76932; - A1 A1 [ 0 0 0 0 0 0 0 ] 1.25; - A2 A2 [ 0 0 0 0 0 0 0 ] 1000; - Ctau1 Ctau1 [ 0 0 0 0 0 0 0 ] -4; - Ctau2 Ctau2 [ 0 0 0 0 0 0 0 ] 13; - Ctau3 Ctau3 [ 0 0 0 0 0 0 0 ] -2; - alphaKsi alphaKsi [ 0 0 0 0 0 0 0 ] 0.9; -} - -LienCubicKECoeffs -{ - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - A1 A1 [ 0 0 0 0 0 0 0 ] 1.25; - A2 A2 [ 0 0 0 0 0 0 0 ] 1000; - Ctau1 Ctau1 [ 0 0 0 0 0 0 0 ] -4; - Ctau2 Ctau2 [ 0 0 0 0 0 0 0 ] 13; - Ctau3 Ctau3 [ 0 0 0 0 0 0 0 ] -2; - alphaKsi alphaKsi [ 0 0 0 0 0 0 0 ] 0.9; -} - -QZetaCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaZeta alphaZeta [ 0 0 0 0 0 0 0 ] 0.76923; - anisotropic no; -} - -LaunderSharmaKECoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -LamBremhorstKECoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -LienCubicKELowReCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - A1 A1 [ 0 0 0 0 0 0 0 ] 1.25; - A2 A2 [ 0 0 0 0 0 0 0 ] 1000; - Ctau1 Ctau1 [ 0 0 0 0 0 0 0 ] -4; - Ctau2 Ctau2 [ 0 0 0 0 0 0 0 ] 13; - Ctau3 Ctau3 [ 0 0 0 0 0 0 0 ] -2; - alphaKsi alphaKsi [ 0 0 0 0 0 0 0 ] 0.9; - Am Am [ 0 0 0 0 0 0 0 ] 0.016; - Aepsilon Aepsilon [ 0 0 0 0 0 0 0 ] 0.263; - Amu Amu [ 0 0 0 0 0 0 0 ] 0.00222; -} - -LienLeschzinerLowReCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - alphak alphak [ 0 0 0 0 0 0 0 ] 1; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - Am Am [ 0 0 0 0 0 0 0 ] 0.016; - Aepsilon Aepsilon [ 0 0 0 0 0 0 0 ] 0.263; - Amu Amu [ 0 0 0 0 0 0 0 ] 0.00222; -} - -LRRCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - Clrr1 Clrr1 [ 0 0 0 0 0 0 0 ] 1.8; - Clrr2 Clrr2 [ 0 0 0 0 0 0 0 ] 0.6; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - Cs Cs [ 0 0 0 0 0 0 0 ] 0.25; - Ceps Ceps [ 0 0 0 0 0 0 0 ] 0.15; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; -} - -LaunderGibsonRSTMCoeffs -{ - Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; - Clg1 Clg1 [ 0 0 0 0 0 0 0 ] 1.8; - Clg2 Clg2 [ 0 0 0 0 0 0 0 ] 0.6; - C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; - C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; - C1Ref C1Ref [ 0 0 0 0 0 0 0 ] 0.5; - C2Ref C2Ref [ 0 0 0 0 0 0 0 ] 0.3; - Cs Cs [ 0 0 0 0 0 0 0 ] 0.25; - Ceps Ceps [ 0 0 0 0 0 0 0 ] 0.15; - alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; - alphaR alphaR [ 0 0 0 0 0 0 0 ] 1.22; -} - -SpalartAllmarasCoeffs -{ - alphaNut alphaNut [ 0 0 0 0 0 0 0 ] 1.5; - Cb1 Cb1 [ 0 0 0 0 0 0 0 ] 0.1355; - Cb2 Cb2 [ 0 0 0 0 0 0 0 ] 0.622; - Cw2 Cw2 [ 0 0 0 0 0 0 0 ] 0.3; - Cw3 Cw3 [ 0 0 0 0 0 0 0 ] 2; - Cv1 Cv1 [ 0 0 0 0 0 0 0 ] 7.1; - Cv2 Cv2 [ 0 0 0 0 0 0 0 ] 5; -} - -wallFunctionCoeffs -{ - kappa kappa [ 0 0 0 0 0 0 0 ] 0.4187; - E E [ 0 0 0 0 0 0 0 ] 9; -} - - -// ************************************************************************* // From a7e4cdea99910fe65f686b6b526886e5bbb59654 Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 08:27:08 +0100 Subject: [PATCH 02/14] Removed tabs. --- .../manipulation/createPatch/createPatchDict | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict index 2ab9a8b3cc..9704392a10 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict +++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict @@ -53,18 +53,18 @@ patches name sidePatches; // Type of new patch - dictionary - { + dictionary + { type cyclic; - // Optional: explicitly set transformation tensor. + // Optional: explicitly set transformation tensor. // Used when matching and synchronising points. //transform translational; //separationVector (-2289 0 0); - transform rotational; - rotationAxis (1 0 0); + transform rotational; + rotationAxis (1 0 0); rotationCentre (0 0 0); - } + } // How to construct: either from 'patches' or 'set' constructFrom patches; @@ -80,10 +80,10 @@ patches name bottom; // Type of new patch - dictionary - { + dictionary + { type wall; - } + } constructFrom set; From ba5ecbaf67ca94b633450d8f3d9e281c50b1b4c3 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 18 Aug 2009 12:20:14 +0100 Subject: [PATCH 03/14] removed reference to libfoamUtil in error message --- src/genericPatchFields/genericFvPatchField/genericFvPatchField.C | 1 - 1 file changed, 1 deletion(-) diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C index 058021f612..ec4c323a91 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C @@ -79,7 +79,6 @@ Foam::genericFvPatchField::genericFvPatchField << " (Actual type " << actualTypeName_ << ")" << nl << "\n Please add the 'value' entry to the write function " "of the user-defined boundary-condition\n" - " or link the boundary-condition into libfoamUtil.so" << exit(FatalIOError); } From cf08f081da637b39178de8d1162e196dc54bc31a Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 17:12:15 +0100 Subject: [PATCH 04/14] Corrected tutorials. --- bin/foamLog | 1 + .../XiFoam/les/pitzDaily/0/alphaSgs | 4 +- .../combustion/XiFoam/les/pitzDaily/0/muSgs | 4 +- .../les/pitzDaily/constant/polyMesh/boundary | 2 +- .../XiFoam/les/pitzDaily3D/0/alphaSgs | 4 +- .../combustion/XiFoam/les/pitzDaily3D/0/muSgs | 4 +- .../pitzDaily3D/constant/polyMesh/boundary | 2 +- .../boundaryWallFunctionsProfile/0/nu.xy | 80 +++++++++++++++++++ .../constant/transportProperties | 2 +- .../multiphase/settlingFoam/ras/tank3D/Allrun | 8 ++ 10 files changed, 100 insertions(+), 11 deletions(-) create mode 100644 tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/nu.xy create mode 100755 tutorials/multiphase/settlingFoam/ras/tank3D/Allrun diff --git a/bin/foamLog b/bin/foamLog index 47968aa120..06b2a2c5dc 100755 --- a/bin/foamLog +++ b/bin/foamLog @@ -452,5 +452,6 @@ done #----------------------------- myEcho "Generated XY files for:" getAllQueries $DBFILE $LOG +myEcho "End" #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs index dde33b47e9..145d82f010 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs @@ -32,13 +32,13 @@ boundaryField upperWall { - type compressible::alphaSgsJayatillekeWallFunction; + type alphaSgsJayatillekeWallFunction; value uniform 0; } lowerWall { - type compressible::alphaSgsJayatillekeWallFunction; + type alphaSgsJayatillekeWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs index 2f642fa18a..05bf1b5329 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs @@ -32,13 +32,13 @@ boundaryField upperWall { - type compressible::muSgsWallFunction; + type muSgsUSpaldingWallFunction; value uniform 0; } lowerWall { - type compressible::muSgsWallFunction; + type muSgsUSpaldingWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/boundary index eb4a4e461d..313dcceba1 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs index bc78e8f836..b536298afb 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs @@ -32,13 +32,13 @@ boundaryField upperWall { - type compressible::alphaSgsJayatillekeWallFunction; + type alphaSgsJayatillekeWallFunction; value uniform 0; } lowerWall { - type compressible::alphaSgsJayatillekeWallFunction; + type alphaSgsJayatillekeWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs index 8f65a48265..7a45526d54 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs @@ -32,13 +32,13 @@ boundaryField upperWall { - type compressible::muSgsWallFunction; + type muSgsUSpaldingWallFunction; value uniform 0; } lowerWall { - type compressible::muSgsWallFunction; + type muSgsUSpaldingWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/polyMesh/boundary b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/polyMesh/boundary index 7a35f54079..19a09dd2c7 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/polyMesh/boundary +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/nu.xy b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/nu.xy new file mode 100644 index 0000000000..39d86bc30f --- /dev/null +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/nu.xy @@ -0,0 +1,80 @@ + 0.000625 0.001 + 0.001875 0.001 + 0.003125 0.001 + 0.004375 0.001 + 0.005625 0.001 + 0.006875 0.001 + 0.008125 0.001 + 0.009375 0.001 + 0.010625 0.001 + 0.011875 0.001 + 0.013125 0.001 + 0.014375 0.001 + 0.015625 0.001 + 0.016875 0.001 + 0.018125 0.001 + 0.019375 0.001 + 0.020625 0.001 + 0.021875 0.001 + 0.023125 0.001 + 0.024375 0.001 + 0.025625 0.001 + 0.026875 0.001 + 0.028125 0.001 + 0.029375 0.001 + 0.030625 0.001 + 0.031875 0.001 + 0.033125 0.001 + 0.034375 0.001 + 0.035625 0.001 + 0.036875 0.001 + 0.038125 0.001 + 0.039375 0.001 + 0.040625 0.001 + 0.041875 0.001 + 0.043125 0.001 + 0.044375 0.001 + 0.045625 0.001 + 0.046875 0.001 + 0.048125 0.001 + 0.049375 0.001 + 0.050625 0.001 + 0.051875 0.001 + 0.053125 0.001 + 0.054375 0.001 + 0.055625 0.001 + 0.056875 0.001 + 0.058125 0.001 + 0.059375 0.001 + 0.060625 0.001 + 0.061875 0.001 + 0.063125 0.001 + 0.064375 0.001 + 0.065625 0.001 + 0.066875 0.001 + 0.068125 0.001 + 0.069375 0.001 + 0.070625 0.001 + 0.071875 0.001 + 0.073125 0.001 + 0.074375 0.001 + 0.075625 0.001 + 0.076875 0.001 + 0.078125 0.001 + 0.079375 0.001 + 0.080625 0.001 + 0.081875 0.001 + 0.083125 0.001 + 0.084375 0.001 + 0.085625 0.001 + 0.086875 0.001 + 0.088125 0.001 + 0.089375 0.001 + 0.090625 0.001 + 0.091875 0.001 + 0.093125 0.001 + 0.094375 0.001 + 0.095625 0.001 + 0.096875 0.001 + 0.098125 0.001 + 0.099375 0.001 diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/transportProperties b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/transportProperties index f4e64506c6..acf7b7754f 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/transportProperties +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/transportProperties @@ -19,7 +19,7 @@ Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 ); transportModel Newtonian; -nu nu [ 0 2 -1 0 0 0 0 ] 1e-8; +nu nu [ 0 2 -1 0 0 0 0 ] 1e-3; // ************************************************************************* // diff --git a/tutorials/multiphase/settlingFoam/ras/tank3D/Allrun b/tutorials/multiphase/settlingFoam/ras/tank3D/Allrun new file mode 100755 index 0000000000..411704d783 --- /dev/null +++ b/tutorials/multiphase/settlingFoam/ras/tank3D/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=`getApplication` + +runApplication $application From c9be8d63de5301d4210bf8ed1c3298cace2611a5 Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 17:12:38 +0100 Subject: [PATCH 05/14] Added alternating stress term. --- applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 18b915b16b..c0daa0e7ca 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -12,6 +12,7 @@ - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + //- fvc::div(rho*turbulence->nuEff()*dev(fvc::grad(U)().T())) ); if (oCorr == nOuterCorr-1) From 0c8ca47199e0f67b9698e3fdc8b674e63990784a Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 17:13:22 +0100 Subject: [PATCH 06/14] Added support for variable density incompressible solvers. --- .../functionObjects/forces/forces/forces.C | 75 ++++++++++++++++--- .../functionObjects/forces/forces/forces.H | 6 ++ 2 files changed, 71 insertions(+), 10 deletions(-) diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index 1ffc36cab0..6baace3863 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -61,7 +61,7 @@ Foam::tmp Foam::forces::devRhoReff() const const incompressible::RASModel& ras = obr_.lookupObject("RASProperties"); - return rhoRef_*ras.devReff(); + return rho()*ras.devReff(); } else if (obr_.foundObject("LESProperties")) { @@ -75,7 +75,7 @@ Foam::tmp Foam::forces::devRhoReff() const const incompressible::LESModel& les = obr_.lookupObject("LESProperties"); - return rhoRef_*les.devBeff(); + return rho()*les.devBeff(); } else if (obr_.foundObject("thermophysicalProperties")) { @@ -97,7 +97,7 @@ Foam::tmp Foam::forces::devRhoReff() const const volVectorField& U = obr_.lookupObject(UName_); - return -rhoRef_*laminarT.nu()*dev(twoSymm(fvc::grad(U))); + return -rho()*laminarT.nu()*dev(twoSymm(fvc::grad(U))); } else if (obr_.foundObject("transportProperties")) { @@ -108,7 +108,7 @@ Foam::tmp Foam::forces::devRhoReff() const const volVectorField& U = obr_.lookupObject(UName_); - return -rhoRef_*nu*dev(twoSymm(fvc::grad(U))); + return -rho()*nu*dev(twoSymm(fvc::grad(U))); } else { @@ -121,6 +121,34 @@ Foam::tmp Foam::forces::devRhoReff() const } +Foam::tmp Foam::forces::rho() const +{ + if (rhoName_ == "rhoInf") + { + const fvMesh& mesh = refCast(obr_); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "rho", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar("rho", dimDensity, rhoRef_) + ) + ); + } + else + { + return(obr_.lookupObject(rhoName_)); + } +} + + Foam::scalar Foam::forces::rho(const volScalarField& p) const { if (p.dimensions() == dimPressure) @@ -129,6 +157,13 @@ Foam::scalar Foam::forces::rho(const volScalarField& p) const } else { + if (rhoName_ != "rhoInf") + { + FatalErrorIn("forces::rho(const volScalarField& p)") + << "Dynamic pressure is expected but kinematic is provided." + << exit(FatalError); + } + return rhoRef_; } } @@ -149,11 +184,12 @@ Foam::forces::forces active_(true), log_(false), patchSet_(), - pName_(""), - UName_(""), + pName_(word::null), + UName_(word::null), + rhoName_(word::null), directForceDensity_(false), fDName_(""), - rhoRef_(0), + rhoRef_(VGREAT), CofR_(vector::zero), forcesFilePtr_(NULL) { @@ -175,6 +211,12 @@ Foam::forces::forces } read(dict); + + if (active_) + { + // Create the forces file if not already created + makeFile(); + } } @@ -222,18 +264,31 @@ void Foam::forces::read(const dictionary& dict) // Optional entries U and p pName_ = dict.lookupOrDefault("pName", "p"); UName_ = dict.lookupOrDefault("UName", "U"); + rhoName_ = dict.lookupOrDefault("rhoName", "rho"); - // Check whether UName and pName exists, if not deactivate forces + // Check whether UName, pName and rhoName exists, + // if not deactivate forces if ( !obr_.foundObject(UName_) || !obr_.foundObject(pName_) + || ( + rhoName_ != "rhoInf" + && !obr_.foundObject(rhoName_) + ) ) { active_ = false; + WarningIn("void forces::read(const dictionary& dict)") - << "Could not find " << UName_ << " or " - << pName_ << " in database." << nl + << "Could not find " << UName_ << ", " << pName_; + + if (rhoName_ != "rhoInf") + { + Info<< " or " << rhoName_; + } + + Info<< " in database." << nl << " De-activating forces." << endl; } diff --git a/src/postProcessing/functionObjects/forces/forces/forces.H b/src/postProcessing/functionObjects/forces/forces/forces.H index 96651af97e..bb82aac412 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.H +++ b/src/postProcessing/functionObjects/forces/forces/forces.H @@ -132,6 +132,9 @@ protected: //- Name of velocity field word UName_; + //- Name of density field (optional) + word rhoName_; + //- Is the force density being supplied directly? Switch directForceDensity_; @@ -157,6 +160,9 @@ protected: //- Return the effective viscous stress (laminar + turbulent). tmp devRhoReff() const; + //- Return rho if rhoName is specified otherwise rhoRef + tmp rho() const; + //- Return rhoRef if the pressure field is dynamic, i.e. p/rho // otherwise return 1 scalar rho(const volScalarField& p) const; From abf9bda45a2514da036c103c72b11530a2769d16 Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 17:13:50 +0100 Subject: [PATCH 07/14] Removed superfluous "compressible::". --- .../alphatWallFunction/alphatWallFunctionFvPatchScalarField.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index 4f21ba6472..b54c9d1b62 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -70,7 +70,7 @@ class alphatWallFunctionFvPatchScalarField public: //- Runtime type information - TypeName("compressible::alphatWallFunction"); + TypeName("alphatWallFunction"); // Constructors From dc183f3011bbaa47cd0661f2e877233f7ccd4ced Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 17:14:25 +0100 Subject: [PATCH 08/14] Minor formatting change. --- applications/solvers/incompressible/simpleFoam/UEqn.H | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H index 9f9d9f6dd4..eb40b7665b 100644 --- a/applications/solvers/incompressible/simpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/UEqn.H @@ -14,4 +14,3 @@ ).initialResidual(); maxResidual = max(eqnResidual, maxResidual); - From a1bf420f52814dbe4d1a735cf8cecf33927fdd0b Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 17:18:05 +0100 Subject: [PATCH 09/14] Corrected for new BCs. --- .../sonicFoam/ras/nacaAirfoil/0/alphat | 47 ++++++++++++++++++ .../sonicFoam/ras/nacaAirfoil/0/epsilon | 23 +++++---- .../sonicFoam/ras/nacaAirfoil/0/k | 20 ++++---- .../sonicFoam/ras/nacaAirfoil/0/mut | 49 +++++++++++++++++++ .../nacaAirfoil/constant/polyMesh/boundary | 2 +- 5 files changed, 120 insertions(+), 21 deletions(-) create mode 100644 tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/alphat create mode 100644 tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/alphat b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/alphat new file mode 100644 index 0000000000..6b66930cda --- /dev/null +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/alphat @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + INLE1 + { + type calculated; + value uniform 0; + } + OUTL2 + { + type calculated; + value uniform 0; + } + SYMP3 + { + type empty; + } + WALL10 + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon index 8f09366b8f..9a65ce7eec 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,29 +21,31 @@ internalField uniform 25000; boundaryField { - INLE1 + INLE1 { type inletOutlet; inletValue uniform 25000; value uniform 25000; } - - OUTL2 + OUTL2 { type inletOutlet; inletValue uniform 25000; value uniform 25000; } - - SYMP3 + SYMP3 { type empty; } - - WALL10 + WALL10 { - type zeroGradient; + type compressible::epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 25000; } } + // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k index 93c09e9044..552f881f4e 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,29 +21,28 @@ internalField uniform 1000; boundaryField { - INLE1 + INLE1 { type inletOutlet; inletValue uniform 1000; value uniform 1000; } - - OUTL2 + OUTL2 { type inletOutlet; inletValue uniform 1000; value uniform 1000; } - - SYMP3 + SYMP3 { type empty; } - - WALL10 + WALL10 { - type zeroGradient; + type compressible::kqRWallFunction; + value uniform 1000; } } + // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut new file mode 100644 index 0000000000..d10d508706 --- /dev/null +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + INLE1 + { + type calculated; + value uniform 0; + } + OUTL2 + { + type calculated; + value uniform 0; + } + SYMP3 + { + type empty; + } + WALL10 + { + type mutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary index b15d0272a6..59a99aa3f0 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From bcb1fc5ea893ed0002696711f17af1ae886e6ac3 Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 18 Aug 2009 22:03:34 +0100 Subject: [PATCH 10/14] Removed spurious "compressible::". --- tutorials/combustion/dieselFoam/aachenBomb/0/alphat | 2 +- tutorials/combustion/engineFoam/kivaTest/-180/alphat | 6 +++--- tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat | 8 ++++---- tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat | 4 ++-- .../rhoPorousSimpleFoam/angledDuctImplicit/0/alphat | 8 ++++---- tutorials/compressible/sonicFoam/ras/prism/0/alphat | 2 +- tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat | 6 +++--- .../heatTransfer/buoyantSimpleFoam/buoyantCavity/0/alphat | 8 ++++---- tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/alphat | 6 +++--- .../buoyantSimpleRadiationFoam/hotRadiationRoom/0/alphat | 8 ++++---- .../hotRadiationRoomFvDOM/0/alphat | 8 ++++---- .../lagrangian/coalChemistryFoam/simplifiedSiwek/0/alphat | 6 +++--- .../filter/0.org/alphat | 2 +- .../filter/0/alphat | 2 +- .../rhoPisoTwinParcelFoam/simplifiedSiwek/0/alphat | 6 +++--- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/tutorials/combustion/dieselFoam/aachenBomb/0/alphat b/tutorials/combustion/dieselFoam/aachenBomb/0/alphat index 46c50d5bee..5eceb3da78 100644 --- a/tutorials/combustion/dieselFoam/aachenBomb/0/alphat +++ b/tutorials/combustion/dieselFoam/aachenBomb/0/alphat @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } } diff --git a/tutorials/combustion/engineFoam/kivaTest/-180/alphat b/tutorials/combustion/engineFoam/kivaTest/-180/alphat index 3c40b89e22..7d6c338d7c 100644 --- a/tutorials/combustion/engineFoam/kivaTest/-180/alphat +++ b/tutorials/combustion/engineFoam/kivaTest/-180/alphat @@ -23,19 +23,19 @@ boundaryField { piston { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } liner { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } cylinderHead { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat b/tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat index caf0ef5da9..28bd4effe6 100644 --- a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat +++ b/tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat @@ -23,22 +23,22 @@ boundaryField { front { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } back { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } wall { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } porosityWall { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } inlet diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat b/tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat index e168ce375e..9c62cf78f3 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat +++ b/tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat @@ -23,13 +23,13 @@ boundaryField { movingWall { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } fixedWalls { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat index caf0ef5da9..28bd4effe6 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat @@ -23,22 +23,22 @@ boundaryField { front { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } back { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } wall { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } porosityWall { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } inlet diff --git a/tutorials/compressible/sonicFoam/ras/prism/0/alphat b/tutorials/compressible/sonicFoam/ras/prism/0/alphat index c361d50f31..cdb024c97e 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/0/alphat +++ b/tutorials/compressible/sonicFoam/ras/prism/0/alphat @@ -43,7 +43,7 @@ boundaryField } prismWall { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } defaultFaces diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat index 88f7153e5c..fcaa8d0c1d 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat @@ -23,17 +23,17 @@ boundaryField { floor { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } ceiling { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } fixedWalls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/alphat b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/alphat index 5addae2ddf..4b700cf1b7 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/alphat +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/alphat @@ -23,25 +23,25 @@ boundaryField { frontAndBack { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } topAndBottom { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } hot { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } cold { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/alphat index 2557d81789..1625699677 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/alphat +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/alphat @@ -23,19 +23,19 @@ boundaryField { floor { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } ceiling { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } fixedWalls { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/alphat b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/alphat index 00d1a6abb3..a7132ce19d 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/alphat +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/alphat @@ -23,22 +23,22 @@ boundaryField { box { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } floor { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } ceiling { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } fixedWalls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat index 51389bfd04..970624b7b9 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat @@ -23,25 +23,25 @@ boundaryField { box { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } floor { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } ceiling { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } fixedWalls { - type compressible::alphatWallFunction; + type alphatWallFunction; Prt 0.85; value uniform 0; } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/alphat b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/alphat index 6321b9c336..b29e4e70c0 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/alphat +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/alphat @@ -23,17 +23,17 @@ boundaryField { top { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } bottom { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } walls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } symmetry diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/alphat b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/alphat index 458a72388d..c87862d4ae 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/alphat +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/alphat @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } inlet diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/alphat b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/alphat index 458a72388d..c87862d4ae 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/alphat +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/alphat @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } inlet diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/alphat b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/alphat index 6321b9c336..b29e4e70c0 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/alphat +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/alphat @@ -23,17 +23,17 @@ boundaryField { top { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } bottom { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } walls { - type compressible::alphatWallFunction; + type alphatWallFunction; value uniform 0; } symmetry From 0d343e4d890c150119f477c8252037b4a6fc91d6 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 18 Aug 2009 22:10:41 +0100 Subject: [PATCH 11/14] indexing error --- .../polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index 0b9c08b39e..265b61cc4b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -1305,7 +1305,7 @@ bool Foam::cyclicPolyPatch::order { label baffleI = 0; - forAll(*this, faceI) + forAll(pp, faceI) { const face& f = pp.localFaces()[faceI]; const labelList& pFaces = pp.pointFaces()[f[0]]; From ddfe6c39e956ecf409f0240b6c08b2a911e972cd Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 18 Aug 2009 22:12:06 +0100 Subject: [PATCH 12/14] user overrideable tolerances --- .../mesh/manipulation/stitchMesh/stitchMesh.C | 23 +++++ .../slidingInterface/coupleSlidingInterface.C | 2 +- .../slidingInterface/slidingInterface.C | 87 ++++++++++++++++++- .../slidingInterface/slidingInterface.H | 44 ++++++++-- .../slidingInterfaceProjectPoints.C | 17 ++-- 5 files changed, 152 insertions(+), 21 deletions(-) diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 859ddf20a2..a5adac74e8 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -105,6 +105,8 @@ int main(int argc, char *argv[]) Foam::argList::validOptions.insert("overwrite", ""); + Foam::argList::validOptions.insert("toleranceDict", "file with tolerances"); + # include "setRootCase.H" # include "createTime.H" runTime.functionObjects().off(); @@ -168,6 +170,22 @@ int main(int argc, char *argv[]) << "If this is not the case use the -partial option" << nl << endl; } + // set up the tolerances for the sliding mesh + dictionary slidingTolerances; + if (args.options().found("toleranceDict")) + { + IOdictionary toleranceFile( + IOobject( + args.options()["toleranceDict"], + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + slidingTolerances += toleranceFile; + } + // Check for non-empty master and slave patches checkPatch(mesh.boundaryMesh(), masterPatchName); checkPatch(mesh.boundaryMesh(), slavePatchName); @@ -320,6 +338,11 @@ int main(int argc, char *argv[]) true // couple/decouple mode ) ); + static_cast(stitcher[0]).setTolerances + ( + slidingTolerances, + true + ); } diff --git a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C index 18d1170c00..f90e9a036b 100644 --- a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C +++ b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C @@ -43,7 +43,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -const Foam::scalar Foam::slidingInterface::edgeCoPlanarTol_ = 0.8; +const Foam::scalar Foam::slidingInterface::edgeCoPlanarTolDefault_ = 0.8; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C index 80d68749e8..316dd389b6 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.C +++ b/src/dynamicMesh/slidingInterface/slidingInterface.C @@ -27,10 +27,8 @@ License #include "slidingInterface.H" #include "polyTopoChanger.H" #include "polyMesh.H" -#include "primitiveMesh.H" #include "polyTopoChange.H" #include "addToRunTimeSelectionTable.H" -#include "triPointRef.H" #include "plane.H" // Index of debug signs: @@ -173,6 +171,14 @@ Foam::slidingInterface::slidingInterface attached_(false), projectionAlgo_(algo), trigger_(false), + pointMergeTol_(pointMergeTolDefault_), + edgeMergeTol_(edgeMergeTolDefault_), + nFacesPerSlaveEdge_(nFacesPerSlaveEdgeDefault_), + edgeFaceEscapeLimit_(edgeFaceEscapeLimitDefault_), + integralAdjTol_(integralAdjTolDefault_), + edgeMasterCatchFraction_(edgeMasterCatchFractionDefault_), + edgeCoPlanarTol_(edgeCoPlanarTolDefault_), + edgeEndCutoffTol_(edgeEndCutoffTolDefault_), cutFaceMasterPtr_(NULL), cutFaceSlavePtr_(NULL), masterFaceCellsPtr_(NULL), @@ -280,6 +286,9 @@ Foam::slidingInterface::slidingInterface masterPointEdgeHitsPtr_(NULL), projectedSlavePointsPtr_(NULL) { + // Optionally default tolerances from dictionary + setTolerances(dict); + checkDefinition(); // If the interface is attached, the master and slave face zone addressing @@ -686,6 +695,63 @@ const Foam::pointField& Foam::slidingInterface::pointProjection() const return *projectedSlavePointsPtr_; } +void Foam::slidingInterface::setTolerances(const dictionary&dict, bool report) +{ + pointMergeTol_ = dict.lookupOrDefault + ( + "pointMergeTol", + pointMergeTol_ + ); + edgeMergeTol_ = dict.lookupOrDefault + ( + "edgeMergeTol", + edgeMergeTol_ + ); + nFacesPerSlaveEdge_ = dict.lookupOrDefault + ( + "nFacesPerSlaveEdge", + nFacesPerSlaveEdge_ + ); + edgeFaceEscapeLimit_ = dict.lookupOrDefault + ( + "edgeFaceEscapeLimit", + edgeFaceEscapeLimit_ + ); + integralAdjTol_ = dict.lookupOrDefault + ( + "integralAdjTol", + integralAdjTol_ + ); + edgeMasterCatchFraction_ = dict.lookupOrDefault + ( + "edgeMasterCatchFraction", + edgeMasterCatchFraction_ + ); + edgeCoPlanarTol_ = dict.lookupOrDefault + ( + "edgeCoPlanarTol", + edgeCoPlanarTol_ + ); + edgeEndCutoffTol_ = dict.lookupOrDefault + ( + "edgeEndCutoffTol", + edgeEndCutoffTol_ + ); + + if (report) + { + Info<< "Sliding interface parameters:" << nl + << "pointMergeTol : " << pointMergeTol_ << nl + << "edgeMergeTol : " << edgeMergeTol_ << nl + << "nFacesPerSlaveEdge : " << nFacesPerSlaveEdge_ << nl + << "edgeFaceEscapeLimit : " << edgeFaceEscapeLimit_ << nl + << "integralAdjTol : " << integralAdjTol_ << nl + << "edgeMasterCatchFraction : " << edgeMasterCatchFraction_ << nl + << "edgeCoPlanarTol : " << edgeCoPlanarTol_ << nl + << "edgeEndCutoffTol : " << edgeEndCutoffTol_ << endl; + } +} + void Foam::slidingInterface::write(Ostream& os) const { @@ -703,6 +769,14 @@ void Foam::slidingInterface::write(Ostream& os) const } +// To write out all those tolerances +#define WRITE_NON_DEFAULT(name) \ + if( name ## _ != name ## Default_ )\ + { \ + os << " " #name " " << name ## _ << token::END_STATEMENT << nl; \ + } + + void Foam::slidingInterface::writeDict(Ostream& os) const { os << nl << name() << nl << token::BEGIN_BLOCK << nl @@ -743,6 +817,15 @@ void Foam::slidingInterface::writeDict(Ostream& os) const << token::END_STATEMENT << nl; } + WRITE_NON_DEFAULT(pointMergeTol) + WRITE_NON_DEFAULT(edgeMergeTol) + WRITE_NON_DEFAULT(nFacesPerSlaveEdge) + WRITE_NON_DEFAULT(edgeFaceEscapeLimit) + WRITE_NON_DEFAULT(integralAdjTol) + WRITE_NON_DEFAULT(edgeMasterCatchFraction) + WRITE_NON_DEFAULT(edgeCoPlanarTol) + WRITE_NON_DEFAULT(edgeEndCutoffTol) + os << token::END_BLOCK << endl; } diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.H b/src/dynamicMesh/slidingInterface/slidingInterface.H index 376c969e38..f86e423c65 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.H +++ b/src/dynamicMesh/slidingInterface/slidingInterface.H @@ -129,6 +129,32 @@ private: //- Trigger topological change mutable bool trigger_; + // Tolerances. Initialised to static ones below. + + //- Point merge tolerance + scalar pointMergeTol_; + + //- Edge merge tolerance + scalar edgeMergeTol_; + + //- Estimated number of faces an edge goes through + label nFacesPerSlaveEdge_; + + //- Edge-face interaction escape limit + label edgeFaceEscapeLimit_; + + //- Integral match point adjustment tolerance + scalar integralAdjTol_; + + //- Edge intersection master catch fraction + scalar edgeMasterCatchFraction_; + + //- Edge intersection co-planar tolerance + scalar edgeCoPlanarTol_; + + //- Edge end cut-off tolerance + scalar edgeEndCutoffTol_; + // Private addressing data. @@ -256,28 +282,28 @@ private: // Static data members //- Point merge tolerance - static const scalar pointMergeTol_; + static const scalar pointMergeTolDefault_; //- Edge merge tolerance - static const scalar edgeMergeTol_; + static const scalar edgeMergeTolDefault_; //- Estimated number of faces an edge goes through - static const label nFacesPerSlaveEdge_; + static const label nFacesPerSlaveEdgeDefault_; //- Edge-face interaction escape limit - static const label edgeFaceEscapeLimit_; + static const label edgeFaceEscapeLimitDefault_; //- Integral match point adjustment tolerance - static const scalar integralAdjTol_; + static const scalar integralAdjTolDefault_; //- Edge intersection master catch fraction - static const scalar edgeMasterCatchFraction_; + static const scalar edgeMasterCatchFractionDefault_; //- Edge intersection co-planar tolerance - static const scalar edgeCoPlanarTol_; + static const scalar edgeCoPlanarTolDefault_; //- Edge end cut-off tolerance - static const scalar edgeEndCutoffTol_; + static const scalar edgeEndCutoffTolDefault_; public: @@ -350,6 +376,8 @@ public: //- Return projected points for a slave patch const pointField& pointProjection() const; + //- Set the tolerances from the values in a dictionary + void setTolerances(const dictionary&, bool report=false); //- Write virtual void write(Ostream&) const; diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C index a34fd0f7b9..cc4643bcde 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C @@ -26,22 +26,19 @@ License #include "slidingInterface.H" #include "polyMesh.H" -#include "primitiveMesh.H" #include "line.H" -#include "triPointRef.H" -#include "plane.H" #include "polyTopoChanger.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -const Foam::scalar Foam::slidingInterface::pointMergeTol_ = 0.05; -const Foam::scalar Foam::slidingInterface::edgeMergeTol_ = 0.01; -const Foam::label Foam::slidingInterface::nFacesPerSlaveEdge_ = 5; -const Foam::label Foam::slidingInterface::edgeFaceEscapeLimit_ = 10; +const Foam::scalar Foam::slidingInterface::pointMergeTolDefault_ = 0.05; +const Foam::scalar Foam::slidingInterface::edgeMergeTolDefault_ = 0.01; +const Foam::label Foam::slidingInterface::nFacesPerSlaveEdgeDefault_ = 5; +const Foam::label Foam::slidingInterface::edgeFaceEscapeLimitDefault_ = 10; -const Foam::scalar Foam::slidingInterface::integralAdjTol_ = 0.05; -const Foam::scalar Foam::slidingInterface::edgeMasterCatchFraction_ = 0.4; -const Foam::scalar Foam::slidingInterface::edgeEndCutoffTol_ = 0.0001; +const Foam::scalar Foam::slidingInterface::integralAdjTolDefault_ = 0.05; +const Foam::scalar Foam::slidingInterface::edgeMasterCatchFractionDefault_ = 0.4; +const Foam::scalar Foam::slidingInterface::edgeEndCutoffTolDefault_ = 0.0001; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // From 71b7f8932973ef61e48cc3f613a4f19e14c58678 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 19 Aug 2009 11:47:52 +0100 Subject: [PATCH 13/14] more sensible variable names --- .../faceZonesIntegration.C | 39 +++++++++---------- .../faceZonesIntegration.H | 6 +-- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.C b/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.C index 36740cbf11..2899224d29 100644 --- a/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.C +++ b/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.C @@ -55,8 +55,8 @@ Foam::faceZonesIntegration::faceZonesIntegration obr_(obr), active_(true), log_(false), - faceZonesSet_(), - fItems_(), + zoneNames_(), + fieldNames_(), filePtr_(NULL) { // Check if the available mesh is an fvMesh otherise deactivate @@ -94,9 +94,9 @@ void Foam::faceZonesIntegration::read(const dictionary& dict) { log_ = dict.lookupOrDefault("log", false); - dict.lookup("fields") >> fItems_; + dict.lookup("fields") >> fieldNames_; - dict.lookup("faceZones") >> faceZonesSet_; + dict.lookup("faceZones") >> zoneNames_; } } @@ -132,11 +132,11 @@ void Foam::faceZonesIntegration::makeFile() mkDir(faceZonesIntegrationDir); // Open new file at start up - filePtr_.resize(fItems_.size()); + filePtr_.resize(fieldNames_.size()); - forAll(fItems_, Ifields) + forAll(fieldNames_, fieldI) { - const word& fieldName = fItems_[Ifields]; + const word& fieldName = fieldNames_[fieldI]; OFstream* sPtr = new OFstream ( @@ -163,10 +163,9 @@ void Foam::faceZonesIntegration::writeFileHeader() os << "#Time " << setw(w); - forAll (faceZonesSet_, zoneI) + forAll (zoneNames_, zoneI) { - const word name = faceZonesSet_[zoneI]; - os << name << setw(w); + os << zoneNames_[zoneI] << setw(w); } os << nl << endl; @@ -192,9 +191,9 @@ void Foam::faceZonesIntegration::write() { makeFile(); - forAll(fItems_, fieldI) + forAll(fieldNames_, fieldI) { - const word& fieldName = fItems_[fieldI]; + const word& fieldName = fieldNames_[fieldI]; const surfaceScalarField& sField = obr_.lookupObject(fieldName); @@ -203,17 +202,17 @@ void Foam::faceZonesIntegration::write() // 1. integrate over all face zones - scalarField integralVals(faceZonesSet_.size()); + scalarField integralVals(zoneNames_.size()); - forAll(faceZonesSet_, setI) + forAll(integralVals, zoneI) { - const word name = faceZonesSet_[setI]; + const word& name = zoneNames_[zoneI]; label zoneID = mesh.faceZones().findZoneID(name); const faceZone& fZone = mesh.faceZones()[zoneID]; - integralVals[setI] = returnReduce + integralVals[zoneI] = returnReduce ( calcIntegral(sField, fZone), sumOp() @@ -231,15 +230,15 @@ void Foam::faceZonesIntegration::write() os << obr_.time().value(); - forAll(integralVals, setI) + forAll(integralVals, zoneI) { - os << ' ' << setw(w) << integralVals[setI]; + os << ' ' << setw(w) << integralVals[zoneI]; if (log_) { Info<< "faceZonesIntegration output:" << nl - << " Integration[" << setI << "] " - << integralVals[setI] << endl; + << " Integration[" << zoneI << "] " + << integralVals[zoneI] << endl; } } diff --git a/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.H b/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.H index c2f3ad9d4b..d1a1bacfd2 100644 --- a/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.H +++ b/src/postProcessing/functionObjects/zones/faceZoneIntegration/faceZonesIntegration.H @@ -82,11 +82,11 @@ protected: //- Switch to send output to Info as well as to file Switch log_; - //- faceZones to integrate over - wordList faceZonesSet_; + //- List of face zone names to integrate over + wordList zoneNames_; //- Names of the surface fields - wordList fItems_; + wordList fieldNames_; //- Current open files From 98bd768d50f4dadcf0f240a8335caa8e37fe97ed Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 19 Aug 2009 16:43:29 +0100 Subject: [PATCH 14/14] adding counterFlowFlame2D tutorial case for reactingFoam --- .../reactingFoam/ras/counterFlowFlame2D/0/CH4 | 48 +++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/N2 | 48 +++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/O2 | 47 ++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/T | 48 +++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/U | 45 ++++++++++++ .../ras/counterFlowFlame2D/0/Ydefault | 48 +++++++++++++ .../ras/counterFlowFlame2D/0/alphat | 45 ++++++++++++ .../ras/counterFlowFlame2D/0/epsilon | 45 ++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/k | 45 ++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/mut | 45 ++++++++++++ .../reactingFoam/ras/counterFlowFlame2D/0/p | 49 +++++++++++++ .../counterFlowFlame2D/constant/RASProperties | 25 +++++++ .../constant/chemistryProperties | 48 +++++++++++++ .../ras/counterFlowFlame2D/constant/g | 22 ++++++ .../constant/polyMesh/blockMeshDict | 66 +++++++++++++++++ .../constant/polyMesh/boundary | 46 ++++++++++++ .../ras/counterFlowFlame2D/constant/reactions | 15 ++++ .../constant/thermo.compressibleGas | 28 ++++++++ .../constant/thermophysicalProperties | 29 ++++++++ .../constant/turbulenceProperties | 21 ++++++ .../ras/counterFlowFlame2D/system/controlDict | 53 ++++++++++++++ .../ras/counterFlowFlame2D/system/fvSchemes | 71 +++++++++++++++++++ .../ras/counterFlowFlame2D/system/fvSolution | 51 +++++++++++++ 23 files changed, 988 insertions(+) create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CH4 create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/N2 create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/O2 create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/Ydefault create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/alphat create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/g create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/reactions create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict create mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes create mode 100755 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CH4 b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CH4 new file mode 100644 index 0000000000..dcdd095f09 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CH4 @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object CH4; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 1.0; + } + air + { + type fixedValue; + value uniform 0.0; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0; + value uniform 0.0; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/N2 b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/N2 new file mode 100644 index 0000000000..3a0de95a3c --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/N2 @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object O2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.77; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.77; + } + outlet + { + type inletOutlet; + inletValue uniform 0.77; + value uniform 0.77; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/O2 b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/O2 new file mode 100644 index 0000000000..3a038966c2 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/O2 @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object O2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.23; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.23; + } + outlet + { + type inletOutlet; + inletValue uniform 0.23; + value uniform 0.23; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T new file mode 100644 index 0000000000..254322f38e --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 800; + } + air + { + type fixedValue; + value uniform 800; + } + outlet + { + type inletOutlet; + inletValue uniform 293; + value uniform 293; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U new file mode 100644 index 0000000000..56b91756dc --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ 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 +{ + fuel + { + type fixedValue; + value uniform (0.1 0 0); + } + air + { + type fixedValue; + value uniform (-0.1 0 0); + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/Ydefault b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/Ydefault new file mode 100644 index 0000000000..da2957b4c8 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/Ydefault @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object Ydefault; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.0; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0; + value uniform 0.0; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/alphat b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/alphat new file mode 100644 index 0000000000..cf60ba7894 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/alphat @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.0; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon new file mode 100644 index 0000000000..52209c27a3 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 50; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 1.e-5; + } + air + { + type fixedValue; + value uniform 1.e-5; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k new file mode 100644 index 0000000000..6b2458ec76 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 3.75e-5; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 3.75e-5; + } + air + { + type fixedValue; + value uniform 3.75e-5; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut new file mode 100644 index 0000000000..3fd75130c2 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.0; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p new file mode 100644 index 0000000000..bb7898548f --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + fuel + { + type zeroGradient; + } + air + { + type zeroGradient; + } + inlet2 + { + type zeroGradient; + } + outlet + { + type fixedValue; + value uniform 1e5; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties new file mode 100644 index 0000000000..81b1ec9115 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties new file mode 100644 index 0000000000..fd8ff1453a --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +psiChemistryModel ODEChemistryModel; + +chemistry on; + +chemistrySolver ode; + +initialChemicalTimeStep 1e-07; + +turbulentReaction on; + +sequentialCoeffs +{ + cTauChem 0.001; +} + +EulerImplicitCoeffs +{ + cTauChem 0.05; + equilibriumRateLimiter off; +} + +odeCoeffs +{ + ODESolver SIBS; + eps 0.05; + scale 1; +} + +Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1; + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/g b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/g new file mode 100644 index 0000000000..c0436c9ba0 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 0 0 ); + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..0befc6212d --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict @@ -0,0 +1,66 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0.0 -0.01 -0.01) + (0.02 -0.01 -0.01) + (0.02 0.01 -0.01) + (0.0 0.01 -0.01) + (0.0 -0.01 0.01) + (0.02 -0.01 0.01) + (0.02 0.01 0.01) + (0.0 0.01 0.01) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (100 40 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch fuel + ( + (0 4 7 3) + ) + patch air + ( + (1 2 6 5) + ) + patch outlet + ( + (0 1 5 4) + (7 6 2 3) + ) + empty frontAndBack + ( + (4 5 6 7) + (0 3 2 1) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary new file mode 100644 index 0000000000..dca33da1db --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + fuel + { + type patch; + nFaces 40; + startFace 7860; + } + air + { + type patch; + nFaces 40; + startFace 7900; + } + outlet + { + type patch; + nFaces 200; + startFace 7940; + } + frontAndBack + { + type empty; + nFaces 8000; + startFace 8140; + } +) + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/reactions b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/reactions new file mode 100644 index 0000000000..e9a256e2da --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/reactions @@ -0,0 +1,15 @@ +species +( + O2 + H2O + CH4 + CO2 + N2 +); + +reactions +( + irreversibleArrheniusReaction + CH4 + 2O2 = CO2 + 2H2O + (5.2e16 0 14906) +); \ No newline at end of file diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas new file mode 100644 index 0000000000..9b202c3435 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas @@ -0,0 +1,28 @@ +( +O2 O2 1 31.9988 + 200 5000 1000 + 3.69758 0.00061352 -1.25884e-07 1.77528e-11 -1.13644e-15 -1233.93 3.18917 + 3.21294 0.00112749 -5.75615e-07 1.31388e-09 -8.76855e-13 -1005.25 6.03474 + 1.67212e-06 170.672 +H2O H2O 1 18.0153 + 200 5000 1000 + 2.67215 0.00305629 -8.73026e-07 1.201e-10 -6.39162e-15 -29899.2 6.86282 + 3.38684 0.00347498 -6.3547e-06 6.96858e-09 -2.50659e-12 -30208.1 2.59023 + 1.67212e-06 170.672 +CH4 CH4 1 16.0428 + 200 6000 1000 + 1.63543 0.0100844 -3.36924e-06 5.34973e-10 -3.15528e-14 -10005.6 9.9937 + 5.14988 -0.013671 4.91801e-05 -4.84744e-08 1.66694e-11 -10246.6 -4.64132 + 1.67212e-06 170.672 +CO2 CO2 1 44.01 + 200 5000 1000 + 4.45362 0.00314017 -1.27841e-06 2.394e-10 -1.66903e-14 -48967 -0.955396 + 2.27572 0.00992207 -1.04091e-05 6.86669e-09 -2.11728e-12 -48373.1 10.1885 + 1.67212e-06 170.672 +N2 N2 1 28.0134 + 200 5000 1000 + 2.92664 0.00148798 -5.68476e-07 1.0097e-10 -6.75335e-15 -922.798 5.98053 + 3.29868 0.00140824 -3.96322e-06 5.64152e-09 -2.44486e-12 -1020.9 3.95037 + 1.67212e-06 170.672 +) + diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties new file mode 100644 index 0000000000..1586cb545c --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hPsiMixtureThermo>; + +inertSpecie N2; + +chemistryReader foamChemistryReader; + +foamChemistryFile "$FOAM_CASE/constant/reactions"; + +foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas"; + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties new file mode 100644 index 0000000000..f1f4b717d0 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict new file mode 100644 index 0000000000..d8eadc979c --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1.0; + +deltaT 1e-6; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.4; + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes new file mode 100644 index 0000000000..b961fdc745 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes @@ -0,0 +1,71 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + div(phi,Yi_h) Gauss limitedLinear01 1; + div(phi,h) Gauss limitedLinear 1; + div(phiU,p) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div(phi,k) Gauss limitedLinear 1; + div((muEff*dev2(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; + laplacian(muEff,U) Gauss linear uncorrected; + laplacian(mut,U) Gauss linear uncorrected; + laplacian(DkEff,k) Gauss linear uncorrected; + laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; + laplacian((rho*(1|A(U))),p) Gauss linear uncorrected; + laplacian(alphaEff,h) Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +fluxRequired +{ + default no; + p; +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution new file mode 100755 index 0000000000..16e36d1356 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.0; + } + + "(U|Yi|h|k|epsilon)" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* //