39 Foam::scalar Foam::fvMeshMovers::multiValveEngine::pistonObject::bore()
const
50 if (pbm[
patchi].localPoints().size())
52 pistonMax =
max(pistonMax,
max(pbm[
patchi].localPoints()));
53 pistonMin =
min(pistonMin,
min(pbm[
patchi].localPoints()));
57 reduce(pistonMax, maxOp<point>());
58 reduce(pistonMin, minOp<point>());
64 (pistonMax - (
axis& pistonMax)*pistonMax)
65 - (pistonMin - (
axis& pistonMin)*pistonMin)
70 void Foam::fvMeshMovers::multiValveEngine::pistonObject::correctClearance
79 const polyPatch& pp = meshMover_.mesh().boundaryMesh()[iter.key()];
80 const labelList& meshPoints = pp.meshPoints();
84 clearance_ =
min(clearance_, pDist[meshPoints[pointi]]);
88 reduce(clearance_, minOp<scalar>());
114 return motion_->value(theta);
121 return position(meshMover_.userTime());
129 position(meshMover_.userTime() - meshMover_.userDeltaT())
136 return displacement()/(meshMover_.mesh().time().deltaTValue() + vSmall);
143 if (
mag(
position() - position0_) > travelInterval_)
152 return clearance_ - displacement();
171 Info <<
" Updating scale field" <<
endl;
195 correctClearance(pDistMoving);
202 movingFrozenLayerThickness_,
204 staticFrozenLayerThickness_
210 const vector translationVector(displacement()*axis);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static pointMesh & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
fvMesh & mesh()
Return the fvMesh.
const multiValveEngine & meshMover_
Reference to engine mesh mover.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const labelHashSet & patchSet
Object patchSet.
pistonObject(const word &name, const multiValveEngine &engine, const dictionary &dict)
Construct from dictionary.
static word pistonBowlName
Name of the piston bowl pointZone.
scalar position() const
Return the current piston position.
scalar clearance() const
Return clearance estimate.
scalar displacement() const
Return piston displacement for current time-step.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void updatePoints(pointField &)
update points due to piston motion
scalar speed() const
Return piston position for current time-step.
A mesh mover using explicit node translation based on scaled distance functions per moving object....
Calculates the distance to the specified sets of patch and pointZone points or for all points.
Mesh representing a set of points created from polyMesh.
Class containing mesh-to-mesh mapping information.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A class for handling words, derived from string.
point position(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the position given the coordinates and tet topology.
List< label > labelList
A List of labels.
void transformPoints(vectorField &, const spatialTransform &, const vectorField &)
Transform given vectorField of coordinates with the given spatialTransform.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Vector< scalar > vector
A scalar version of the templated Vector.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)