Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
lumpedPointMovement Class Reference

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

Inheritance diagram for lumpedPointMovement:
Inheritance graph
[legend]
Collaboration diagram for lumpedPointMovement:
Collaboration graph
[legend]

Public Types

enum  outputFormatType { PLAIN, DICTIONARY }
 
enum  scalingType { LENGTH = 0, FORCE, MOMENT }
 

Public Member Functions

 lumpedPointMovement ()
 
 lumpedPointMovement (const dictionary &dict, label ownerId=-1)
 
virtual ~lumpedPointMovement ()=default
 
void readDict (const dictionary &dict)
 
bool empty () const
 
label size () const
 
label ownerId () const
 
void ownerId (label id)
 
const externalFileCouplercoupler () const
 
externalFileCouplercoupler ()
 
bool couplingPending (const label timeIndex) const
 
void couplingCompleted (const label timeIndex) const
 
const lumpedPointStatestate0 () const
 
const lumpedPointStatestate () const
 
const pointorigin () const
 
void scalePoints (lumpedPointState &state) const
 
scalar relax () const
 
scalar & relax ()
 
const wordinputName () const
 
const wordoutputName () const
 
const wordlogName () const
 
lumpedPointState::inputFormatType inputFormat () const
 
lumpedPointMovement::outputFormatType outputFormat () const
 
quaternion::eulerOrder rotationOrder () const
 
bool degrees () const
 
bool hasPatchControl (const label patchIndex) const
 
bool hasPatchControl (const polyPatch &pp) const
 
bool hasInterpolator (const pointPatch &fpatch) const
 
void checkPatchControl (const polyPatch &pp) const
 
void setPatchControl (const polyPatch &pp, const wordList &ctrlNames, const pointField &points0)
 
void setMapping (const polyMesh &mesh, const labelUList &patchIds, const pointField &points0)
 
void setInterpolator (const pointPatch &fpatch, const pointField &points0)
 
bool hasMapping () const
 
bool hasInterpolator (const label patchIndex) const
 
List< scalar > areas (const polyMesh &pmesh) const
 
bool forcesAndMoments (const polyMesh &pmesh, List< vector > &forces, List< vector > &moments) const
 
tmp< pointFieldpointsDisplacement (const pointPatch &fpatch, const pointField &points0) const
 
tmp< pointFieldpointsDisplacement (const lumpedPointState &state, const pointPatch &fpatch, const pointField &points0) const
 
tmp< pointFieldpointsPosition (const lumpedPointState &state, const pointPatch &fpatch, const pointField &points0) const
 
void writeDict (Ostream &os) const
 
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
 
bool readState ()
 
void writeStateVTP (const lumpedPointState &state, const fileName &file) const
 
void writeStateVTP (const fileName &file) const
 
void writeForcesAndMomentsVTP (const fileName &file, const UList< vector > &forces, const UList< vector > &moments) const
 
void writeZonesVTP (const fileName &file, const polyMesh &mesh, const pointField &points0) const
 
void writeVTP (const fileName &file, const polyMesh &mesh, const pointField &points0) const
 
void writeVTP (const fileName &file, const lumpedPointState &state, const polyMesh &mesh, const pointField &points0) const
 

Static Public Attributes

static const Enum< outputFormatTypeformatNames
 
static const Enum< scalingTypescalingNames
 
static int debug
 
static const word canonicalName
 

Detailed Description

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
Source files

Definition at line 265 of file lumpedPointMovement.H.

Member Enumeration Documentation

◆ outputFormatType

enum outputFormatType
strong
Enumerator
PLAIN 

"plain" is a simple ASCII format

DICTIONARY 

"dictionary" is the OpenFOAM dictionary format

Definition at line 272 of file lumpedPointMovement.H.

◆ scalingType

Enumerator
LENGTH 

The "length" scaling.

FORCE 

The "force" scaling.

MOMENT 

The "moment" scaling.

Definition at line 279 of file lumpedPointMovement.H.

Constructor & Destructor Documentation

◆ lumpedPointMovement() [1/2]

Definition at line 119 of file lumpedPointMovement.C.

◆ lumpedPointMovement() [2/2]

lumpedPointMovement ( const dictionary dict,
label  ownerId = -1 
)
explicit

