diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index a0873ab4c91dc7ea1d8c74910bed47fa76e823ee..b1bcf33d8269ccb64c75fa9d98821187bd00fc4a 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -36,7 +36,6 @@ Description (nonuniformTransform)cyclic \<zoneA\>_\<zoneB\> - extrudes into master direction (i.e. away from the owner cell if flipMap is false) - - not parallel \verbatim diff --git a/applications/utilities/postProcessing/sampling/sample/sampleDict b/applications/utilities/postProcessing/sampling/sample/sampleDict index b55b190bf71ce090805ab9f9a7dd3ff47a493573..7a9b6f7f0a2bedd8171ec9d1ab172295a5672e5f 100644 --- a/applications/utilities/postProcessing/sampling/sample/sampleDict +++ b/applications/utilities/postProcessing/sampling/sample/sampleDict @@ -47,12 +47,14 @@ formatOptions } // interpolationScheme. choice of -// cell : use cell-centre value only; constant over cells (default) +// cell : use cell-centre value only; constant over cells +// (default) // cellPoint : use cell-centre and vertex values // cellPointFace : use cell-centre, vertex and face values. // pointMVC : use point values only (Mean Value Coordinates) -// cellPatchConstrained : use cell-centre except on boundary faces where -// it uses the boundary value. For use with e.g. patchCloudSet. +// cellPatchConstrained : like 'cell' but uses cell-centre except on +// boundary faces where it uses the boundary value. +// For use with e.g. patchCloudSet. // 1] vertex values determined from neighbouring cell-centre values // 2] face values determined using the current face interpolation scheme // for the field (linear, gamma, etc.) diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index 3856d52adaf6d926ec226d25b220b7925099303a..5b2e78ca967f882ce3b91aabc93e95e07008cdbe 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -486,7 +486,7 @@ int main(int argc, char *argv[]) ( "dict", "word", - "name of dictionary to provide feature extraction information" + "specify alternative dictionary for the feature extraction information" ); # include "setRootCase.H" diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C index 54db26a30c771437085af83c9e4b5bcc5d979e21..2879e28f10806db850a4fe997fffed6c45ca82a8 100644 --- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C +++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,22 @@ Foam::UniformDimensionedField<Type>::UniformDimensionedField : regIOobject(io), dimensioned<Type>(dt) -{} +{ + // Read value + if + ( + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) + || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) + ) + { + dictionary dict(readStream(typeName)); + this->dimensions().reset(dict.lookup("dimensions")); + dict.lookup("value") >> this->value(); + } +} template<class Type> diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H index 62461df2809b0c26de1642d4aa7139e22030ebaf..bab30a55ffa0b6392b80868564525647843b8087 100644 --- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H +++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ public: // Constructors - //- Construct from components + //- Construct from components. Either reads or uses supplied value. UniformDimensionedField(const IOobject&, const dimensioned<Type>&); //- Construct as copy diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C index 560010c31a080aba9388f6cf7f9c185184983267..b577a171779f4f1643ea5116ed9c70d7f2cdd553 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1745,6 +1745,7 @@ void Foam::hexRef8::setInstance(const fileName& inst) cellLevel_.instance() = inst; pointLevel_.instance() = inst; + level0Edge_.instance() = inst; history_.instance() = inst; } @@ -1752,7 +1753,7 @@ void Foam::hexRef8::setInstance(const fileName& inst) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from mesh, read refinement data -Foam::hexRef8::hexRef8(const polyMesh& mesh) +Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory) : mesh_(mesh), cellLevel_ @@ -1781,7 +1782,19 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh) ), labelList(mesh_.nPoints(), 0) ), - level0Edge_(getLevel0EdgeLength()), + level0Edge_ + ( + IOobject + ( + "level0Edge", + mesh_.facesInstance(), + polyMesh::meshSubDir, + mesh_, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + dimensionedScalar("level0Edge", dimLength, getLevel0EdgeLength()) + ), history_ ( IOobject @@ -1790,15 +1803,24 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh) mesh_.facesInstance(), polyMesh::meshSubDir, mesh_, - IOobject::READ_IF_PRESENT, + IOobject::NO_READ, IOobject::AUTO_WRITE ), - mesh_.nCells() // All cells visible if could not be read + (readHistory ? mesh_.nCells() : 0) // All cells visible if not be read ), faceRemover_(mesh_, GREAT), // merge boundary faces wherever possible savedPointLevel_(0), savedCellLevel_(0) { + if (readHistory) + { + history_.readOpt() = IOobject::READ_IF_PRESENT; + if (history_.headerOk()) + { + history_.read(); + } + } + if (history_.active() && history_.visibleCells().size() != mesh_.nCells()) { FatalErrorIn @@ -1849,7 +1871,8 @@ Foam::hexRef8::hexRef8 const polyMesh& mesh, const labelList& cellLevel, const labelList& pointLevel, - const refinementHistory& history + const refinementHistory& history, + const scalar level0Edge ) : mesh_(mesh), @@ -1879,7 +1902,24 @@ Foam::hexRef8::hexRef8 ), pointLevel ), - level0Edge_(getLevel0EdgeLength()), + level0Edge_ + ( + IOobject + ( + "level0Edge", + mesh_.facesInstance(), + polyMesh::meshSubDir, + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + dimensionedScalar + ( + "level0Edge", + dimLength, + (level0Edge >= 0 ? level0Edge : getLevel0EdgeLength()) + ) + ), history_ ( IOobject @@ -1945,7 +1985,8 @@ Foam::hexRef8::hexRef8 ( const polyMesh& mesh, const labelList& cellLevel, - const labelList& pointLevel + const labelList& pointLevel, + const scalar level0Edge ) : mesh_(mesh), @@ -1975,7 +2016,24 @@ Foam::hexRef8::hexRef8 ), pointLevel ), - level0Edge_(getLevel0EdgeLength()), + level0Edge_ + ( + IOobject + ( + "level0Edge", + mesh_.facesInstance(), + polyMesh::meshSubDir, + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + dimensionedScalar + ( + "level0Edge", + dimLength, + (level0Edge >= 0 ? level0Edge : getLevel0EdgeLength()) + ) + ), history_ ( IOobject @@ -2621,7 +2679,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 << "Value should be >= 1" << exit(FatalError); } - const scalar level0Size = 2*maxFaceDiff*level0Edge_; + const scalar level0Size = 2*maxFaceDiff*level0EdgeLength(); // Bit tricky. Say we want a distance of three cells between two @@ -5514,7 +5572,10 @@ void Foam::hexRef8::setUnrefinement // Write refinement to polyMesh directory. bool Foam::hexRef8::write() const { - bool writeOk = cellLevel_.write() && pointLevel_.write(); + bool writeOk = + cellLevel_.write() + && pointLevel_.write() + && level0Edge_.write(); if (history_.active()) { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H index 36980f73207570ed6b23933ee277a54b1e5a36b1..503412dd38cd7812e8bfda8faccb570ff0f32fe1 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,7 @@ SourceFiles #include "removeFaces.H" #include "refinementHistory.H" #include "PackedBoolList.H" +#include "uniformDimensionedFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -74,7 +75,7 @@ class hexRef8 labelIOList pointLevel_; //- Typical edge length between unrefined points - const scalar level0Edge_; + uniformDimensionedScalarField level0Edge_; //- Refinement history refinementHistory history_; @@ -319,24 +320,29 @@ public: // Constructors //- Construct from mesh, read_if_present refinement data - // (from write below) - hexRef8(const polyMesh& mesh); + // (from write below). If readHistory is true does read_if_present + // of refinement history. If false clears all history + hexRef8(const polyMesh& mesh, const bool readHistory = true); - //- Construct from mesh and un/refinement data. + //- Construct from mesh and un/refinement data and optional size of + // starting cells hexRef8 ( const polyMesh& mesh, const labelList& cellLevel, const labelList& pointLevel, - const refinementHistory& history + const refinementHistory& history, + const scalar level0Edge = -GREAT ); - //- Construct from mesh and refinement data. + //- Construct from mesh and refinement data and optional size of + // starting cells hexRef8 ( const polyMesh& mesh, const labelList& cellLevel, - const labelList& pointLevel + const labelList& pointLevel, + const scalar level0Edge = -GREAT ); @@ -367,7 +373,7 @@ public: //- Typical edge length between unrefined points scalar level0EdgeLength() const { - return level0Edge_; + return level0Edge_.value(); } // Refinement diff --git a/src/fileFormats/vtk/vtkUnstructuredReader.C b/src/fileFormats/vtk/vtkUnstructuredReader.C index 3d80e1ccec6ac05ce02e083b9a386b2f41dc0c94..049f68f89bad0cbfa00c9e1ce727884904d52007 100644 --- a/src/fileFormats/vtk/vtkUnstructuredReader.C +++ b/src/fileFormats/vtk/vtkUnstructuredReader.C @@ -704,6 +704,7 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile) labelList faceVerts; readBlock(inFile, nNumbers, faceVerts); faces_.setSize(nFaces); + faceMap_.setSize(nFaces); label elemI = 0; forAll(faces_, faceI) { diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 5503e6d2a8f9ff1e06630f98a1a0bcb8925eb2a1..c2565fc67061a2013377919f5e98af7e742860cc 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -877,49 +877,7 @@ Foam::meshRefinement::meshRefinement meshCutter_ ( mesh, - labelIOList - ( - IOobject - ( - "cellLevel", - mesh_.facesInstance(), - fvMesh::meshSubDir, - mesh, - IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE, - false - ), - labelList(mesh_.nCells(), 0) - ), - labelIOList - ( - IOobject - ( - "pointLevel", - mesh_.facesInstance(), - fvMesh::meshSubDir, - mesh, - IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE, - false - ), - labelList(mesh_.nPoints(), 0) - ), - refinementHistory - ( - IOobject - ( - "refinementHistory", - mesh_.facesInstance(), - fvMesh::meshSubDir, - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - List<refinementHistory::splitCell8>(0), - labelList(0) - ) // no unrefinement + false // do not try to read history. ), surfaceIndex_ ( diff --git a/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index 49d23cc84af87bb7d0e15b3c6bda5aa5065cc606..d1a924ad11e0aea8585b03ad672f793fb4808b0c 100644 --- a/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -284,24 +284,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const Foam::tmp<Foam::volScalarField> Foam::radiation::greyMeanAbsorptionEmission::eCont(const label bandI) const { - tmp<volScalarField> e - ( - new volScalarField - ( - IOobject - ( - "eCont" + name(bandI), - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh(), - dimensionedScalar("e", dimless/dimLength, 0.0) - ) - ); - - return e; + return aCont(bandI); } diff --git a/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index c2640f402aa7ff36ea5d0dc169ce2d554a64f596..dcaf7f01f60953fc0cae13736c5ef8cd88870cc3 100644 --- a/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -231,24 +231,7 @@ Foam::radiation::wideBandAbsorptionEmission::aCont(const label bandI) const Foam::tmp<Foam::volScalarField> Foam::radiation::wideBandAbsorptionEmission::eCont(const label bandI) const { - tmp<volScalarField> e - ( - new volScalarField - ( - IOobject - ( - "e", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh(), - dimensionedScalar("e", dimless/dimLength, 0.0) - ) - ); - - return e; + return aCont(bandI); } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/radiationProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/radiationProperties index 3282b1b075d14120d48ea67434a2888d8f93da05..ca98125036afe50f9646de87cbc321e80a75deea 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/radiationProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/radiationProperties @@ -137,6 +137,61 @@ greyMeanAbsorptionEmissionCoeffs ); } + O2 + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 0.1 + 0 + 0 + 0 + 0 + 0 + ); + } + + + N2 + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 0.1 + 0 + 0 + 0 + 0 + 0 + ); + } + } scatterModel constantScatter; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties index 54fb40ca34c29f6820dbafd3486b8904ccaa1e35..f9ff27414ec2bf0bffa56fa2275fca570cb3cf99 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties @@ -43,7 +43,7 @@ absorptionEmissionModel greyMeanAbsorptionEmission; constantAbsorptionEmissionCoeffs { a a [ 0 -1 0 0 0 0 0 ] 0.01; - e e [ 0 -1 0 0 0 0 0 ] 0; + e e [ 0 -1 0 0 0 0 0 ] 0.01; E E [ 1 -1 -3 0 0 0 0 ] 0; } @@ -134,6 +134,61 @@ greyMeanAbsorptionEmissionCoeffs 0 ); } + + O2 + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 0.1 + 0 + 0 + 0 + 0 + 0 + ); + } + + + N2 + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 0.1 + 0 + 0 + 0 + 0 + 0 + ); + } } scatterModel constantScatter; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/radiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/radiationProperties index 05fda138af0cde9ce9f691bd7f116bbaab17a47d..60bbcc81c487724625338e2707e0d61fa4e7c816 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/radiationProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/radiationProperties @@ -135,6 +135,61 @@ greyMeanAbsorptionEmissionCoeffs 0 ); } + + O2 + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 0.1 + 0 + 0 + 0 + 0 + 0 + ); + } + + + N2 + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 0.1 + 0 + 0 + 0 + 0 + 0 + ); + } } scatterModel constantScatter;