Merge branch 'local30NextRelease' into nextRelease

This commit is contained in:
Hrvoje Jasak 2014-06-11 16:07:02 +01:00
commit e9d87c46e5
21 changed files with 78 additions and 151 deletions

View file

@ -61,9 +61,9 @@ int main(int argc, char *argv[])
// Calculate coupling matrices only once since the mesh doesn't change and
// implicit div and grad operators are only dependant on Sf. Actually
// coupling terms (div(U) and grad(p)) in blockMatrix do not change, so they
// could be inserted only once, resetting other parts of blockMatrix to zero
// at the end of each time step. VV, 30/April/2014
// coupling terms (div(U) and grad(p)) in blockMatrix do not change,
// so they could be inserted only once, resetting other parts of
// blockMatrix to zero at the end of each time step. VV, 30/April/2014
# include "calculateCouplingMatrices.H"
Info<< "\nStarting time loop\n" << endl;

View file

@ -471,7 +471,7 @@ int main(int argc, char *argv[])
{-1, -1, -1, -1, -1, -1}, // 1
{-1, -1, -1, -1, -1, -1}, // 2
{-1, -1, -1, -1, -1, -1}, // 3
{ 3, 2, 0, -1, 1, -1}, // tet (version 2.0)
{-1, 2, 0, 3, 1, -1}, // tet (version 2.0)
{ 0, 4, 3, -1, 2, 1}, // prism
{ 4, 2, 1, 3, 0, 5}, // hex
};

View file

