66 "sixDoFRigidBodyMotionState",
75 "sixDoFRigidBodyMotionState",
87 patchSet_(
mesh.boundaryMesh().patchSet(patches_)),
88 di_(
dict.lookup<scalar>(
"innerDistance")),
89 do_(
dict.lookup<scalar>(
"outerDistance")),
90 test_(
dict.lookupOrDefault<
Switch>(
"test", false)),
92 rhoName_(
dict.lookupOrDefault<
word>(
"rho",
"rho")),
110 if (rhoName_ ==
"rhoInf")
112 rhoInf_ =
dict.lookup<scalar>(
"rhoInf");
167 return points0() + pointDisplacement_.primitiveField();
178 <<
"The number of points in the mesh seems to have changed." <<
endl
179 <<
"In constant/polyMesh there are " << points0().size()
180 <<
" points; in the current mesh there are " <<
mesh().
nPoints()
185 bool firstIter =
false;
195 if (
mesh().foundObject<uniformDimensionedVectorField>(
"g"))
208 ramp*(mass()*g.
value()),
209 ramp*(mass()*(momentArm() ^ g.
value())),
218 functionObjects::forces::typeName,
222 "type", functionObjects::forces::typeName,
226 "CofR", centreOfRotation()
230 f.calcForcesMoments();
235 ramp*(
f.forceEff() + mass()*g.
value()),
239 + mass()*(momentArm() ^ g.
value())
247 pointDisplacement_.primitiveFieldRef() =
248 transform(points0(), scale_) - points0();
253 pointDisplacement_.mesh()
264 "sixDoFRigidBodyMotionState",
277 dict.regIOobject::writeObject
281 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 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.
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...
const Time & time() const
Return the top-level database.
Virtual base class for mesh motion solver.
const polyMesh & mesh() const
Return reference to mesh.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
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.
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.
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.
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)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dimensionedScalar cos(const dimensionedScalar &ds)