Go to the documentation of this file.
95 #ifndef lumpedPointMovement_H
96 #define lumpedPointMovement_H
125 class lumpedPointMovement
165 List<lumpedPointInterpolator> interp_;
175 lumpedPointState state0_;
179 lumpedPointState state_;
185 HashPtrTable<lumpedPointController> controllers_;
188 Map<patchControl> patchControls_;
197 dictionary forcesDict_;
200 externalFileCoupler coupler_;
214 FixedList<scalar, 1> scaleInput_;
215 FixedList<scalar, 3> scaleOutput_;
218 label calcFrequency_;
221 mutable label lastTrigger_;
264 inline bool empty()
const;
267 inline label
size()
const;
300 inline scalar
relax()
const;
303 inline scalar&
relax();
"dictionary" is the OpenFOAM dictionary format
List< label > labelList
A List of labels.
const externalFileCoupler & coupler() const
Communication control.
void writeDict(Ostream &os) const
Write axis, locations, division as a dictionary.
A class for handling words, derived from Foam::string.
bool degrees() const
Rotation angles in degrees.
A class for handling file names.
bool forcesAndMoments(const polyMesh &pmesh, List< vector > &forces, List< vector > &moments) const
The forces and moments acting on each pressure-zone.
static const Enum< scalingType > scalingNames
Names for the scaling types.
bool writeData(Ostream &os, const UList< vector > &forces, const UList< vector > &moments, const outputFormatType fmt=outputFormatType::PLAIN, const Tuple2< scalar, scalar > *timesWritten=nullptr) const
Write points, forces, moments. Only call from the master process.
void readDict(const dictionary &dict)
Update settings from dictionary.
A class for managing temporary objects.
inputFormatType
Input format types.
const point & origin() const
The offset for lumped points, used on input.
List< scalar > areas(const polyMesh &pmesh) const
The areas for each pressure-zone.
void writeStateVTP(const lumpedPointState &state, const fileName &file) const
Write state as VTK PolyData format.
const word & inputName() const
The input (state) file name.
scalingType
Output format types.
Basic pointPatch represents a set of points from the mesh.
label ownerId() const
An owner Id, if needed for bookkeeping purposes.
quaternion::eulerOrder rotationOrder() const
The Euler-angle rotation order.
Specialisations of Field<T> for scalar, vector and tensor.
Mesh consisting of general polyhedral cells.
label size() const
The number of lumped points (number of locations)
bool hasInterpolator(const pointPatch &fpatch) const
Check if patch control exists for specified patch.
List< word > wordList
A List of words.
lumpedPointMovement::outputFormatType outputFormat() const
The output (forces) file format.
bool couplingPending(const label timeIndex) const
Check if coupling is pending (according to the calcFrequency)
The state of lumped points corresponds to positions and rotations.
static int debug
Debug switch.
A patch is a list of labels that address the faces in the global face list.
const lumpedPointState & state0() const
The initial state (positions/rotations)
void writeZonesVTP(const fileName &file, const polyMesh &mesh, const pointField &points0) const
Write pressure-zones geometry, write as VTK PolyData format.
lumpedPointState::inputFormatType inputFormat() const
The input (state) file format.
void setMapping(const polyMesh &mesh, const labelUList &patchIds, const pointField &points0)
Define pressure-zones mapping for faces in the specified patches.
void writeForcesAndMomentsVTP(const fileName &file, const UList< vector > &forces, const UList< vector > &moments) const
Write forces on points as VTK PolyData format.
void writeVTP(const fileName &file, const polyMesh &mesh, const pointField &points0) const
Write displaced geometry according to the current state,.
eulerOrder
Euler-angle rotation order.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static const word canonicalName
The canonical name ("lumpedPointMovement") for the dictionary.
static const Enum< outputFormatType > formatNames
Names for the output format types.
OBJstream os(runTime.globalPath()/outputName)
bool readState()
Read state from file, applying relaxation as requested.
scalar relax() const
The relaxation factor when changing states.
const lumpedPointState & state() const
The current state (positions/rotations)
tmp< pointField > pointsPosition(const lumpedPointState &state, const pointPatch &fpatch, const pointField &points0) const
The points absolute position according to specified state.
const word & logName() const
The log file name.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)))
Encapsulates the logic for coordinating between OpenFOAM and an external application.
const word & outputName() const
The output (forces) file name.
bool empty() const
If no number of lumped points (locations) were specified.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
outputFormatType
Output format types.
bool hasPatchControl(const label patchIndex) const
Check if patch control exists for specified patch.
void setPatchControl(const polyPatch &pp, const wordList &ctrlNames, const pointField &points0)
Define pressure-zones mapping for faces in the specified patches.
tmp< pointField > pointsDisplacement(const pointPatch &fpatch, const pointField &points0) const
Displace points according to the current state.
The movement driver that describes initial point locations, the current state of the points/rotations...
lumpedPointMovement()
Default construct.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void checkPatchControl(const polyPatch &pp) const
Check if patch control exists for specified patch.
void couplingCompleted(const label timeIndex) const
Register that coupling is completed at this calcFrequency.
vector point
Point is a vector.
bool hasMapping() const
True if the pressure-zones mapping has already been performed.
"plain" is a simple ASCII format
void setInterpolator(const pointPatch &fpatch, const pointField &points0)
Check if patch control exists for specified patch.
void scalePoints(lumpedPointState &state) const
Scale the lumped points (on input).
virtual ~lumpedPointMovement()=default
Destructor.