44 sixDoFRigidBodyMotionSolver,
64 "sixDoFRigidBodyMotionState",
68 ).typeHeaderOk<IOdictionary>(
true)
73 "sixDoFRigidBodyMotionState",
85 patchSet_(mesh.boundaryMesh().patchSet(patches_)),
86 di_(coeffDict().
lookup<scalar>(
"innerDistance")),
87 do_(coeffDict().
lookup<scalar>(
"outerDistance")),
88 test_(coeffDict().lookupOrDefault<
Switch>(
"test", false)),
90 rhoName_(coeffDict().lookupOrDefault<
word>(
"rho",
"rho")),
107 if (rhoName_ ==
"rhoInf")
109 rhoInf_ = coeffDict().lookup<scalar>(
"rhoInf");
121 scale_.primitiveFieldRef() =
133 scale_.primitiveFieldRef() =
140 *
cos(scale_.primitiveField()
164 return points0() + pointDisplacement_.primitiveField();
175 <<
"The number of points in the mesh seems to have changed." <<
endl 176 <<
"In constant/polyMesh there are " << points0().size()
177 <<
" points; in the current mesh there are " <<
mesh().
nPoints()
182 bool firstIter =
false;
192 if (
mesh().foundObject<uniformDimensionedVectorField>(
"g"))
196 else if (coeffDict().found(
"g"))
198 coeffDict().lookup(
"g") >>
g;
209 ramp*(mass()*g.
value()),
210 ramp*(mass()*(momentArm() ^ g.
value())),
219 forcesDict.
add(
"type", functionObjects::forces::typeName);
220 forcesDict.
add(
"patches", patches_);
221 forcesDict.
add(
"rhoInf", rhoInf_);
222 forcesDict.
add(
"rho", rhoName_);
223 forcesDict.
add(
"CofR", centreOfRotation());
236 + mass()*(momentArm() ^ g.
value())
244 pointDisplacement_.primitiveFieldRef() =
245 transform(points0(), scale_) - points0();
250 pointDisplacement_.mesh()
251 ).constrainDisplacement(pointDisplacement_);
261 "sixDoFRigidBodyMotionState",
274 dict.regIOobject::writeObject
278 mesh().time().writeCompression(),
Six degree of freedom motion for a rigid body.
virtual vector momentEff() const
Return the total moment.
virtual bool write() const
Write motion state information for restart.
Virtual base class for displacement motion solver.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
virtual bool write() const
Optionally write motion state information for restart.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
virtual vector forceEff() const
Return the total force.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const dimensionSet dimless
const Time & time() const
Return the top-level database.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Mesh representing a set of points created from polyMesh.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar cos(const dimensionedScalar &ds)
const dimensionSet dimAcceleration
scalar deltaT0Value() const
Return old time step value.
A class for handling words, derived from string.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Calculation of distance to nearest patch for all points.
scalar deltaTValue() const
Return time step value.
sixDoFRigidBodyMotionSolver(const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
const Type & value() const
Return const reference to value.
virtual void calcForcesMoment()
Calculate the forces and moments.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const Time & time() const
Return time.
defineTypeNameAndDebug(combustionModel, 0)
static pointMesh & New(polyMesh &mesh)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual void solve()
Solve for motion.
label timeIndex() const
Return current time index.
static const versionNumber currentVersion
Current version number.
~sixDoFRigidBodyMotionSolver()
Destructor.
Mesh consisting of general polyhedral cells.
Calculates the forces and moments by integrating the pressure and skin-friction forces over a given l...
A class for managing temporary objects.
const dimensionedVector & g
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void constrain(GeometricField< Type, pointPatchField, pointMesh > &pf, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints) and.
dimensionSet transform(const dimensionSet &)