<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>multiPhysicsFoam – Fluid-Flow</title><link>https://multiphysicsfoam.com/tags/fluid-flow/</link><description>Recent content in Fluid-Flow on multiPhysicsFoam</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://multiphysicsfoam.com/tags/fluid-flow/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: paraboloidInletVelocity</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/paraboloidinletvelocity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/paraboloidinletvelocity/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>paraboloidInletVelocity&lt;/code> is a &lt;code>fixedValue&lt;/code> condition for a velocity field. It
prescribes a velocity in the $+x$ direction whose magnitude is parabolic in
both $y$ and $z$, as found in the developed laminar inflow of a rectangular
channel. The peak velocity can be ramped up smoothly from zero with a
half-cosine. The BC is based on the &lt;code>setInletVelocity&lt;/code> function object of
Ž. Tuković and was taken over from the foam-extend solid-mechanics toolbox. It
is used for the 3-D FSI benchmark &amp;ldquo;beam in cross-flow&amp;rdquo;. The profile is written
in global coordinates: the inlet must be normal to $x$, and the channel must be
placed as described below.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
$$
\mathbf{U}_b = U(t)\;
\frac{y\,(2y_m - y)\,\left(z_m^2 - z^2\right)}{y_m^2\, z_m^2}\;
\mathbf{e}_x
$$
&lt;p>$(y, z)$ are the global coordinates of each face centre. The profile reaches
$U(t)$ at $y = y_m$, $z = 0$. It is zero at $y = 0$, $y = 2y_m$ and
$z = \pm z_m$. The time function is&lt;/p>
$$
U(t) =
\begin{cases}
\dfrac{U_\text{max}}{2}\left[1 - \cos\left(\dfrac{\pi\, t}{t_\text{max}}\right)\right] &amp; t &lt; t_\text{end} \\[2ex]
U_\text{max} &amp; t \ge t_\text{end}
\end{cases}
$$
&lt;p>With $t_\text{end} = t_\text{max}$ (as in the tutorials), this is a smooth ramp
from $0$ to $U_\text{max}$, after which the velocity is constant. With
$t_\text{end} > t_\text{max}$, the velocity follows the cosine further (it
oscillates between $0$ and $U_\text{max}$) until $t_\text{end}$, and then jumps
to $U_\text{max}$. With $t_\text{end} &lt; t_\text{max}$, the ramp is cut off and
the velocity jumps to $U_\text{max}$ at $t_\text{end}$. With
$t_\text{end} \le 0$, $U(t) = U_\text{max}$ from the start.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Symbol&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Unit&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>$\mathbf{U}_b$&lt;/td>
&lt;td>Patch velocity&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$U_\text{max}$&lt;/td>
&lt;td>&lt;code>maxVelocity&lt;/code>, peak velocity at full load&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$y_m$&lt;/td>
&lt;td>&lt;code>yWidth&lt;/code>: $y$ position of the peak, i.e. half the channel height for a channel $0 \le y \le 2y_m$&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$z_m$&lt;/td>
&lt;td>&lt;code>zWidth&lt;/code>: half-width in $z$ for a channel $-z_m \le z \le z_m$ (or the full width with a symmetry plane at $z=0$)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$t_\text{end}$&lt;/td>
&lt;td>&lt;code>timeVaryingEndTime&lt;/code>&lt;/td>
&lt;td>s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$t_\text{max}$&lt;/td>
&lt;td>&lt;code>timeAtMaxVelocity&lt;/code>&lt;/td>
&lt;td>s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$t$&lt;/td>
&lt;td>&lt;code>time().value()&lt;/code>&lt;/td>
&lt;td>s&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;strong>&lt;code>updateCoeffs()&lt;/code>&lt;/strong> computes $U(t)$ from the current time value and
evaluates the formula for every face centre. It assigns the result with
&lt;code>operator==&lt;/code> and calls &lt;code>fixedValue::updateCoeffs()&lt;/code>. The profile does not
depend on the patch normal or the internal field.&lt;/p>
&lt;p>&lt;strong>&lt;code>snGrad()&lt;/code>&lt;/strong> returns $(\mathbf{U}_b - \mathbf{U}_P^{*})\,/\,\delta$, where
$\mathbf{U}_P^{*} = \mathbf{U}_P + \mathbf{k}\cdot(\nabla\mathbf{U})_P$ and
$\mathbf{k} = (\mathbf{I}-\mathbf{n}\mathbf{n})\cdot\boldsymbol{\Delta}$. The
correction is only applied if a &lt;code>volTensorField&lt;/code> named &lt;code>grad(&amp;lt;U&amp;gt;)&lt;/code> is
registered. Otherwise the plain $(\mathbf{U}_b-\mathbf{U}_P)/\delta$ is used.&lt;/p>
&lt;p>&lt;strong>&lt;code>gradientBoundaryCoeffs()&lt;/code>&lt;/strong> returns
$(\mathbf{U}_b - \mathbf{k}\cdot(\nabla\mathbf{U})_P)/\delta$. If no
&lt;code>grad(&amp;lt;U&amp;gt;)&lt;/code> field is registered, it computes &lt;code>fvc::grad(U)&lt;/code> on the fly for
this. &lt;code>gradientInternalCoeffs()&lt;/code> and the value coefficients are inherited
from &lt;code>fixedValue&lt;/code>.&lt;/p>
&lt;p>A second-order variant exists in both functions, but it is hard-coded off
(&lt;code>secondOrder_ = false&lt;/code>) and cannot be selected from the dictionary.&lt;/p>
&lt;p>&lt;strong>Note on OpenFOAM.com.&lt;/strong> &lt;code>fvPatch::delta()&lt;/code> is patch-normal for non-coupled
patches, so $\mathbf{k} \equiv \mathbf{0}$. The non-orthogonal correction does
nothing, and the gradient coefficients are those of a plain &lt;code>fixedValue&lt;/code>
condition. The on-the-fly &lt;code>fvc::grad(U)&lt;/code> in &lt;code>gradientBoundaryCoeffs()&lt;/code> still
costs time on every matrix assembly.&lt;/p>
&lt;p>&lt;strong>&lt;code>write()&lt;/code>&lt;/strong> writes &lt;code>maxVelocity&lt;/code>, &lt;code>yWidth&lt;/code>, &lt;code>zWidth&lt;/code>, &lt;code>timeVaryingEndTime&lt;/code>,
&lt;code>timeAtMaxVelocity&lt;/code>, then &lt;code>type&lt;/code> and &lt;code>value&lt;/code>.&lt;/p>
&lt;h2 id="dictionary-entries">Dictionary Entries&lt;/h2>
&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>paraboloidInletVelocity&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>maxVelocity&lt;/code>&lt;/td>
&lt;td>Peak velocity $U_\text{max}$&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>yWidth&lt;/code>&lt;/td>
&lt;td>$y_m$, $y$ coordinate of the peak (half channel height)&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>zWidth&lt;/code>&lt;/td>
&lt;td>$z_m$, $z$ half-width of the profile&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>timeVaryingEndTime&lt;/code>&lt;/td>
&lt;td>$t_\text{end}$. &lt;code>0&lt;/code> gives a constant velocity from the start.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>timeAtMaxVelocity&lt;/code>&lt;/td>
&lt;td>$t_\text{max}$, end of the cosine ramp&lt;/td>
&lt;td>yes if &lt;code>timeVaryingEndTime &amp;gt; 0&lt;/code>&lt;/td>
&lt;td>&lt;code>0&lt;/code> (not read otherwise)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value (required by &lt;code>fixedValue&lt;/code>, overwritten at the first update)&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>From &lt;code>tutorials/fluidStructureInteraction/beamInCrossFlow/0/fluid/orig/partitioned/U&lt;/code>.
The fluid domain is $0 \le y \le 0.4$, $-0.4 \le z \le 0$ with a symmetry
plane at $z = 0$, so &lt;code>yWidth 0.2&lt;/code> puts the peak at mid-height and &lt;code>zWidth 0.4&lt;/code>
puts it on the symmetry plane:&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">inlet
&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 paraboloidInletVelocity;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxVelocity 0.3;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> yWidth 0.2;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> zWidth 0.4;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> timeVaryingEndTime 1.0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> timeAtMaxVelocity 1.0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform (0 0 0);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>x-direction and global coordinates only.&lt;/strong> The velocity always points
along $+\mathbf{e}_x$. $y$ and $z$ are absolute coordinates, so the channel
must start at $y = 0$ and be centred on $z = 0$. The profile cannot be
translated or rotated.&lt;/li>
&lt;li>&lt;strong>No clipping.&lt;/strong> Faces outside $0 \le y \le 2y_m$, $|z| \le z_m$ get a
negative (reversed) velocity.&lt;/li>
&lt;li>&lt;strong>&lt;code>timeAtMaxVelocity&lt;/code> must be positive&lt;/strong> when &lt;code>timeVaryingEndTime &amp;gt; 0&lt;/code>.
Otherwise $U(t)$ divides by zero.&lt;/li>
&lt;li>&lt;strong>Uses &lt;code>time().value()&lt;/code>&lt;/strong>, not the user time (&lt;code>timeOutputValue()&lt;/code>), unlike
&lt;code>solidTraction&lt;/code>&amp;rsquo;s series.&lt;/li>
&lt;li>&lt;strong>Second-order correction not selectable&lt;/strong> (hard-coded off).&lt;/li>
&lt;li>&lt;strong>Non-orthogonal correction has no effect in OpenFOAM.com&lt;/strong>, but
&lt;code>gradientBoundaryCoeffs()&lt;/code> still computes &lt;code>fvc::grad(U)&lt;/code> on each call unless
&lt;code>grad(U)&lt;/code> is registered (see the note above).&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/beamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Inlet of the &lt;code>pimpleFluid&lt;/code> region, ramped to 0.3 m/s over 1 s.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Same inlet in the thermo-FSI variant (&lt;code>pimpleFluid transportTemperature&lt;/code>).&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Cardiff, P., Karač, A., De Jaeger, P., Jasak, H., Nagy, J., Ivanković, A., Tuković, Ž., &lt;em>An open-source finite volume toolbox for solid mechanics and fluid-solid interaction simulations&lt;/em>, arXiv:1808.10736, 2018.&lt;/li>
&lt;li>Alkfri, A., Habes, C., Marschall, H., &lt;em>multiRegionFoam: A Unified Multiphysics Framework for Multi-Region Coupled Continuum-Physical Problems&lt;/em>, Engineering with Computers, 2023.
DOI: &lt;a href="https://doi.org/10.1007/s00366-024-01974-4">10.1007/s00366-024-01974-4&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>