48template<
class GeoFieldType>
55 if (
io &&
io->headerClassName() == GeoFieldType::typeName)
57 Info<<
"Reading " << GeoFieldType::typeName
58 <<
' ' <<
io->name() <<
endl;
82int main(
int argc,
char *argv[])
86 "Extract force/moment information from simulation results that"
87 " use the lumped points movement description."
90 argList::addBoolOption
93 "Create visualization files of the forces"
96 timeSelector::addOptions(
true,
false);
97 argList::noFunctionObjects();
114 Info<<
"No valid movement found" <<
endl;
118 const label
nPatches = lumpedPointTools::setPatchControls(
mesh);
121 Info<<
"No point patches with lumped movement found" <<
endl;
134 runTime.setTime(timeDirs[timei], timei);
138 if (
mesh.readUpdate())
140 Info<<
" Read new mesh" <<
nl;
148 = loadField<volScalarField>(
mesh, objects.findObject(
"p"));
151 if (movement().forcesAndMoments(
mesh, forces, moments))
153 Info<<
"forces per zone: " << forces <<
endl;
154 Info<<
"moments per zone: " << moments <<
endl;
156 if (withVTK && Pstream::master())
159 word::printf(
"forces_%06d.vtp",
runTime.timeIndex());
163 movement().writeForcesAndMomentsVTP
178 if (forceSeries.
size())
180 forceSeries.
write(
"forces.vtp");
List of IOobjects with searching and retrieving facilities.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool found(const word &optName) const
Return true if the named option is found.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Provides a means of accumulating and generating VTK file series.
bool append(const fileNameInstant &inst)
Append the specified file instant.
label size() const noexcept
The number of data sets.
static void write(const fileName &base, const UList< instant > &series, const char sep='_')
Write file series (JSON format) to disk, for specified instances.
A class for handling words, derived from Foam::string.
word outputName("finiteArea-edges.obj")
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.