mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,11 +2,11 @@
|
||||
// checkTimeOptions.H
|
||||
// ~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::label startTime = 0;
|
||||
Foam::label endTime = Times.size();
|
||||
Foam::label startTime = 0;
|
||||
Foam::label endTime = Times.size();
|
||||
|
||||
// unless -constant is present, skip startTime if it is "constant"
|
||||
# include "checkConstantOption.H"
|
||||
#include "checkConstantOption.H"
|
||||
|
||||
// check -time and -latestTime options
|
||||
# include "checkTimeOption.H"
|
||||
#include "checkTimeOption.H"
|
||||
|
||||
@ -36,6 +36,7 @@ License
|
||||
#include "polyMeshTetDecomposition.H"
|
||||
#include "indexedOctree.H"
|
||||
#include "treeDataCell.H"
|
||||
#include "SubField.H"
|
||||
|
||||
#include "pointMesh.H"
|
||||
|
||||
|
||||
@ -55,6 +55,8 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
|
||||
|
||||
const point& oCc = pC[oCI];
|
||||
|
||||
List<scalar> tetQualities(2, 0.0);
|
||||
|
||||
forAll(f, faceBasePtI)
|
||||
{
|
||||
scalar thisBaseMinTetQuality = VGREAT;
|
||||
@ -66,8 +68,6 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
|
||||
label facePtI = (tetPtI + faceBasePtI) % f.size();
|
||||
label otherFacePtI = f.fcIndex(facePtI);
|
||||
|
||||
List<scalar> tetQualities(2, 0.0);
|
||||
|
||||
{
|
||||
// owner cell tet
|
||||
label ptAI = f[facePtI];
|
||||
|
||||
@ -35,6 +35,7 @@ License
|
||||
#include "Time.H"
|
||||
#include "diagTensor.H"
|
||||
#include "transformField.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@ License
|
||||
#include "contiguous.H"
|
||||
#include "transform.H"
|
||||
#include "transformList.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -56,8 +56,6 @@ SourceFiles
|
||||
#include "DynamicList.H"
|
||||
#include "edgeList.H"
|
||||
#include "pointField.H"
|
||||
#include "SubField.H"
|
||||
#include "SubList.H"
|
||||
#include "faceList.H"
|
||||
#include "cellList.H"
|
||||
#include "cellShapeList.H"
|
||||
@ -65,8 +63,6 @@ SourceFiles
|
||||
#include "boolList.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "EdgeMap.H"
|
||||
#include "boundBox.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
@ -29,7 +29,7 @@ License
|
||||
#include "ListOps.H"
|
||||
#include "unitConversion.H"
|
||||
#include "SortableList.H"
|
||||
|
||||
#include "EdgeMap.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -24,8 +24,11 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "primitiveMesh.H"
|
||||
#include "indexedOctree.H"
|
||||
#include "treeDataCell.H"
|
||||
#include "demandDrivenData.H"
|
||||
|
||||
#include "indexedOctree.H"
|
||||
#include "treeDataCell.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#include "primitiveMesh.H"
|
||||
#include "cell.H"
|
||||
#include "boundBox.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
@ -51,7 +51,6 @@ void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh)
|
||||
cellVolumes_[0] = vols[ignCell];
|
||||
|
||||
scalar minDist = GREAT;
|
||||
label nearestCell = 0;
|
||||
label nIgnCells = 1;
|
||||
|
||||
forAll(centres, celli)
|
||||
@ -60,7 +59,6 @@ void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh)
|
||||
|
||||
if (dist < minDist)
|
||||
{
|
||||
nearestCell = celli;
|
||||
minDist = dist;
|
||||
}
|
||||
|
||||
|
||||
@ -654,8 +654,6 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange
|
||||
{
|
||||
List<label> permutationIndices(nTrans, 0);
|
||||
|
||||
vector s = vector::zero;
|
||||
|
||||
if (nTrans == 0 && procI != Pstream::myProcNo())
|
||||
{
|
||||
treeBoundBox extendedReferredProcBb = allExtendedProcBbs[procI];
|
||||
|
||||
@ -32,6 +32,8 @@ Foam::label Foam::particle::particleCount_ = 0;
|
||||
|
||||
const Foam::scalar Foam::particle::trackingCorrectionTol = 1e-5;
|
||||
|
||||
const Foam::scalar Foam::particle::lambdaDistanceToleranceCoeff = 1e3*SMALL;
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(particle, 0);
|
||||
|
||||
@ -164,7 +164,8 @@ protected:
|
||||
DynamicList<label>& faceList,
|
||||
const tetPointRef& tet,
|
||||
const FixedList<vector, 4>& tetAreas,
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs,
|
||||
const scalar tol
|
||||
) const;
|
||||
|
||||
//- Find the lambda value for the line to-from across the
|
||||
@ -178,7 +179,8 @@ protected:
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const;
|
||||
|
||||
//- Find the lambda value for a moving tri face
|
||||
@ -191,7 +193,8 @@ protected:
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const;
|
||||
|
||||
//- Modify the tet owner data by crossing triI
|
||||
@ -291,6 +294,10 @@ public:
|
||||
// 'rescue' it from a tracking problem
|
||||
static const scalar trackingCorrectionTol;
|
||||
|
||||
//- Fraction of the cell volume to use in determining tolerance values
|
||||
// for the denominator and numerator of lambda
|
||||
static const scalar lambdaDistanceToleranceCoeff;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@ inline void Foam::particle::findTris
|
||||
DynamicList<label>& faceList,
|
||||
const tetPointRef& tet,
|
||||
const FixedList<vector, 4>& tetAreas,
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
faceList.clear();
|
||||
@ -52,7 +53,8 @@ inline void Foam::particle::findTris
|
||||
tetPlaneBasePtIs[i],
|
||||
cellI_,
|
||||
tetFaceI_,
|
||||
tetPtI_
|
||||
tetPtI_,
|
||||
tol
|
||||
);
|
||||
|
||||
if ((lambda > 0.0) && (lambda < 1.0))
|
||||
@ -72,7 +74,8 @@ inline Foam::scalar Foam::particle::tetLambda
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
const pointField& pPts = mesh_.points();
|
||||
@ -88,7 +91,8 @@ inline Foam::scalar Foam::particle::tetLambda
|
||||
tetPlaneBasePtI,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI
|
||||
tetPtI,
|
||||
tol
|
||||
);
|
||||
}
|
||||
|
||||
@ -102,8 +106,6 @@ inline Foam::scalar Foam::particle::tetLambda
|
||||
// delta-length in the direction of n times the face area to a fraction of
|
||||
// the cell volume.
|
||||
|
||||
scalar tol = 1e3*SMALL*mesh_.cellVolumes()[cellI];
|
||||
|
||||
if (mag(lambdaDenominator) < tol)
|
||||
{
|
||||
if (mag(lambdaNumerator) < tol)
|
||||
@ -147,7 +149,8 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
const pointField& pPts = mesh_.points();
|
||||
@ -299,8 +302,6 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
||||
|
||||
}
|
||||
|
||||
scalar tol = 1e3*SMALL*mesh_.cellVolumes()[cellI];
|
||||
|
||||
if (mag(lambdaDenominator) < tol)
|
||||
{
|
||||
if (mag(lambdaNumerator) < tol)
|
||||
|
||||
@ -286,6 +286,11 @@ Foam::scalar Foam::particle::trackToFace
|
||||
// be a different tet to the one that the particle occupies.
|
||||
tetIndices faceHitTetIs;
|
||||
|
||||
// What tolerance is appropriate the minimum lambda numerator and
|
||||
// denominator for tracking in this cell.
|
||||
scalar lambdaDistanceTolerance =
|
||||
lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_];
|
||||
|
||||
do
|
||||
{
|
||||
if (triI != -1)
|
||||
@ -371,7 +376,15 @@ Foam::scalar Foam::particle::trackToFace
|
||||
tetPlaneBasePtIs[2] = basePtI;
|
||||
tetPlaneBasePtIs[3] = basePtI;
|
||||
|
||||
findTris(endPosition, tris, tet, tetAreas, tetPlaneBasePtIs);
|
||||
findTris
|
||||
(
|
||||
endPosition,
|
||||
tris,
|
||||
tet,
|
||||
tetAreas,
|
||||
tetPlaneBasePtIs,
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
// Reset variables for new track
|
||||
triI = -1;
|
||||
@ -415,7 +428,8 @@ Foam::scalar Foam::particle::trackToFace
|
||||
tetPlaneBasePtIs[tI],
|
||||
cellI_,
|
||||
tetFaceI_,
|
||||
tetPtI_
|
||||
tetPtI_,
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
if (lam < lambdaMin)
|
||||
@ -704,6 +718,9 @@ void Foam::particle::hitWallFaces
|
||||
|
||||
const Foam::cell& thisCell = mesh_.cells()[cellI_];
|
||||
|
||||
scalar lambdaDistanceTolerance =
|
||||
lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_];
|
||||
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
forAll(thisCell, cFI)
|
||||
@ -755,7 +772,8 @@ void Foam::particle::hitWallFaces
|
||||
f[tetIs.faceBasePt()],
|
||||
cellI_,
|
||||
fI,
|
||||
tetIs.tetPt()
|
||||
tetIs.tetPt(),
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
if ((tetClambda <= 0.0) || (tetClambda >= 1.0))
|
||||
@ -781,7 +799,8 @@ void Foam::particle::hitWallFaces
|
||||
f[tetIs.faceBasePt()],
|
||||
cellI_,
|
||||
fI,
|
||||
tetIs.tetPt()
|
||||
tetIs.tetPt(),
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
pointHit hitInfo(vector::zero);
|
||||
|
||||
@ -440,7 +440,6 @@ void Foam::parcel::updateParcelProperties
|
||||
scalar oldhv = fuels.hl(pg, T(), X());
|
||||
scalar Np = N(oldDensity);
|
||||
|
||||
scalar newDensity = oldDensity;
|
||||
scalar newMass = oldMass;
|
||||
scalar newhg = oldhg;
|
||||
scalar newhv = oldhv;
|
||||
@ -460,7 +459,6 @@ void Foam::parcel::updateParcelProperties
|
||||
// first time
|
||||
if (n > 1)
|
||||
{
|
||||
newDensity = fuels.rho(pg, Tnew, X());
|
||||
newMass = m();
|
||||
newhg = 0.0;
|
||||
scalarField Ynew(fuels.Y(X()));
|
||||
|
||||
@ -112,11 +112,10 @@ void Foam::LISA::atomizeParcel
|
||||
vector uDir = p.U()/mag(p.U());
|
||||
|
||||
scalar uGas = mag(vel & uDir);
|
||||
vector Ug = uGas*uDir;
|
||||
|
||||
// Might be the relative velocity between Liquid and Gas, but using the
|
||||
// absolute velocity of the parcel as suggested by the authors
|
||||
// scalar U = mag(p.Urel(vel));
|
||||
// scalar U = mag(p.Urel(vel));
|
||||
scalar U = mag(p.U());
|
||||
|
||||
p.ct() += deltaT;
|
||||
|
||||
@ -118,9 +118,6 @@ void Foam::SHF::breakupParcel
|
||||
scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
|
||||
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
|
||||
|
||||
vector acceleration = p.Urel(vel)/p.tMom();
|
||||
vector trajectory = p.U()/mag(p.U());
|
||||
|
||||
vector vRel = p.Urel(vel);
|
||||
|
||||
scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge);
|
||||
|
||||
@ -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
|
||||
@ -246,9 +246,6 @@ void Foam::blobsSwirlInjector::calculateHX
|
||||
)
|
||||
);
|
||||
|
||||
scalar hOLD = -100.0;
|
||||
scalar xOLD = -100.0;
|
||||
|
||||
label i;
|
||||
|
||||
for (i=0; i<20; i++)
|
||||
@ -267,10 +264,6 @@ void Foam::blobsSwirlInjector::calculateHX
|
||||
);
|
||||
|
||||
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
||||
|
||||
hOLD = h_;
|
||||
xOLD = x_;
|
||||
|
||||
}
|
||||
|
||||
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
||||
|
||||
@ -163,13 +163,14 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
|
||||
)
|
||||
)
|
||||
{
|
||||
uniformDimensionedVectorField omegaDot = this->mesh().template
|
||||
uniformDimensionedVectorField centreOfRotation =
|
||||
this->mesh().template
|
||||
lookupObject<uniformDimensionedVectorField>
|
||||
(
|
||||
centreOfRotationName_
|
||||
);
|
||||
|
||||
centreOfRotation_ = omegaDot.value();
|
||||
centreOfRotation_ = centreOfRotation.value();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,7 +188,7 @@ Foam::forceSuSp Foam::NonInertialFrameForce<CloudType>::calcNonCoupled
|
||||
{
|
||||
forceSuSp value(vector::zero, 0.0);
|
||||
|
||||
const vector& r = p.position() - centreOfRotation_;
|
||||
const vector r = p.position() - centreOfRotation_;
|
||||
|
||||
value.Su() =
|
||||
mass
|
||||
|
||||
@ -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
|
||||
@ -225,8 +225,6 @@ void Foam::blockMesh::calcMergeInfo()
|
||||
}
|
||||
|
||||
|
||||
bool found = false;
|
||||
|
||||
// N-squared point search over all points of all faces of
|
||||
// master block over all point of all faces of slave block
|
||||
forAll(blockPfaceFaces, blockPfaceFaceLabel)
|
||||
@ -240,8 +238,6 @@ void Foam::blockMesh::calcMergeInfo()
|
||||
|
||||
forAll(blockPfaceFacePoints, blockPfaceFacePointLabel)
|
||||
{
|
||||
found = false;
|
||||
|
||||
forAll(blockNfaceFaces, blockNfaceFaceLabel)
|
||||
{
|
||||
const labelList& blockNfaceFacePoints
|
||||
@ -261,7 +257,6 @@ void Foam::blockMesh::calcMergeInfo()
|
||||
)
|
||||
{
|
||||
// Found a new pair
|
||||
found = true;
|
||||
|
||||
cp[blockPfaceFacePointLabel] =
|
||||
blockNfaceFacePoints[blockNfaceFacePointLabel];
|
||||
@ -332,7 +327,6 @@ void Foam::blockMesh::calcMergeInfo()
|
||||
|
||||
const labelListList& curPairs = glueMergePairs[blockFaceLabel];
|
||||
|
||||
bool foundFace = false;
|
||||
label blockPfaceLabel;
|
||||
for
|
||||
(
|
||||
@ -347,14 +341,12 @@ void Foam::blockMesh::calcMergeInfo()
|
||||
== blockInternalFaces[blockFaceLabel]
|
||||
)
|
||||
{
|
||||
foundFace = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME? - there seems to be some logic missing here
|
||||
|
||||
foundFace = false;
|
||||
label blockNfaceLabel;
|
||||
for
|
||||
(
|
||||
@ -369,7 +361,6 @@ void Foam::blockMesh::calcMergeInfo()
|
||||
== blockInternalFaces[blockFaceLabel]
|
||||
)
|
||||
{
|
||||
foundFace = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -281,7 +281,7 @@ void Foam::cellClassification::markCells
|
||||
// Use linear search for points.
|
||||
label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
|
||||
|
||||
if (cellI == -1)
|
||||
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
@ -293,13 +293,16 @@ void Foam::cellClassification::markCells
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
cellInfoList[cellI] = cellInfo(cellClassification::OUTSIDE);
|
||||
|
||||
// Mark faces of cellI
|
||||
const labelList& myFaces = mesh_.cells()[cellI];
|
||||
forAll(myFaces, myFaceI)
|
||||
if (cellI >= 0)
|
||||
{
|
||||
outsideFacesMap.insert(myFaces[myFaceI]);
|
||||
cellInfoList[cellI] = cellInfo(cellClassification::OUTSIDE);
|
||||
|
||||
// Mark faces of cellI
|
||||
const labelList& myFaces = mesh_.cells()[cellI];
|
||||
forAll(myFaces, myFaceI)
|
||||
{
|
||||
outsideFacesMap.insert(myFaces[myFaceI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "polyMesh.H"
|
||||
#include "wallPoint.H"
|
||||
#include "globalMeshData.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "cellQuality.H"
|
||||
#include "unitConversion.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ License
|
||||
#include "polyPatch.H"
|
||||
#include "Time.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
@ -175,7 +175,8 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
|
||||
const point& outsidePoint = outsidePoints_[outsideI];
|
||||
|
||||
// Find cell point is in. Linear search.
|
||||
if (queryMesh.findCell(outsidePoint, -1, false) == -1)
|
||||
label cellI = queryMesh.findCell(outsidePoint, -1, false);
|
||||
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||
{
|
||||
FatalErrorIn("surfaceToCell::combine(topoSet&, const bool)")
|
||||
<< "outsidePoint " << outsidePoint
|
||||
|
||||
@ -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
|
||||
@ -237,27 +237,6 @@ void Foam::surfaceSets::getSurfaceSets
|
||||
// Construct search engine on mesh
|
||||
meshSearch queryMesh(mesh, true);
|
||||
|
||||
|
||||
// Check all 'outside' points
|
||||
forAll(outsidePts, outsideI)
|
||||
{
|
||||
const point& outsidePoint = outsidePts[outsideI];
|
||||
|
||||
// Find cell point is in. Linear search.
|
||||
if (queryMesh.findCell(outsidePoint, -1, false) == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"surfaceSets::getSurfaceSets"
|
||||
"(const polyMesh&, const fileName&, const triSurface&"
|
||||
", const triSurfaceSearch&, const pointField&"
|
||||
", labelHashSet&, labelHashSet&, labelHashSet&)"
|
||||
) << "outsidePoint " << outsidePoint
|
||||
<< " is not inside any cell"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
// Cut faces with surface and classify cells
|
||||
cellClassification cellType
|
||||
(
|
||||
|
||||
@ -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
|
||||
@ -263,6 +263,16 @@ Foam::surfaceFeatures::labelScalar Foam::surfaceFeatures::walkSegment
|
||||
|
||||
label vertI = startPointI;
|
||||
|
||||
scalar visitedLength = 0.0;
|
||||
|
||||
label nVisited = 0;
|
||||
|
||||
if (findIndex(featurePoints_, startPointI) >= 0)
|
||||
{
|
||||
// Do not walk across feature points
|
||||
|
||||
return labelScalar(nVisited, visitedLength);
|
||||
}
|
||||
|
||||
//
|
||||
// Now we have:
|
||||
@ -284,11 +294,6 @@ Foam::surfaceFeatures::labelScalar Foam::surfaceFeatures::walkSegment
|
||||
unsetVal = currentFeatI;
|
||||
}
|
||||
|
||||
|
||||
scalar visitedLength = 0.0;
|
||||
|
||||
label nVisited = 0;
|
||||
|
||||
do
|
||||
{
|
||||
// Step to next feature edge with value unsetVal
|
||||
@ -620,8 +625,13 @@ void Foam::surfaceFeatures::trimFeatures
|
||||
|
||||
if
|
||||
(
|
||||
(leftPath.len_ + rightPath.len_ < minLen)
|
||||
|| (leftPath.n_ + rightPath.n_ < minElems)
|
||||
(
|
||||
leftPath.len_
|
||||
+ rightPath.len_
|
||||
+ startEdge.mag(surf_.localPoints())
|
||||
< minLen
|
||||
)
|
||||
|| (leftPath.n_ + rightPath.n_ + 1 < minElems)
|
||||
)
|
||||
{
|
||||
// Rewalk same route (recognizable by featLines == featI)
|
||||
|
||||
@ -2958,7 +2958,6 @@ char *timestring ( void )
|
||||
# define TIME_SIZE 29
|
||||
|
||||
const struct tm *tm;
|
||||
size_t len;
|
||||
time_t now;
|
||||
char *s;
|
||||
|
||||
@ -2967,7 +2966,7 @@ char *timestring ( void )
|
||||
|
||||
s = new char[TIME_SIZE];
|
||||
|
||||
len = strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
|
||||
strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
|
||||
|
||||
return s;
|
||||
# undef TIME_SIZE
|
||||
|
||||
@ -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
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "polyMesh.H"
|
||||
#include "wedgePolyPatch.H"
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "SortableList.H"
|
||||
#include "globalIndex.H"
|
||||
#include "SubField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -117,6 +117,7 @@ License
|
||||
#include "Time.H"
|
||||
#include "OFstream.H"
|
||||
#include "globalIndex.H"
|
||||
#include "SubField.H"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -110,6 +110,7 @@ License
|
||||
#include "Time.H"
|
||||
#include "OFstream.H"
|
||||
#include "globalIndex.H"
|
||||
#include "SubField.H"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -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
|
||||
@ -83,20 +83,15 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
|
||||
) const
|
||||
{
|
||||
vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0);
|
||||
|
||||
vector oldDir = refQ_ & refDir;
|
||||
|
||||
vector newDir = motion.orientation() & refDir;
|
||||
|
||||
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
|
||||
{
|
||||
// Directions getting close to the axis, change reference
|
||||
|
||||
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
|
||||
|
||||
vector oldDir = refQ_ & refDir;
|
||||
|
||||
vector newDir = motion.orientation() & refDir;
|
||||
oldDir = refQ_ & refDir;
|
||||
newDir = motion.orientation() & refDir;
|
||||
}
|
||||
|
||||
// Removing any axis component from oldDir and newDir and normalising
|
||||
|
||||
@ -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
|
||||
@ -87,7 +87,6 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
|
||||
vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0);
|
||||
|
||||
vector oldDir = refQ_ & refDir;
|
||||
|
||||
vector newDir = motion.orientation() & refDir;
|
||||
|
||||
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
|
||||
@ -96,9 +95,8 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
|
||||
|
||||
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
|
||||
|
||||
vector oldDir = refQ_ & refDir;
|
||||
|
||||
vector newDir = motion.orientation() & refDir;
|
||||
oldDir = refQ_ & refDir;
|
||||
newDir = motion.orientation() & refDir;
|
||||
}
|
||||
|
||||
// Removing any axis component from oldDir and newDir and normalising
|
||||
|
||||
Reference in New Issue
Block a user