The movement driver that describes initial point locations, the current state of the points/rotations, and forwarding to the externalFileCoupler communication coordinator. More...
#include <lumpedPointMovement.H>


Public Types | |
| enum class | outputFormatType { PLAIN , DICTIONARY } |
| Output format types. More... | |
| enum | scalingType { LENGTH = 0 , FORCE , MOMENT } |
| Output format types. More... | |
Public Member Functions | |
| lumpedPointMovement () | |
| Default construct. | |
| lumpedPointMovement (const dictionary &dict, label ownerId=-1) | |
| Construct from dictionary, optionally with some owner information. | |
| virtual | ~lumpedPointMovement ()=default |
| Destructor. | |
| void | readDict (const dictionary &dict) |
| Update settings from dictionary. | |
| bool | empty () const |
| If no number of lumped points (locations) were specified. | |
| label | size () const |
| The number of lumped points (number of locations). | |
| label | ownerId () const |
| An owner Id, if needed for bookkeeping purposes. | |
| void | ownerId (label id) |
| Change the owner id, if needed for bookkeeping purposes. | |
| const externalFileCoupler & | coupler () const |
| Communication control. | |
| externalFileCoupler & | coupler () |
| Communication control. | |
| bool | couplingPending (const label timeIndex) const |
| Check if coupling is pending (according to the calcFrequency). | |
| void | couplingCompleted (const label timeIndex) const |
| Register that coupling is completed at this calcFrequency. | |
| const lumpedPointState & | state0 () const |
| The initial state (positions/rotations). | |
| const lumpedPointState & | state () const |
| The current state (positions/rotations). | |
| const point & | origin () const |
| The offset for lumped points, used on input. | |
| void | scalePoints (lumpedPointState &state) const |
| Scale the lumped points (on input). | |
| scalar | relax () const |
| The relaxation factor when changing states. | |
| scalar & | relax () |
| The relaxation factor when changing states. | |
| const word & | inputName () const |
| The input (state) file name. | |
| const word & | outputName () const |
| The output (forces) file name. | |
| const word & | logName () const |
| The log file name. | |
| lumpedPointState::inputFormatType | inputFormat () const |
| The input (state) file format. | |
| lumpedPointMovement::outputFormatType | outputFormat () const |
| The output (forces) file format. | |
| quaternion::eulerOrder | rotationOrder () const |
| The Euler-angle rotation order. | |
| bool | degrees () const |
| Rotation angles in degrees. | |
| bool | hasPatchControl (const label patchIndex) const |
| Check if patch control exists for specified patch. | |
| bool | hasPatchControl (const polyPatch &pp) const |
| Check if patch control exists for specified patch. | |
| bool | hasInterpolator (const pointPatch &fpatch) const |
| Check if patch control exists for specified patch. | |
| void | checkPatchControl (const polyPatch &pp) 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. | |
| void | setMapping (const polyMesh &mesh, const labelUList &patchIds, const pointField &points0) |
| Define pressure-zones mapping for faces in the specified patches. | |
| void | setInterpolator (const pointPatch &fpatch, const pointField &points0) |
| Check if patch control exists for specified patch. | |
| bool | hasMapping () const |
| True if the pressure-zones mapping has already been performed. | |
| bool | hasInterpolator (const label patchIndex) const |
| Check if patch interpolator exists for specified patch. | |
| List< scalar > | areas (const polyMesh &pmesh) const |
| The areas for each pressure-zone. | |
| bool | forcesAndMoments (const polyMesh &pmesh, List< vector > &forces, List< vector > &moments) const |
| The forces and moments acting on each pressure-zone. | |
| tmp< pointField > | pointsDisplacement (const pointPatch &fpatch, const pointField &points0) const |
| Displace points according to the current state. | |
| tmp< pointField > | pointsDisplacement (const lumpedPointState &state, const pointPatch &fpatch, const pointField &points0) const |
| Displace points according to specified state. | |
| tmp< pointField > | pointsPosition (const lumpedPointState &state, const pointPatch &fpatch, const pointField &points0) const |
| The points absolute position according to specified state. | |
| void | writeDict (Ostream &os) const |
| Write axis, locations, division as a dictionary. | |
| 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. | |
| bool | writeData (const UList< vector > &forces, const UList< vector > &moments=List< vector >(), const Tuple2< scalar, scalar > *timesWritten=nullptr) const |
| Write points, forces, moments. | |
| bool | readState () |
| Read state from file, applying relaxation as requested. | |
| void | writeStateVTP (const lumpedPointState &state, const fileName &file) const |
| Write state as VTK PolyData format. | |
| void | writeStateVTP (const fileName &file) const |
| Write state as VTK PolyData format. | |
| void | writeForcesAndMomentsVTP (const fileName &file, const UList< vector > &forces, const UList< vector > &moments) const |
| Write forces on points as VTK PolyData format. | |
| void | writeZonesVTP (const fileName &file, const polyMesh &mesh, const pointField &points0) const |
| Write pressure-zones geometry, write as VTK PolyData format. | |
| void | writeVTP (const fileName &file, const polyMesh &mesh, const pointField &points0) const |
| Write displaced geometry according to the current state,. | |
| void | writeVTP (const fileName &file, const lumpedPointState &state, const polyMesh &mesh, const pointField &points0) const |
| Write displaced geometry according to the specified state,. | |
Static Public Attributes | |
| static const Enum< outputFormatType > | formatNames |
| Names for the output format types. | |
| static const Enum< scalingType > | scalingNames |
| Names for the scaling types. | |
| static int | debug |
| Debug switch. | |
| static const word | canonicalName |
| The canonical name ("lumpedPointMovement") for the dictionary. | |
The movement driver that describes initial point locations, the current state of the points/rotations, and forwarding to the externalFileCoupler communication coordinator.
The lumpedPointIOMovement class is simply a registered version of the same.
See externalFileCoupler for more information about some of the communication parameters and setup.
Dictionary parameters
| Property | Description | Required | Default |
|---|---|---|---|
points | Initial locations of lumped points | yes | |
pointLabels | The FEA ids for the points | no | |
origin | Shift offset when reading points | no | (0 0 0) |
rotationOrder | The Euler rotation order | no | zxz |
degrees | Input rotations in degrees | no | false |
relax | Relaxation/scaling for updating positions | no | 1 |
controllers | Motion controllers (dictionary) | yes | |
forces | Force settings (dictionary) | no | |
communication | Communication settings (dictionary) | yes |
Parameters for communication dictionary
| Property | Description | Required | Default |
|---|---|---|---|
inputName | Name of positions input file | yes | |
outputName | Name of forces output file | yes | |
logName | Name of log file | no | movement.log |
inputFormat | Input format: dictionary/plain | yes | |
outputFormat | Output format: dictionary/plain | yes | |
scaleInput | Input scaling parameter dictionary | no | |
scaleOutput | Output scaling parameter dictionary | no | |
calcFrequency | Calculation/coupling frequency | no | 1 |
Parameters for optional communication/scaleInput dictionary
| Property | Description | Required | Default |
|---|---|---|---|
length | Scaling for input positions | no | 1 |
Parameters for optional communication/scaleOutput dictionary
| Property | Description | Required | Default |
|---|---|---|---|
length | Scaling for output positions | no | 1 |
force | Scaling for force | no | 1 |
moment | Scaling for moment | no | 1 |
Parameters for optional forces dictionary
| Property | Description | Required | Default |
|---|---|---|---|
p | Name of the pressure field | no | p |
pRef | Reference pressure in Pa | no | 0 |
rhoRef | Reference density for incompressible | no | 1 |
Definition at line 265 of file lumpedPointMovement.H.
|
strong |
Output format types.
| Enumerator | |
|---|---|
| PLAIN | "plain" is a simple ASCII format |
| DICTIONARY | "dictionary" is the OpenFOAM dictionary format |
Definition at line 274 of file lumpedPointMovement.H.
| enum scalingType |
Output format types.
| Enumerator | |
|---|---|
| LENGTH | The "length" scaling. |
| FORCE | The "force" scaling. |
| MOMENT | The "moment" scaling. |
Definition at line 283 of file lumpedPointMovement.H.
| lumpedPointMovement | ( | ) |
Default construct.
|
explicit |
|
virtualdefault |
Destructor.
| void readDict | ( | const dictionary & | dict | ) |
Update settings from dictionary.
References dict.
Referenced by lumpedPointIOMovement::readData().

