From 71b7f8932973ef61e48cc3f613a4f19e14c58678 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 19 Aug 2009 11:47:52 +0100 Subject: [PATCH 1/2] 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 2/2] 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; +} + + +// ************************************************************************* //