47 rigidBodyMeshMotionSolver,
55 Foam::rigidBodyMeshMotionSolver::bodyMesh::bodyMesh
60 const dictionary& dict
66 patchSet_(mesh.boundaryMesh().patchSet(patches_))
83 "rigidBodyMotionState",
92 "rigidBodyMotionState",
118 "rigidBodyMotionSolver:meshSolver",
119 mesh.time().constant(),
128 if (rhoName_ ==
"rhoInf")
148 if (bodyDict.
found(
"patches"))
155 <<
"Body " << iter().keyword()
156 <<
" has been merged with another body" 157 " and cannot be assigned a set of patches" 187 return meshSolverPtr_->curPoints();
198 <<
"The number of points in the mesh seems to have changed." <<
endl 199 <<
"In constant/polyMesh there are " << meshSolver_.
points0().
size()
200 <<
" points; in the current mesh there are " <<
mesh().
nPoints()
211 const scalar ramp = ramp_->value(t.
value());
224 for (
label i=0; i<nIter; i++)
244 forcesDict.
add(
"type", functionObjects::forces::typeName);
245 forcesDict.
add(
"patches", bodyMeshes_[bi].patches_);
246 forcesDict.
add(
"rhoInf", rhoInf_);
247 forcesDict.
add(
"rho", rhoName_);
269 status(bodyMeshes_[bi].bodyID_);
283 .patchInternalField(meshSolver_.
points0())
297 meshSolverPtr_->solve();
303 meshSolverPtr_->movePoints(points);
309 meshSolverPtr_->topoChange(map);
315 meshSolverPtr_->mapMesh(map);
324 meshSolverPtr_->distribute(map);
334 "rigidBodyMotionState",
347 dict.regIOobject::writeObject
351 mesh().time().writeCompression(),
void newTime()
Store the motion state at the beginning of the time-step.
Template class for intrusive linked lists.
virtual vector momentEff() const
Return the total moment.
void append(T *)
Append an element at the end of the list.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Virtual base class for displacement motion solver.
virtual bool write() const
Write motion state information for restart.
#define forAll(list, i)
Loop across all elements in list.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Templated form of IOobject providing type information for file reading and header type checking...
To & refCast(From &r)
Reference type cast template function.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void status(const label bodyID) const
Report the status of the motion of the given body.
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.
static bool master(const label communicator=0)
Am I the master process.
bool foundObject(const word &name) const
Is the named Type found?
virtual bool write() const
Optionally write motion state information for restart.
Virtual base class for mesh motion solver.
const word & keyword() const
Return keyword.
virtual vector forceEff() const
Return the total force.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
label nBodies() const
Return the number of bodies in the model (bodies().size())
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
const rigidBodyModelState & state() const
Return the motion state.
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.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Macros for easy insertion into run-time selection tables.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
rigidBodyMeshMotionSolver(const word &name, const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
Templated function that returns the corresponding 1 (one).
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Six degree of freedom motion for a rigid body.
stressControl lookup("compactNormalStress") >> compactNormalStress
Pre-declare SubField and related Field type.
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
virtual void topoChange(const polyTopoChangeMap &)
Update local data for topology changes.
void write(dictionary &dict) const
Write to dictionary.
scalar deltaTValue() const
Return time step value.
const Type & value() const
Return const reference to value.
virtual void calcForcesMoment()
Calculate the forces and moments.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
void solve(const scalar t, const scalar deltaT, const scalarField &tau, const Field< spatialVector > &fx)
Integrate velocities, orientation and position.
const Time & time() const
Return time.
defineTypeNameAndDebug(combustionModel, 0)
label nDoF() const
Return the number of degrees of freedom of the model.
const vector & g() const
Return the acceleration due to gravity.
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
label timeIndex() const
Return current time index.
motionSolver(const word &name, const polyMesh &mesh, const dictionary &, const word &type)
Construct from polyMesh and dictionary and type.
static const versionNumber currentVersion
Current version number.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void transformPoints(vectorField &, const spatialTransform &, const vectorField &)
Transform given vectorField of coordinates with the given spatialTransform.
label bodyID(const word &name) const
Return the ID of the body with the given name.
Mesh consisting of general polyhedral cells.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
Calculates the forces and moments by integrating the pressure and skin-friction forces over a given l...
const polyMesh & mesh() const
Return reference to mesh.
A class for managing temporary objects.
spatialTransform transform0(const label bodyID) const
Return the transformation of bodyID relative to the initial time.
Class containing mesh-to-mesh mapping information.
pointField & points0()
Return reference to the reference field.
~rigidBodyMeshMotionSolver()
Destructor.
virtual void solve()
Solve for motion.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static autoPtr< motionSolver > New(const word &name, const polyMesh &, const dictionary &)
Select constructed from polyMesh and dictionary.
bool report() const
Return the report Switch.
static const Vector< scalar > zero
static autoPtr< Function1< Type > > New(const word &name, const dictionary &dict)
Selector.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.