Definition at line 144 of file lumpedPointMovement.C.

References dict.

◆ ~lumpedPointMovement()

virtual ~lumpedPointMovement ( )
virtualdefault

Member Function Documentation

◆ readDict()

void readDict ( const dictionary dict)

◆ empty()

bool empty ( ) const
inline

Definition at line 21 of file lumpedPointMovementI.H.

References lumpedPointState::empty().

Here is the call graph for this function:

◆ size()

Foam::label size ( ) const
inline

Definition at line 27 of file lumpedPointMovementI.H.

◆ ownerId() [1/2]

Foam::label ownerId ( ) const
inline

Definition at line 33 of file lumpedPointMovementI.H.

Referenced by lumpedPointDisplacementPointPatchVectorField::~lumpedPointDisplacementPointPatchVectorField().

Here is the caller graph for this function:

◆ ownerId() [2/2]

void ownerId ( label  id)
inline

Definition at line 39 of file lumpedPointMovementI.H.

◆ coupler() [1/2]

Foam::externalFileCoupler & coupler ( ) const
inline

Definition at line 62 of file lumpedPointMovementI.H.

◆ coupler() [2/2]

externalFileCoupler& coupler ( )
inline

◆ couplingPending()

bool couplingPending ( const label  timeIndex) const

Definition at line 173 of file lumpedPointMovement.C.

References timeIndex.

◆ couplingCompleted()

void couplingCompleted ( const label  timeIndex) const

Definition at line 179 of file lumpedPointMovement.C.

References timeIndex.

Referenced by lumpedPointDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

◆ state0()

const Foam::lumpedPointState & state0 ( ) const
inline

Definition at line 74 of file lumpedPointMovementI.H.

◆ state()

const Foam::lumpedPointState & state ( ) const
inline

Definition at line 80 of file lumpedPointMovementI.H.

Referenced by lumpedPointMovement::writeStateVTP().

Here is the caller graph for this function:

◆ origin()

const Foam::point & origin ( ) const
inline

Definition at line 86 of file lumpedPointMovementI.H.

◆ scalePoints()

void scalePoints ( lumpedPointState state) const
inline

Definition at line 93 of file lumpedPointMovementI.H.

References lumpedPointState::scalePoints().

Here is the call graph for this function:

◆ relax() [1/2]

Foam::scalar & relax ( ) const
inline

Definition at line 101 of file lumpedPointMovementI.H.

◆ relax() [2/2]

scalar& relax ( )
inline

◆ inputName()

const Foam::word & inputName ( ) const
inline

Definition at line 113 of file lumpedPointMovementI.H.

◆ outputName()

const Foam::word & outputName ( ) const
inline

Definition at line 119 of file lumpedPointMovementI.H.

◆ logName()

const Foam::word & logName ( ) const
inline

Definition at line 125 of file lumpedPointMovementI.H.

◆ inputFormat()

Foam::lumpedPointState::inputFormatType inputFormat ( ) const
inline

Definition at line 132 of file lumpedPointMovementI.H.

◆ outputFormat()

Foam::lumpedPointMovement::outputFormatType outputFormat ( ) const
inline

Definition at line 139 of file lumpedPointMovementI.H.

◆ rotationOrder()

Foam::quaternion::eulerOrder rotationOrder ( ) const
inline

Definition at line 146 of file lumpedPointMovementI.H.

◆ degrees()

bool degrees ( ) const
inline

Definition at line 152 of file lumpedPointMovementI.H.

◆ hasPatchControl() [1/2]

bool hasPatchControl ( const label  patchIndex) const
inline

Definition at line 46 of file lumpedPointMovementI.H.

◆ hasPatchControl() [2/2]

bool hasPatchControl ( const polyPatch pp) const

Definition at line 336 of file lumpedPointMovement.C.

References patchIdentifier::index().

Here is the call graph for this function:

◆ hasInterpolator() [1/2]

bool hasInterpolator ( const pointPatch fpatch) const

Definition at line 345 of file lumpedPointMovement.C.

References pointPatch::index().

Here is the call graph for this function:

◆ checkPatchControl()

void checkPatchControl ( const polyPatch pp) const

Definition at line 354 of file lumpedPointMovement.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, patchIdentifier::index(), patchIdentifier::name(), and Foam::nl.

