66 "sixDoFRigidBodyMotionState",
75 "sixDoFRigidBodyMotionState",
86 patches_(
wordReList(coeffDict().lookup(
"patches"))),
87 patchSet_(mesh.boundaryMesh().patchSet(patches_)),
88 di_(coeffDict().lookup<scalar>(
"innerDistance")),
89 do_(coeffDict().lookup<scalar>(
"outerDistance")),
90 test_(coeffDict().lookupOrDefault<
Switch>(
"test", false)),
92 rhoName_(coeffDict().lookupOrDefault<
word>(
"rho",
"rho")),
109 if (rhoName_ ==
"rhoInf")
166 return points0() + pointDisplacement_.primitiveField();
174 if (mesh().
nPoints() != points0().size())
177 <<
"The number of points in the mesh seems to have changed." <<
endl
178 <<
"In constant/polyMesh there are " << points0().size()
179 <<
" points; in the current mesh there are " << mesh().nPoints()
184 bool firstIter =
false;
194 if (mesh().foundObject<uniformDimensionedVectorField>(
"g"))
198 else if (coeffDict().found(
"g"))
200 coeffDict().lookup(
"g") >> g;
211 ramp*(mass()*g.
value()),
212 ramp*(mass()*(momentArm() ^ g.
value())),
221 functionObjects::forces::typeName,
225 "type", functionObjects::forces::typeName,
229 "CofR", centreOfRotation()
233 f.calcForcesMoments();
238 ramp*(
f.forceEff() + mass()*g.
value()),
242 + mass()*(momentArm() ^ g.
value())
250 pointDisplacement_.primitiveFieldRef() =
251 transform(points0(), scale_) - points0();
256 pointDisplacement_.mesh()
267 "sixDoFRigidBodyMotionState",
268 mesh().time().
name(),
280 dict.regIOobject::writeObject
284 mesh().time().writeCompression(),
Macros for easy insertion into run-time selection tables.
static pointMesh & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static const versionNumber currentVersion
Current version number.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
scalar deltaT0Value() const
Return old time step value.
label timeIndex() const
Return current time index.
scalar deltaTValue() const
Return time step value.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const Type & value() const
Return const reference to value.
Virtual base class for displacement motion solver.
Calculates the forces and moments by integrating the pressure and skin-friction forces over a given l...
Virtual base class for mesh motion solver.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
const polyMesh & mesh() const
Return reference to mesh.
const Time & time() const
Return time.
void constrain(PointField< Type > &pf, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints) and.
void constrainDisplacement(pointVectorField &displacement, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints),.
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.
virtual bool write() const
Write points0 if the mesh topology changed.
pointField & points0()
Return reference to the reference field.
Mesh consisting of general polyhedral cells.
virtual bool write(const bool write=true) const
Write using setting from DB.
6-DoF solid-body mesh motion solver for an fvMesh.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
sixDoFRigidBodyMotionSolver(const word &name, const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
~sixDoFRigidBodyMotionSolver()
Destructor.
virtual bool write() const
Write motion state information for restart.
virtual void solve()
Solve for motion.
Six degree of freedom motion for a rigid body.
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
A class for managing temporary objects.
Templated form of IOobject providing type information for file reading and header type checking.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimAcceleration
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionSet transform(const dimensionSet &)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar cos(const dimensionedScalar &ds)