84 refCast<const rigidBodyMeshMotion>(model_);
96 if (isType<fv::rigidBodyPropellerDisk>(
fvModels[i]))
100 refCast<const fv::rigidBodyPropellerDisk>(
fvModels[i])
103 if (bodyIndex_ == prop.
bodyID())
113 <<
"Cannot find " << fv::rigidBodyPropellerDisk::typeName
114 <<
" fvModel for body "
115 << model_.name(bodyIndex_)
124 + ((propPtr->
centre() - model_.X0(bodyIndex_).r()) ^ force)
130 <<
" force " << force
131 <<
" moment " << moment
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Base class for defining restraints for rigid-body dynamics.
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
virtual void write(Ostream &) const =0
Write.
rigidBodyPropellerDisk force restraint.
virtual ~propellerDiskForce()
Destructor.
virtual void write(Ostream &) const
Write.
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
virtual void restrain(scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const
Accumulate the retraint internal joint forces into the tau field and.
propellerDiskForce(const word &name, const dictionary &dict, const rigidBodyModel &model)
Construct from components.
Holds the motion state of rigid-body model.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Mesh data needed to do the Finite Volume discretisation.
vector force() const
Return the current force of the fluid on the propeller.
vector moment() const
Return the current moment of the fluid on the propeller.
Disk momentum source derived from Foam::fv::propellerDisk with support for motion of the body the pro...
virtual vector centre() const
Return the current propeller centre.
const polyMesh & mesh() const
Return reference to mesh.
Rigid-body mesh motion solver for fvMesh.
A class for handling words, derived from string.
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineTypeNameAndDebug(propellerDiskForce, 0)
addToRunTimeSelectionTable(restraint, propellerDiskForce, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.