Here is the call graph for this function:

◆ setPatchControl()

void setPatchControl ( const polyPatch pp,
const wordList ctrlNames,
const pointField points0 
)

◆ setMapping()

void setMapping ( const polyMesh mesh,
const labelUList patchIds,
const pointField points0 
)

◆ setInterpolator()

void setInterpolator ( const pointPatch fpatch,
const pointField points0 
)

◆ hasMapping()

bool hasMapping ( ) const
inline

Definition at line 158 of file lumpedPointMovementI.H.

◆ hasInterpolator() [2/2]

bool hasInterpolator ( const label  patchIndex) const
inline

Definition at line 53 of file lumpedPointMovementI.H.

◆ areas()

Foam::List< Foam::scalar > areas ( const polyMesh pmesh) const

◆ forcesAndMoments()

bool forcesAndMoments ( const polyMesh pmesh,
List< vector > &  forces,
List< vector > &  moments 
) const

◆ pointsDisplacement() [1/2]

Foam::tmp< Foam::pointField > pointsDisplacement ( const pointPatch fpatch,
const pointField points0 
) const

Definition at line 1022 of file lumpedPointMovement.C.

References points0().

Here is the call graph for this function:

◆ pointsDisplacement() [2/2]

Foam::tmp< Foam::pointField > pointsDisplacement ( const lumpedPointState state,
const pointPatch fpatch,
const pointField points0 
) const

◆ pointsPosition()

Foam::tmp< Foam::pointField > pointsPosition ( const lumpedPointState state,
const pointPatch fpatch,
const pointField points0 
) const

◆ writeDict()

void writeDict ( Ostream os) const

Definition at line 1125 of file lumpedPointMovement.C.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ writeData() [1/2]

bool writeData ( Ostream os,
const UList< vector > &  forces,
const UList< vector > &  moments,
const outputFormatType  fmt = outputFormatType::PLAIN,
const Tuple2< scalar, scalar > *  timesWritten = nullptr 
) const

◆ writeData() [2/2]

bool writeData ( const UList< vector > &  forces,
const UList< vector > &  moments = List<vector>(),
const Tuple2< scalar, scalar > *  timesWritten = nullptr 
) const

Definition at line 1292 of file lumpedPointMovement.C.

References UPstream::master(), os(), and Foam::writeData().

Here is the call graph for this function:

◆ readState()

bool readState ( )

Definition at line 1132 of file lumpedPointMovement.C.

References lumpedPointState::readData().

Here is the call graph for this function:

◆ writeStateVTP() [1/2]

void writeStateVTP ( const lumpedPointState state,
const fileName file 
) const

Definition at line 31 of file lumpedPointMovementWriter.C.

References Foam::identity(), List::resize(), lumpedPointState::size(), and lumpedPointState::writeVTP().

Referenced by lumpedPointMovement::writeStateVTP().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeStateVTP() [2/2]

void writeStateVTP ( const fileName file) const

Definition at line 68 of file lumpedPointMovementWriter.C.

References lumpedPointMovement::state(), and lumpedPointMovement::writeStateVTP().

Here is the call graph for this function:

◆ writeForcesAndMomentsVTP()

void writeForcesAndMomentsVTP ( const fileName file,
const UList< vector > &  forces,
const UList< vector > &  moments 
) const

◆ writeZonesVTP()

void writeZonesVTP ( const fileName file,
const polyMesh mesh,
const pointField points0 
) const

◆ writeVTP() [1/2]

void writeVTP ( const fileName file,
const polyMesh mesh,
const pointField points0 
) const

Definition at line 252 of file lumpedPointMovementWriter.C.

References mesh, and points0().

Here is the call graph for this function:

◆ writeVTP() [2/2]

void writeVTP ( const fileName file,
const lumpedPointState state,
const polyMesh mesh,
const pointField points0 
) const

Member Data Documentation

◆ formatNames

Definition at line 290 of file lumpedPointMovement.H.

◆ scalingNames

const Foam::Enum< Foam::lumpedPointMovement::scalingType > scalingNames
static

Definition at line 293 of file lumpedPointMovement.H.

◆ debug

int debug
static

◆ canonicalName

const Foam::word canonicalName
static

The documentation for this class was generated from the following files: