Go to the documentation of this file.
48 surfaceAlignedSBRStressFvMotionSolver,
64 surfaceNames_(coeffDict().
lookup(
"surfaces")),
65 surfaceMesh_(surfaceNames_.size()),
71 fvMesh_.time().timeName(),
79 maxAng_(coeffDict().lookupOrDefault<scalar>(
"maxAng", 80.0)),
80 minAng_(coeffDict().lookupOrDefault<scalar>(
"minAng", 20.0)),
81 accFactor_(coeffDict().lookupOrDefault<scalar>(
"accFactor", 1.0)),
82 smoothFactor_(coeffDict().lookupOrDefault<scalar>(
"smoothFactor", 0.9)),
83 nNonOrthogonalCorr_(
readLabel(coeffDict().
lookup(
"nNonOrthogonalCorr"))),
84 pointDisplacement_(pointDisplacement()),
90 fvMesh_.time().timeName(),
92 IOobject::READ_IF_PRESENT,
98 minSigmaDiff_(coeffDict().lookupOrDefault<scalar>(
"minSigmaDiff", 1
e-4))
110 mesh.time().constant(),
141 for (
label faceI = 0; faceI < fvMesh_.nInternalFaces(); faceI++)
143 start[faceI] = fvMesh_.cellCentres()[fvMesh_.faceOwner()[faceI]];
144 end[faceI] = fvMesh_.cellCentres()[fvMesh_.faceNeighbour()[faceI]];
149 forAll (surfaceMesh_, surfI)
152 surfaceMesh_[surfI].findLineAny(start, end, hit);
156 const vectorField& nf = surfaceMesh_[surfI].faceNormals();
166 if (hit[faceI].hit())
169 const vector hitPoint = hit[faceI].hitPoint();
171 if (fvMesh_.isInternalFace(faceI))
174 fvMesh_.cellCentres()[fvMesh_.faceOwner()[faceI]];
177 fvMesh_.cellCentres()[fvMesh_.faceNeighbour()[faceI]];
179 if (
mag(cCOne - hitPoint) <
mag(cCTwo - hitPoint))
181 rotCellId = fvMesh_.faceOwner()[faceI];
185 rotCellId = fvMesh_.faceNeighbour()[faceI];
190 label patchI = fvMesh_.boundaryMesh().whichPatch(faceI);
193 isA<processorPolyPatch>(fvMesh_.boundaryMesh()[patchI])
197 fvMesh_.cellCentres()[fvMesh_.faceOwner()[faceI]];
199 const vector cCentreOne = ownCc - hitPoint;
202 refCast<const processorPolyPatch>
204 fvMesh_.boundaryMesh()[patchI]
205 ).neighbFaceCellCentres()[faceI];
207 const vector cCentreTwo = nbrCc - hitPoint;
209 if (cCentreOne < cCentreTwo)
211 rotCellId = fvMesh_.faceOwner()[faceI];
224 const labelList& cFaces = fvMesh_.cells()[rotCellId];
226 scalar cosMax(-GREAT);
231 mag(nf[hit[faceI].index()] & nSfMesh[cFaces[
k]]);
250 cellRot_[rotCellId] =
251 nSfMesh[
faceId] ^ nf[hit[faceI].index()];
253 const scalar magRot =
mag(cellRot_[rotCellId]);
257 const scalar theta =
::asin(magRot);
258 quaternion q(cellRot_[rotCellId]/magRot, theta);
261 fvMesh_.cellPoints(rotCellId);
265 const label pointId = cPoints[j];
267 pointsCount[pointId]++;
270 fvMesh_.points()[pointId];
272 pointDisplacement_[pointId] +=
273 (
R & (pointPos - hitPoint))
274 - (pointPos - hitPoint);
282 forAll (pointDisplacement_.internalField(), iPoint)
284 vector&
point = pointDisplacement_.internalField()[iPoint];
285 point /= pointsCount[iPoint];
297 this->movePoints(fvMesh_.points());
301 diffusivity().correct();
313 fvMesh_.time().timeName(),
320 cellMotionBoundaryTypes<vector>
333 Ud[i] = pointInter.
interpolate(pointDisplacement_);
358 fvMesh_.time().timeName(),
370 mu.internalField() = (1.0/V);
381 const scalar diffSigmaD =
382 gSum(
mag(sigmaD_.oldTime().internalField()))
385 if (
mag(diffSigmaD) > minSigmaDiff_)
387 sigmaD_ = magNewSigmaD;
391 pointDisplacement_.boundaryField().updateCoeffs();
395 for (
int nonOrth=0; nonOrth<=nNonOrthogonalCorr_; nonOrth++)
403 "laplacian(diffusivity,cellDisplacement)"
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionedScalar mu
Atomic mass unit.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Calculate the divergence of the given field.
Unit conversion functions.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
IOoject and searching on triSurface.
Type gSum(const FieldField< Field, Type > &f)
dimensioned< scalar > mag(const dimensioned< Type > &)
Type interpolate(const GeometricField< Type, pointPatchField, pointMesh > &psip) const
Interpolate field.
Mesh consisting of general polyhedral cells.
Quaternion class used to perform rotations in 3D space.
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
virtual void solve()
Solve for motion.
#define R(A, B, C, D, E, F, K, M)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Calculate the matrix for the laplacian of the field.
void calculateCellRot()
Calculate cellRot.
~surfaceAlignedSBRStressFvMotionSolver()
Destructor.
InternalField & internalField()
Return internal field.
Container to calculate weights for interpolating directly from vertices of cell using Mean Value Coor...
surfaceAlignedSBRStressFvMotionSolver(const surfaceAlignedSBRStressFvMotionSolver &)
Disallow default bitwise copy construct.
Mesh motion solver for an fvMesh. Based on solving the cell-centre solid-body rotation stress equatio...
static const sphericalTensor I(1)
Macros for easy insertion into run-time selection tables.
cellIbMask *cellIbMaskExt *faceIbMask *cellIbMask boundaryField().evaluateCoupled()
Generic dimensioned Type class.
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label k
Boltzmann constant.
const dimensionedScalar e
Elementary charge.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
label readLabel(Istream &is)
void replace(const direction, const GeometricField< cmptType, PatchField, GeoMesh > &)
tensor R() const
The rotation tensor corresponding the quaternion.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
Graphite solid properties.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
dimensionedScalar asin(const dimensionedScalar &ds)
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
stressControl lookup("compactNormalStress") >> compactNormalStress
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
void smooth(volScalarField &field, const scalar coeff)
dimensionedScalar cos(const dimensionedScalar &ds)