|
inline |
If no number of lumped points (locations) were specified.
Definition at line 21 of file lumpedPointMovementI.H.
|
inline |
The number of lumped points (number of locations).
Definition at line 27 of file lumpedPointMovementI.H.
|
inline |
An owner Id, if needed for bookkeeping purposes.
Definition at line 33 of file lumpedPointMovementI.H.
Referenced by lumpedPointIOMovement::lumpedPointIOMovement(), lumpedPointMovement(), lumpedPointIOMovement::New(), lumpedPointIOMovement::TypeNameNoDebug(), and lumpedPointDisplacementPointPatchVectorField::~lumpedPointDisplacementPointPatchVectorField().

|
inline |
Change the owner id, if needed for bookkeeping purposes.
Definition at line 39 of file lumpedPointMovementI.H.
|
inline |
Communication control.
Definition at line 62 of file lumpedPointMovementI.H.
|
inline |
Communication control.
Definition at line 68 of file lumpedPointMovementI.H.
| bool couplingPending | ( | const label | timeIndex | ) | const |
Check if coupling is pending (according to the calcFrequency).
References timeIndex.
| void couplingCompleted | ( | const label | timeIndex | ) | const |
|
inline |
The initial state (positions/rotations).
Definition at line 74 of file lumpedPointMovementI.H.
Referenced by degrees(), and rotationOrder().

