Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
laurence
2012-03-30 08:54:05 +01:00
14 changed files with 282 additions and 109 deletions

View File

@ -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

View File

@ -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.)

View File

@ -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"

View File

@ -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>

View File

@ -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

View File

@ -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())
{

View File

@ -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

View File

@ -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)
{

View File

@ -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_
(

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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;