36 namespace pointMeshMovers
53 Foam::pointMeshMovers::sixDoFRigidBodyMotion::transforms0()
const
63 void Foam::pointMeshMovers::sixDoFRigidBodyMotion::moveBodies()
65 const Time& t = poly().time();
67 if (poly().
nPoints() != points0().size())
70 <<
"The number of points in the mesh seems to have changed." <<
endl
71 <<
"In constant/polyMesh there are " << points0().size()
72 <<
" points; in the current mesh there are " << poly().nPoints()
77 bool firstIter =
false;
78 if (curTimeIndex_ != t.timeIndex())
81 curTimeIndex_ = t.timeIndex();
87 if (poly().foundObject<uniformDimensionedVectorField>(
"g"))
89 g = poly().lookupObject<uniformDimensionedVectorField>(
"g");
100 ramp*(
mass()*g.value()),
101 ramp*(
mass()*(momentArm() ^ g.value())),
108 functionObjects::forces
f
115 "patches", bodyMeshes_[0].
patches(),
118 "CofR", centreOfRotation()
122 f.calcForcesMoments();
127 ramp*(
f.forceEff() +
mass()*g.value()),
131 +
mass()*(momentArm() ^ g.value())
154 "sixDoFRigidBodyMotionState",
163 "sixDoFRigidBodyMotionState",
174 test_(
dict.lookupOrDefault<
Switch>(
"test", false)),
176 rhoName_(
dict.lookupOrDefault<
word>(
"rho",
"rho")),
180 if (rhoName_ ==
"rhoInf")
182 rhoInf_ =
dict.lookup<scalar>(
"rhoInf");
201 "sixDoFRigidBodyMotionState",
215 &&
dict.regIOobject::writeObject
219 poly().
time().writeCompression(),
Macros for easy insertion into run-time selection tables.
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,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
static std::tuple< const Entries &... > entries(const Entries &...)
Construct an entries tuple from which to make a dictionary.
Abstract base class for pointMesh movers.
Motion of the mesh specified as a list of pointMeshMovers.
virtual bool write() const
Write points0 if the mesh topology changed.
Abstract base-class for multiple rigid body mesh motion.
Single rigid body mesh motion in which movement of the bodies is generated by Foam::sixDoFRigidBodyMo...
~sixDoFRigidBodyMotion()
Destructor.
virtual bool write() const
Write motion state information for restart.
Mesh consisting of general polyhedral cells.
static const septernion I
septernion transform0() const
Return the transformation relative to the initial time.
sixDoFRigidBodyMotion()
Construct null.
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
Templated form of IOobject providing type information for file reading and header type checking.
A class for handling words, derived from string.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
addToRunTimeSelectionTable(pointMeshMover, externalDisplacement, dictionary)
defineTypeNameAndDebug(externalDisplacement, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
const dimensionSet & dimAcceleration
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.