Commit 6e2ba20f authored by andy's avatar andy
Browse files

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

parents 709fc12c ec1b7c01
......@@ -39,8 +39,6 @@ Description
+ massSource.SuTot()
);
rhoEqn.relax();
rhoEqn.solve();
}
......
......@@ -2282,7 +2282,7 @@ void Foam::indexedOctree<Type>::writeOBJ
{
subBb = nodes_[getNode(index)].bb_;
}
else if (isContent(index))
else if (isContent(index) || isEmpty(index))
{
subBb = nodes_[nodeI].bb_.subBbox(octant);
}
......@@ -2290,17 +2290,21 @@ void Foam::indexedOctree<Type>::writeOBJ
Pout<< "dumpContentNode : writing node:" << nodeI << " octant:" << octant
<< " to " << str.name() << endl;
label vertI = 0;
// Dump bounding box
pointField bbPoints(subBb.points());
label pointVertI = vertI;
forAll(bbPoints, i)
{
const point& pt = bbPoints[i];
str<< "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
}
forAll(treeBoundBox::edges, i)
{
const edge& e = treeBoundBox::edges[i];
str<< "l " << e[0]+pointVertI+1 << ' ' << e[1]+pointVertI+1 << nl;
str<< "l " << e[0] + 1 << ' ' << e[1] + 1 << nl;
}
}
......@@ -2852,6 +2856,11 @@ void Foam::indexedOctree<Type>::print
{
const labelList& indices = contents_[getContent(index)];
if (debug)
{
writeOBJ(nodeI, octant);
}
os << "octant:" << octant
<< " content: n:" << indices.size()
<< " bb:" << subBb;
......@@ -2868,6 +2877,11 @@ void Foam::indexedOctree<Type>::print
}
else
{
if (debug)
{
writeOBJ(nodeI, octant);
}
os << "octant:" << octant << " empty:" << subBb << endl;
}
}
......
......@@ -499,7 +499,7 @@ Foam::point Foam::face::centre(const pointField& points) const
const label nPoints = size();
// If the face is a triangle, do a direct calculation
if (nPoints)
if (nPoints == 3)
{
return
(1.0/3.0)
......
......@@ -344,6 +344,11 @@ public:
// Access
const polyMesh& mesh() const
{
return mesh_;
}
const labelIOList& cellLevel() const
{
return cellLevel_;
......
......@@ -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
......@@ -690,9 +690,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
// Remove unreferenced history.
compact();
Pout<< nl << "--BEFORE:" << endl;
writeDebug();
Pout<< "---------" << nl << endl;
//Pout<< nl << "--BEFORE:" << endl;
//writeDebug();
//Pout<< "---------" << nl << endl;
// Distribution is only partially functional.
......@@ -746,18 +746,18 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
}
}
Pout<< "refinementHistory::distribute :"
<< " splitCellProc:" << splitCellProc << endl;
Pout<< "refinementHistory::distribute :"
<< " splitCellNum:" << splitCellNum << endl;
//Pout<< "refinementHistory::distribute :"
// << " splitCellProc:" << splitCellProc << endl;
//
//Pout<< "refinementHistory::distribute :"
// << " splitCellNum:" << splitCellNum << endl;
// Create subsetted refinement tree consisting of all parents that
// move in their whole to other processor.
for (label procI = 0; procI < Pstream::nProcs(); procI++)
{
Pout<< "-- Subetting for processor " << procI << endl;
//Pout<< "-- Subetting for processor " << procI << endl;
// From uncompacted to compacted splitCells.
labelList oldToNew(splitCells_.size(), -1);
......@@ -781,10 +781,10 @@ Pout<< "refinementHistory::distribute :"
oldToNew[index] = newSplitCells.size();
newSplitCells.append(splitCells_[index]);
Pout<< "Added oldCell " << index
<< " info " << newSplitCells.last()
<< " at position " << newSplitCells.size()-1
<< endl;
//Pout<< "Added oldCell " << index
// << " info " << newSplitCells.last()
// << " at position " << newSplitCells.size()-1
// << endl;
}
}
......@@ -797,9 +797,9 @@ Pout<< "refinementHistory::distribute :"
{
label parent = splitCells_[index].parent_;
Pout<< "Adding refined cell " << cellI
<< " since moves to "
<< procI << " old parent:" << parent << endl;
//Pout<< "Adding refined cell " << cellI
// << " since moves to "
// << procI << " old parent:" << parent << endl;
// Create new splitCell with parent
oldToNew[index] = newSplitCells.size();
......@@ -891,8 +891,8 @@ Pout<< "refinementHistory::distribute :"
// renumbering can be done here.
label offset = splitCells_.size();
Pout<< "**Renumbering data from proc " << procI << " with offset "
<< offset << endl;
//Pout<< "**Renumbering data from proc " << procI << " with offset "
// << offset << endl;
forAll(newSplitCells, index)
{
......@@ -929,9 +929,9 @@ Pout<< "refinementHistory::distribute :"
}
splitCells_.shrink();
Pout<< nl << "--AFTER:" << endl;
writeDebug();
Pout<< "---------" << nl << endl;
//Pout<< nl << "--AFTER:" << endl;
//writeDebug();
//Pout<< "---------" << nl << endl;
}
......
......@@ -52,10 +52,28 @@ Foam::viscosityModels::HerschelBulkley::calcNu() const
{
dimensionedScalar tone("tone", dimTime, 1.0);
dimensionedScalar rtone("rtone", dimless/dimTime, 1.0);
tmp<volScalarField> sr(strainRate());
return (min(nu0_,(tau0_ + k_* rtone *( pow(tone * sr(), n_)
- pow(tone*tau0_/nu0_,n_))) / (max(sr(), dimensionedScalar
("VSMALL", dimless/dimTime, VSMALL)))));
// return
// (
// min
// (
// nu0_,
// (tau0_ + k_*rtone*(pow(tone*sr(), n_) - pow(tone*tau0_/nu0_, n_)))
// /max(sr(), dimensionedScalar("VSMALL", dimless/dimTime, VSMALL))
// )
// );
return
(
min
(
nu0_,
(tau0_ + k_*rtone*pow(tone*sr(), n_))
/(max(sr(), dimensionedScalar ("VSMALL", dimless/dimTime, VSMALL)))
)
);
}
......
......@@ -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
......@@ -57,7 +57,7 @@ Foam::viscosityModel::viscosityModel
Foam::tmp<Foam::volScalarField> Foam::viscosityModel::strainRate() const
{
return mag(symm(fvc::grad(U_)));
return sqrt(2.0)*mag(symm(fvc::grad(U_)));
}
......
......@@ -77,7 +77,7 @@ PIMPLE
relaxationFactors
{
"h.* 1;
"h.*" 1;
"U.*" 1;
}
......
......@@ -35,7 +35,7 @@ boundaryField
lowerWall
{
type fixedValue;
value uniform (20 0 0);
value $internalField;
}
"motorBike_.*"
......
......@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0 > /dev/null 2>&1
rm -f ./*.obj > /dev/null 2>&1
rm -f ./flange ./*.obj > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/flange.eMesh > /dev/null 2>&1
rm -f constant/polyMesh/boundary
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment