Calculation of cell aspect ratio sensitised to 1- and 2-D cases
This commit is contained in:
parent
0ee9ddb2b2
commit
190c4f8eae
1 changed files with 20 additions and 7 deletions
|
@ -258,13 +258,26 @@ bool Foam::primitiveMesh::checkClosedCells
|
||||||
|
|
||||||
// Calculate the aspect ration as the maximum of Cartesian component
|
// Calculate the aspect ration as the maximum of Cartesian component
|
||||||
// aspect ratio to the total area hydraulic area aspect ratio
|
// aspect ratio to the total area hydraulic area aspect ratio
|
||||||
scalar aspectRatio = max
|
scalar minCmpt = VGREAT;
|
||||||
(
|
scalar maxCmpt = -VGREAT;
|
||||||
cmptMax(sumMagClosed[cellI])
|
for (direction dir = 0; dir < vector::nComponents; dir++)
|
||||||
/(cmptMin(sumMagClosed[cellI]) + VSMALL),
|
{
|
||||||
1.0/6.0*cmptSum(sumMagClosed[cellI])/
|
if (meshD[dir] == 1)
|
||||||
Foam::pow(Foam::max(vols[cellI], SMALL), 2.0/3.0)
|
{
|
||||||
);
|
minCmpt = min(minCmpt, sumMagClosed[cellI][dir]);
|
||||||
|
maxCmpt = max(maxCmpt, sumMagClosed[cellI][dir]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scalar aspectRatio = maxCmpt/(minCmpt + VSMALL);
|
||||||
|
if (nDims == 3)
|
||||||
|
{
|
||||||
|
aspectRatio = max
|
||||||
|
(
|
||||||
|
aspectRatio,
|
||||||
|
1.0/6.0*cmptSum(sumMagClosed[cellI])/pow(vols[cellI], 2.0/3.0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
maxAspectRatio = max(maxAspectRatio, aspectRatio);
|
maxAspectRatio = max(maxAspectRatio, aspectRatio);
|
||||||
|
|
||||||
|
|
Reference in a new issue