Go to the documentation of this file.
44 sixDoFRigidBodyMotionSolver,
64 "sixDoFRigidBodyMotionState",
65 mesh.time().timeName(),
73 "sixDoFRigidBodyMotionState",
74 mesh.time().timeName(),
77 IOobject::READ_IF_PRESENT,
85 patchSet_(
mesh.boundaryMesh().patchSet(patches_)),
88 test_(coeffDict().lookupOrDefault<Switch>(
"test",
false)),
90 rhoName_(coeffDict().lookupOrDefault<word>(
"rhoName",
"rho")),
96 mesh.time().timeName(),
107 if (rhoName_ ==
"rhoInf")
121 scale_.internalField() =
133 scale_.internalField() =
140 *
cos(scale_.internalField()
164 return points0() + pointDisplacement_.internalField();
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;
183 if (curTimeIndex_ != this->db().time().
timeIndex())
186 curTimeIndex_ = this->db().time().timeIndex();
192 if (db().foundObject<uniformDimensionedVectorField>(
"g"))
196 else if (coeffDict().found(
"g"))
198 coeffDict().lookup(
"g") >>
g;
209 ramp*(motion_.mass()*
g.
value()),
210 ramp*(motion_.mass()*(motion_.momentArm() ^
g.
value())),
219 forcesDict.
add(
"type", forces::typeName);
220 forcesDict.
add(
"patches", patches_);
221 forcesDict.
add(
"rhoInf", rhoInf_);
222 forcesDict.
add(
"rhoName", rhoName_);
223 forcesDict.
add(
"CofR", motion_.centreOfRotation());
225 forces f(
"forces", db(), forcesDict);
227 f.calcForcesMoment();
232 ramp*(
f.forceEff() + motion_.mass()*
g.
value()),
236 + motion_.mass()*(motion_.momentArm() ^
g.
value())
244 pointDisplacement_.internalField() =
245 motion_.transform(points0(), scale_) - points0();
250 pointDisplacement_.mesh()
266 "sixDoFRigidBodyMotionState",
276 motion_.state().write(
dict);
277 return dict.regIOobject::write();
285 motion_.read(coeffDict());
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
A class for managing temporary objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
compressionType
Enumeration for the format of data in the stream.
scalar deltaT0Value() const
Return old time step value.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
const dimensionedVector & g
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
void constrainDisplacement(pointVectorField &displacement, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints),.
Mesh consisting of general polyhedral cells.
static const pointConstraints & New(const pointMesh &mesh)
virtual void solve()
Solve for motion.
bool headerOk()
Read and check header info.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
InternalField & internalField()
Return internal field.
scalar deltaTValue() const
Return time step value.
virtual bool read()
Read dynamicMeshDict dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Virtual base class for displacement motion solver.
Macros for easy insertion into run-time selection tables.
Generic dimensioned Type class.
Mesh representing a set of points created from polyMesh.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimAcceleration
This function object calculates the forces and moments by integrating the pressure and skin-friction ...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Calculation of distance to nearest patch for all points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
~sixDoFRigidBodyMotionSolver()
Destructor.
sixDoFRigidBodyMotionSolver(const sixDoFRigidBodyMotionSolver &)
Disallow default bitwise copy construct.
const Time & time() const
Return the top-level database.
virtual bool read()
Read dynamicMeshDict dictionary.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write state using given format, version and compression.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
bool add(entry *, bool mergeEntry=false)
Add a new entry.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar cos(const dimensionedScalar &ds)
streamFormat
Enumeration for the format of data in the stream.