34 namespace functionObjects
50 Foam::functionObjects::rigidBodySectionalForceProbes::distances()
const
52 tmp<scalarField> tdistances =
59 distances.append((1 + 2*small)*
max(maxDistance, distances.last()));
65 void Foam::functionObjects::rigidBodySectionalForceProbes::writeFileHeader
82 writeCommented(
file(),
"Coordinate");
87 << w << i << w <<
' ' << w <<
' '
88 << w <<
' ' << w <<
' ' << w <<
' '
89 << w <<
' ' << w <<
' ' << w <<
' '
90 << w <<
' ' << w <<
' ' << w <<
' '
91 << w <<
' ' << w <<
' ' << w <<
' '
92 << w <<
' ' << w <<
' ' << w <<
' ';
96 writeCommented(
file(),
"Time");
101 << w <<
"Fluid Force" << w <<
' ' << w <<
' '
102 << w <<
"Body Force" << w <<
' ' << w <<
' '
103 << w <<
"Total Force" << w <<
' ' << w <<
' '
104 << w <<
"Fluid Moment" << w <<
' ' << w <<
' '
105 << w <<
"Body Moment" << w <<
' ' << w <<
' '
106 << w <<
"Total Moment" << w <<
' ' << w <<
' ';
110 writeCommented(
file(),
"");
115 << w <<
'x' << w <<
'y' << w <<
'z'
116 << w <<
'x' << w <<
'y' << w <<
'z'
117 << w <<
'x' << w <<
'y' << w <<
'z'
118 << w <<
'x' << w <<
'y' << w <<
'z'
119 << w <<
'x' << w <<
'y' << w <<
'z'
120 << w <<
'x' << w <<
'y' << w <<
'z';
163 if (coordinates_.empty())
166 <<
"At least one coordinate must be specified"
170 coordinateOrders_.setSize(coordinates_.size());
197 totalForce = fluidForce + bodyForce;
198 totalMoment = fluidMoment + bodyMoment;
201 fluidForce.
map(fluidForce, coordinateOrders_);
202 bodyForce.
map(bodyForce, coordinateOrders_);
203 totalForce.
map(totalForce, coordinateOrders_);
204 fluidMoment.
map(fluidMoment, coordinateOrders_);
205 bodyMoment.
map(bodyMoment, coordinateOrders_);
206 totalMoment.
map(totalMoment, coordinateOrders_);
218 << w << fluidForce[i].x()
219 << w << fluidForce[i].y()
220 << w << fluidForce[i].z()
221 << w << bodyForce[i].x()
222 << w << bodyForce[i].y()
223 << w << bodyForce[i].z()
224 << w << totalForce[i].x()
225 << w << totalForce[i].y()
226 << w << totalForce[i].z()
227 << w << fluidMoment[i].x()
228 << w << fluidMoment[i].y()
229 << w << fluidMoment[i].z()
230 << w << bodyMoment[i].x()
231 << w << bodyMoment[i].y()
232 << w << bodyMoment[i].z()
233 << w << totalMoment[i].x()
234 << w << totalMoment[i].y()
235 << w << totalMoment[i].z();
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void map(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 map from the given field
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.
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.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
virtual bool write()
Write function.
This function calculates the fluid and acceleration forces and moments at a number of section-planes ...
virtual ~rigidBodySectionalForceProbes()
Destructor.
rigidBodySectionalForceProbes(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool write()
Write the rigidBodySectionalForceProbes.
virtual bool read(const dictionary &)
Read the rigidBodySectionalForceProbes data.
Base class for rigid-body sectional forces function objects.
label axisi() const
Return the axis on which to plot the result.
const point & localOrigin() const
Return the local origin of the plot.
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.
tmp< scalarField > patchPointDistances() const
Return the distance from the origin to the patch points.
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)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Type gMax(const UList< Type > &f, const label comm)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)