The movement driver that describes initial point locations, the current state of the points/rotations, and forwarding to the externalFileCoupler communication coordinator. More...
Public Types | |
enum | outputFormatType { PLAIN, DICTIONARY } |
enum | scalingType { LENGTH = 0, FORCE, MOMENT } |
Static Public Attributes | |
static const Enum< outputFormatType > | formatNames |
static const Enum< scalingType > | scalingNames |
static int | debug |
static const word | canonicalName |
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 |
Enumerator | |
---|---|
PLAIN | "plain" is a simple ASCII format |
DICTIONARY | "dictionary" is the OpenFOAM dictionary format |
Definition at line 272 of file lumpedPointMovement.H.
enum scalingType |
Enumerator | |
---|---|
LENGTH | The "length" scaling. |
FORCE | The "force" scaling. |
MOMENT | The "moment" scaling. |
Definition at line 279 of file lumpedPointMovement.H.
Definition at line 119 of file lumpedPointMovement.C.
|
explicit |
Definition at line 144 of file lumpedPointMovement.C.
References dict.
|
virtualdefault |
void readDict | ( | const dictionary & | dict | ) |
Definition at line 185 of file lumpedPointMovement.C.
References dict, Foam::endl(), quaternion::eulerOrderNames, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::findDict(), Foam::flatOutput(), forAllIters, lumpedPointState::formatNames, Enum::get(), dictionary::getOrDefault(), Foam::Info, Foam::glTF::key(), tmp::New(), Foam::nl, points0(), dictionary::readEntry(), dictionary::readIfPresent(), HashSet::set(), dictionary::subDict(), dictionary::subOrEmptyDict(), Foam::Zero, and MinMax::zero_one().
|
inline |
Definition at line 21 of file lumpedPointMovementI.H.
References lumpedPointState::empty().
|
inline |
Definition at line 27 of file lumpedPointMovementI.H.
|
inline |
Definition at line 33 of file lumpedPointMovementI.H.
Referenced by lumpedPointDisplacementPointPatchVectorField::~lumpedPointDisplacementPointPatchVectorField().
|
inline |
Definition at line 39 of file lumpedPointMovementI.H.
|
inline |
Definition at line 62 of file lumpedPointMovementI.H.
|
inline |
bool couplingPending | ( | const label | timeIndex | ) | const |
Definition at line 173 of file lumpedPointMovement.C.
References timeIndex.
void couplingCompleted | ( | const label | timeIndex | ) | const |
Definition at line 179 of file lumpedPointMovement.C.
References timeIndex.
Referenced by lumpedPointDisplacementPointPatchVectorField::updateCoeffs().
|
inline |
Definition at line 74 of file lumpedPointMovementI.H.
|
inline |
Definition at line 80 of file lumpedPointMovementI.H.
Referenced by lumpedPointMovement::writeStateVTP().
|
inline |
Definition at line 86 of file lumpedPointMovementI.H.
|
inline |
Definition at line 93 of file lumpedPointMovementI.H.
References lumpedPointState::scalePoints().
|
inline |
Definition at line 101 of file lumpedPointMovementI.H.
|
inline |
|
inline |
Definition at line 113 of file lumpedPointMovementI.H.
|
inline |
Definition at line 119 of file lumpedPointMovementI.H.
|
inline |
Definition at line 125 of file lumpedPointMovementI.H.
|
inline |
Definition at line 132 of file lumpedPointMovementI.H.
|
inline |
Definition at line 139 of file lumpedPointMovementI.H.
|
inline |
Definition at line 146 of file lumpedPointMovementI.H.
|
inline |
Definition at line 152 of file lumpedPointMovementI.H.
|
inline |
Definition at line 46 of file lumpedPointMovementI.H.
Definition at line 336 of file lumpedPointMovement.C.
References patchIdentifier::index().
bool hasInterpolator | ( | const pointPatch & | fpatch | ) | const |
Definition at line 345 of file lumpedPointMovement.C.
References pointPatch::index().
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.
void setPatchControl | ( | const polyPatch & | pp, |
const wordList & | ctrlNames, | ||
const pointField & | points0 | ||
) |
Definition at line 385 of file lumpedPointMovement.C.
References polyPatch::boundaryMesh(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::index(), boundBox::inflate(), HashSet::insert(), polyBoundaryMesh::mesh(), Foam::nl, treeDataPoint::pointLabel(), pointLabels(), points0(), Foam::Pout, Foam::sqr(), and polyPatch::start().
void setMapping | ( | const polyMesh & | mesh, |
const labelUList & | patchIds, | ||
const pointField & | points0 | ||
) |
void setInterpolator | ( | const pointPatch & | fpatch, |
const pointField & | points0 | ||
) |
Definition at line 479 of file lumpedPointMovement.C.
References triangle::a(), DynamicList::append(), triangle::b(), triangle::c(), List::clear(), DynamicList::clear(), Foam::expressions::patchExpr::debug, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), forAll, forAllConstIters(), pointPatch::index(), boundBox::inflate(), Foam::Info, Foam::inplaceReorder(), HashSet::insert(), line::mag(), Foam::magSqr(), pointPatch::meshPoints(), pointPatch::name(), Foam::nl, Foam::normalised(), Barycentric2D< Cmpt >::outside(), treeDataPoint::pointLabel(), pointLabels(), points0(), triangle::pointToBarycentric(), List::resize(), DynamicList::resize(), Pair::second(), bitSet::set(), List::set(), Foam::sortedOrder(), Foam::sqr(), bitSet::test(), triFace::tri(), line::unitVec(), and line::vec().
|
inline |
Definition at line 158 of file lumpedPointMovementI.H.
|
inline |
Definition at line 53 of file lumpedPointMovementI.H.
Foam::List< Foam::scalar > areas | ( | const polyMesh & | pmesh | ) | const |
Definition at line 828 of file lumpedPointMovement.C.
References GeometricField::boundaryField(), polyMesh::boundaryMesh(), Foam::endl(), forAll, forAllConstIters(), Pstream::listCombineGather(), Pstream::listCombineScatter(), Foam::mag(), mesh, Foam::nl, patches, fvMesh::Sf(), WarningInFunction, and Foam::Zero.
bool forcesAndMoments | ( | const polyMesh & | pmesh, |
List< vector > & | forces, | ||
List< vector > & | moments | ||
) | const |
Definition at line 889 of file lumpedPointMovement.C.
References GeometricField::boundaryField(), polyMesh::boundaryMesh(), fvMesh::Cf(), Foam::dimPressure, Foam::endl(), objectRegistry::findObject(), forAll, forAllConstIters(), Foam::Info, Pstream::listCombineGather(), Pstream::listCombineScatter(), mesh, Foam::nl, p, patches, List::resize(), fvMesh::Sf(), WarningInFunction, and Foam::Zero.
Foam::tmp< Foam::pointField > pointsDisplacement | ( | const pointPatch & | fpatch, |
const pointField & | points0 | ||
) | const |
Definition at line 1022 of file lumpedPointMovement.C.
References points0().
Foam::tmp< Foam::pointField > pointsDisplacement | ( | const lumpedPointState & | state, |
const pointPatch & | fpatch, | ||
const pointField & | points0 | ||
) | const |
Definition at line 1033 of file lumpedPointMovement.C.
References forAll, pointPatch::index(), lumpedPointInterpolator::interpolate(), pointPatch::meshPoints(), tmp::New(), p0, lumpedPointState::points(), points0(), lumpedPointState::rotations(), and pointPatch::size().
Foam::tmp< Foam::pointField > pointsPosition | ( | const lumpedPointState & | state, |
const pointPatch & | fpatch, | ||
const pointField & | points0 | ||
) | const |
Definition at line 1080 of file lumpedPointMovement.C.
References forAll, pointPatch::index(), lumpedPointInterpolator::interpolate(), pointPatch::meshPoints(), tmp::New(), p0, lumpedPointState::points(), points0(), lumpedPointState::rotations(), and pointPatch::size().
void writeDict | ( | Ostream & | os | ) | const |
Definition at line 1125 of file lumpedPointMovement.C.
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 |
Definition at line 1153 of file lumpedPointMovement.C.
References Tuple2::first(), forAll, Foam::nl, os(), points, Tuple2::second(), UList::size(), Ostream::writeEntry(), Foam::vtk::writeList(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
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().
bool readState | ( | ) |
Definition at line 1132 of file lumpedPointMovement.C.
References lumpedPointState::readData().
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().
void writeStateVTP | ( | const fileName & | file | ) | const |
Definition at line 68 of file lumpedPointMovementWriter.C.
References lumpedPointMovement::state(), and lumpedPointMovement::writeStateVTP().
void writeForcesAndMomentsVTP | ( | const fileName & | file, |
const UList< vector > & | forces, | ||
const UList< vector > & | moments | ||
) | const |
Definition at line 75 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, points, Foam::vtk::POINTS, lumpedPointState::points(), Foam::vtk::POLY_DATA, UList::size(), OFstream::stdStream(), Foam::vtk::VERTS, Foam::vtk::writeIdentity(), and Foam::vtk::writeList().
void writeZonesVTP | ( | const fileName & | file, |
const polyMesh & | mesh, | ||
const pointField & | points0 | ||
) | const |
Definition at line 210 of file lumpedPointMovementWriter.C.
References polyMesh::boundaryMesh(), polyMesh::faces(), Foam::vtk::INLINE_ASCII, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), mesh, Field::null(), List::null(), patches, patchIds, points0(), polyBoundaryMesh::range(), writer< Type >::write(), and writer().
void writeVTP | ( | const fileName & | file, |
const polyMesh & | mesh, | ||
const pointField & | points0 | ||
) | const |
Definition at line 252 of file lumpedPointMovementWriter.C.
References mesh, and points0().
void writeVTP | ( | const fileName & | file, |
const lumpedPointState & | state, | ||
const polyMesh & | mesh, | ||
const pointField & | points0 | ||
) | const |
Definition at line 263 of file lumpedPointMovementWriter.C.
References pointMesh::boundary(), polyMesh::boundaryMesh(), forAll, Foam::vtk::INLINE_ASCII, PrimitivePatch< FaceList, PointField >::localFaces(), mesh, Field::null(), List::null(), patches, patchIds, points0(), writer< Type >::write(), and writer().
|
static |
Definition at line 290 of file lumpedPointMovement.H.
|
static |
Definition at line 293 of file lumpedPointMovement.H.
|
static |
Definition at line 378 of file lumpedPointMovement.H.
Referenced by lumpedPointDisplacementPointPatchVectorField::updateCoeffs().
|
static |
Definition at line 381 of file lumpedPointMovement.H.
Referenced by lumpedPointIOMovement::getMovementObject(), and lumpedPointIOMovement::New().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.