diff --git a/.gitignore b/.gitignore index 43c7337ec1..1b8ce3cde3 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ linuxming*/ SiCortex*Gcc*/ solaris*Gcc*/ SunOS*Gcc*/ +platforms/ # reinstate wmake/rules that might look like build folders !wmake/rules/*/ diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 227041536f..2e9a025ec8 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -35,43 +35,44 @@ *** Core library + Large number of code refinements and consistency improvements to support other developments. - Parallel : using non-blocking communications wherever possible. This will + + Parallel : using non-blocking communications wherever possible. This will lead to lower requirements for MPI_BUFFER_SIZE and possibly better start-up performance on larger numbers of processors. *** Turbulence modelling *** *Updated* thermophysical libraries + Now use the more descriptive dictionary input format, e.g. for a single component mixture: + #+BEGIN_SRC c++ + thermoType hPsiThermo>>>>; - thermoType hPsiThermo>>>>; - - mixture - { - nMoles 1; - molWeight 28.9; - Cp 1007; - Hf 0; - As 1.4792e-06; - Ts 116; - } + mixture + { + nMoles 1; + molWeight 28.9; + Cp 1007; + Hf 0; + As 1.4792e-06; + Ts 116; + } + #+END_SRC *** Lagrangian intermediate library - Extensively updated - *Updated* input format - Extended to include steady cloud tracking - *New* collision modelling - *Coupled* to new surface film modelling library - *New* sub-models - + NonSphereDrag: drag model to account for non-spherical particles - + ParticleTracks: post-processing model to generate track data, typically - during steady calculations - *Updated* sub-models - + Devolatilisation models: now act on a per-specie basis + + Extensively updated + + *Updated* input format + + Extended to include steady cloud tracking + + *New* collision modelling + + *Coupled* to new surface film modelling library + + *New* sub-models + + NonSphereDrag: drag model to account for non-spherical particles + + ParticleTracks: post-processing model to generate track data, typically + during steady calculations + + *Updated* sub-models + + Devolatilisation models: now act on a per-specie basis *** DSMC *** Dynamic Mesh *** Numerics *** *Updated* command line help, e.g. `snappyHexMesh -help' now gives: - + #+BEGIN_SRC c++ Usage: snappyHexMesh [OPTIONS] options: -case specify alternate case directory, default is the cwd @@ -80,12 +81,13 @@ -srcDoc display source code in browser -doc display application documentation in browser -help print the usage - + #+END_SRC *** *New* basicSolidThermo solids thermophysical library + Used in all conjugate heat transfer solvers + constant properties + temperature dependent properties - + temperature and direction (in local coordinate system) dependent properties + + temperature and direction (in local coordinate system) dependent + properties *** *New* Surface film library + Creation of films by particle addition, or initial film distribution + Coupled with the lagrangian/intermediate cloud hierarchy library @@ -104,17 +106,25 @@ taking film into account + Parallel aware *** *New* ptscotch decomposition method +*** *Updated* scotch decomposition method to run in parallel by doing + decomposition on the master. Unfortunately scotch and ptscotch cannot + be linked in to the same executable. +*** *Updated* simple decomposition method to run in parallel by doing + decomposition on the master. *** *Updated* decomposePar maps polyPatches instead of recreating them so polyPatches holding data can map the data. *** *Updated* particle tracking algorithm + uses non-blocking parallel transfers - + does 'minimum-tet' decomposition of face to work with warped faces (snappyHexMesh!) + + does 'minimum-tet' decomposition of face to work with warped faces + (snappyHexMesh!) + reuses tracking state in interpolation - improves consistency and speed -*** *Updated* split cyclics into two separate patches. See doc/changed/splitCyclics.txt +*** *Updated* split cyclics into two separate patches. + See [[./doc/changes/splitCyclic.txt]] * *Updated* interpolation (volPointInterpolation) now works without the globalPointPatch. Moving mesh cases can now be run non-parallel and continued in parallel and reconstructed without any limitation. -*** *New* compact binary I/O for faces and cells. This speeds up reading/writing meshes in binary. +*** *New* compact binary I/O for faces and cells. + This speeds up reading/writing meshes in binary. *** *Updated* runTimeModifiable + user selectable model to use for checking run-time modifiable dictionaries (see also doc/changes/inotify.txt): @@ -124,11 +134,34 @@ contents from master. + inotifyMaster : only master checks and reads file. Slaves get file contents from master. - + on linux optionally uses inotify instead of time stamps - more efficient for large - numbers of monitored files. No more fileModificationSkew needed. + + on linux optionally uses inotify instead of time stamps - more efficient + for large numbers of monitored files. No more fileModificationSkew needed. + single integer reduction instead of one reduction per monitored file. + only files that can be re-read are being checked. Drastic reduction of number of files to check. +*** *New* #codeStream dictionary entry + Uses dynamic compilation of OpenFOAM C++ code to construct dictionary. + E.g. in blockMeshDict: + #+BEGIN_SRC c++ + convertToMeters 0.001; + + vertices #codeStream + { + code + #{ + label nVerts = + readLabel(dict.lookup("nx")) + *readLabel(dict.lookup("ny")) + *readLabel(dict.lookup("nz")); + pointField verts(nVerts); + // Now fill verts here + // .. + os << verts; + #}; + } + #+END_SRC + See also ./[[doc/changes/dynamicCode.org]] + * Solvers A number of new solvers have been developed for a range of engineering applications. There has been a set of improvements to certain classes of @@ -158,6 +191,23 @@ + takes optional fieldName to sample + directMapped patch added 'normal' method to calculate sample points to e.g. sample fields just above wall (e.g. for streaklines) + + *New* codedFixedValue: Uses the dynamic code compilation from #codeStream + to provide an in-line fixedValueFvPatchScalarField. E.g. + #+BEGIN_SRC c++ + outlet + { + type codedFixedValue; + value uniform 0; + redirectType fixedValue10; + + code + #{ + operator==(min(10, 0.1*this->db().time().value())); + #}; + } + #+END_SRC + See also [[./doc/changes/dynamicCode.org]] + * Utilities There have been some utilities added and updated in this release. *** *New* utilities @@ -177,17 +227,31 @@ + =topoSet=: replacement of cellSet,faceSet,pointSet utilities. Comparable to a dictionary driven =setSet= utility. *** Updated utilities - + =setFields=: optionally use faceSets to set patch values (see e.g. hotRoom tutorial). + + =setFields=: optionally use faceSets to set patch values (see + e.g. =hotRoom= tutorial). + =blockMesh=: specify patches via dictionary instead of type only. This makes rereading the boundary file superfluous. see e.g. pitzDailyDirectMapped tutorial. - + =setSet=: allows time range (e.g. 0:100) in combination with -batch argument - to execute the commands for multiple times. + + =setSet=: allows time range (e.g. 0:100) in combination with -batch + argument to execute the commands for multiple times. + + =extrudeMesh=: + - option to add extrusion to existing mesh. + - works in parallel + + =snappyHexMesh=: + + extrude across multi-processor boundaries + + preserve faceZones during layering + + *Warning*: + - minMedianAxisAngle angle fixed w.r.t. 17x. Set to + 90 to get same behaviour as 130 in 17x. + - nGrow did not work in 17x. Set to 0 + to get same behaviour as 130 in 17x. + - new minTetQuality setting (see tracking). Disable for 17x + compatibility. * Post-processing + =paraFoam=, =foamToVTK=: full support for polyhedral cell type in recent Paraview versions. - + =foamToEnsight=: parallel continuous data. new =-nodeValues= option to generate and output nodal - field data. + + =foamToEnsight=: parallel continuous data. new =-nodeValues= option to + generate and output nodal field data. + =singleCellMesh=: new utility to convert mesh and fields to a single cell mesh. Great for postprocessing. + =steadyParticleTracks=: Generates VTK tracks from the output of the cloud @@ -221,3 +285,7 @@ + multipleBoxes, hotBoxes, panel, evaporationTest + =interDyMFoam= tutorials: + testTubeMixer: showcases =solidBodyMotionFunction= + +* Other + + compilable with =clang= + In your prefs.sh set the WM_COMPILER to Clang diff --git a/applications/solvers/combustion/PDRFoam/Make/files b/applications/solvers/combustion/PDRFoam/Make/files index 1e5d200ccb..0a8358cdb6 100644 --- a/applications/solvers/combustion/PDRFoam/Make/files +++ b/applications/solvers/combustion/PDRFoam/Make/files @@ -27,7 +27,7 @@ PDRModels/XiGModels/basicXiSubG/basicXiSubG.C laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C -/* PDRFoamAutoRefine.C */ +/*PDRFoamAutoRefine.C*/ PDRFoam.C EXE = $(FOAM_APPBIN)/PDRFoam diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index 3432f09ef7..b9937a8a69 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -9,13 +9,14 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/triSurface/lnInclude EXE_LIBS = \ -lengine \ diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index 0197d8e0b3..2f11a8db1a 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "initContinuityErrs.H" #include "readTimeControls.H" - #include "CourantNo.H" + #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" scalar StCoNum = 0.0; @@ -91,11 +91,10 @@ int main(int argc, char *argv[]) { #include "readTimeControls.H" #include "readPISOControls.H" - #include "CourantNo.H" + #include "compressibleCourantNo.H" #include "setDeltaT.H" runTime++; - Info<< "\n\nTime = " << runTime.timeName() << endl; #include "rhoEqn.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index bf31388aaa..b7d4b42bc9 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "initContinuityErrs.H" #include "readTimeControls.H" - #include "CourantNo.H" + #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" scalar StCoNum = 0.0; @@ -89,17 +89,15 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; + bool hasChanged = false; + while (runTime.run()) { #include "readTimeControls.H" #include "readPISOControls.H" - #include "CourantNo.H" + #include "compressibleCourantNo.H" #include "setDeltaT.H" - runTime++; - - Info<< "\n\nTime = " << runTime.timeName() << endl; - // Indicators for refinement. Note: before runTime++ // only for postprocessing reasons. tmp tmagGradP = mag(fvc::grad(p)); @@ -111,7 +109,10 @@ int main(int argc, char *argv[]) normalisedGradP.writeOpt() = IOobject::AUTO_WRITE; tmagGradP.clear(); - bool meshChanged = false; + runTime++; + + Info<< "\n\nTime = " << runTime.timeName() << endl; + { // Make the fluxes absolute fvc::makeAbsolute(phi, rho, U); @@ -134,29 +135,27 @@ int main(int argc, char *argv[]) } } - //volScalarField pIndicator("pIndicator", - // p*(fvc::laplacian(p)) - // / ( - // magSqr(fvc::grad(p)) - // + dimensionedScalar - // ( - // "smallish", - // sqr(p.dimensions()/dimLength), - // 1E-6 - // ) - // )); - //pIndicator.writeOpt() = IOobject::AUTO_WRITE; - // Flux estimate for introduced faces. volVectorField rhoU("rhoU", rho*U); // Do any mesh changes - meshChanged = mesh.update(); + bool meshChanged = mesh.update(); -// if (mesh.moving() || meshChanged) -// { -// #include "correctPhi.H" -// } + + if (meshChanged) + { + hasChanged = true; + } + + if (runTime.write() && hasChanged) + { + betav.write(); + Lobs.write(); + CT.write(); + drag->writeFields(); + flameWrinkling->writeFields(); + hasChanged = false; + } // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, rho, U); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index 35f9bb02f3..70933519bb 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,55 +50,12 @@ Foam::XiEqModels::basicSubGrid::basicSubGrid : XiEqModel(XiEqProperties, thermo, turbulence, Su), - N_ - ( - IOobject - ( - "N", - Su.mesh().time().findInstance(polyMesh::meshSubDir, "N"), - polyMesh::meshSubDir, - Su.mesh(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - Su.mesh() - ), - - ns_ - ( - IOobject - ( - "ns", - Su.mesh().time().findInstance(polyMesh::meshSubDir, "ns"), - polyMesh::meshSubDir, - Su.mesh(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - Su.mesh() - ), - B_ ( IOobject ( "B", - Su.mesh().time().findInstance(polyMesh::meshSubDir, "B"), - polyMesh::meshSubDir, - Su.mesh(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - Su.mesh() - ), - - Lobs_ - ( - IOobject - ( - "Lobs", - Su.mesh().time().findInstance(polyMesh::meshSubDir, "Lobs"), - polyMesh::meshSubDir, + Su.mesh().facesInstance(), Su.mesh(), IOobject::MUST_READ, IOobject::NO_WRITE @@ -120,8 +77,12 @@ Foam::XiEqModels::basicSubGrid::~basicSubGrid() Foam::tmp Foam::XiEqModels::basicSubGrid::XiEq() const { - const objectRegistry& db = Su_.db(); - const volVectorField& U = db.lookupObject("U"); + const fvMesh& mesh = Su_.mesh(); + const volVectorField& U = mesh.lookupObject("U"); + + const volScalarField& Nv = mesh.lookupObject("Nv"); + const volSymmTensorField& nsv = + mesh.lookupObject("nsv"); volScalarField magU(mag(U)); volVectorField Uhat @@ -129,20 +90,71 @@ Foam::tmp Foam::XiEqModels::basicSubGrid::XiEq() const U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4)) ); - volScalarField n(max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4))); + const scalarField Cw = pow(mesh.V(), 2.0/3.0); - volScalarField b((Uhat & B_ & Uhat)/n); + tmp tN + ( + new volScalarField + ( + IOobject + ( + "tN", + mesh.time().constant(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("zero", Nv.dimensions(), 0.0), + zeroGradientFvPatchVectorField::typeName + ) + ); + + volScalarField& N = tN(); + + N.internalField() = Nv.internalField()*Cw; + + tmp tns + ( + new volSymmTensorField + ( + IOobject + ( + "tns", + U.mesh().time().timeName(), + U.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + U.mesh(), + dimensionedSymmTensor + ( + "zero", + nsv.dimensions(), + pTraits::zero + ), + zeroGradientFvPatchSymmTensorField::typeName + ) + ); + + volSymmTensorField& ns = tns(); + + ns.internalField() = nsv.internalField()*Cw; + + volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4))); + + volScalarField b((Uhat & B_ & Uhat)/sqrt(n)); volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); volScalarField XiSubEq ( scalar(1) - + max(2.2*sqrt(b), min(0.34*magU/up, scalar(1.6))) - *min(0.25*n, scalar(1)) + + max(2.2*sqrt(b), min(0.34*magU/up*sqrt(b), scalar(1.6))) + * min(n, scalar(1)) ); - return XiSubEq*XiEqModel_->XiEq(); + return (XiSubEq*XiEqModel_->XiEq()); } diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H index a9d915d2a4..c510399971 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,18 +85,9 @@ class basicSubGrid { // Private data - //- Count - volScalarField N_; - - //- Sub-count - volSymmTensorField ns_; - //- tblock volSymmTensorField B_; - //- Typical obstacle diameters per cell - volScalarField Lobs_; - //- Equilibrium Xi model due to turbulence autoPtr XiEqModel_; diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index cc8e7ee2aa..3be4385857 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,8 +34,8 @@ namespace XiGModels { defineTypeNameAndDebug(basicSubGrid, 0); addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary); -} -} +}; +}; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -66,12 +66,37 @@ Foam::tmp Foam::XiGModels::basicSubGrid::G() const { const objectRegistry& db = Su_.db(); const volVectorField& U = db.lookupObject("U"); - const volScalarField& N = db.lookupObject("N"); + const volScalarField& Nv = db.lookupObject("Nv"); const volScalarField& Lobs = db.lookupObject("Lobs"); tmp tGtot = XiGModel_->G(); volScalarField& Gtot = tGtot(); + const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0); + + tmp tN + ( + new volScalarField + ( + IOobject + ( + "tN", + Su_.mesh().time().timeName(), + Su_.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + Su_.mesh(), + dimensionedScalar("zero", Nv.dimensions(), 0.0), + zeroGradientFvPatchVectorField::typeName + ) + ); + + volScalarField& N = tN(); + + N.internalField() = Nv.internalField()*Cw; + forAll(N, celli) { if (N[celli] > 1e-3) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 22e23a1278..097d0e02f1 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C index 5caaadef14..31cd0165fe 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ namespace Foam { defineTypeNameAndDebug(PDRDragModel, 0); defineRunTimeSelectionTable(PDRDragModel, dictionary); -} +}; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index c9efeab3c4..d6d8a73906 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -162,6 +162,11 @@ public: { return true; } + + virtual void writeFields() const + { + notImplemented("PDRDragModel::write()"); + } }; diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 6e485a7a3c..785490db2f 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,34 +53,12 @@ Foam::PDRDragModels::basic::basic Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")), Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")), - Aw2_ - ( - "Aw2", - sqr - ( - volScalarField - ( - IOobject - ( - "Aw", - U_.mesh().time().findInstance(polyMesh::meshSubDir, "Aw"), - polyMesh::meshSubDir, - U_.mesh(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - U_.mesh() - ) - ) - ), - - CR_ + Aw_ ( IOobject ( - "CR", - U_.mesh().time().findInstance(polyMesh::meshSubDir, "CR"), - polyMesh::meshSubDir, + "Aw", + U_.mesh().facesInstance(), U_.mesh(), IOobject::MUST_READ, IOobject::NO_WRITE @@ -88,13 +66,12 @@ Foam::PDRDragModels::basic::basic U_.mesh() ), - CT_ + CR_ ( IOobject ( - "CT", - U_.mesh().time().findInstance(polyMesh::meshSubDir, "CT"), - polyMesh::meshSubDir, + "CR", + U_.mesh().facesInstance(), U_.mesh(), IOobject::MUST_READ, IOobject::NO_WRITE @@ -114,19 +91,24 @@ Foam::PDRDragModels::basic::~basic() Foam::tmp Foam::PDRDragModels::basic::Dcu() const { - const volScalarField& betav = U_.db().lookupObject("betav"); + const volScalarField& betav = + U_.db().lookupObject("betav"); - return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_; + return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_); } Foam::tmp Foam::PDRDragModels::basic::Gk() const { - const volScalarField& betav = U_.db().lookupObject("betav"); + const volScalarField& betav = + U_.db().lookupObject("betav"); + + const volSymmTensorField& CT = + U_.db().lookupObject("CT"); return - (0.5*rho_)*mag(U_)*(U_ & CT_ & U_) - + Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_); + (0.5*rho_)*mag(U_)*(U_ & CT & U_) + + Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_); } @@ -141,4 +123,10 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties) } +void Foam::PDRDragModels::basic::writeFields() const +{ + Aw_.write(); + CR_.write(); +} + // ************************************************************************* // diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H index 83df5fa11b..0c5e49a661 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,9 +102,8 @@ class basic dimensionedScalar Csu; dimensionedScalar Csk; - volScalarField Aw2_; + volScalarField Aw_; volSymmTensorField CR_; - volSymmTensorField CT_; // Private Member Functions @@ -149,6 +148,9 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& PDRProperties); + + //- Write fields + void writeFields() const; }; diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index c96477d9c6..0b5c3e4ac9 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,12 +55,42 @@ PDRkEpsilon::PDRkEpsilon const word& modelName ) : - kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName) + kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName), + + C4_ + ( + dimensioned::lookupOrAddToDict + ( + "C4", + coeffDict_, + 0.1 + ) + ) +{} + + +// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +PDRkEpsilon::~PDRkEpsilon() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +bool PDRkEpsilon::read() +{ + if (RASModel::read()) + { + C4_.readIfPresent(coeffDict_); + return true; + } + else + { + return false; + } +} + + void PDRkEpsilon::correct() { if (!turbulence_) @@ -89,18 +119,25 @@ void PDRkEpsilon::correct() volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU())))); tgradU.clear(); - // Update epsilon and G at the wall + // Update espsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); // Add the blockage generation term so that it is included consistently // in both the k and epsilon equations - const volScalarField& betav = U_.db().lookupObject("betav"); + const volScalarField& betav = + U_.db().lookupObject("betav"); + + const volScalarField& Lobs = + U_.db().lookupObject("Lobs"); const PDRDragModel& drag = U_.db().lookupObject("PDRDragModel"); volScalarField GR(drag.Gk()); + volScalarField LI + (C4_*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL))); + // Dissipation equation tmp epsEqn ( @@ -108,7 +145,8 @@ void PDRkEpsilon::correct() + fvm::div(phi_, epsilon_) - fvm::laplacian(DepsilonEff(), epsilon_) == - C1_*(betav*G + GR)*epsilon_/k_ + C1_*betav*G*epsilon_/k_ + + 1.5*pow(Cmu_, 3.0/4.0)*GR*sqrt(k_)/LI - fvm::SuSp(((2.0/3.0)*C1_)*betav*rho_*divU, epsilon_) - fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_) ); @@ -138,7 +176,6 @@ void PDRkEpsilon::correct() solve(kEqn); bound(k_, kMin_); - // Re-calculate viscosity mut_ = rho_*Cmu_*sqr(k_)/epsilon_; mut_.correctBoundaryConditions(); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index a4378fb7ad..4588950825 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,8 +25,7 @@ Class Foam::compressible::RASModels::PDRkEpsilon Description - Standard k-epsilon turbulence model for compressible flow - with additional source terms + Standard k-epsilon turbulence model with additional source terms corresponding to PDR basic drag model (\link basic.H \endlink) The default model coefficients correspond to the following: @@ -37,6 +36,7 @@ Description C1 1.44; C2 1.92; C3 -0.33; // only for compressible + C4 0.1; sigmak 1.0; // only for compressible sigmaEps 1.3; Prt 1.0; // only for compressible @@ -60,7 +60,7 @@ SourceFiles #ifndef compressiblePDRkEpsilon_H #define compressiblePDRkEpsilon_H -#include "RASModel.H" + #include "kEpsilon.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -80,6 +80,11 @@ class PDRkEpsilon : public kEpsilon { + // Private data + + // Model coefficients + dimensionedScalar C4_; + public: @@ -102,15 +107,16 @@ public: //- Destructor - virtual ~PDRkEpsilon() - {} + virtual ~PDRkEpsilon(); // Member Functions //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); + void correct(); + //- Read turbulenceProperties dictionary + bool read(); }; diff --git a/applications/solvers/combustion/PDRFoam/StCourantNo.H b/applications/solvers/combustion/PDRFoam/StCourantNo.H index 5f870711fa..55140320a4 100644 --- a/applications/solvers/combustion/PDRFoam/StCourantNo.H +++ b/applications/solvers/combustion/PDRFoam/StCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description if (mesh.nInternalFaces()) { - scalarField sumPhi + scalarField sumPhi ( fvc::surfaceSum(mag(phiSt))().internalField() / rho.internalField() diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index 9e62af2e48..ef1c049f8b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,8 +49,8 @@ Foam::XiEqModels::Gulder::Gulder ) : XiEqModel(XiEqProperties, thermo, turbulence, Su), - XiEqCoef(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))), - SuMin(0.01*Su.average()) + XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))), + SuMin_(0.01*Su.average()) {} @@ -67,6 +67,11 @@ Foam::tmp Foam::XiEqModels::Gulder::XiEq() const volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); const volScalarField& epsilon = turbulence_.epsilon(); + if (subGridSchelkin()) + { + up.internalField() += calculateSchelkinEffect(); + } + volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)))); volScalarField Reta @@ -78,7 +83,7 @@ Foam::tmp Foam::XiEqModels::Gulder::XiEq() const ) ); - return 1.0 + XiEqCoef*sqrt(up/(Su_ + SuMin))*Reta; + return (1.0 + XiEqCoef_*sqrt(up/(Su_ + SuMin_))*Reta); } @@ -86,7 +91,9 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties) { XiEqModel::read(XiEqProperties); - XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef; + XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_; + XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_; + XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_; return true; } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H index ebfeaa39a7..c4c6afbb27 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,8 +55,11 @@ class Gulder { // Private data - scalar XiEqCoef; - dimensionedScalar SuMin; + //- Model constant + scalar XiEqCoef_; + + //- Minimum laminar burning velocity + const dimensionedScalar SuMin_; // Private Member Functions @@ -97,6 +100,7 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties); + }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H index 16a46162ce..7d38c1bb23 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,6 +105,7 @@ public: { return true; } + }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index ac6c129202..6483712ec8 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,10 +49,10 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq ) : XiEqModel(XiEqProperties, thermo, turbulence, Su), - XiEqCoef(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))), - XiEqExp(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))), - lCoef(readScalar(XiEqModelCoeffs_.lookup("lCoef"))), - SuMin(0.01*Su.average()), + XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))), + XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))), + lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))), + SuMin_(0.01*Su.average()), MaModel ( IOdictionary @@ -62,7 +62,7 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq "combustionProperties", Su.mesh().time().constant(), Su.mesh(), - IOobject::MUST_READ_IF_MODIFIED + IOobject::MUST_READ ) ), thermo @@ -84,10 +84,15 @@ Foam::tmp Foam::XiEqModels::SCOPEXiEq::XiEq() const const volScalarField& epsilon = turbulence_.epsilon(); volScalarField up(sqrt((2.0/3.0)*k)); - volScalarField l((lCoef*sqrt(3.0/2.0))*up*k/epsilon); + if (subGridSchelkin()) + { + up.internalField() += calculateSchelkinEffect(); + } + + volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon); volScalarField Rl(up*l*thermo_.rhou()/thermo_.muu()); - volScalarField upBySu(up/(Su_ + SuMin)); + volScalarField upBySu(up/(Su_ + SuMin_)); volScalarField K(0.157*upBySu/sqrt(Rl)); volScalarField Ma(MaModel.Ma()); @@ -114,7 +119,7 @@ Foam::tmp Foam::XiEqModels::SCOPEXiEq::XiEq() const if (Ma[celli] > 0.01) { xieq[celli] = - XiEqCoef*pow(K[celli]*Ma[celli], -XiEqExp)*upBySu[celli]; + XiEqCoef_*pow(K[celli]*Ma[celli], -XiEqExp_)*upBySu[celli]; } } @@ -130,7 +135,8 @@ Foam::tmp Foam::XiEqModels::SCOPEXiEq::XiEq() const if (Ma[facei] > 0.01) { xieqp[facei] = - XiEqCoef*pow(Kp[facei]*Map[facei], -XiEqExp)*upBySup[facei]; + XiEqCoef_*pow(Kp[facei]*Map[facei], -XiEqExp_) + *upBySup[facei]; } } } @@ -143,9 +149,9 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties) { XiEqModel::read(XiEqProperties); - XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef; - XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp; - XiEqModelCoeffs_.lookup("lCoef") >> lCoef; + XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_; + XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_; + XiEqModelCoeffs_.lookup("lCoef") >> lCoef_; return true; } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 63415ad33c..eeafa1a150 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,10 +58,17 @@ class SCOPEXiEq { // Private data - scalar XiEqCoef; - scalar XiEqExp; - scalar lCoef; - dimensionedScalar SuMin; + // Model constant + scalar XiEqCoef_; + + // Model constant + scalar XiEqExp_; + + // Model constant + scalar lCoef_; + + //- Minimum Su + dimensionedScalar SuMin_; //- The SCOPE laminar flame speed model used to obtain the // Marstein number. Note: the laminar flame speed need not be @@ -107,6 +114,7 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties); + }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 1524643108..e90c0b48db 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,7 +53,36 @@ Foam::XiEqModel::XiEqModel ), thermo_(thermo), turbulence_(turbulence), - Su_(Su) + Su_(Su), + Nv_ + ( + IOobject + ( + "Nv", + Su.mesh().facesInstance(), + Su.mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + Su.mesh() + ), + nsv_ + ( + IOobject + ( + "nsv", + Su.mesh().facesInstance(), + Su.mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + Su.mesh() + ), + uPrimeCoef_(XiEqModelCoeffs_.lookupOrDefault("uPrimeCoef", 0.0)), + subGridSchelkin_ + ( + XiEqModelCoeffs_.lookupOrDefault("subGridSchelkin", false) + ) {} @@ -69,8 +98,105 @@ bool Foam::XiEqModel::read(const dictionary& XiEqProperties) { XiEqModelCoeffs_ = XiEqProperties.subDict(type() + "Coeffs"); + uPrimeCoef_ = XiEqModelCoeffs_.lookupOrDefault("uPrimeCoef", 0.0); + subGridSchelkin_ = + XiEqModelCoeffs_.lookupOrDefault("subGridSchelkin", false); + return true; } +void Foam::XiEqModel::writeFields() const +{ + Nv_.write(); + nsv_.write(); + if (Su_.mesh().foundObject("B")) + { + const volSymmTensorField& B = + Su_.mesh().lookupObject("B"); + B.write(); + } +} + +Foam::tmp +Foam::XiEqModel::calculateSchelkinEffect() const +{ + const fvMesh& mesh = Su_.mesh(); + + const volVectorField& U = mesh.lookupObject("U"); + + const volSymmTensorField& CT = mesh.lookupObject("CT"); + const volScalarField& Nv = mesh.lookupObject("Nv"); + const volSymmTensorField& nsv = + mesh.lookupObject("nsv"); + + tmp tN + ( + new volScalarField + ( + IOobject + ( + "tN", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar("zero", Nv.dimensions(), 0.0), + zeroGradientFvPatchVectorField::typeName + ) + ); + + volScalarField& N = tN(); + + N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0); + + tmp tns + ( + new volSymmTensorField + ( + IOobject + ( + "tns", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedSymmTensor + ( + "zero", + nsv.dimensions(), + pTraits::zero + ) + ) + ); + + volSymmTensorField& ns = tns(); + + ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0); + + const volVectorField Uhat + ( + U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4)) + ); + + const volScalarField nr(sqrt(max(N - (Uhat & ns & Uhat), scalar(1e-4)))); + + const scalarField cellWidth(pow(mesh.V(), 1.0/3.0)); + + const scalarField upLocal(uPrimeCoef_*sqrt((U & CT & U)*cellWidth)); + + const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0)); + + //Re use tN + N.internalField() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0); + + return tN; + +} + // ************************************************************************* // diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index 85a151c216..ac8c9eae11 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,12 +62,30 @@ protected: // Protected data + //- Dictionary dictionary XiEqModelCoeffs_; + //- Thermo const hhuCombustionThermo& thermo_; + + //- Turbulence const compressible::RASModel& turbulence_; + + //- Laminar burning velocity const volScalarField& Su_; + //- Volumetric obstacles number + volScalarField Nv_; + + // + volSymmTensorField nsv_; + + //- Schelkin effect Model constant + scalar uPrimeCoef_; + + //- Use sub-grid Schelkin effect + bool subGridSchelkin_; + private: @@ -144,8 +162,20 @@ public: return turbulence_.muEff(); } + //- Return state of the sub-grid Schelkin effect + bool subGridSchelkin() const + { + return subGridSchelkin_; + } + + //- Return the sub-grid Schelkin effect + tmp calculateSchelkinEffect() const; + //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties) = 0; + + //- Write fields + void writeFields() const; }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index cd25337a75..bd58072489 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H index 5dd954451a..64732baa75 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,6 +101,7 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties); + }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index caf44f2ec4..b74f4f3ae7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS ) : XiGModel(XiGProperties, thermo, turbulence, Su), - GEtaCoef(readScalar(XiGModelCoeffs_.lookup("GEtaCoef"))) + GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef"))) {} @@ -63,13 +63,12 @@ Foam::XiGModels::KTS::~KTS() Foam::tmp Foam::XiGModels::KTS::G() const { - // volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); + volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); const volScalarField& epsilon = turbulence_.epsilon(); - tmp tauEta = - sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))); + volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)))); - return GEtaCoef/tauEta; + return (GEtaCoef_/tauEta); } @@ -77,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties) { XiGModel::read(XiGProperties); - XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef; + XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_; return true; } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H index eb87a7dc8e..46f170140e 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ class KTS { // Private data - scalar GEtaCoef; + scalar GEtaCoef_; // Private Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index 40eeba53ac..5694c311f4 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C index 277dfb1d9e..7def10da2b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG ) : XiGModel(XiGProperties, thermo, turbulence, Su), - GIn(XiGModelCoeffs_.lookup("GIn")), - lambdaIn(XiGModelCoeffs_.lookup("lambdaIn")), + GIn_(XiGModelCoeffs_.lookup("GIn")), + lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")), XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su)) {} @@ -66,7 +66,7 @@ Foam::XiGModels::instabilityG::~instabilityG() Foam::tmp Foam::XiGModels::instabilityG::G() const { volScalarField turbXiG(XiGModel_->G()); - return GIn*GIn/(GIn + turbXiG) + turbXiG; + return (GIn_*GIn_/(GIn_ + turbXiG) + turbXiG); } @@ -78,7 +78,7 @@ Foam::tmp Foam::XiGModels::instabilityG::Db() const const volScalarField& mgb = db.lookupObject("mgb"); return XiGModel_->Db() - + rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn)/(mgb + 1.0/lambdaIn); + + rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn_)/(mgb + 1.0/lambdaIn_); } @@ -86,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties) { XiGModel::read(XiGProperties); - XiGModelCoeffs_.lookup("GIn") >> GIn; - XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn; + XiGModelCoeffs_.lookup("GIn") >> GIn_; + XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_; return true; } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H index 948d4a35ad..35f0f4a77f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,10 +58,10 @@ class instabilityG // Private data //- Flame instabilityG wrinling generation rate coefficient - dimensionedScalar GIn; + dimensionedScalar GIn_; //- InstabilityG length-scale - dimensionedScalar lambdaIn; + dimensionedScalar lambdaIn_; //- Xi generation rate model due to all other processes autoPtr XiGModel_; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index 8f7b0c0422..346a6c4968 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -237,6 +237,9 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiProperties) = 0; + + //- Write fields related to Xi model + virtual void writeFields() = 0; }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index fbf8baff49..c58339940e 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H index d08cb0a6be..6cfb29e7fc 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,6 +109,13 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiProperties); + + //- Write fields of the XiEq model + virtual void writeFields() + { + XiEqModel_().writeFields(); + } + }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C index bc2df338a6..4c271bba2e 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H index 5829768be8..d508a0eb3a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,6 +95,11 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiProperties); + + //- Write fields of the XiEq model + virtual void writeFields() + {} + }; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index f65984d631..8b5236978d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -124,6 +124,12 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiProperties); + + //- Write fields of the XiEq model + virtual void writeFields() + { + XiEqModel_().writeFields(); + } }; diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H index bdc21c1bab..348e4b8991 100644 --- a/applications/solvers/combustion/PDRFoam/bEqn.H +++ b/applications/solvers/combustion/PDRFoam/bEqn.H @@ -30,7 +30,7 @@ if (ign.ignited()) // Calculate flame normal etc. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // volVectorField n(fvc::grad(b)); + //volVectorField n(fvc::grad(b)); volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf())); volScalarField mgb("mgb", mag(n)); diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 233383ab1c..15a0ecafea 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -30,7 +30,6 @@ //const volScalarField& T = thermo->T(); - Info<< "\nReading field U\n" << endl; volVectorField U ( @@ -94,8 +93,35 @@ IOobject ( "betav", - runTime.findInstance(polyMesh::meshSubDir, "betav"), - polyMesh::meshSubDir, + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh + ); + + Info<< "Reading field Lobs\n" << endl; + volScalarField Lobs + ( + IOobject + ( + "Lobs", + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh + ); + + Info<< "Reading field CT\n" << endl; + volSymmTensorField CT + ( + IOobject + ( + "CT", + mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index 7ce9a6da3f..ed860d9ca9 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,6 +23,7 @@ License \*---------------------------------------------------------------------------*/ +#include "IFstream.H" #include "SCOPELaminarFlameSpeed.H" #include "addToRunTimeSelectionTable.H" @@ -68,7 +69,19 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE : laminarFlameSpeed(dict, ct), - coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)), + coeffsDict_ + ( + dictionary + ( + IFstream + ( + fileName + ( + dict.lookup("fuelFile") + ) + )() + ).subDict(typeName + "Coeffs") + ), LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))), UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))), SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")), diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H index 7f4a6c0d14..83689c5ec7 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,7 +134,7 @@ class SCOPE polynomial MaPolyU_; - // Private Member Functions + // Private member functions //- Polynomial evaluated from the given equivalence ratio // and polynomial coefficients diff --git a/applications/solvers/combustion/chemFoam/chemFoam.C b/applications/solvers/combustion/chemFoam/chemFoam.C index 9a19930ee5..15f4a33747 100644 --- a/applications/solvers/combustion/chemFoam/chemFoam.C +++ b/applications/solvers/combustion/chemFoam/chemFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,6 +47,8 @@ Description int main(int argc, char *argv[]) { + argList::noParallel(); + #include "setRootCase.H" #include "createTime.H" #include "createSingleCellMesh.H" diff --git a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H index e9f0272772..71ee8d60f6 100644 --- a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H +++ b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H @@ -23,7 +23,7 @@ fvMesh mesh fvMesh::defaultRegion, runTime.timeName(), runTime, - IOobject::NO_READ + IOobject::MUST_READ ), xferMove >(points), faces.xfer(), diff --git a/applications/solvers/combustion/dieselEngineFoam/Make/options b/applications/solvers/combustion/dieselEngineFoam/Make/options index 9a45247819..c4d65fa137 100644 --- a/applications/solvers/combustion/dieselEngineFoam/Make/options +++ b/applications/solvers/combustion/dieselEngineFoam/Make/options @@ -4,8 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ @@ -27,12 +27,12 @@ EXE_LIBS = \ -llagrangian \ -lmeshTools \ -ldieselSpray \ - -lliquids \ - -lliquidMixture \ + -lliquidProperties \ + -lliquidMixtureProperties \ -lthermophysicalFunctions \ -lspecie \ -lbasicThermophysicalModels \ -llaminarFlameSpeedModels \ -lchemistryModel \ -lODE \ - -lpdf + -ldistributionModels diff --git a/applications/solvers/combustion/dieselFoam/Make/options b/applications/solvers/combustion/dieselFoam/Make/options index 3b1786aa08..124371575d 100644 --- a/applications/solvers/combustion/dieselFoam/Make/options +++ b/applications/solvers/combustion/dieselFoam/Make/options @@ -5,8 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ @@ -24,13 +24,13 @@ EXE_LIBS = \ -llagrangian \ -lmeshTools \ -ldieselSpray \ - -lliquids \ - -lliquidMixture \ + -lliquidProperties \ + -lliquidMixtureProperties \ -lthermophysicalFunctions \ -lspecie \ -lbasicThermophysicalModels \ -llaminarFlameSpeedModels \ -lchemistryModel \ -lODE \ - -lpdf \ + -ldistributionModels \ -lfiniteVolume diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index cba08b2629..045e37a344 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude EXE_LIBS = \ @@ -17,4 +17,4 @@ EXE_LIBS = \ -lcompressibleTurbulenceModel \ -lcompressibleLESModels \ -lcompressibleRASModels \ - -lradiation + -lradiationModels diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H index f11c979224..ee03ece751 100644 --- a/applications/solvers/combustion/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -24,12 +24,17 @@ fvc::interpolate(thermo.psi())*phiv ); + fvScalarMatrix pDDtEqn + ( + fvc::ddt(rho) + fvc::div(phi) + + correction(fvm::ddt(psi, p) + fvm::div(phid, p)) + ); + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn ( - fvc::ddt(rho) + fvc::div(phi) - + correction(fvm::ddt(psi, p) + fvm::div(phid, p)) + pDDtEqn - fvm::laplacian(rho*rAU, p) ); @@ -63,12 +68,17 @@ + fvc::ddtPhiCorr(rAU, rho, U, phi) ); + fvScalarMatrix pDDtEqn + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + + fvc::div(phi) + ); + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn ( - fvc::ddt(rho) + psi*correction(fvm::ddt(p)) - + fvc::div(phi) + pDDtEqn - fvm::laplacian(rho*rAU, p) ); diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index 768876c316..c6d1ad5e3c 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -19,12 +19,17 @@ surfaceScalarField buoyancyPhi(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); phi += buoyancyPhi; + fvScalarMatrix p_rghDDtEqn + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + + fvc::div(phi) + ); + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix p_rghEqn ( - fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) - + fvc::div(phi) + p_rghDDtEqn - fvm::laplacian(rhorAUf, p_rgh) ); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/files b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/files deleted file mode 100644 index 25c10cc98f..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantSimpleFoam.C - -EXE = $(FOAM_APPBIN)/buoyantSimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/options deleted file mode 100644 index ec604cf28c..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lmeshTools \ - -lbasicThermophysicalModels \ - -lspecie \ - -lcompressibleRASModels \ - -lfiniteVolume diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/UEqn.H deleted file mode 100644 index e51dfcdfcb..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/UEqn.H +++ /dev/null @@ -1,24 +0,0 @@ - // Solve the Momentum equation - - tmp UEqn - ( - fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - ); - - UEqn().relax(); - - solve - ( - UEqn() - == - rho*g - - fvc::grad(p) - /* - fvc::reconstruct - ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - */ - ); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/buoyantSimpleFoam.C deleted file mode 100644 index b78c36ed86..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/buoyantSimpleFoam.C +++ /dev/null @@ -1,83 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - buoyantSimpleFoam - -Description - Steady-state solver for buoyant, turbulent flow of compressible fluids - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicPsiThermo.H" -#include "RASModel.H" -#include "fixedGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readGravitationalAcceleration.H" - #include "createFields.H" - #include "initContinuityErrs.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "readSIMPLEControls.H" - - p.storePrevIter(); - rho.storePrevIter(); - - // Pressure-velocity SIMPLE corrector - { - #include "UEqn.H" - #include "hEqn.H" - #include "pEqn.H" - } - - turbulence->correct(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/createFields.H deleted file mode 100644 index b304ace104..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/createFields.H +++ /dev/null @@ -1,69 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr pThermo - ( - basicPsiThermo::New(mesh) - ); - basicPsiThermo& thermo = pThermo(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermo.rho() - ); - - volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); - const volScalarField& psi = thermo.psi(); - - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::RASModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - thermo.correct(); - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - mesh.solutionDict().subDict("SIMPLE"), - pRefCell, - pRefValue - ); - - - dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/hEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/hEqn.H deleted file mode 100644 index b91a17ee7c..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/hEqn.H +++ /dev/null @@ -1,17 +0,0 @@ -{ - fvScalarMatrix hEqn - ( - fvm::div(phi, h) - - fvm::Sp(fvc::div(phi), h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p)) - - p*fvc::div(phi/fvc::interpolate(rho)) - ); - - hEqn.relax(); - - hEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H deleted file mode 100644 index a90dd23ebc..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H +++ /dev/null @@ -1,59 +0,0 @@ -{ - rho = thermo.rho(); - - volScalarField rAU(1.0/UEqn().A()); - surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); - - U = rAU*UEqn().H(); - UEqn.clear(); - - phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); - bool closedVolume = adjustPhi(phi, U, p); - - surfaceScalarField buoyancyPhi - ( - rhorAUf*fvc::interpolate(rho)*(g & mesh.Sf()) - ); - phi += buoyancyPhi; - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(rhorAUf, p) == fvc::div(phi) - ); - - pEqn.setReference(pRefCell, pRefValue); - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - // For closed-volume cases adjust the pressure and density levels - // to obey overall mass continuity - if (closedVolume) - { - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); - } - - // Calculate the conservative fluxes - phi -= pEqn.flux(); - - // Explicitly relax pressure for momentum corrector - p.relax(); - - // Correct the momentum source with the pressure gradient flux - // calculated from the relaxed pressure - U += rAU*(rho*g - fvc::grad(p)); - //U += rAU*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorAUf); - U.correctBoundaryConditions(); - } - } - - #include "continuityErrs.H" - - rho = thermo.rho(); - rho.relax(); - Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() - << endl; -} diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options index 7058e8a503..96c99816d0 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I../buoyantSimpleFoam \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS \ @@ -11,7 +11,7 @@ EXE_INC = \ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ - -lradiation \ + -lradiationModels \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean index c583a8de0a..a4096c3fbe 100755 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean @@ -2,6 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x +wclean libso coupledDerivedFvPatchFields wclean wclean chtMultiRegionSimpleFoam diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake index f65ba1181b..be40e0c4f4 100755 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake @@ -2,6 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x +wmake libso coupledDerivedFvPatchFields wmake wmake chtMultiRegionSimpleFoam diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files index c62898c31f..9ae6090832 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files @@ -1,5 +1,3 @@ -derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C - fluid/compressibleCourantNo.C solid/solidRegionDiffNo.C diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 636fc5d8bb..84d0633333 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -7,7 +7,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude EXE_LIBS = \ -lbasicThermophysicalModels \ @@ -17,4 +18,6 @@ EXE_LIBS = \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lmeshTools \ - -lfiniteVolume + -lfiniteVolume \ + -lradiationModels \ + -lcoupledDerivedFvPatchFields diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index eab496d11b..e126b4656d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,6 +38,7 @@ Description #include "compressibleCourantNo.H" #include "solidRegionDiffNo.H" #include "basicSolidThermo.H" +#include "radiationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options index 599e1e7502..0459735470 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options @@ -1,7 +1,5 @@ EXE_INC = \ - /* -DFULLDEBUG -O0 -g */ \ -I.. \ - -I../derivedFvPatchFields \ -Ifluid \ -Isolid \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -9,6 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude @@ -20,4 +19,6 @@ EXE_LIBS = \ -lspecie \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ - -lcompressibleLESModels + -lcompressibleLESModels \ + -lradiationModels \ + -lcoupledDerivedFvPatchFields diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 4f0d5fc25b..1cb756541a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,6 +35,7 @@ Description #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" #include "basicSolidThermo.H" +#include "radiationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index 75191acff9..3d8531e1bb 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -9,6 +9,7 @@ PtrList p_rghFluid(fluidRegions.size()); PtrList ghFluid(fluidRegions.size()); PtrList ghfFluid(fluidRegions.size()); + PtrList radiation(fluidRegions.size()); List initialMassFluid(fluidRegions.size()); List