|
inline |
The current state (positions/rotations).
Definition at line 80 of file lumpedPointMovementI.H.
Referenced by couplingCompleted(), pointsDisplacement(), pointsPosition(), readState(), scalePoints(), writeForcesAndMomentsVTP(), writeStateVTP(), writeStateVTP(), writeVTP(), and writeVTP().

|
inline |
The offset for lumped points, used on input.
Definition at line 86 of file lumpedPointMovementI.H.
|
inline |
Scale the lumped points (on input).
Definition at line 92 of file lumpedPointMovementI.H.
References LENGTH, and state().

|
inline |
The relaxation factor when changing states.
Definition at line 101 of file lumpedPointMovementI.H.
|
inline |
The relaxation factor when changing states.
Definition at line 107 of file lumpedPointMovementI.H.
|
inline |
The input (state) file name.
Definition at line 113 of file lumpedPointMovementI.H.
|
inline |
The output (forces) file name.
Definition at line 119 of file lumpedPointMovementI.H.
|
inline |
The log file name.
Definition at line 125 of file lumpedPointMovementI.H.
|
inline |
The input (state) file format.
Definition at line 132 of file lumpedPointMovementI.H.
|
inline |
The output (forces) file format.
Definition at line 139 of file lumpedPointMovementI.H.
|
inline |
The Euler-angle rotation order.
Definition at line 146 of file lumpedPointMovementI.H.
References state0().

|
inline |
Rotation angles in degrees.
Definition at line 152 of file lumpedPointMovementI.H.
References state0().

|
inline |
Check if patch control exists for specified patch.
Definition at line 46 of file lumpedPointMovementI.H.
| bool hasPatchControl | ( | const polyPatch & | pp | ) | const |
Check if patch control exists for specified patch.
References pp().

| bool hasInterpolator | ( | const pointPatch & | fpatch | ) | const |
Check if patch control exists for specified patch.
| void checkPatchControl | ( | const polyPatch & | pp | ) | const |
Check if patch control exists for specified patch.
References pp().

| void setPatchControl | ( | const polyPatch & | pp, |
| const wordList & | ctrlNames, | ||
| const pointField & | points0 ) |
Define pressure-zones mapping for faces in the specified patches.
The face centres are compared to the controller points,
| pp | The patch with a control |
| ctrlNames | The patch ids to be included in the mapping |
| points0 | The initial mesh points, prior to movement |
References points0(), and pp().
Referenced by lumpedPointDisplacementPointPatchVectorField::setPatchControls().


| void setMapping | ( | const polyMesh & | mesh, |
| const labelUList & | patchIds, | ||
| const pointField & | points0 ) |
Define pressure-zones mapping for faces in the specified patches.
The face centres are compared to the controller points,
| mesh | The volume mesh reference |
| patchIds | The patch ids to be included in the mapping |
| points0 | The initial mesh points, prior to movement |
References mesh, patchIds, and points0().

| void setInterpolator | ( | const pointPatch & | fpatch, |
| const pointField & | points0 ) |
Check if patch control exists for specified patch.
References points0().
Referenced by lumpedPointDisplacementPointPatchVectorField::setInterpolators().


|
inline |
True if the pressure-zones mapping has already been performed.
Definition at line 158 of file lumpedPointMovementI.H.
|
inline |
Check if patch interpolator exists for specified patch.
Definition at line 53 of file lumpedPointMovementI.H.
| bool forcesAndMoments | ( | const polyMesh & | pmesh, |
| List< vector > & | forces, | ||
| List< vector > & | moments ) const |
The forces and moments acting on each pressure-zone.
The zones must be previously defined via setMapping.
| tmp< pointField > pointsDisplacement | ( | const pointPatch & | fpatch, |
| const pointField & | points0 ) const |
Displace points according to the current state.
References points0().

