37 namespace functionObjects
52 void Foam::functionObjects::rigidBodySectionalForceGraph::clear()
56 distancesPtr_.clear();
61 Foam::functionObjects::rigidBodySectionalForceGraph::distances()
const
63 if (!distancesPtr_.valid())
70 patchPointDistances(),
82 return distancesPtr_();
97 distancesPtr_(nullptr),
122 nPoints_ =
dict.lookup<
label>(
"nPoints");
126 nOptimiseIter_ =
dict.lookupOrDefault<
label>(
"nOptimiseIter", 2);
149 #define DeclareTypeFieldValues(Type, nullArg) \
150 PtrList<Field<Type>> Type##FieldValues(fieldNames.size());
152 #undef DeclareTypeFieldValues
154 forAll(vectorFieldValues, i)
156 vectorFieldValues.set
177 totalForce = fluidForce + bodyForce;
178 totalMoment = fluidMoment + bodyMoment;
193 distances + localOrigin()[axisi()],
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
Holds list of sampling positions.
static const NamedEnum< axisType, 6 > axisTypeNames_
String representation of axis enums.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base-class for Time/database functionObjects.
rigidBodySectionalForceGraph(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual ~rigidBodySectionalForceGraph()
Destructor.
virtual bool write()
Write the rigidBodySectionalForceGraph.
virtual bool read(const dictionary &)
Read the rigidBodySectionalForceGraph data.
Base class for rigid-body sectional forces function objects.
void addFluid(vectorField &force, vectorField &moment) const
Calculate the forces and moments at the cuts.
void addBody(vectorField &force, vectorField &moment) const
Calculate the forces and moments at the cuts.
virtual bool read(const dictionary &)
Read the rigidBodySectionalForcesBase data.
virtual void clear()
Clear the cached weights.
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
A class for managing temporary objects.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
static List< word > fieldNames
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
tmp< scalarField > calcCutXs(const faceList &faces, const Field< vector > &faceAreas, const Field< vector > &faceNormals, const pointField &points, const scalarField &pointXs, const bool interpolate, const label nCuts, const label nIter, const bool debug=false, const word &functionName=word::null, const polyMesh &functionMesh=NullObjectRef< polyMesh >(), const setWriter &functionFormatter=NullObjectRef< setWriter >())
Compute and return evenly-spaced cut coordinates.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
#define TypeFieldValuesParameter(Type, nullArg)
#define DeclareTypeFieldValues(Type, nullArg)