@ -44,6 +44,7 @@ Description
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
@ -80,7 +81,7 @@ int main(int argc, char *argv[])
word blockName;
label nx, ny, nz;
forAll(blocks, blockI)
forAll (blocks, blockI)
{
cfxFile >> blockName;
cfxFile >> nx >> ny >> nz;
@ -100,7 +101,7 @@ int main(int argc, char *argv[])
{
label no, blkNo, patchLabel;
forAll(cfxPatchTypes, patchI)
forAll (cfxPatchTypes, patchI)
{
// Grab patch type and name
cfxFile >> cfxPatchTypes[patchI] >> cfxPatchNames[patchI] >> no;
@ -109,7 +110,7 @@ int main(int argc, char *argv[])
patchRanges[patchI].setSize(6);
labelList& curRange = patchRanges[patchI];
forAll(curRange, rI)
forAll (curRange, rI)
{
cfxFile >> curRange[rI];
}
@ -146,7 +147,7 @@ int main(int argc, char *argv[])
Info<< "Reading block points" << endl;
forAll(blocks, blockI)
forAll (blocks, blockI)
{
Info<< "block " << blockI << " is a ";
blocks[blockI].readPoints(cfxFile);
@ -175,7 +176,7 @@ int main(int argc, char *argv[])
faceListList rawPatches(npatch);
forAll(rawPatches, patchI)
forAll (rawPatches, patchI)
{
const word& patchType = cfxPatchTypes[patchI];
@ -213,7 +214,7 @@ int main(int argc, char *argv[])
// For efficiency, create merge pairs in the first pass
labelListListList glueMergePairs(glueMasterPatches.size());
forAll(glueMasterPatches, glueI)
forAll (glueMasterPatches, glueI)
{
const label masterPatch = glueMasterPatches[glueI];
const label slavePatch = glueSlavePatches[glueI];
@ -246,14 +247,14 @@ int main(int argc, char *argv[])
scalar sqrMergeTol = GREAT;
forAll(blockPFaces, blockPFaceLabel)
forAll (blockPFaces, blockPFaceLabel)
{
const labelList& blockPFacePoints =
blockPFaces[blockPFaceLabel];
forAll(blockPFacePoints, blockPFacePointI)
forAll (blockPFacePoints, blockPFacePointI)
{
forAll(blockPFacePoints, blockPFacePointI2)
forAll (blockPFacePoints, blockPFacePointI2)
{
if (blockPFacePointI != blockPFacePointI2)
{
@ -280,7 +281,7 @@ int main(int argc, char *argv[])
// N-squared point search over all points of all faces of
// master block over all point of all faces of slave block
forAll(blockPFaces, blockPFaceLabel)
forAll (blockPFaces, blockPFaceLabel)
{
const labelList& blockPFacePoints =
blockPFaces[blockPFaceLabel];
@ -288,16 +289,16 @@ int main(int argc, char *argv[])
labelList& cp = curPairs[blockPFaceLabel];
cp.setSize(blockPFacePoints.size());
forAll(blockPFacePoints, blockPFacePointI)
forAll (blockPFacePoints, blockPFacePointI)
{
found = false;
forAll(blockNFaces, blockNFaceLabel)
forAll (blockNFaces, blockNFaceLabel)
{
const labelList& blockNFacePoints =
blockNFaces[blockNFaceLabel];
forAll(blockNFacePoints, blockNFacePointI)
forAll (blockNFacePoints, blockNFacePointI)
{
if
(
@ -359,7 +360,7 @@ int main(int argc, char *argv[])
changedPointMerge = false;
nPasses++;
forAll(glueMasterPatches, glueI)
forAll (glueMasterPatches, glueI)
{
const label masterPatch = glueMasterPatches[glueI];
const label slavePatch = glueSlavePatches[glueI];
@ -371,14 +372,14 @@ int main(int argc, char *argv[])
const labelListList& curPairs = glueMergePairs[glueI];
forAll(blockPFaces, blockPFaceLabel)
forAll (blockPFaces, blockPFaceLabel)
{
const labelList& blockPFacePoints =
blockPFaces[blockPFaceLabel];
const labelList& cp = curPairs[blockPFaceLabel];
forAll(cp, blockPFacePointI)
forAll (cp, blockPFacePointI)
{
label PpointLabel =
blockPFacePoints[blockPFacePointI]
@ -420,7 +421,7 @@ int main(int argc, char *argv[])
}
forAll(glueMasterPatches, glueI)
forAll (glueMasterPatches, glueI)
{
const label masterPatch = glueMasterPatches[glueI];
const label slavePatch = glueSlavePatches[glueI];
@ -432,12 +433,12 @@ int main(int argc, char *argv[])
const faceList& blockNFaces = rawPatches[slavePatch];
forAll(blockPFaces, blockPFaceLabel)
forAll (blockPFaces, blockPFaceLabel)
{
const labelList& blockPFacePoints
= blockPFaces[blockPFaceLabel];
forAll(blockPFacePoints, blockPFacePointI)
forAll (blockPFacePoints, blockPFacePointI)
{
label PpointLabel =
blockPFacePoints[blockPFacePointI]
@ -454,12 +455,12 @@ int main(int argc, char *argv[])
}
}
forAll(blockNFaces, blockNFaceLabel)
forAll (blockNFaces, blockNFaceLabel)
{
const labelList& blockNFacePoints
= blockNFaces[blockNFaceLabel];
forAll(blockNFacePoints, blockNFacePointI)
forAll (blockNFacePoints, blockNFacePointI)
{
label NpointLabel =
blockNFacePoints[blockNFacePointI]
@ -482,7 +483,7 @@ int main(int argc, char *argv[])
// given old point label
label nNewPoints = 0;
forAll(pointMergeList, pointLabel)
forAll (pointMergeList, pointLabel)
{
if (pointMergeList[pointLabel] > pointLabel)
{
@ -512,11 +513,11 @@ int main(int argc, char *argv[])
pointField points(nMeshPoints);
forAll(blocks, blockI)
forAll (blocks, blockI)
{
const pointField& blockPoints = blocks[blockI].points();
forAll(blockPoints, blockPointLabel)
forAll (blockPoints, blockPointLabel)
{
points
[
@ -543,15 +544,15 @@ int main(int argc, char *argv[])
label nCreatedCells = 0;
forAll(blocks, blockI)
forAll (blocks, blockI)
{
labelListList curBlockCells = blocks[blockI].blockCells();
forAll(curBlockCells, blockCellI)
forAll (curBlockCells, blockCellI)
{
labelList cellPoints(curBlockCells[blockCellI].size());
forAll(cellPoints, pointI)
forAll (cellPoints, pointI)
{
cellPoints[pointI] =
pointMergeList
@ -577,7 +578,7 @@ int main(int argc, char *argv[])
label nCreatedPatches = 0;
forAll(rawPatches, patchI)
forAll (rawPatches, patchI)
{
if (rawPatches[patchI].size() && cfxPatchTypes[patchI] != "BLKBDY")
{
@ -608,14 +609,14 @@ int main(int argc, char *argv[])
label oldSize = renumberedPatch.size();
renumberedPatch.setSize(oldSize + curRawPatch.size());
forAll(curRawPatch, faceI)
forAll (curRawPatch, faceI)
{
const face& oldFace = curRawPatch[faceI];
face& newFace = renumberedPatch[oldSize + faceI];
newFace.setSize(oldFace.size());
forAll(oldFace, pointI)
forAll (oldFace, pointI)
{
newFace[pointI] =
pointMergeList
@ -632,14 +633,14 @@ int main(int argc, char *argv[])
faceList& renumberedPatch = boundary[nCreatedPatches];
renumberedPatch.setSize(curRawPatch.size());
forAll(curRawPatch, faceI)
forAll (curRawPatch, faceI)
{
const face& oldFace = curRawPatch[faceI];
face& newFace = renumberedPatch[faceI];
newFace.setSize(oldFace.size());
forAll(oldFace, pointI)
forAll (oldFace, pointI)
{
newFace[pointI] =
pointMergeList
@ -716,7 +717,7 @@ int main(int argc, char *argv[])
);
// Add information to dictionary
forAll(patchNames, patchI)
forAll (patchNames, patchI)
{
if (!patchDicts.set(patchI))
{

View file

@ -198,6 +198,7 @@ protected:
bool translate
) const;
public:
//- Runtime type information
@ -308,6 +309,7 @@ public:
//- Select constructed from Istream
static autoPtr<coordinateSystem> New(Istream& is);
// Destructor
virtual ~coordinateSystem();
@ -414,6 +416,7 @@ public:
return origin_;
}
// Write
//- Write
@ -422,6 +425,7 @@ public:
//- Write dictionary
virtual void writeDict(Ostream&, bool subDict = true) const;
// Transformations
//- Convert from position in local coordinate system to
@ -487,7 +491,7 @@ public:
void operator=(const dictionary&);
// friend Operators
// Friend Operators
friend bool operator!=
(

View file

@ -153,7 +153,7 @@ public:
//- Are angles in degrees?
bool inDegrees() const;
bool inDegrees() const;
//- Non-const access to inDegrees
bool& inDegrees();

View file

@ -168,7 +168,7 @@ public:
//- Are angles in degrees?
bool inDegrees() const;
bool inDegrees() const;
//- Non-const access to inDegrees
bool& inDegrees();

View file

@ -131,7 +131,7 @@ public:
//- Are angles in degrees?
bool inDegrees() const;
bool inDegrees() const;
//- Non-const access to inDegrees
bool& inDegrees();

View file

@ -151,7 +151,7 @@ public:
//- Are angles in degrees?
bool inDegrees() const;
bool inDegrees() const;
//- Non-const access to inDegrees
bool& inDegrees();

View file

@ -130,7 +130,7 @@ public:
//- Are angles in degrees?
bool inDegrees() const;
bool inDegrees() const;
//- Non-const access to inDegrees
bool& inDegrees();

View file

@ -293,8 +293,8 @@ void Foam::coarseBlockAmgLevel<Type>::scaleX
x
);
scalar scalingFactorNum = sumProd(x,b);
scalar scalingFactorDenom = sumProd(x,Ax);
scalar scalingFactorNum = sumProd(x, b);
scalar scalingFactorDenom = sumProd(x, Ax);
vector2D scalingVector(scalingFactorNum, scalingFactorDenom);
reduce(scalingVector, sumOp<vector2D>());

View file

@ -39,9 +39,17 @@ bool Foam::BlockSolverPerformance<Type>::checkConvergence
Info<< solverName_
<< ": Iteration " << nIterations_
<< " residual = " << finalResidual_
<< " mag = " << mag(finalResidual_)
<< " tol = "
<< Foam::max(Tolerance, RelTolerance*mag(initialResidual_))
<< endl;
}
// Reconsider evaluation of the final residual residualVector
// - mag(residualVector) = sqrt(sum(sqr(cmpt))). Currently used - strict
// - cmptSum(residualVector) = consistent with 1-norm
// - cmptMax(residualVector) = consistent with inftyNorm
// HJ, 29/May/2014
if
(
mag(finalResidual_) < Tolerance

View file

@ -215,6 +215,7 @@ private:
cellList& cells
);
public:
// Public typedefs
@ -291,6 +292,7 @@ public:
const bool syncPar = true
);
// Destructor
virtual ~polyMesh();
@ -548,13 +550,11 @@ public:
//- Remove all files from mesh instance()
void removeFiles() const;
// Helper functions
//- Find cell enclosing this location (-1 if not in mesh)
label findCell
(
const point&
) const;
label findCell(const point&) const;
};

View file

@ -132,7 +132,7 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells
}
//- Set faces_, calculate cells and patchStarts.
// Set faces, calculate cells and patchStarts.
void Foam::polyMesh::setTopology
(
const cellShapeList& cellsAsShapes,
@ -584,7 +584,7 @@ Foam::polyMesh::polyMesh
// Warning: Patches can only be added once the face list is
// completed, as they hold a subList of the face list
forAll(boundaryFaces, patchI)
forAll (boundaryFaces, patchI)
{
// add the patch to the list
boundary_.set
@ -869,7 +869,7 @@ Foam::polyMesh::polyMesh
// Warning: Patches can only be added once the face list is
// completed, as they hold a subList of the face list
forAll(boundaryDicts, patchI)
forAll (boundaryDicts, patchI)
{
dictionary patchDict(boundaryDicts[patchI]);

View file

@ -117,7 +117,7 @@ void Foam::coupledPolyPatch::calcTransformTensors
forwardT_.setSize(0);
reverseT_.setSize(0);
separation_ = (nf&(Cr - Cf))*nf;
separation_ = (nf & (Cr - Cf))*nf;
// Three situations:
// - separation is zero. No separation.

View file

@ -849,6 +849,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
if (dict.found("transform"))
{
transform_ = transformTypeNames.read(dict.lookup("transform"));
switch (transform_)
{
case ROTATIONAL:

View file

@ -68,7 +68,7 @@ void Foam::preservePatchTypes
}
}
forAll(patchNames, patchi)
forAll (patchNames, patchi)
{
if (patchDictionary.found(patchNames[patchi]))
{

View file

@ -1,37 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.1 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1e-05;
CrossPowerLawCoeffs
{
nu0 nu0 [0 2 -1 0 0 0 0] 1e-06;
nuInf nuInf [0 2 -1 0 0 0 0] 1e-06;
m m [0 0 1 0 0 0 0] 1;
n n [0 0 0 0 0 0 0] 1;
}
BirdCarreauCoeffs
{
nu0 nu0 [0 2 -1 0 0 0 0] 1e-06;
nuInf nuInf [0 2 -1 0 0 0 0] 1e-06;
k k [0 0 1 0 0 0 0] 0;
n n [0 0 0 0 0 0 0] 1;
}
// ************************************************************************* //

View file

@ -86,4 +86,3 @@ roots
);
// ************************************************************************* //

View file

@ -20,7 +20,7 @@ define(calc, [esyscmd(perl -e 'printf ($1)')])
//define(calc, [esyscmd(echo $1 | bc | tr -d \\n)])
define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
define(pi, calc(3.14159265/20))
define(pi, 3.14159265)
define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t))
define(quad2D, ($1b $2b $2t $1t))
@ -200,7 +200,7 @@ blocks
hex2D(GV1l, GV1r, GV2r, GV2l)
(GVtc GVbac GVrc)
simpleGrading (1 1 1)
simpleGrading (1 0.2 1)
hex2D(GV2l, GV2r, GV3r, GV3l)
(GVtc GViac GVrc)
@ -215,7 +215,7 @@ blocks
hex2D(RU1l, RU1r, RU2r, RU2l)
rotor
(RUtc RUbac RUrc)
simpleGrading (1 1 1)
simpleGrading (1 0.4 1)
hex2D(RU2l, RU2r, RU3r, RU3l)
rotor

View file

@ -17,39 +17,39 @@ FoamFile
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
internalField uniform (0 0 0);
boundaryField
{
RUINLET
{
type calculated;
value uniform (0 0 0);
value uniform (0 0 0);
}
RUOUTLET
{
type calculated;
value uniform (0 0 0);
value uniform (0 0 0);
}
RUCYCLIC1
{
type cyclicGgi;
value uniform (0 0 0);
value uniform (0 0 0);
}
RUCYCLIC2
{
type cyclicGgi;
value uniform (0 0 0);
value uniform (0 0 0);
}
RUBLADE
{
type calculated;
value uniform (0 0 0);
value uniform (0 0 0);
}
RUHUB
{
type calculated;
value uniform (0 0 0);
value uniform (0 0 0);
}
RUSHROUD
{

View file

@ -1,49 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.1 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 50;
deltaT 0.0003;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.5;
// ************************************************************************* //