51 initialPoints_(p.localPoints()),
76 if (rhoName_ ==
"rhoInf")
86 if (!dict.
found(
"value"))
91 if (dict.
found(
"initialPoints"))
97 initialPoints_ = p.localPoints();
112 motion_(ptf.motion_),
113 initialPoints_(ptf.initialPoints_, mapper),
114 rhoInf_(ptf.rhoInf_),
115 rhoName_(ptf.rhoName_),
116 lookupGravity_(ptf.lookupGravity_),
130 motion_(ptf.motion_),
131 initialPoints_(ptf.initialPoints_),
132 rhoInf_(ptf.rhoInf_),
133 rhoName_(ptf.rhoName_),
134 lookupGravity_(ptf.lookupGravity_),
149 initialPoints_.autoMap(m);
160 refCast<const sixDoFRigidBodyDisplacementPointPatchVectorField>(ptf);
164 initialPoints_.rmap(sDoFptf.initialPoints_, addr);
175 if (lookupGravity_ < 0)
177 if (
db().foundObject<uniformDimensionedVectorField>(
"g"))
179 if (lookupGravity_ == -2)
182 <<
"Specifying the value of g in this boundary condition " 183 <<
"when g is available from the database is considered " 184 <<
"a fatal error to avoid the possibility of inconsistency" 203 bool firstIter =
false;
213 forcesDict.
add(
"type", functionObjects::forces::typeName);
215 forcesDict.
add(
"rhoInf", rhoInf_);
216 forcesDict.
add(
"rho", rhoName_);
225 if (lookupGravity_ == 1)
247 motion_.
transform(initialPoints_) - initialPoints_
260 if (rhoName_ ==
"rhoInf")
265 if (lookupGravity_ == 0 || lookupGravity_ == -2)
272 initialPoints_.
writeEntry(
"initialPoints", os);
label timeIndex() const
Return current time index.
const Time & time() const
Return time.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool updated() const
Return true if the boundary condition has already been updated.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
sixDoFRigidBodyDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
virtual vector forceEff() const
Return the total force.
scalar mass() const
Return the mass.
scalar deltaT0Value() const
Return old time step value.
Foam::pointPatchFieldMapper.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
const Type & value() const
Return const reference to value.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
point transform(const point &initialPoints) const
Transform the given initial state point by the current motion.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
const objectRegistry & db() const
Return local objectRegistry.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
virtual void rmap(const pointPatchField< vector > &, const labelList &)
Reverse map the given pointPatchField onto this pointPatchField.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Foam::sixDoFRigidBodyDisplacementPointPatchVectorField.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual void calcForcesMoment()
Calculate the forces and moments.
virtual const word & name() const =0
Return name.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
const point & centreOfRotation() const
Return the current centre of rotation.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const dimensionedVector & g
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
void newTime()
Store the motion state at the beginning of the time-step.
scalar deltaTValue() const
Return time step value.
virtual vector momentEff() const
Return the total moment.
const pointPatch & patch() const
Return patch.
List< word > wordList
A List of words.
Basic pointPatch represents a set of points from the mesh.
void write(Ostream &) const
Write.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
makePointPatchTypeField(pointPatchVectorField, solidBodyMotionDisplacementPointPatchVectorField)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const DimensionedField< vector, pointMesh > & internalField() const
Return dimensioned internal field reference.
Mesh consisting of general polyhedral cells.
virtual void write(Ostream &) const
Write.
This function object calculates the forces and moments by integrating the pressure and skin-friction ...
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual void write(Ostream &) const
Write.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given PointPatchField onto.
void update(bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0)
Symplectic integration of velocities, orientation and position.
label size() const
Return size.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.