<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>multiPhysicsFoam – Function-Object</title><link>https://multiphysicsfoam.com/tags/function-object/</link><description>Recent content in Function-Object on multiPhysicsFoam</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://multiphysicsfoam.com/tags/function-object/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: solidPointDisplacement</title><link>https://multiphysicsfoam.com/docs/user-guide/utilities/solidpointdisplacement/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/utilities/solidpointdisplacement/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>solidPointDisplacement&lt;/code> is a function object (library &lt;code>libmultiRegionFOs&lt;/code>)
that monitors the displacement of one point of a solid region. At start-up it
picks the mesh point closest to a user-given location. At every execution it
writes the time, the three components and the magnitude of the point
displacement field &lt;code>pointD&lt;/code> at that point to a &lt;code>.dat&lt;/code> file. &lt;code>pointD&lt;/code> is
provided by the &lt;code>solidStVK&lt;/code> region type. The typical use is the tip
displacement of an elastic structure in FSI benchmarks such as Hron-Turek FSI3.&lt;/p>
&lt;h2 id="method">Method&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Region.&lt;/strong> The &lt;code>region&lt;/code> keyword names the solid mesh. If it is omitted,
&lt;code>solid&lt;/code> is used when a mesh of that name exists, otherwise &lt;code>region0&lt;/code>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Point selection&lt;/strong> (constructor, once). The vector &lt;code>point&lt;/code> is read.
On each processor the mesh point with the smallest distance
$|\mathbf{x}_i - \mathbf{x}_\text{probe}|$ is found by a brute-force search
over all points of the &lt;strong>reference (undeformed)&lt;/strong> mesh. Only the processor(s)
holding the global minimum distance keep their point. If several
processors tie (e.g. a point on a processor boundary), the one with the
highest processor number is kept. Each processor that keeps a point prints
its distance to the given location. If no processor ends up with a point,
the run aborts.&lt;/p>
&lt;p>Note: this search always uses the mesh &lt;code>solid&lt;/code> if it exists, otherwise
&lt;code>region0&lt;/code>, regardless of the &lt;code>region&lt;/code> keyword (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/utilities/solidpointdisplacement/#known-limitations">Known Limitations&lt;/a>).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Sampling&lt;/strong> (&lt;code>execute()&lt;/code>, once per time step by default). In mesh
&lt;code>region&lt;/code>, the &lt;code>pointVectorField&lt;/code> &lt;code>pointD&lt;/code> is looked up. Its value at the
chosen point is taken without interpolation. All other processors
contribute zero, and the values are summed over processors. The master
writes one line&lt;/p>
$$
t \quad D_x \quad D_y \quad D_z \quad |\mathbf{D}|
$$
&lt;p>If &lt;code>pointD&lt;/code> does not exist in that mesh, a message
&lt;code>pointVectorField pointD not found&lt;/code> is printed and nothing is written for
that step.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>&lt;code>write()&lt;/code> does nothing and &lt;code>read()&lt;/code> ignores the dictionary, so changes to the
entry during the run (&lt;code>runTimeModifiable&lt;/code>) have no effect.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>&lt;code>system/controlDict&lt;/code> entry (function object):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">functions
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> displacement
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> type solidPointDisplacement;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> libs (multiRegionFOs);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> region solid;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> point (0.6 0.2 0.0075);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> }
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Keyword&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>type&lt;/code>&lt;/td>
&lt;td>&lt;code>solidPointDisplacement&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>libs&lt;/code>&lt;/td>
&lt;td>&lt;code>(multiRegionFOs)&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>point&lt;/code>&lt;/td>
&lt;td>Location (m); the closest solid mesh point is monitored&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>region&lt;/code>&lt;/td>
&lt;td>Name of the solid mesh that holds &lt;code>pointD&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>solid&lt;/code> if that mesh exists, else &lt;code>region0&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The standard function object controls that OpenFOAM handles outside the
object itself (e.g. &lt;code>executeControl&lt;/code>, &lt;code>executeInterval&lt;/code>, &lt;code>timeStart&lt;/code>,
&lt;code>timeEnd&lt;/code>) can be added. The object itself reads no other keywords.&lt;/p>
&lt;h2 id="input--output">Input / Output&lt;/h2>
&lt;p>&lt;strong>Read&lt;/strong>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Mesh&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>pointD&lt;/code>&lt;/td>
&lt;td>&lt;code>pointVectorField&lt;/code>&lt;/td>
&lt;td>&lt;code>region&lt;/code>&lt;/td>
&lt;td>Point displacement (m); registered by &lt;code>solidStVK&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Written&lt;/strong> (master processor only):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">&amp;lt;case&amp;gt;/postProcessing/&amp;lt;startTime&amp;gt;/solidPointDisplacement_&amp;lt;name&amp;gt;.dat
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>&amp;lt;name&amp;gt;&lt;/code> is the function object entry name (e.g. &lt;code>displacement&lt;/code>) and
&lt;code>&amp;lt;startTime&amp;gt;&lt;/code> is the case start time. In parallel runs the file is still
written to the undecomposed case directory (&lt;code>processor*/../postProcessing&lt;/code>).
The file starts with the header &lt;code># Time Dx Dy Dz magD&lt;/code>, followed by one
space-separated line per execution. The file is opened anew at start-up, so a
restart from the same start time overwrites the earlier file.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>&lt;code>region&lt;/code> is only partly honoured.&lt;/strong> The closest-point search always uses
mesh &lt;code>solid&lt;/code> (or &lt;code>region0&lt;/code> if there is no &lt;code>solid&lt;/code> mesh). The sampling uses
&lt;code>region&lt;/code>. In practice the solid region must be called &lt;code>solid&lt;/code>. With another
name the search falls back to &lt;code>region0&lt;/code>, which does not exist in a
multi-region case, and the run aborts.&lt;/li>
&lt;li>&lt;strong>Nearest mesh point, no interpolation.&lt;/strong> The monitored location is the
closest existing mesh point, not the exact &lt;code>point&lt;/code>. The distance is printed
at start-up, so check it in the log.&lt;/li>
&lt;li>&lt;strong>Requires &lt;code>pointD&lt;/code>.&lt;/strong> Only region types that register a &lt;code>pointVectorField&lt;/code>
called &lt;code>pointD&lt;/code> (currently &lt;code>solidStVK&lt;/code>) can be monitored. Other fields cannot
be selected.&lt;/li>
&lt;li>&lt;strong>Reference configuration.&lt;/strong> The point is selected on the solid mesh
points at start-up. This is correct for the total-Lagrangian &lt;code>solidStVK&lt;/code>,
whose mesh never moves.&lt;/li>
&lt;li>&lt;strong>Brute-force search.&lt;/strong> The point search is $O(N_\text{points})$ per
processor. This is negligible since it runs only once.&lt;/li>
&lt;li>&lt;strong>Distributed cases.&lt;/strong> With distributed data (no shared case directory),
writing to &lt;code>processor*/../postProcessing&lt;/code> can fail.&lt;/li>
&lt;li>&lt;strong>Header comment.&lt;/strong> The class description in the header refers to
&amp;ldquo;temperature&amp;rdquo; and least-squares vol-to-point interpolation. Both are wrong:
the object reads &lt;code>pointD&lt;/code> directly.&lt;/li>
&lt;/ul>
&lt;h2 id="tutorials">Tutorials&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Tutorial&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/HronTurekFsi3&lt;/code>&lt;/td>
&lt;td>Beam tip displacement at &lt;code>(0.6 0.2 0.0075)&lt;/code> (entry &lt;code>displacement&lt;/code> in &lt;code>system/functions&lt;/code>, included from &lt;code>controlDict&lt;/code>); plotted by &lt;code>deflection.gnuplot&lt;/code> from &lt;code>postProcessing/0/solidPointDisplacement_displacement.dat&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/beamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Ships a &lt;code>deflection.gnuplot&lt;/code> that reads the same file, but its &lt;code>controlDict&lt;/code> defines &lt;strong>no&lt;/strong> &lt;code>solidPointDisplacement&lt;/code> entry, so the file is not produced&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table></description></item></channel></rss>