| tmp< pointField > pointsDisplacement | ( | const lumpedPointState & | state, |
| const pointPatch & | fpatch, | ||
| const pointField & | points0 ) const |
| tmp< pointField > pointsPosition | ( | const lumpedPointState & | state, |
| const pointPatch & | fpatch, | ||
| const pointField & | points0 ) const |
The points absolute position according to specified state.
References points0(), and state().
Referenced by writeVTP().


| void writeDict | ( | Ostream & | os | ) | const |
Write axis, locations, division as a dictionary.
References os().
Referenced by Foam::operator<<().


| bool writeData | ( | Ostream & | os, |
| const UList< vector > & | forces, | ||
| const UList< vector > & | moments, | ||
| const outputFormatType | fmt = outputFormatType::PLAIN, | ||
| const Tuple2< scalar, scalar > * | timesWritten = nullptr ) const |
| bool writeData | ( | const UList< vector > & | forces, |
| const UList< vector > & | moments = List< vector >(), | ||
| const Tuple2< scalar, scalar > * | timesWritten = nullptr ) const |
Write points, forces, moments.
| bool readState | ( | ) |
| void writeStateVTP | ( | const lumpedPointState & | state, |
| const fileName & | file ) const |
Write state as VTK PolyData format.
Definition at line 30 of file lumpedPointMovementWriter.C.
References UList< T >::first(), Foam::identity(), UPstream::master(), List< T >::resize(), and state().
Referenced by writeStateVTP().


| void writeStateVTP | ( | const fileName & | file | ) | const |
Write state as VTK PolyData format.
Definition at line 68 of file lumpedPointMovementWriter.C.
References state(), and writeStateVTP().

| void writeForcesAndMomentsVTP | ( | const fileName & | file, |
| const UList< vector > & | forces, | ||
| const UList< vector > & | moments ) const |
Write forces on points as VTK PolyData format.
Definition at line 74 of file lumpedPointMovementWriter.C.
References Foam::vtk::CONNECTIVITY, format(), Foam::vtk::INLINE_ASCII, UPstream::master(), Foam::vtk::newFormatter(), nPoints, Foam::vtk::NUMBER_OF_POINTS, Foam::vtk::NUMBER_OF_VERTS, Foam::vtk::OFFSETS, os(), Foam::vtk::PIECE, Foam::vtk::POINTS, points, Foam::vtk::POLY_DATA, UList< T >::size(), Foam::vtk::sizeofData(), state(), OFstream::stdStream(), Foam::vtk::VERTS, Foam::vtk::writeIdentity(), and Foam::vtk::writeList().

| void writeZonesVTP | ( | const fileName & | file, |
| const polyMesh & | mesh, | ||
| const pointField & | points0 ) const |
Write pressure-zones geometry, write as VTK PolyData format.
Definition at line 209 of file lumpedPointMovementWriter.C.
References Foam::vtk::INLINE_ASCII, mesh, Field< vector >::null(), List< face >::null(), patches, patchIds, points0(), pp(), and writer().

| void writeVTP | ( | const fileName & | file, |
| const polyMesh & | mesh, | ||
| const pointField & | points0 ) const |
Write displaced geometry according to the current state,.
write as VTK PolyData format.
Definition at line 247 of file lumpedPointMovementWriter.C.
References mesh, points0(), state(), and writeVTP().
Referenced by writeVTP().


| void writeVTP | ( | const fileName & | file, |
| const lumpedPointState & | state, | ||
| const polyMesh & | mesh, | ||
| const pointField & | points0 ) const |
Write displaced geometry according to the specified state,.
write as VTK PolyData format.
Definition at line 258 of file lumpedPointMovementWriter.C.
References pointMesh::boundary(), forAll, Foam::vtk::INLINE_ASCII, mesh, Field< vector >::null(), List< face >::null(), patches, patchIds, points0(), pointsPosition(), pp(), UList< T >::size(), state(), and writer().

|
static |
Names for the output format types.
Definition at line 296 of file lumpedPointMovement.H.
|
static |
Names for the scaling types.
Definition at line 301 of file lumpedPointMovement.H.
|
static |
Debug switch.
Definition at line 427 of file lumpedPointMovement.H.
Referenced by lumpedPointDisplacementPointPatchVectorField::updateCoeffs().
|
static |
The canonical name ("lumpedPointMovement") for the dictionary.
Definition at line 432 of file lumpedPointMovement.H.
Referenced by lumpedPointIOMovement::getMovementObject(), and lumpedPointIOMovement::New().