<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>multiPhysicsFoam – Boundary-Condition</title><link>https://multiphysicsfoam.com/tags/boundary-condition/</link><description>Recent content in Boundary-Condition on multiPhysicsFoam</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://multiphysicsfoam.com/tags/boundary-condition/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: fixedGradientCorrected</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedgradientcorrected/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedgradientcorrected/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>fixedGradientCorrected&lt;/code> is a Neumann condition for fields of any type
(scalar, vector, sphericalTensor, symmTensor, tensor). It prescribes the
patch-normal gradient. Its patch value and value coefficients include a
non-orthogonal correction $\mathbf{c}\cdot\nabla\phi_P$, evaluated on a small
sub-mesh around the patch. Unlike &lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/">fixedValueCorrected&lt;/a>,
the correction enters the matrix directly, through &lt;code>valueBoundaryCoeffs&lt;/code>. It
comes from the foam-extend interface-tracking solver (&lt;code>interTrackFoam&lt;/code>,
Tuković). The BC is compiled into &lt;code>libinterfaceTrackingFvMesh&lt;/code>. It derives
from the common base &lt;code>correctedFvPatchField&lt;/code> (type &lt;code>corrected&lt;/code>). The base
class, the sub-mesh machinery, the &lt;code>corrected&lt;/code> type and the porting status
(&lt;code>interTrackFluid&lt;/code> disabled, &lt;code>patchCorrected&lt;/code> snGrad not ported) are
described on the &lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/">fixedValueCorrected&lt;/a> page.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
$$
\left.\frac{\partial\phi}{\partial n}\right|_b = g \quad \text{on } \partial\Omega,
\qquad
\phi_b = \phi_P + \phi_c + \delta\, g
$$
&lt;p>with the correction from the base class&lt;/p>
$$
\mathbf{c} = \boldsymbol{\Delta} - \mathbf{n}\,(\mathbf{n}\cdot\boldsymbol{\Delta}),
\qquad
\phi_c = \mathbf{c}\cdot(\nabla\phi)_P
$$
&lt;p>Matrix coefficients:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Coefficient&lt;/th>
&lt;th>Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>valueInternalCoeffs&lt;/code>&lt;/td>
&lt;td>$1$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>valueBoundaryCoeffs&lt;/code>&lt;/td>
&lt;td>$\phi_c + \delta\,g$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradientInternalCoeffs&lt;/code>&lt;/td>
&lt;td>$0$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradientBoundaryCoeffs&lt;/code>&lt;/td>
&lt;td>$g$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>snGrad()&lt;/code>&lt;/td>
&lt;td>$g$&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&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>$\phi$&lt;/td>
&lt;td>Patch field&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$g$&lt;/td>
&lt;td>Prescribed normal gradient (&lt;code>gradient&lt;/code>)&lt;/td>
&lt;td>field unit/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$&lt;/td>
&lt;td>Patch unit normal&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\Delta}$&lt;/td>
&lt;td>Patch delta vector (&lt;code>patch().delta()&lt;/code>)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{c}$&lt;/td>
&lt;td>Correction vector&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\phi_c$&lt;/td>
&lt;td>Stored correction (&lt;code>corrVecGrad&lt;/code>), updated in &lt;code>updateCoeffs()&lt;/code>&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\delta$&lt;/td>
&lt;td>$1/$&lt;code>patch().deltaCoeffs()&lt;/code>&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Note on OpenFOAM.com.&lt;/strong> &lt;code>fvPatch::delta()&lt;/code> is patch-normal for every
non-coupled patch in OpenFOAM.com, so $\mathbf{c} \equiv \mathbf{0}$ and
$\phi_c \equiv 0$. The coefficients reduce to those of stock &lt;code>fixedGradient&lt;/code>.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Construction:&lt;/strong> the base class reads &lt;code>volFieldName&lt;/code> (required) and the
optional &lt;code>corrVecGrad&lt;/code>. This class then reads &lt;code>gradient&lt;/code> (required). If
&lt;code>value&lt;/code> is given, it is used as the initial patch value. Otherwise
$\phi_P + \delta g + \phi_c$ is used, with $\phi_c = 0$ at that point unless
&lt;code>corrVecGrad&lt;/code> was given. &lt;code>nGradInternal&lt;/code> is set to $g$.&lt;/li>
&lt;li>&lt;strong>&lt;code>updateCoeffs()&lt;/code>&lt;/strong> (base class): recomputes $\mathbf{c}$ if the mesh moves,
rebuilds $\phi_c$ on the patch sub-mesh (gradient scheme
&lt;code>snGradCorr(&amp;lt;volFieldName&amp;gt;)&lt;/code>). It is called whenever an &lt;code>fvMatrix&lt;/code> for the
field is constructed, so &lt;code>valueBoundaryCoeffs&lt;/code> always uses the current
$\phi_c$.&lt;/li>
&lt;li>&lt;strong>&lt;code>evaluate()&lt;/code>:&lt;/strong> the class declares &lt;code>evaluate()&lt;/code> &lt;strong>without&lt;/strong> the
&lt;code>Pstream::commsTypes&lt;/code> argument. It therefore does not override
&lt;code>fvPatchField::evaluate(const Pstream::commsTypes)&lt;/code>, which
&lt;code>correctBoundaryConditions()&lt;/code> calls. In practice the base &lt;code>evaluate&lt;/code> runs,
and that only resets the &lt;code>updated&lt;/code> flag. &lt;strong>The patch value is not
recomputed&lt;/strong> from $\phi_P + \phi_c + \delta g$ after a solve. It keeps its
initial value unless code assigns it explicitly. Only the matrix
coefficients follow the formula above.&lt;/li>
&lt;li>&lt;strong>Mapping:&lt;/strong> &lt;code>autoMap&lt;/code>/&lt;code>rmap&lt;/code> map the value and &lt;code>gradient&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Sub-mesh motion:&lt;/strong> &lt;code>interfaceTrackingFvMesh::update()&lt;/code> moves the
sub-mesh only for &lt;code>U&lt;/code> and &lt;code>p&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>write()&lt;/code>:&lt;/strong> &lt;code>type&lt;/code>, &lt;code>volFieldName&lt;/code>, &lt;code>corrVecGrad&lt;/code>, &lt;code>gradient&lt;/code>, &lt;code>value&lt;/code>.&lt;/li>
&lt;/ul>
&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>fixedGradientCorrected&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>volFieldName&lt;/code>&lt;/td>
&lt;td>Name of the volume field this patch field belongs to&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>– (no default)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Prescribed normal gradient $g$&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>$\phi_P + \delta g + \phi_c$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>corrVecGrad&lt;/code>&lt;/td>
&lt;td>Initial stored correction $\phi_c$&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The library must be loaded with
&lt;code>libs (&amp;quot;libinterfaceTrackingFvMesh.so&amp;quot;);&lt;/code> in &lt;code>system/controlDict&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&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">outlet
&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 fixedGradientCorrected;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> volFieldName p;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> gradient uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 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>Patch value not updated by &lt;code>correctBoundaryConditions()&lt;/code>&lt;/strong> because the
&lt;code>evaluate()&lt;/code> signature does not match (see Implementation). Explicit
operators that use patch values (&lt;code>fvc::grad&lt;/code>, &lt;code>fvc::interpolate&lt;/code>, face
fluxes) see a stale value.&lt;/li>
&lt;li>&lt;strong>No correction in OpenFOAM.com&lt;/strong> (patch-normal &lt;code>delta()&lt;/code>). The cost of the
sub-mesh gradient remains on every &lt;code>updateCoeffs()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Interface-tracking context not available:&lt;/strong> &lt;code>interTrackFluid&lt;/code> is disabled
and &lt;code>patchCorrected&lt;/code> is not ported (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/#known-limitations">fixedValueCorrected&lt;/a>).&lt;/li>
&lt;li>&lt;strong>&lt;code>volFieldName&lt;/code> has no default&lt;/strong> and must match the field name.&lt;/li>
&lt;li>&lt;strong>Sub-mesh motion only for &lt;code>U&lt;/code> and &lt;code>p&lt;/code>.&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>In practice, use the stock &lt;code>fixedGradient&lt;/code> instead.&lt;/p>
&lt;h2 id="tutorials">Tutorials&lt;/h2>
&lt;p>No tutorial uses &lt;code>fixedGradientCorrected&lt;/code>.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Tuković, Ž., Jasak, H., &lt;em>A moving mesh finite volume interface tracking method for surface tension dominated interfacial fluid flow&lt;/em>, Computers &amp;amp; Fluids 55, 2012. DOI: &lt;a href="https://doi.org/10.1016/j.compfluid.2011.11.003">10.1016/j.compfluid.2011.11.003&lt;/a>&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><item><title>Docs: fixedValueCorrected</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>fixedValueCorrected&lt;/code> is a Dirichlet condition for fields of any type
(scalar, vector, sphericalTensor, symmTensor, tensor). On top of the fixed
value it stores a non-orthogonal correction $\mathbf{c}\cdot\nabla\phi_P$ of the
near-wall value. The correction is evaluated on a small sub-mesh around the
patch. It comes from the foam-extend interface-tracking solver
(&lt;code>interTrackFoam&lt;/code>, Tuković), where it is used on patches whose near-wall
cells become skewed as the mesh follows a moving interface. The fixed-value
matrix coefficients themselves are not corrected. The correction only reaches
the discretisation through &lt;code>snGradCorrection()&lt;/code>, which is called by the
&lt;code>patchCorrected&lt;/code> snGrad scheme. That scheme is &lt;strong>not ported&lt;/strong> (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/#known-limitations">Known Limitations&lt;/a>).&lt;/p>
&lt;p>The BC is compiled into &lt;code>libinterfaceTrackingFvMesh&lt;/code>, not
&lt;code>libmultiRegionSystem&lt;/code>, so this library must be loaded. It is one of three
types derived from the common base &lt;code>correctedFvPatchField&lt;/code>:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Type&lt;/th>
&lt;th>Page&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>fixedValueCorrected&lt;/code>&lt;/td>
&lt;td>this page&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>fixedGradientCorrected&lt;/code>&lt;/td>
&lt;td>&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedgradientcorrected/">fixedGradientCorrected&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>zeroGradientCorrected&lt;/code>&lt;/td>
&lt;td>&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/zerogradientcorrected/">zeroGradientCorrected&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>corrected&lt;/code>&lt;/td>
&lt;td>the base class itself, registered as a type but not usable on its own (see below)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
$$
\phi_b = \phi_\text{fixed} \quad \text{on } \partial\Omega
$$
&lt;p>With $\mathbf{n}$ the patch unit normal, $\boldsymbol{\Delta}$ the patch delta
vector and $\delta = 1/\texttt{deltaCoeffs}$, the base class defines the
correction vector and the stored correction&lt;/p>
$$
\mathbf{c} = \boldsymbol{\Delta} - \mathbf{n}\,(\mathbf{n}\cdot\boldsymbol{\Delta}),
\qquad
\phi_c = \mathbf{c}\cdot(\nabla\phi)_P
$$
&lt;p>and the corrected normal gradient&lt;/p>
$$
\left.\frac{\partial\phi}{\partial n}\right|_b
= \frac{\phi_b - \phi_P}{\delta} - \frac{\phi_c}{\delta}
= \frac{\phi_b - (\phi_P + \phi_c)}{\delta}
$$
&lt;p>The matrix coefficients are those of plain &lt;code>fixedValue&lt;/code>:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Coefficient&lt;/th>
&lt;th>Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>valueInternalCoeffs&lt;/code>&lt;/td>
&lt;td>$0$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>valueBoundaryCoeffs&lt;/code>&lt;/td>
&lt;td>$\phi_b$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradientInternalCoeffs&lt;/code>&lt;/td>
&lt;td>$-1/\delta$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradientBoundaryCoeffs&lt;/code>&lt;/td>
&lt;td>$\phi_b/\delta$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>snGradCorrection()&lt;/code>&lt;/td>
&lt;td>$-\phi_c/\delta$&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&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>$\phi$&lt;/td>
&lt;td>Patch field&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$&lt;/td>
&lt;td>Patch unit normal&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\Delta}$&lt;/td>
&lt;td>Patch delta vector (&lt;code>patch().delta()&lt;/code>)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{c}$&lt;/td>
&lt;td>Correction vector (&lt;code>correctionVectors()&lt;/code>)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$(\nabla\phi)_P$&lt;/td>
&lt;td>Cell gradient next to the patch, computed on the patch sub-mesh&lt;/td>
&lt;td>field unit/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\phi_c$&lt;/td>
&lt;td>Stored correction (&lt;code>corrVecGrad&lt;/code>)&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\delta$&lt;/td>
&lt;td>$1/$&lt;code>patch().deltaCoeffs()&lt;/code>&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Note on OpenFOAM.com.&lt;/strong> In OpenFOAM.com (v2512 and v2606),
&lt;code>fvPatch::delta()&lt;/code> returns the patch-normal delta for every non-coupled patch.
So $\mathbf{c} \equiv \mathbf{0}$ and $\phi_c \equiv 0$ identically. The BC then
behaves exactly like stock &lt;code>fixedValue&lt;/code>, but still does the sub-mesh work
described below on every update. The correction is only non-zero in
foam-extend, where &lt;code>delta()&lt;/code> is the full $\mathbf{C}_f - \mathbf{C}_P$.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;strong>Base class &lt;code>correctedFvPatchField&lt;/code> (type &lt;code>corrected&lt;/code>).&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;em>Construction:&lt;/em> reads &lt;code>volFieldName&lt;/code> (required) and, if present,
&lt;code>corrVecGrad&lt;/code>. It computes the correction vectors $\mathbf{c}$. It does
&lt;strong>not&lt;/strong> read &lt;code>value&lt;/code> or &lt;code>patchType&lt;/code>.&lt;/li>
&lt;li>&lt;em>&lt;code>updateCoeffs()&lt;/code>:&lt;/em> if the mesh is moving, recomputes $\mathbf{c}$. Then it
always calls &lt;code>updateCorrVecGrad()&lt;/code>:
&lt;ol>
&lt;li>On first use, builds a patch sub-mesh (&lt;code>fvMeshSubset&lt;/code>) from the
patch face cells plus all their neighbouring cells. The sub-mesh takes
its &lt;code>fvSchemes&lt;/code>/&lt;code>fvSolution&lt;/code> from the region mesh.&lt;/li>
&lt;li>Interpolates the volume field named &lt;code>volFieldName&lt;/code> onto the sub-mesh.&lt;/li>
&lt;li>For each component, computes &lt;code>fvc::grad&lt;/code> with the gradient scheme
named &lt;code>snGradCorr(&amp;lt;volFieldName&amp;gt;)&lt;/code> (normally covered by
&lt;code>gradSchemes { default ...; }&lt;/code>).&lt;/li>
&lt;li>Stores $\phi_c = \mathbf{c}\cdot(\nabla\phi)_P$ and
$\mathbf{n}\cdot(\nabla\phi)_P$ (&lt;code>nGradInternal&lt;/code>, not used by any active
code path).&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>&lt;em>&lt;code>movePatchSubMesh()&lt;/code>:&lt;/em> moves the sub-mesh points to the current mesh
points. &lt;code>interfaceTrackingFvMesh::update()&lt;/code> calls it after each mesh motion
for every &lt;code>fixedValueCorrected&lt;/code>, &lt;code>fixedGradientCorrected&lt;/code> or
&lt;code>zeroGradientCorrected&lt;/code> patch of the fields &lt;strong>&lt;code>U&lt;/code>&lt;/strong> and &lt;strong>&lt;code>p&lt;/code>&lt;/strong> only. The
sub-meshes of other fields are not moved.&lt;/li>
&lt;li>&lt;em>&lt;code>write()&lt;/code>:&lt;/em> writes &lt;code>type&lt;/code>, &lt;code>volFieldName&lt;/code> and &lt;code>corrVecGrad&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>&lt;code>fixedValueCorrected&lt;/code>.&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;em>Construction:&lt;/em> reads &lt;code>value&lt;/code> (required) in addition to the base keywords.&lt;/li>
&lt;li>&lt;code>fixesValue()&lt;/code> returns &lt;code>true&lt;/code>, so no pressure reference is needed if the BC
is used on &lt;code>p&lt;/code>.&lt;/li>
&lt;li>All assignment operators (&lt;code>=&lt;/code>, &lt;code>+=&lt;/code>, &lt;code>-=&lt;/code>, &lt;code>*=&lt;/code>, &lt;code>/=&lt;/code> with fields, patch
fields or constants) are no-ops, as in stock &lt;code>fixedValue&lt;/code>. The value can
only be changed with &lt;code>==&lt;/code>.&lt;/li>
&lt;li>&lt;code>evaluate()&lt;/code> is not overridden, so the value stays fixed.&lt;/li>
&lt;li>&lt;em>&lt;code>write()&lt;/code>:&lt;/em> base entries plus &lt;code>value&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>&lt;code>patchCorrectedSnGrad&lt;/code> (not compiled).&lt;/strong> The source is in
&lt;code>src/dynamicFvMesh/interfaceTrackingFvMesh/patchCorrectedSnGrad&lt;/code>. It is a
central snGrad scheme with explicit non-orthogonal correction, using the
gradient scheme &lt;code>snGradCorr(&amp;lt;field&amp;gt;)&lt;/code>. On patches of type
&lt;code>fixedValueCorrected&lt;/code> it replaces the boundary correction by
&lt;code>snGradCorrection()&lt;/code>. This is the only code path through which the stored
correction would enter a discretised equation. The entry in
&lt;code>src/dynamicFvMesh/Make/files&lt;/code> is commented out (&amp;ldquo;NEEDS TO BE PORTED STILL&amp;rdquo;),
so the scheme cannot be selected.&lt;/p>
&lt;h3 id="the-corrected-type">The &lt;code>corrected&lt;/code> type&lt;/h3>
&lt;p>&lt;code>makePatchFields(corrected)&lt;/code> registers the base class as type &lt;code>corrected&lt;/code> for
scalar, vector, sphericalTensor, symmTensor and tensor fields. The base class
does not implement any matrix coefficients (&lt;code>valueInternalCoeffs&lt;/code> etc. fall
back to &lt;code>fvPatchField&lt;/code>, which raises &lt;code>NotImplemented&lt;/code>). It does not read or
write &lt;code>value&lt;/code>, so its patch values are uninitialised. It also does not
override &lt;code>evaluate()&lt;/code>. &lt;code>type corrected;&lt;/code> is therefore not a usable boundary
condition. Use one of the three derived types.&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>fixedValueCorrected&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>volFieldName&lt;/code>&lt;/td>
&lt;td>Name of the volume field this patch field belongs to (e.g. &lt;code>U&lt;/code>, &lt;code>p&lt;/code>). Used to look up the field for the sub-mesh gradient.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>– (no default)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Fixed patch value&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>corrVecGrad&lt;/code>&lt;/td>
&lt;td>Initial stored correction $\phi_c$ (written on output; overwritten at the first update)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Library loading (&lt;code>system/controlDict&lt;/code> of the case):&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">libs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">(
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &amp;#34;libinterfaceTrackingFvMesh.so&amp;#34;
&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="usage">Usage&lt;/h2>
&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">movingWall
&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 fixedValueCorrected;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> volFieldName U;
&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;p>The field must be the one named in &lt;code>volFieldName&lt;/code>. The sub-mesh is only kept
in step with mesh motion if the field is &lt;code>U&lt;/code> or &lt;code>p&lt;/code> and the region mesh is an
&lt;code>interfaceTrackingFvMesh&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>No effect in OpenFOAM.com.&lt;/strong> The patch delta is patch-normal, so the
correction vectors and $\phi_c$ are identically zero. The BC is equivalent
to &lt;code>fixedValue&lt;/code>, at the cost of a sub-mesh construction and a gradient
evaluation per component on every &lt;code>updateCoeffs()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>patchCorrected&lt;/code> snGrad scheme not ported.&lt;/strong> Even with a non-zero
correction, nothing in the compiled code would use &lt;code>snGradCorrection()&lt;/code>.
The matrix coefficients are those of plain &lt;code>fixedValue&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Interface-tracking region type disabled.&lt;/strong> The BCs were meant for
&lt;code>interTrackFluid&lt;/code>, which is commented out in
&lt;code>src/multiRegionSystem/Make/files&lt;/code>. The &lt;code>multiphaseFlow&lt;/code> tutorials that need
it (&lt;code>2dRisingBubble&lt;/code>, &lt;code>3dDuineveldRisingBubble&lt;/code>, &lt;code>3dOscillatingBubble&lt;/code>)
cannot currently be run. Only &lt;code>3dDuineveldRisingBubble&lt;/code> mentions
&lt;code>patchCorrected&lt;/code>, and only in comments in its base-mesh &lt;code>fvSchemes&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>volFieldName&lt;/code> has no default&lt;/strong> and must match the field name. Otherwise
the field lookup in &lt;code>updateCoeffs()&lt;/code> fails.&lt;/li>
&lt;li>&lt;strong>Sub-mesh motion only for &lt;code>U&lt;/code> and &lt;code>p&lt;/code>.&lt;/strong> For any other field, the sub-mesh
keeps its initial geometry while the mesh moves.&lt;/li>
&lt;li>&lt;strong>&lt;code>corrected&lt;/code> is not a standalone BC&lt;/strong> (see above).&lt;/li>
&lt;/ul>
&lt;p>In practice, use the stock &lt;code>fixedValue&lt;/code> instead.&lt;/p>
&lt;h2 id="tutorials">Tutorials&lt;/h2>
&lt;p>No tutorial uses &lt;code>fixedValueCorrected&lt;/code> (or any &lt;code>*Corrected&lt;/code> type). The FSI
tutorials &lt;code>beamInCrossFlow&lt;/code>, &lt;code>heatedBeamInCrossFlow&lt;/code> and &lt;code>HronTurekFsi3&lt;/code> load
&lt;code>libinterfaceTrackingFvMesh.so&lt;/code> for their &lt;code>interfaceTrackingFvMesh&lt;/code> fluid mesh,
but their fields use stock and &lt;code>regionCoupled*&lt;/code> boundary conditions.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Tuković, Ž., Jasak, H., &lt;em>A moving mesh finite volume interface tracking method for surface tension dominated interfacial fluid flow&lt;/em>, Computers &amp;amp; Fluids 55, 2012. DOI: &lt;a href="https://doi.org/10.1016/j.compfluid.2011.11.003">10.1016/j.compfluid.2011.11.003&lt;/a>&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><item><title>Docs: genericRegionCoupledFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/genericregioncoupledflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/genericregioncoupledflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>genericRegionCoupledFlux&amp;lt;Type&amp;gt;&lt;/code> is the flux side (Neumann side) of the
partitioned Dirichlet–Neumann (DNA) coupling. It derives from &lt;code>fixedGradient&lt;/code>
and from &lt;code>interfaceToInterfaceCoupleManager&lt;/code>. In each coupling iteration it
reads the diffusive flux of the value-side partner (a
&lt;code>genericRegionCoupledJump&lt;/code>-derived BC on the neighbour patch), interpolates it
onto this patch, negates it, adds a &lt;em>flux jump&lt;/em> $j_q$ and divides by the
local diffusivity. The result is relaxed with an acceleration model and fixed
as the patch-normal gradient. Every partitioned flux-side BC derives from it:
&lt;code>regionCoupledScalarFlux&lt;/code>, &lt;code>regionCoupledHeatFlux&lt;/code>,
&lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code>, &lt;code>regionCoupledVelocityFlux&lt;/code>,
&lt;code>regionCoupledPressureFlux&lt;/code>, &lt;code>regionCoupledMassTransferVelocityFlux&lt;/code> and
&lt;code>regionCoupledTraction&lt;/code>.&lt;/p>
&lt;p>The template is also registered as a selectable patch field type
&lt;code>genericRegionCoupledFlux&lt;/code> for &lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code> fields. Both &lt;code>fluxJump()&lt;/code>
and &lt;code>flux()&lt;/code> are &lt;code>notImplemented&lt;/code>, so the bare type aborts on the first
&lt;code>updateCoeffs()&lt;/code> (see Known Limitations). In a case, use a derived BC such as
&lt;code>regionCoupledScalarFlux&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $F$ be the patch with this BC and $J$ the neighbour patch with the
value-side partner. The unrelaxed gradient in coupling iteration $k$ is&lt;/p>
$$
\left.\frac{\partial \tilde\phi_F}{\partial n}\right|^{k}
= \frac{-\,\mathcal{I}_{J\to F}\!\left(q_J\right) + j_q}{\Gamma_F}
\quad \text{on } \Gamma,
\qquad q_J = \Gamma_J \left.\frac{\partial \phi_J}{\partial n}\right|_b
$$
&lt;p>so that, at convergence,&lt;/p>
$$
\Gamma_F \frac{\partial \phi_F}{\partial n_F} + \Gamma_J \frac{\partial \phi_J}{\partial n_J} = j_q .
$$
&lt;p>$q_J$ is the &lt;code>flux()&lt;/code> of the jump-side partner, computed with its own
non-orthogonal/second-order settings (see &lt;code>genericRegionCoupledJump&lt;/code>). The
gradient is then relaxed (fixed, Aitken or IQN-ILS, as for
&lt;code>genericRegionCoupledJump&lt;/code>):&lt;/p>
$$
g_F^{\,k} = g_F^{\,k-1} + \omega^k \left(\tilde g_F^{\,k} - g_F^{\,k-1}\right).
$$
&lt;p>The patch value is evaluated from the gradient:&lt;/p>
$$
\phi_b =
\begin{cases}
\phi_P + \mathbf{k}\cdot\nabla\phi_P + \dfrac{g_F}{\Delta_f} &amp; \texttt{secondOrder false} \\[8pt]
\phi_P + \mathbf{k}\cdot\nabla\phi_P + \dfrac{g_F + \mathbf{n}\cdot\nabla\phi_P}{2\,\Delta_f} &amp; \texttt{secondOrder true}
\end{cases}
$$
&lt;p>The term $\mathbf{k}\cdot\nabla\phi_P$ ($\mathbf{k} = \mathbf{d} - \mathbf{n}(\mathbf{n}\cdot\mathbf{d})$)
is only present with &lt;code>nonOrthCorr true&lt;/code>.&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>$\phi$&lt;/td>
&lt;td>Coupled field (&lt;code>scalar&lt;/code> or &lt;code>vector&lt;/code>), same name in both regions&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$g_F$&lt;/td>
&lt;td>Fixed patch-normal gradient (&lt;code>gradient()&lt;/code>)&lt;/td>
&lt;td>field-dependent / m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$q_J$&lt;/td>
&lt;td>Diffusive flux of the jump-side partner&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathcal{I}_{J\to F}$&lt;/td>
&lt;td>Interface-to-interface interpolation of the owning interface&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$j_q$&lt;/td>
&lt;td>Flux jump, &lt;code>fluxJump()&lt;/code> of the derived class&lt;/td>
&lt;td>as $q$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Gamma_F$, $\Gamma_J$&lt;/td>
&lt;td>Diffusivities from &lt;code>diffCoeff()&lt;/code> on each side&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Delta_f$&lt;/td>
&lt;td>&lt;code>patch().deltaCoeffs()&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$, $\mathbf{d}$&lt;/td>
&lt;td>Outward unit face normal, face-to-cell-centre vector&lt;/td>
&lt;td>–, m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The interface residual checked by the DNA loop is&lt;/p>
$$
r = \left|\Gamma_F\, g_F + \mathcal{I}_{J\to F}(q_J) - j_q\right|,
\qquad
\|r\| = \frac{\|r\|_2}{\max\!\left(\min\!\left(\|\Gamma_F\, g_F\|_2,\ \|-\mathcal{I}_{J\to F}(q_J) + j_q\|_2\right),\ \texttt{SMALL}\right)}
$$
&lt;p>with the global $L_2$ norm over the patch faces. The own flux uses the
stored (relaxed) gradient $g_F$, not a gradient recomputed from the
solution.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;strong>Finding the interface.&lt;/strong> As for &lt;code>genericRegionCoupledJump&lt;/code>: the interface
is the registered &lt;code>regionInterfaceType&lt;/code> whose type equals the &lt;strong>first&lt;/strong>
&lt;code>interfaceType&lt;/code> entry and that contains this region/patch on side A or B.
No match, or more than one match of that type, is a &lt;code>FatalError&lt;/code>. The
neighbour region/patch is the other side of that interface.&lt;/p>
&lt;p>&lt;strong>&lt;code>updateCoeffs()&lt;/code>&lt;/strong>:&lt;/p>
&lt;ol>
&lt;li>Returns at once if already updated or if the interface is not &lt;code>coupled&lt;/code>
(the gradient keeps its last value).&lt;/li>
&lt;li>Calls &lt;code>update()&lt;/code> on the matched interface (topology update, curvature
update if a finite-area mesh exists, then the interface&amp;rsquo;s &lt;code>correct()&lt;/code>).&lt;/li>
&lt;li>If the derived class returns &lt;code>useDirectFlux() == true&lt;/code>, the gradient is
set to &lt;code>flux()&lt;/code> directly. In this repository only &lt;code>regionCoupledTraction&lt;/code>
does that.&lt;/li>
&lt;li>Otherwise it looks up the neighbour field under the &lt;strong>local field name&lt;/strong>,
&lt;code>refCast&lt;/code>s its patch field on the neighbour patch to
&lt;code>genericRegionCoupledJumpFvPatchField&amp;lt;Type&amp;gt;&lt;/code> and calls its &lt;code>flux()&lt;/code>. The
flux is interpolated with &lt;code>interpolateFromNbrField&lt;/code>, multiplied by $-1$,
&lt;code>fluxJump()&lt;/code> is added, and the result is divided by &lt;code>diffCoeff()&lt;/code>.&lt;/li>
&lt;li>Relaxes the gradient in place with the acceleration model
(&lt;code>accModel_-&amp;gt;relax(this-&amp;gt;gradient())&lt;/code>).&lt;/li>
&lt;li>Calls &lt;code>fixedGradientFvPatchField::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>&lt;code>evaluate()&lt;/code>&lt;/strong> is specialised for &lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code>. It calls
&lt;code>updateCoeffs()&lt;/code> if needed and sets the patch value with the formula above,
using &lt;code>grad(&amp;lt;field&amp;gt;)&lt;/code> if registered, otherwise &lt;code>fvc::grad(&amp;lt;field&amp;gt;)&lt;/code>. The
&lt;code>vector&lt;/code> version first calls &lt;code>fixedGradientFvPatchVectorField::evaluate()&lt;/code> and
then overwrites the value. The matrix coefficients (&lt;code>valueInternalCoeffs&lt;/code>,
&lt;code>valueBoundaryCoeffs&lt;/code>, &lt;code>gradientInternalCoeffs&lt;/code>, &lt;code>gradientBoundaryCoeffs&lt;/code>) are
not overridden. The diffusion term therefore receives exactly $g_F$, while
the corrections only enter through the evaluated patch value.&lt;/p>
&lt;p>&lt;strong>&lt;code>diffCoeff()&lt;/code>&lt;/strong> is identical to the jump side: name from
&lt;code>diffusivityName()&lt;/code> (the &lt;code>diffusivity&lt;/code> keyword unless overridden), &lt;code>v&lt;/code> →
&lt;code>rho&lt;/code>, &lt;code>volScalarField&lt;/code> of that name if registered, else a uniform
&lt;code>dimensionedScalar&lt;/code> from the region&amp;rsquo;s &lt;code>transportProperties&lt;/code>, and 1 for a
field named &lt;code>pKin&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Residuals.&lt;/strong> &lt;code>rawResidual()&lt;/code> and &lt;code>normResidual()&lt;/code> are called through
&lt;code>regionInterfaceType::rawFluxRes/normFluxRes&lt;/code>. &lt;code>dnaControl&lt;/code> compares the
normalised value against &lt;code>maxFluxRes&lt;/code> and writes the raw value to
&lt;code>&amp;lt;field&amp;gt;initialFluxRes&lt;/code> / &lt;code>&amp;lt;field&amp;gt;finalFluxRes&lt;/code> when &lt;code>outputFluxResField&lt;/code> is
on. &lt;code>ofNormResidual()&lt;/code> exists but is not called. With &lt;code>useDirectFlux()&lt;/code> all
residual functions stop with a &lt;code>FatalError&lt;/code>, so a derived class that uses
the direct flux must not be checked through the generic flux residual.&lt;/p>
&lt;p>&lt;strong>Acceleration.&lt;/strong> The same &lt;code>accelerationModel&lt;/code> family as on the jump side
(&lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>), applied to the gradient field. See
&lt;code>genericRegionCoupledJump&lt;/code> for the update formulas.&lt;/p>
&lt;h2 id="dictionary-entries">Dictionary Entries&lt;/h2>
&lt;p>All keywords read by the dictionary constructor (including those of
&lt;code>interfaceToInterfaceCoupleManager&lt;/code>, &lt;code>fixedGradient&lt;/code> and the acceleration
model):&lt;/p>
&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>genericRegionCoupledFlux&lt;/code> (or a derived type)&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names; only the &lt;strong>first&lt;/strong> entry is used&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read and written back, but not used (the neighbour field is looked up under the local name)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Name of the diffusivity (&lt;code>volScalarField&lt;/code> or &lt;code>transportProperties&lt;/code> entry)&lt;/td>
&lt;td>no (but see Known Limitations)&lt;/td>
&lt;td>&lt;code>word::null&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (a warning is printed when missing)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor $\omega_0$&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: number of past time steps whose modes are kept&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order patch-value evaluation&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial gradient (&lt;code>fixedGradient&lt;/code>). If present, the patch value is evaluated from it at construction. If absent, the gradient is zero and the patch value is the patch-internal value.&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Written by &lt;code>write()&lt;/code>, but &lt;strong>not read&lt;/strong> by the constructor (&lt;code>fixedGradient&lt;/code> constructs the value from &lt;code>gradient&lt;/code> or by extrapolation)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> writes &lt;code>type&lt;/code>, &lt;code>interfaceType&lt;/code>, &lt;code>neighbourFieldName&lt;/code>, &lt;code>diffusivity&lt;/code>
(if non-empty), &lt;code>accType&lt;/code>, &lt;code>relax&lt;/code> (&lt;code>couplingReuse&lt;/code> for &lt;code>IQNILS&lt;/code>),
&lt;code>nonOrthCorr&lt;/code>, &lt;code>secondOrder&lt;/code> and &lt;code>value&lt;/code>. The &lt;code>gradient&lt;/code> is &lt;strong>not&lt;/strong> written.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>As with the jump side, only derived types are usable. Generic layout (shown
with the concrete scalar BC):&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">// 0/regionB/C
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceB
&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 regionCoupledScalarFlux; // genericRegionCoupledFlux-derived
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;D&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner on the neighbour region (must be &lt;code>genericRegionCoupledJump&lt;/code>-derived,
same field name and type):&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">// 0/regionA/C
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceA
&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 regionCoupledScalarJump;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;D&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.75;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The interface entry in &lt;code>constant/regionInterfaceProperties&lt;/code> is the same as
shown for &lt;code>genericRegionCoupledJump&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Not usable on its own.&lt;/strong> &lt;code>fluxJump()&lt;/code> and &lt;code>flux()&lt;/code> call
&lt;code>notImplemented&lt;/code> (a &lt;code>FatalError&lt;/code>). &lt;code>updateCoeffs()&lt;/code> calls &lt;code>fluxJump()&lt;/code>, so
the bare type aborts on the first coupled solve.&lt;/li>
&lt;li>&lt;strong>The partner must be a jump BC.&lt;/strong> The neighbour patch field is
&lt;code>refCast&lt;/code> to &lt;code>genericRegionCoupledJumpFvPatchField&amp;lt;Type&amp;gt;&lt;/code>. Any other
neighbour BC (including another flux BC) stops the run with a bad-cast
error.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> effectively required.&lt;/strong> With the default &lt;code>word::null&lt;/code> the
&lt;code>diffCoeff()&lt;/code> lookup fails unless the derived class overrides
&lt;code>diffusivityName()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>First relaxation uses the wrong reference.&lt;/strong> The acceleration model is
initialised with the patch &lt;strong>values&lt;/strong> (&lt;code>initialize(*this)&lt;/code>), but it relaxes
the &lt;strong>gradient&lt;/strong>. In the very first coupled iteration
$g = \phi_b + \omega(\tilde g - \phi_b)$ for $\omega \ne 1$. With the
default &lt;code>fixed&lt;/code>/&lt;code>relax 1&lt;/code> (all tutorials) this has no effect.&lt;/li>
&lt;li>&lt;strong>&lt;code>gradient&lt;/code> is not written.&lt;/strong> On restart the flux BC starts from a zero
gradient (or from &lt;code>gradient&lt;/code> if added by hand), not from the last
coupled gradient.&lt;/li>
&lt;li>&lt;strong>&lt;code>value&lt;/code> is ignored on input.&lt;/strong> The initial patch value comes from
&lt;code>gradient&lt;/code> or zero-gradient extrapolation.&lt;/li>
&lt;li>&lt;strong>Corrections are explicit.&lt;/strong> &lt;code>nonOrthCorr&lt;/code>/&lt;code>secondOrder&lt;/code> only change the
evaluated patch value. The fixed-gradient matrix coefficients are unchanged.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity &amp;quot;v&amp;quot;&lt;/code> is not inverted&lt;/strong> (same dead check as on the jump side:
$\Gamma = \rho$ instead of $1/\rho$).&lt;/li>
&lt;li>&lt;strong>&lt;code>neighbourFieldName&lt;/code> has no effect&lt;/strong>; the same field name is required on
both sides.&lt;/li>
&lt;li>&lt;strong>&lt;code>IQNILS&lt;/code> is not parallel-consistent&lt;/strong> (processor-local &lt;code>sum&lt;/code>).&lt;/li>
&lt;li>&lt;strong>Partitioned only.&lt;/strong>&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;/td>
&lt;td>No tutorial uses the bare &lt;code>genericRegionCoupledFlux&lt;/code> type. Derived BCs are used in &lt;code>tutorials/conjugateHeatTransfer/*&lt;/code>, &lt;code>tutorials/electrochemistry/NTGKBatteryWithTabs&lt;/code> and &lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code> (see &lt;code>regionCoupledScalarFlux&lt;/code>, &lt;code>regionCoupledHeatFlux&lt;/code>).&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: genericRegionCoupledJump</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/genericregioncoupledjump/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/genericregioncoupledjump/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>genericRegionCoupledJump&amp;lt;Type&amp;gt;&lt;/code> is the value side (Dirichlet side) of the
partitioned Dirichlet–Neumann (DNA) coupling. It derives from &lt;code>fixedValue&lt;/code> and
from &lt;code>interfaceToInterfaceCoupleManager&lt;/code>. In each coupling iteration it sets
the patch value to the neighbour patch value, interpolated onto this patch,
plus a &lt;em>value jump&lt;/em> $j$. It then relaxes this value with an acceleration
model. It also provides the diffusive flux $\Gamma\,\partial\phi/\partial n$
that the flux-side partner (&lt;code>genericRegionCoupledFlux&lt;/code> or a class derived
from it) reads on the other side of the interface. Every partitioned value-side
BC derives from it: &lt;code>regionCoupledScalarJump&lt;/code>, &lt;code>regionCoupledTemperatureJump&lt;/code>,
&lt;code>regionCoupledVelocityValue&lt;/code>, &lt;code>regionCoupledPressureValue&lt;/code>,
&lt;code>regionCoupledMassTransferVelocityValue&lt;/code> and
&lt;code>regionCoupledMassTransferPressureValue&lt;/code>.&lt;/p>
&lt;p>The template is also registered as a selectable patch field type
&lt;code>genericRegionCoupledJump&lt;/code> for &lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code> fields. It cannot be used
on its own, though: &lt;code>valueJump()&lt;/code> is &lt;code>notImplemented&lt;/code> and aborts the run on
the first &lt;code>updateCoeffs()&lt;/code> (see Known Limitations). In a case, use a derived
BC such as &lt;code>regionCoupledScalarJump&lt;/code> instead.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $J$ be the patch with this BC and $F$ the neighbour patch with the
flux-side partner. In coupling iteration $k$ the BC computes&lt;/p>
$$
\tilde\phi_J^{\,k} = \mathcal{I}_{F\to J}\!\left(\phi_F\right) + j
\quad \text{on } \Gamma
$$
&lt;p>and fixes the relaxed value&lt;/p>
$$
\phi_J^{\,k} = \phi_J^{\,k-1} + \omega^k \left(\tilde\phi_J^{\,k} - \phi_J^{\,k-1}\right)
$$
&lt;p>(or the IQN-ILS update; see Implementation). The flux handed to the partner is&lt;/p>
$$
q_J = \Gamma_J \left.\frac{\partial \phi_J}{\partial n}\right|_b
$$
&lt;p>with the coupled patch-normal gradient (scalar fields)&lt;/p>
$$
\left.\frac{\partial \phi}{\partial n}\right|_b =
\begin{cases}
\Delta_f \left(\phi_b - \phi_P - \mathbf{k}\cdot\nabla\phi_P\right) &amp; \texttt{secondOrder false} \\[4pt]
2\,\Delta_f \left(\phi_b - \phi_P - \mathbf{k}\cdot\nabla\phi_P\right) - \mathbf{n}\cdot\nabla\phi_P &amp; \texttt{secondOrder true}
\end{cases}
\qquad
\mathbf{k} = \mathbf{d} - \mathbf{n}\,(\mathbf{n}\cdot\mathbf{d})
$$
&lt;p>The term $\mathbf{k}\cdot\nabla\phi_P$ is only present with &lt;code>nonOrthCorr true&lt;/code>.
For &lt;code>vector&lt;/code> fields the same expressions are used, and then the normal component is
removed: $\partial_n\boldsymbol{\phi} \leftarrow (\mathbf{I} - \mathbf{n}\mathbf{n})\cdot\partial_n\boldsymbol{\phi}$.&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>$\phi$&lt;/td>
&lt;td>Coupled field (&lt;code>scalar&lt;/code> or &lt;code>vector&lt;/code>), same name in both regions&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathcal{I}_{F\to J}$&lt;/td>
&lt;td>Interface-to-interface interpolation (&lt;code>AMI&lt;/code> or &lt;code>directMap&lt;/code>) of the owning interface&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$j$&lt;/td>
&lt;td>Value jump, &lt;code>valueJump()&lt;/code> of the derived class&lt;/td>
&lt;td>as $\phi$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\omega^k$&lt;/td>
&lt;td>Relaxation factor of the acceleration model&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Gamma_J$&lt;/td>
&lt;td>Diffusivity of side $J$, from &lt;code>diffCoeff()&lt;/code>&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\phi_P$, $\nabla\phi_P$&lt;/td>
&lt;td>Patch-internal cell value and cell gradient&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Delta_f$&lt;/td>
&lt;td>&lt;code>patch().deltaCoeffs()&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$, $\mathbf{d}$&lt;/td>
&lt;td>Outward unit face normal, face-to-cell-centre vector (&lt;code>patch().delta()&lt;/code>)&lt;/td>
&lt;td>–, m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The interface residual checked by the DNA loop is&lt;/p>
$$
r = \left|\phi_J - \mathcal{I}_{F\to J}(\phi_F) - j\right|,
\qquad
\|r\| = \frac{\|r\|_2}{\max\!\left(\min\!\left(\|\phi_J\|_2,\ \|\mathcal{I}_{F\to J}(\phi_F) + j\|_2\right),\ \texttt{SMALL}\right)}
$$
&lt;p>where $\|\cdot\|_2$ is the global (all-processor) $L_2$ norm over the patch faces.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;strong>Finding the interface.&lt;/strong> The coupling data are taken from a
&lt;code>regionInterfaceType&lt;/code> object. &lt;code>interfaceToInterfaceCoupleManager&lt;/code> looks up all
registered interfaces and keeps the one whose type equals the &lt;strong>first&lt;/strong> entry
of the BC&amp;rsquo;s &lt;code>interfaceType&lt;/code> list and whose side A or side B is this
region/patch. If there is no match, or more than one interface of that type
contains this patch, the run stops with a &lt;code>FatalError&lt;/code>. The neighbour region
and patch are taken from the matched interface: if this patch&amp;rsquo;s name equals
&lt;code>patchA&lt;/code> of the interface, the neighbour is side B, otherwise side A.&lt;/p>
&lt;p>&lt;strong>&lt;code>updateCoeffs()&lt;/code>&lt;/strong>, called when the coupled equation is assembled in the
DNA loop:&lt;/p>
&lt;ol>
&lt;li>Returns at once if the BC is already updated or the interface is not
&lt;code>coupled&lt;/code>. In that case the patch keeps its last value.&lt;/li>
&lt;li>Calls &lt;code>update()&lt;/code> on the matched interface. This rebuilds the global
patches if the mesh topology changed, updates the curvature if the
interface has a finite-area mesh, and calls the interface&amp;rsquo;s &lt;code>correct()&lt;/code>.&lt;/li>
&lt;li>If the derived class returns &lt;code>useDirectValue() == true&lt;/code>, the value is set
to &lt;code>value()&lt;/code> directly. No derived class in this repository does that; the
base class returns &lt;code>false&lt;/code>.&lt;/li>
&lt;li>Otherwise it looks up the neighbour field &lt;strong>under the local field name&lt;/strong>,
interpolates the neighbour patch values with
&lt;code>interpolateFromNbrField&lt;/code>, adds &lt;code>valueJump()&lt;/code> and assigns the result.&lt;/li>
&lt;li>Relaxes the patch values in place with the acceleration model
(&lt;code>accModel_-&amp;gt;relax(*this)&lt;/code>).&lt;/li>
&lt;li>Calls &lt;code>fixedValueFvPatchField::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Matrix coefficients.&lt;/strong> &lt;code>snGrad()&lt;/code> and &lt;code>gradientBoundaryCoeffs()&lt;/code> are
specialised for &lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code>. They use the cell gradient
&lt;code>grad(&amp;lt;field&amp;gt;)&lt;/code> if a field of that name is registered, otherwise they compute
&lt;code>fvc::grad(&amp;lt;field&amp;gt;)&lt;/code> on the fly. They add the non-orthogonal and
second-order corrections of the formula above, so the implicit
&lt;code>fvm::laplacian&lt;/code> of the coupled equation sees the same face gradient that
&lt;code>flux()&lt;/code> reports. &lt;code>gradientInternalCoeffs()&lt;/code> is inherited from &lt;code>fixedValue&lt;/code>
($-\Delta_f$).&lt;/p>
&lt;p>&lt;strong>&lt;code>flux()&lt;/code>&lt;/strong> returns &lt;code>snGrad() * diffCoeff()&lt;/code>. The flux-side partner calls it
through a &lt;code>refCast&lt;/code> to &lt;code>genericRegionCoupledJumpFvPatchField&amp;lt;Type&amp;gt;&lt;/code>.&lt;/p>
&lt;p>&lt;strong>&lt;code>diffCoeff()&lt;/code>&lt;/strong> resolves the diffusivity name returned by the virtual
&lt;code>diffusivityName()&lt;/code>. The base class returns the &lt;code>diffusivity&lt;/code> keyword; derived
classes may override it (&lt;code>regionCoupledTemperatureJump&lt;/code> falls back to
&lt;code>kappa&lt;/code>):&lt;/p>
&lt;ol>
&lt;li>The name &lt;code>v&lt;/code> is replaced by &lt;code>rho&lt;/code>.&lt;/li>
&lt;li>If a &lt;code>volScalarField&lt;/code> with that name is registered on the local region,
its patch values are used.&lt;/li>
&lt;li>Otherwise a uniform &lt;code>dimensionedScalar&lt;/code> with that name is read from the
region&amp;rsquo;s registered &lt;code>transportProperties&lt;/code> dictionary. A missing entry or
dictionary is a fatal error.&lt;/li>
&lt;li>For a field named &lt;code>pKin&lt;/code> the diffusivity is set to 1.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Residuals.&lt;/strong> &lt;code>rawResidual()&lt;/code> (per face) and &lt;code>normResidual()&lt;/code> (normalised,
see above) are called by &lt;code>regionInterfaceType::rawJumpRes/normJumpRes&lt;/code>. The
DNA loop (&lt;code>dnaControl&lt;/code>) compares the normalised residual against
&lt;code>maxJumpRes&lt;/code> and writes the raw residual to &lt;code>&amp;lt;field&amp;gt;initialJumpRes&lt;/code> /
&lt;code>&amp;lt;field&amp;gt;finalJumpRes&lt;/code> if &lt;code>outputJumpResField&lt;/code> is on. &lt;code>ofNormResidual()&lt;/code>
(an OpenFOAM-style normalisation) is implemented but not called anywhere.
All three residual functions stop with a &lt;code>FatalError&lt;/code> if
&lt;code>useDirectValue()&lt;/code> is true.&lt;/p>
&lt;h3 id="acceleration-models">Acceleration models&lt;/h3>
&lt;p>The acceleration model is built from the patch dictionary by
&lt;code>accelerationModel&amp;lt;Type&amp;gt;::New&lt;/code>. It is initialised with the initial patch
values and stores the last relaxed value $x^{k-1}$. In each call it forms the
residual $r^k = \tilde x^k - x^{k-1}$. The iteration counter is reset to 1 on
the first call in a new time step; $x^{k-1}$ is &lt;strong>not&lt;/strong> reset, so the first
iteration of a time step is relaxed against the final value of the previous
one.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;code>accType&lt;/code>&lt;/th>
&lt;th>Update&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>fixed&lt;/code> (default)&lt;/td>
&lt;td>$x^k = x^{k-1} + \omega_0\, r^k$ with $\omega_0 =$ &lt;code>relax&lt;/code>. With &lt;code>relax 1&lt;/code> this is no relaxation.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>aitken&lt;/code>&lt;/td>
&lt;td>$x^k = x^{k-1} + \omega^k r^k$ with $\omega^k = \left&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>Interface quasi-Newton with inverse Jacobian from a least-squares model. Iteration 1 of a time step drops stored modes older than &lt;code>couplingReuse&lt;/code> time steps. Iteration 2 stores the reference $(\tilde x_{ref}, r_{ref})$. From iteration 3 the columns $V_i = r^k - r_{ref}$, $W_i = \tilde x^k - \tilde x_{ref}$ are added. With more than one column, $c = \arg\min\|V c + r^k\|$ is solved by modified Gram–Schmidt QR and $x^k = \tilde x^k + W c$. Otherwise the fixed update with $\omega_0$ is used.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="dictionary-entries">Dictionary Entries&lt;/h2>
&lt;p>All keywords read by the dictionary constructor (including those of
&lt;code>interfaceToInterfaceCoupleManager&lt;/code> and the acceleration model):&lt;/p>
&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>genericRegionCoupledJump&lt;/code> (or a derived type)&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names, e.g. &lt;code>(defaultInterface)&lt;/code>. Only the &lt;strong>first&lt;/strong> entry is used to find the interface. Must be a list.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Name of the neighbour field. Read and written back, but not used: the neighbour field is always looked up under the local field name.&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Name of the diffusivity (&lt;code>volScalarField&lt;/code> or &lt;code>transportProperties&lt;/code> entry) used by &lt;code>flux()&lt;/code>&lt;/td>
&lt;td>no (but see Known Limitations)&lt;/td>
&lt;td>&lt;code>word::null&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Name of a jump-coefficient field/entry. Stored by the base class, used only by &lt;code>regionCoupledScalarJump&lt;/code>.&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>word::null&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (a warning is printed when missing)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor $\omega_0$&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: number of past time steps whose modes are kept&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction $\mathbf{k}\cdot\nabla\phi_P$ in &lt;code>snGrad&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order one-sided &lt;code>snGrad&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value. Read if present; otherwise the patch values are left uninitialised, so always give it.&lt;/td>
&lt;td>effectively yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> writes &lt;code>type&lt;/code>, &lt;code>interfaceType&lt;/code>, &lt;code>neighbourFieldName&lt;/code>, &lt;code>diffusivity&lt;/code>
(if the resolved name is non-empty), &lt;code>accType&lt;/code>, &lt;code>relax&lt;/code> (&lt;code>couplingReuse&lt;/code> for
&lt;code>IQNILS&lt;/code>), &lt;code>nonOrthCorr&lt;/code>, &lt;code>secondOrder&lt;/code> and &lt;code>value&lt;/code>. &lt;code>jumpCoefficient&lt;/code> is
&lt;strong>not&lt;/strong> written.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>Direct use only makes sense with a derived class; the base type aborts in
&lt;code>valueJump()&lt;/code>. The generic entry layout (shown with the concrete scalar BC)
is:&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">// 0/regionA/C
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceA
&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 regionCoupledScalarJump; // genericRegionCoupledJump-derived
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;D&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.75;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The partner on the neighbour region must be a
&lt;code>genericRegionCoupledFlux&lt;/code>-derived BC of the same field type, e.g.
&lt;code>regionCoupledScalarFlux&lt;/code>:&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">// 0/regionB/C
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceB
&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 regionCoupledScalarFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;D&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>and the patch pair must be declared in &lt;code>constant/regionInterfaceProperties&lt;/code>
under &lt;code>partitionedCoupledPatches&lt;/code>, with the field in &lt;code>coupledFields&lt;/code>:&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">partitionedCoupledPatches
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">(
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> regionAregionB
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair ((regionA interfaceA) (regionB interfaceB));
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledFields (C);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> defaultInterfaceCoeffs {}
&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;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Not usable on its own.&lt;/strong> &lt;code>genericRegionCoupledJump&lt;/code> is registered for
&lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code>, but &lt;code>valueJump()&lt;/code> calls &lt;code>notImplemented&lt;/code>, which is a
&lt;code>FatalError&lt;/code>. &lt;code>updateCoeffs()&lt;/code> calls it in every coupled iteration, so a case
using the bare type aborts on the first coupled solve.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> effectively required.&lt;/strong> The default is &lt;code>word::null&lt;/code>. Unless
a derived class overrides &lt;code>diffusivityName()&lt;/code>, &lt;code>flux()&lt;/code> (called by the
partner) then looks up an empty name in &lt;code>transportProperties&lt;/code> and stops.&lt;/li>
&lt;li>&lt;strong>&lt;code>neighbourFieldName&lt;/code> has no effect.&lt;/strong> Both coupled patches must carry a
field of the same name.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity &amp;quot;v&amp;quot;&lt;/code> is not inverted.&lt;/strong> The name &lt;code>v&lt;/code> is mapped to &lt;code>rho&lt;/code>. The
following check for &lt;code>v&lt;/code>, meant to return $1/\rho$, compares the already
replaced name and is never true, so $\Gamma = \rho$ is used.&lt;/li>
&lt;li>&lt;strong>Vector &lt;code>snGrad&lt;/code> is tangential only.&lt;/strong> For &lt;code>vector&lt;/code> fields the normal
component of $\partial_n\boldsymbol\phi$ is removed in &lt;code>snGrad()&lt;/code> and
&lt;code>gradientBoundaryCoeffs()&lt;/code>. This suits the velocity BCs built on it, but not
a general vector diffusion problem.&lt;/li>
&lt;li>&lt;strong>Acceleration state carries over time steps.&lt;/strong> $x^{k-1}$ is not reset at a
new time step, so &lt;code>relax &amp;lt; 1&lt;/code> damps the transient change of the interface
value in the first iteration of every step.&lt;/li>
&lt;li>&lt;strong>&lt;code>IQNILS&lt;/code> is not parallel-consistent.&lt;/strong> The QR products use processor-local
&lt;code>sum&lt;/code> instead of &lt;code>gSum&lt;/code>, so in a decomposed run each processor computes its
own coefficients.&lt;/li>
&lt;li>&lt;strong>Side detection by patch name only.&lt;/strong> The neighbour side is decided by
comparing the local patch name with &lt;code>patchA&lt;/code> of the interface. Two coupled
patches with the same name in both regions would resolve to the wrong
neighbour (inferred, untested).&lt;/li>
&lt;li>&lt;strong>&lt;code>jumpCoefficient&lt;/code> is not written&lt;/strong> by &lt;code>write()&lt;/code>, so it is lost after
&lt;code>decomposePar&lt;/code>/&lt;code>reconstructPar&lt;/code> round trips or in written time directories.&lt;/li>
&lt;li>&lt;strong>Jump–jump pairing.&lt;/strong> Nothing prevents a jump BC on both sides, but then no
flux BC exists and &lt;code>normFluxRes&lt;/code> returns &lt;code>GREAT&lt;/code> with a warning, so the DNA
loop always runs &lt;code>maxCoupleIter&lt;/code> iterations (inferred from the code).&lt;/li>
&lt;li>&lt;strong>Partitioned only.&lt;/strong> The monolithic solve is commented out in
&lt;code>multiRegionSystem::solve()&lt;/code>.&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;/td>
&lt;td>No tutorial uses the bare &lt;code>genericRegionCoupledJump&lt;/code> type. Derived BCs are used in &lt;code>tutorials/conjugateHeatTransfer/*&lt;/code>, &lt;code>tutorials/electrochemistry/NTGKBatteryWithTabs&lt;/code> and &lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code> (see &lt;code>regionCoupledScalarJump&lt;/code>, &lt;code>regionCoupledTemperatureJump&lt;/code>).&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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;li>Küttler, U., Wall, W. A., &lt;em>Fixed-point fluid–structure interaction solvers with dynamic relaxation&lt;/em>, Computational Mechanics 43, 2008. DOI: &lt;a href="https://doi.org/10.1007/s00466-008-0255-5">10.1007/s00466-008-0255-5&lt;/a>&lt;/li>
&lt;li>Degroote, J., Bathe, K.-J., Vierendeels, J., &lt;em>Performance of a new partitioned procedure versus a monolithic procedure in fluid–structure interaction&lt;/em>, Computers &amp;amp; Structures 87, 2009. DOI: &lt;a href="https://doi.org/10.1016/j.compstruc.2008.11.013">10.1016/j.compstruc.2008.11.013&lt;/a>&lt;/li>
&lt;/ul></description></item><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><item><title>Docs: regionCoupledHeatFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledheatflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledheatflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledHeatFlux&lt;/code> is the flux side (Neumann side) of the temperature
coupling used with &lt;code>heatTransferInterface&lt;/code> for conjugate heat transfer and
thermo-FSI. It derives from &lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code> (and so from
&lt;code>fixedGradient&lt;/code>). It fixes the normal temperature gradient so that the local
conductive heat flux is equal and opposite to the heat flux of the
value-side partner on the neighbour region, without an interfacial source.
The partner must be a &lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>-derived BC, in
practice &lt;code>regionCoupledTemperatureJump&lt;/code>. Unlike its partner, this BC does
&lt;strong>not&lt;/strong> check the interface type (see Implementation).&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $B$ be this patch and $A$ the neighbour (jump-side) patch:&lt;/p>
$$
\kappa_A \frac{\partial T_A}{\partial n_A} + \kappa_B \frac{\partial T_B}{\partial n_B} = 0
\quad \text{on } \Gamma
$$
&lt;p>imposed as the gradient&lt;/p>
$$
\left.\frac{\partial T_B}{\partial n}\right|_b
= -\frac{\mathcal{I}_{A\to B}\!\left(\kappa_A\, \partial_n T_A\right)}{\kappa_B}
$$
&lt;p>followed by relaxation with the acceleration model. &lt;code>fluxJump()&lt;/code> returns zero.&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>$T$&lt;/td>
&lt;td>Temperature (field &lt;code>T&lt;/code> in both regions)&lt;/td>
&lt;td>K&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\kappa_B$&lt;/td>
&lt;td>Diffusivity named by &lt;code>diffusivity&lt;/code>, default &lt;code>kappa&lt;/code>&lt;/td>
&lt;td>W/(m K)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\kappa_A\,\partial_n T_A$&lt;/td>
&lt;td>&lt;code>flux()&lt;/code> of the jump-side partner&lt;/td>
&lt;td>W/m²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathcal{I}_{A\to B}$&lt;/td>
&lt;td>Interface-to-interface interpolation&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>Run-time work is inherited from &lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code> (see
there). The class adds:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>&lt;code>fluxJump()&lt;/code>&lt;/strong>: returns a zero field.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivityName()&lt;/code>&lt;/strong>: the &lt;code>diffusivity&lt;/code> keyword if set, otherwise
&lt;code>kappa&lt;/code>. &lt;code>diffCoeff()&lt;/code> uses a &lt;code>volScalarField&lt;/code> with that name on the local
region if one is registered, otherwise a uniform &lt;code>dimensionedScalar&lt;/code> from
the region&amp;rsquo;s &lt;code>transportProperties&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>heatTransInterface()&lt;/code>&lt;/strong>: a type check plus cast to
&lt;code>heatTransferInterface&lt;/code>, as in &lt;code>regionCoupledTemperatureJump&lt;/code>. It is
declared and defined but &lt;strong>never called&lt;/strong>, so the BC accepts any interface
type listed first in &lt;code>interfaceType&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Per DNA iteration of &lt;code>T&lt;/code>, &lt;code>updateCoeffs()&lt;/code> updates the interface,
&lt;code>refCast&lt;/code>s the neighbour &lt;code>T&lt;/code> patch field to
&lt;code>genericRegionCoupledJumpFvPatchField&amp;lt;scalar&amp;gt;&lt;/code>, interpolates and negates its
&lt;code>flux()&lt;/code>, divides by the local $\kappa$, relaxes the gradient and fixes it.
&lt;code>evaluate()&lt;/code> sets the patch temperature from the gradient (with the optional
non-orthogonal and second-order corrections). The flux residual
$|\kappa_B g_B + \mathcal{I}(q_A)|$ is checked against &lt;code>maxFluxRes&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>regionCoupledHeatFlux&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>Interface type list; the first entry selects the interface (normally &lt;code>heatTransferInterface&lt;/code>; not checked)&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Name of the thermal conductivity field / &lt;code>transportProperties&lt;/code> entry&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>kappa&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read and written, not used&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name (&lt;code>T&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code> or &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (with warning)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: reused time steps&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order value evaluation&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial gradient; if given, the initial patch value is evaluated from it&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (only written)&lt;/td>
&lt;td>no&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/heatedBeamInCrossFlow/0/solid/orig/partitioned/T&lt;/code>:&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">interface
&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 regionCoupledHeatFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (heatTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;kappa&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner in &lt;code>0/fluid/orig/partitioned/T&lt;/code>:&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">interfaceShadow
&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 regionCoupledTemperatureJump;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (heatTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;kappa&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.75;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Interface in &lt;code>constant/regionInterfaceProperties&lt;/code> (heat transfer stacked on
FSI):&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">fluidsolid
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (fsiInterface heatTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluid interfaceShadow)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (solid interface)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> );
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledFields
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> D
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> T
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> );
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupled yes;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> fsiInterfaceCoeffs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> heatTransferInterfaceCoeffs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> jumpCoefficient jumpCoefficient [ 0 0 0 0 0 0 0 ] 1;
&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;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>No interface-type check.&lt;/strong> &lt;code>heatTransInterface()&lt;/code> is never called, so a
wrong first &lt;code>interfaceType&lt;/code> entry is not caught here. It is usually caught
by the partner &lt;code>regionCoupledTemperatureJump&lt;/code>, which does check.&lt;/li>
&lt;li>&lt;strong>Partner must be a jump BC&lt;/strong> of &lt;code>T&lt;/code> (bad-cast error otherwise).&lt;/li>
&lt;li>&lt;strong>No interfacial heat source or contact resistance&lt;/strong>: &lt;code>fluxJump()&lt;/code> is zero.
For phase change use &lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code>.&lt;/li>
&lt;li>&lt;strong>No unit check on &lt;code>kappa&lt;/code>&lt;/strong> across the two regions.&lt;/li>
&lt;li>&lt;strong>&lt;code>value&lt;/code> is ignored on input&lt;/strong> and &lt;strong>&lt;code>gradient&lt;/code> is not written&lt;/strong> (restart
starts from a zero gradient).&lt;/li>
&lt;li>&lt;strong>First relaxation uses the patch values as reference&lt;/strong> (inherited; the
tutorials use the default &lt;code>fixed&lt;/code>/&lt;code>relax 1&lt;/code> on this side, where it has no
effect).&lt;/li>
&lt;li>Inherited from &lt;code>genericRegionCoupledFlux&lt;/code>: &lt;code>neighbourFieldName&lt;/code> unused,
corrections only in the evaluated value, &lt;code>IQNILS&lt;/code> not parallel-consistent,
partitioned only.&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/conjugateHeatTransfer/flowOverHeatedPlate&lt;/code>&lt;/td>
&lt;td>Solid side (&lt;code>conductTemperature&lt;/code>, patch &lt;code>top&lt;/code>), default &lt;code>kappa&lt;/code>, no relaxation.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/conjugateHeatTransfer/ShellAndTubeHeatExchanger&lt;/code>&lt;/td>
&lt;td>Solid side towards both fluids (&lt;code>solid_to_inner&lt;/code>, &lt;code>solid_to_outer&lt;/code>), &lt;code>nonOrthCorr true&lt;/code>, &lt;code>AMI&lt;/code>.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Solid side (&lt;code>solidStVK conductTemperature&lt;/code>) of the thermo-FSI interface.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledMassTransferPressureValue</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransferpressurevalue/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransferpressurevalue/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledMassTransferPressureValue&lt;/code> is the Dirichlet (jump) half of the
partitioned pressure coupling across a sharp liquid-vapour interface with
phase change. It acts on a &lt;code>volScalarField&lt;/code> (&lt;code>p&lt;/code> or &lt;code>pKin&lt;/code>) and derives from
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>, i.e. from &lt;code>fixedValue&lt;/code>. It applies the
same normal-stress jump as &lt;code>regionCoupledPressureValue&lt;/code> and adds the recoil
pressure $-(1/\rho_\text{own}-1/\rho_\text{nbr})\,\dot m^2$. There is no
mass-transfer pressure-flux BC; the partner is presumably
&lt;code>regionCoupledPressureFlux&lt;/code> (&lt;em>inferred&lt;/em>). The BC needs a &lt;code>capillaryInterface&lt;/code>
as the &lt;strong>first&lt;/strong> &lt;code>interfaceType&lt;/code> entry and a &lt;code>massTransferInterface&lt;/code> on the
same patch pair.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>The BC sits on side A (&amp;ldquo;own&amp;rdquo;), which carries the &lt;code>faMesh&lt;/code> of the
&lt;code>capillaryInterface&lt;/code>; &amp;ldquo;nbr&amp;rdquo; is side B.
$\tilde{\dot m} = \mathcal{I}_{\text{nbr}\to\text{own}}(\dot m)$.&lt;/p>
&lt;p>For a field named &lt;code>p&lt;/code>:&lt;/p>
$$
p_\text{own}^{*} = \mathcal{I}(p_\text{nbr}) + 2(\mu_\text{nbr}-\mu_\text{own})\,\nabla_s\cdot\mathbf{u}_s - \sigma\kappa + (\rho_\text{nbr}-\rho_\text{own})\,(\mathbf{x}_f-\mathbf{x}_\text{ref})\cdot\mathbf{g} - \left(\frac{1}{\rho_\text{own}}-\frac{1}{\rho_\text{nbr}}\right)\tilde{\dot m}^2
\quad \text{on } \Gamma
$$
&lt;p>For a field named &lt;code>pKin&lt;/code>:&lt;/p>
$$
p_{\text{kin,own}}^{*} = \frac{1}{\rho_\text{own}}\Big[\rho_\text{nbr}\,\mathcal{I}(p_\text{kin,nbr}) + 2(\mu_\text{nbr}-\mu_\text{own})\,\nabla_s\cdot\mathbf{u}_s - \sigma\kappa + (\rho_\text{nbr}-\rho_\text{own})\,(\mathbf{x}_f-\mathbf{x}_\text{ref})\cdot\mathbf{g} - \left(\frac{1}{\rho_\text{own}}-\frac{1}{\rho_\text{nbr}}\right)\tilde{\dot m}^2\Big]
$$
&lt;p>followed by relaxation, $p^{k} = p^{k-1} + \omega\,(p^{*} - p^{k-1})$.&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>$p$, $p_\text{kin}$&lt;/td>
&lt;td>Pressure / kinematic pressure&lt;/td>
&lt;td>Pa / m²/s²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\dot m$&lt;/td>
&lt;td>Interfacial mass flux, &lt;code>mDotS()&lt;/code> of the &lt;code>massTransferInterface&lt;/code>&lt;/td>
&lt;td>kg/(m² s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{u}_s$&lt;/td>
&lt;td>Surface velocity on the &lt;code>faMesh&lt;/code> (&lt;code>Us()&lt;/code>)&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\sigma$, $\kappa$&lt;/td>
&lt;td>Surface tension and face curvature from the &lt;code>capillaryInterface&lt;/code>&lt;/td>
&lt;td>N/m, 1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mu$, $\rho$&lt;/td>
&lt;td>&lt;code>mu&lt;/code>, &lt;code>rho&lt;/code> from each region&amp;rsquo;s &lt;code>transportProperties&lt;/code>&lt;/td>
&lt;td>Pa·s, kg/m³&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{g}$&lt;/td>
&lt;td>&lt;code>uniformDimensionedVectorField g&lt;/code> of the local region&lt;/td>
&lt;td>m/s²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{x}_\text{ref}$&lt;/td>
&lt;td>&lt;code>PISO.pRefPoint&lt;/code> from the local &lt;code>fvSolution&lt;/code>&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledJump&lt;/code>: return if
updated or &lt;code>coupled no&lt;/code>; call &lt;code>update()&lt;/code> on the first &lt;code>interfaceType&lt;/code> (the
&lt;code>capillaryInterface&lt;/code>); interpolate the neighbour field (looked up by the
local field name); add &lt;code>valueJump()&lt;/code>; relax; call
&lt;code>fixedValue::updateCoeffs()&lt;/code>.&lt;/p>
&lt;p>&lt;code>valueJump()&lt;/code> is that of &lt;code>regionCoupledPressureValue&lt;/code> with the extra recoil
term. It aborts unless the first &lt;code>interfaceType&lt;/code> is &lt;code>capillaryInterface&lt;/code>,
finds the &lt;code>massTransferInterface&lt;/code> by type name and interpolates &lt;code>mDotS()&lt;/code>
from the neighbour side. &lt;code>PISO.pRefPoint&lt;/code>, &lt;code>g&lt;/code>, and &lt;code>mu&lt;/code>/&lt;code>rho&lt;/code> of both
regions are required. The mesh flux and patch normals are computed but not
used.&lt;/p>
&lt;p>Since only the first interface is &lt;code>update()&lt;/code>d, $\dot m$ is not recomputed by
this BC. It changes only when a BC that lists &lt;code>massTransferInterface&lt;/code> first
(e.g. &lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code> on &lt;code>T&lt;/code>) is updated. Until then the
recoil term is zero and the BC behaves like &lt;code>regionCoupledPressureValue&lt;/code>.&lt;/p>
&lt;p>The &lt;code>p&lt;/code> jump residual of the &lt;code>pUPimple&lt;/code> DNA loop is taken from this BC
(side A is checked first). &lt;code>flux()&lt;/code> uses the hardcoded diffusivity &lt;code>v&lt;/code>, for
which &lt;code>diffCoeff()&lt;/code> returns $\rho$ instead of $1/\rho$ (1 for &lt;code>pKin&lt;/code>); the
partner &lt;code>regionCoupledPressureFlux&lt;/code> cancels this flux.&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>regionCoupledMassTransferPressureValue&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. First entry must be &lt;code>capillaryInterface&lt;/code>; &lt;code>massTransferInterface&lt;/code> must also be listed&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value. Read if present. If missing, the patch values are not initialised&lt;/td>
&lt;td>in practice yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>v&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, not used by this BC&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Read by the base class, not used, not written back&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>snGrad()&lt;/code> / matrix coefficients&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order face-normal gradient&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Entries read from other files: &lt;code>PISO { pRefPoint (...); }&lt;/code> in the local
&lt;code>fvSolution&lt;/code>, &lt;code>g&lt;/code> in the local &lt;code>constant/&lt;/code>, and &lt;code>mu&lt;/code>, &lt;code>rho&lt;/code> in
&lt;code>transportProperties&lt;/code> of both regions.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>No tutorial uses this BC. Untested entry on side A, following
&lt;code>massTransferInterface&lt;/code>:&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">// 0/fluidA/p
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interface
&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 regionCoupledMassTransferPressureValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner on side B (&lt;em>inferred&lt;/em>):&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">// 0/fluidB/p
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceShadow
&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 regionCoupledPressureFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>regionInterfaceProperties&lt;/code> entry is shown on the
&lt;code>regionCoupledMassTransferVelocityValue&lt;/code> page and in &lt;code>massTransferInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Untested, no tutorial&lt;/strong>; the intended region type &lt;code>interTrackFluid&lt;/code> is
disabled.&lt;/li>
&lt;li>&lt;strong>$\dot m$ is only updated through another BC.&lt;/strong> See
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransferpressurevalue/#implementation">Implementation&lt;/a>.&lt;/li>
&lt;li>&lt;strong>&lt;code>mDotS()&lt;/code> is interpolated from the neighbour although it is defined on
side A&lt;/strong> (&lt;em>inferred&lt;/em>), where this BC sits. Harmless only for identical
conformal patches.&lt;/li>
&lt;li>&lt;strong>Must sit on side A&lt;/strong> (&lt;em>inferred&lt;/em>): $\sigma$, $\kappa$ and
$\nabla_s\cdot\mathbf{u}_s$ are used without interpolation.&lt;/li>
&lt;li>&lt;strong>No dedicated flux partner.&lt;/strong> &lt;code>regionCoupledPressureFlux&lt;/code> does not
account for phase change.&lt;/li>
&lt;li>&lt;strong>Constant properties&lt;/strong>, &lt;code>PISO.pRefPoint&lt;/code> required, &lt;code>diffusivity&lt;/code> and
&lt;code>neighbourFieldName&lt;/code> ignored (as for &lt;code>regionCoupledPressureValue&lt;/code>).&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;/td>
&lt;td>No tutorial uses &lt;code>regionCoupledMassTransferPressureValue&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledMassTransferVelocityFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledMassTransferVelocityFlux&lt;/code> is the Neumann (flux) half of the
partitioned velocity coupling across a sharp liquid-vapour interface with
phase change. It acts on a &lt;code>volVectorField&lt;/code> (&lt;code>U&lt;/code>) and derives from
&lt;code>genericRegionCoupledFlux&amp;lt;vector&amp;gt;&lt;/code>, i.e. from &lt;code>fixedGradient&lt;/code>. It uses the
same stress balance as &lt;code>regionCoupledVelocityFlux&lt;/code> and adds the momentum
flux $\dot m\,[\![\mathbf{u}_\text{rel}]\!]$ that the mass flux carries
across the interface. The partner condition on the other side is
&lt;code>regionCoupledMassTransferVelocityValue&lt;/code>. The BC needs a &lt;code>capillaryInterface&lt;/code>
as the &lt;strong>first&lt;/strong> &lt;code>interfaceType&lt;/code> entry and a &lt;code>massTransferInterface&lt;/code> on the
same patch pair.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>&amp;ldquo;own&amp;rdquo; is the side the BC sits on (side A, which carries the &lt;code>faMesh&lt;/code>) and
&amp;ldquo;nbr&amp;rdquo; the other side. $\mathbf{n}$ is the &lt;code>faMesh&lt;/code> face normal,
$\mathbf{n}_\varepsilon = \mathbf{n}$ if the local region is &lt;code>meshA&lt;/code> of the
&lt;code>capillaryInterface&lt;/code> (otherwise $-\mathbf{n}$). $\tilde{\mathbf{F}}$ is the
interpolated diffusive flux of the partner BC ($\mu_\text{nbr}$ times the
tangential face-normal gradient) and
$\tilde{\dot m} = \mathcal{I}_{\text{nbr}\to\text{own}}(\dot m)$.&lt;/p>
$$
\mu_\text{own}\frac{\partial \mathbf{U}_\text{own}}{\partial n} =
-(\mathbf{I}-\mathbf{n}\mathbf{n})\cdot\tilde{\mathbf{F}} + \mathbf{f}_{\sigma,t} - \mu_\text{own}\,\mathbf{n}\,(\nabla_s\cdot\mathbf{u}_s) + (\mu_\text{nbr}-\mu_\text{own})\,(\nabla_s\mathbf{u}_s)\cdot\mathbf{n} + \tilde{\dot m}\left[\left(\frac{\tilde{\dot m}}{\rho_\text{own}}\mathbf{n}_\varepsilon - \mathbf{U}_\text{own}\right) - \left(\frac{\tilde{\dot m}}{\rho_\text{nbr}}\mathbf{n}_\varepsilon - \mathbf{U}_\text{nbr}\right)\right]
$$
&lt;p>with the tangential surface-tension force&lt;/p>
$$
\mathbf{f}_{\sigma,t} = \sigma\,\frac{1}{S_f}\sum_{e} \mathbf{L}_e\,c_e \;-\; \sigma\kappa\,\mathbf{n}
$$
&lt;p>$\mathbf{U}_\text{own}$ are the current patch values (previous iteration) and
$\mathbf{U}_\text{nbr}$ the neighbour patch values &lt;strong>without interpolation&lt;/strong>
(see &lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityflux/#known-limitations">Known Limitations&lt;/a>). The gradient is relaxed,
$g^{k} = g^{k-1} + \omega\,(g^{*} - g^{k-1})$, and the patch value is
reconstructed from it in &lt;code>evaluate()&lt;/code> as described for
&lt;code>regionCoupledVelocityFlux&lt;/code>.&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}$&lt;/td>
&lt;td>Velocity&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\dot m$&lt;/td>
&lt;td>Interfacial mass flux, &lt;code>mDotS()&lt;/code> of the &lt;code>massTransferInterface&lt;/code>&lt;/td>
&lt;td>kg/(m² s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{u}_s$&lt;/td>
&lt;td>Surface velocity on the &lt;code>faMesh&lt;/code> (&lt;code>Us()&lt;/code>)&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\sigma$, $\kappa$&lt;/td>
&lt;td>Surface tension and face curvature from the &lt;code>capillaryInterface&lt;/code>&lt;/td>
&lt;td>N/m, 1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{L}_e$, $c_e$&lt;/td>
&lt;td>&lt;code>faMesh&lt;/code> edge length vectors and &lt;code>edgeLengthCorrection()&lt;/code>&lt;/td>
&lt;td>m, –&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mu$, $\rho$&lt;/td>
&lt;td>&lt;code>mu&lt;/code>, &lt;code>rho&lt;/code> from each region&amp;rsquo;s &lt;code>transportProperties&lt;/code>&lt;/td>
&lt;td>Pa·s, kg/m³&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledFlux&lt;/code>: return if
updated or &lt;code>coupled no&lt;/code>; call &lt;code>update()&lt;/code> on the first &lt;code>interfaceType&lt;/code> (the
&lt;code>capillaryInterface&lt;/code>); interpolate and negate the neighbour &lt;code>flux()&lt;/code> (the
neighbour patch field is &lt;code>refCast&lt;/code> to &lt;code>genericRegionCoupledJump&amp;lt;vector&amp;gt;&lt;/code>);
add &lt;code>fluxJump()&lt;/code>; divide by &lt;code>diffCoeff()&lt;/code> (hardcoded name &lt;code>mu&lt;/code>: registered
&lt;code>volScalarField mu&lt;/code>, else &lt;code>transportProperties&lt;/code>); relax; call
&lt;code>fixedGradient::updateCoeffs()&lt;/code>.&lt;/p>
&lt;p>&lt;code>fluxJump()&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>aborts unless the first &lt;code>interfaceType&lt;/code> is &lt;code>capillaryInterface&lt;/code>; finds the
&lt;code>massTransferInterface&lt;/code> by type name;&lt;/li>
&lt;li>computes $\nabla_s\cdot\mathbf{u}_s$, $\nabla_s\mathbf{u}_s$ and the
edge-integrated surface-tension force on the &lt;code>faMesh&lt;/code>;&lt;/li>
&lt;li>reads &lt;code>mu&lt;/code> and &lt;code>rho&lt;/code> of both regions from &lt;code>transportProperties&lt;/code>; if a
region has a &lt;code>pKin&lt;/code> field, its &lt;code>mu&lt;/code> must equal &lt;code>rho*nu&lt;/code> exactly, otherwise
the run stops;&lt;/li>
&lt;li>interpolates &lt;code>mDotS()&lt;/code> from the neighbour side.&lt;/li>
&lt;/ul>
&lt;p>Because only the first interface is &lt;code>update()&lt;/code>d, $\dot m$ is not recomputed by
this BC. It changes only when a BC that lists &lt;code>massTransferInterface&lt;/code> first
(e.g. &lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code> on &lt;code>T&lt;/code>) is updated.&lt;/p>
&lt;p>The &lt;code>U&lt;/code> flux residual of the &lt;code>pUPimple&lt;/code> DNA loop is taken from this BC if it
sits on side A:
$\lVert\mu_\text{own}\partial_n\mathbf{U}_\text{own} + \tilde{\mathbf{F}} - \text{fluxJump}\rVert_2$,
normalised as in &lt;code>genericRegionCoupledFlux&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>regionCoupledMassTransferVelocityFlux&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. First entry must be &lt;code>capillaryInterface&lt;/code>; &lt;code>massTransferInterface&lt;/code> must also be listed&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial patch-normal gradient. Read if present; otherwise zero gradient and the patch value is set from the internal field&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (&lt;code>fixedGradient&lt;/code> ignores it). Written by &lt;code>write()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>mu&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, not used by this BC&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model for the gradient: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order reconstruction of the patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> does not write &lt;code>gradient&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>No tutorial uses this BC. Untested entry on side A, following
&lt;code>massTransferInterface&lt;/code>:&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">// 0/fluidA/U
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interface
&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 regionCoupledMassTransferVelocityFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&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;p>Partner on side B:&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">// 0/fluidB/U
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceShadow
&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 regionCoupledMassTransferVelocityValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&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;p>The &lt;code>regionInterfaceProperties&lt;/code> entry is shown on the
&lt;code>regionCoupledMassTransferVelocityValue&lt;/code> page and in &lt;code>massTransferInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Neighbour velocity is not interpolated (bug).&lt;/strong> $\mathbf{U}_\text{nbr}$
in the mass-flux term is the raw neighbour patch field, combined index by
index with local fields. This is only correct for conformal patches with
identical face order; otherwise the sizes may not even match.&lt;/li>
&lt;li>&lt;strong>&lt;code>mDotS()&lt;/code> is interpolated from the neighbour although it is defined on
side A&lt;/strong> (&lt;em>inferred&lt;/em>), where this BC sits. Harmless only for identical
conformal patches.&lt;/li>
&lt;li>&lt;strong>Must sit on side A&lt;/strong> (&lt;em>inferred&lt;/em>): &lt;code>faMesh&lt;/code> normals, $\mathbf{u}_s$,
$\sigma$, $\kappa$ are used without interpolation.&lt;/li>
&lt;li>&lt;strong>$\dot m$ is only updated through another BC.&lt;/strong> See
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityflux/#implementation">Implementation&lt;/a>.&lt;/li>
&lt;li>&lt;strong>Exact &lt;code>mu == rho*nu&lt;/code> check&lt;/strong> for regions with &lt;code>pKin&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Relaxation history starts from the patch value&lt;/strong> (&lt;em>inferred&lt;/em>). The base
class initialises the acceleration model with the patch values but relaxes
the gradient; harmless with &lt;code>relax 1&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Untested, no tutorial&lt;/strong>; &lt;code>interTrackFluid&lt;/code> is disabled.&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;/td>
&lt;td>No tutorial uses &lt;code>regionCoupledMassTransferVelocityFlux&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledMassTransferVelocityValue</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityvalue/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityvalue/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledMassTransferVelocityValue&lt;/code> is the Dirichlet (jump) half of the
partitioned velocity coupling across a sharp liquid-vapour interface with
phase change. It acts on a &lt;code>volVectorField&lt;/code> (&lt;code>U&lt;/code>) and derives from
&lt;code>genericRegionCoupledJump&amp;lt;vector&amp;gt;&lt;/code>, i.e. from &lt;code>fixedValue&lt;/code>. The patch value is
the interpolated neighbour velocity plus the jump in normal velocity that a
mass flux $\dot m$ produces between two phases of different density. The
partner condition on the other side is
&lt;code>regionCoupledMassTransferVelocityFlux&lt;/code>. The BC needs both a
&lt;code>capillaryInterface&lt;/code> and a &lt;code>massTransferInterface&lt;/code> on the same patch pair,
and the pressure is coupled by &lt;code>regionCoupledMassTransferPressureValue&lt;/code> and
(&lt;em>inferred&lt;/em>) &lt;code>regionCoupledPressureFlux&lt;/code>. It is the phase-change counterpart
of &lt;code>regionCoupledVelocityValue&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>&amp;ldquo;own&amp;rdquo; is the side the BC sits on and &amp;ldquo;nbr&amp;rdquo; the other side.
$\mathcal{I}_{\text{nbr}\to\text{own}}$ is the patch-to-patch interpolation.
$\mathbf{n}_\varepsilon$ is the local patch normal if the local region is
&lt;code>meshA&lt;/code> of the &lt;code>capillaryInterface&lt;/code>, and its negative otherwise. In both
cases it points out of region A.&lt;/p>
$$
\mathbf{U}_\text{own}^{*} = \mathcal{I}_{\text{nbr}\to\text{own}}(\mathbf{U}_\text{nbr}) + \left(\frac{1}{\rho_\text{own}} - \frac{1}{\rho_\text{nbr}}\right)\tilde{\dot m}\,\mathbf{n}_\varepsilon,
\qquad
\tilde{\dot m} = \mathcal{I}_{\text{nbr}\to\text{own}}(\dot m)
\quad \text{on } \Gamma
$$
&lt;p>followed by relaxation,
$\mathbf{U}^{k} = \mathbf{U}^{k-1} + \omega\,(\mathbf{U}^{*} - \mathbf{U}^{k-1})$.&lt;/p>
&lt;p>Unlike &lt;code>regionCoupledVelocityValue&lt;/code>, no surface-velocity or mesh-velocity
correction of the normal component is applied. That version is still in the
source but commented out.&lt;/p>
&lt;p>The diffusive momentum flux handed to &lt;code>regionCoupledMassTransferVelocityFlux&lt;/code>
is the same as for &lt;code>regionCoupledVelocityValue&lt;/code>: $\mu_\text{own}$ times the
tangential part of the face-normal gradient (normal component removed in the
vector &lt;code>snGrad()&lt;/code> of &lt;code>genericRegionCoupledJump&lt;/code>).&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}$&lt;/td>
&lt;td>Velocity&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\dot m$&lt;/td>
&lt;td>Interfacial mass flux, &lt;code>mDotS()&lt;/code> of the &lt;code>massTransferInterface&lt;/code> (area field on the side-A &lt;code>faMesh&lt;/code>)&lt;/td>
&lt;td>kg/(m² s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\rho_\text{own}$, $\rho_\text{nbr}$&lt;/td>
&lt;td>&lt;code>rho&lt;/code> from each region&amp;rsquo;s &lt;code>transportProperties&lt;/code>&lt;/td>
&lt;td>kg/m³&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}_\varepsilon$&lt;/td>
&lt;td>Interface normal pointing out of region A&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mu_\text{own}$&lt;/td>
&lt;td>Diffusivity &lt;code>mu&lt;/code> (field or &lt;code>transportProperties&lt;/code>)&lt;/td>
&lt;td>Pa·s&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledJump&lt;/code>: return if
updated or &lt;code>coupled no&lt;/code>; call &lt;code>update()&lt;/code> on the &lt;strong>first&lt;/strong> &lt;code>interfaceType&lt;/code>;
interpolate the neighbour &lt;code>U&lt;/code> (looked up by the local field name); add
&lt;code>valueJump()&lt;/code>; relax; call &lt;code>fixedValue::updateCoeffs()&lt;/code>.&lt;/p>
&lt;p>&lt;code>valueJump()&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>finds the &lt;code>capillaryInterface&lt;/code> and the &lt;code>massTransferInterface&lt;/code> by type name
on this patch (&lt;code>rgInterface(&amp;lt;type&amp;gt;)&lt;/code>), independent of their order in
&lt;code>interfaceType&lt;/code>;&lt;/li>
&lt;li>interpolates &lt;code>mDotS()&lt;/code> from the neighbour side;&lt;/li>
&lt;li>reads &lt;code>rho&lt;/code> of both regions from &lt;code>transportProperties&lt;/code>;&lt;/li>
&lt;li>&lt;code>refCast&lt;/code>s the neighbour &lt;code>U&lt;/code> patch field to &lt;code>genericRegionCoupledFlux&amp;lt;vector&amp;gt;&lt;/code>
and uses its values only for a diagnostic line;&lt;/li>
&lt;li>prints &lt;code>U Dirichlet boundary contributions: ...&lt;/code> (integrated volume fluxes
of the neighbour velocity, of the jump term and of mesh motion plus
$\dot m/\rho$) on every call.&lt;/li>
&lt;/ul>
&lt;p>Only the interface listed first in &lt;code>interfaceType&lt;/code> is &lt;code>update()&lt;/code>d by this
BC. With &lt;code>(capillaryInterface massTransferInterface)&lt;/code> the
&lt;code>massTransferInterface&lt;/code> is not corrected here. $\dot m$ is only recomputed
when a BC that lists &lt;code>massTransferInterface&lt;/code> first (e.g.
&lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code> on &lt;code>T&lt;/code>) is updated. Otherwise it stays at
its initial value of zero.&lt;/p>
&lt;p>The class has two more functions that are not used in the solution:&lt;/p>
&lt;ul>
&lt;li>&lt;code>updatePhi()&lt;/code> would set the boundary &lt;code>phi&lt;/code> to the negated interpolated
neighbour flux plus $\pm(1/\rho_\text{own}-1/\rho_\text{nbr})\dot m\,|\mathbf{S}_f|$.
The call in the base class is commented out.&lt;/li>
&lt;li>The member &lt;code>correctClosedVolumePhi(phi, U, p, rAU)&lt;/code> would correct the
interface flux to the net volume flux $-\dot m/\rho\,|\mathbf{S}_f|$. It is
never called. The global &lt;code>correctClosedVolumePhi()&lt;/code> used by &lt;code>icoFluid&lt;/code> and
&lt;code>interTrackFluid&lt;/code> (&lt;code>closedVolume&lt;/code> on) recognises this BC, but forces the net
volume flux through the patch to &lt;strong>zero&lt;/strong>.&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>U&lt;/code> jump residual is evaluated on this BC if the side-A &lt;code>U&lt;/code> patch is not
jump-derived (as in the intended setup):
$\lVert\mathbf{U}_\text{own} - \mathcal{I}(\mathbf{U}_\text{nbr}) - \text{valueJump}\rVert_2$,
normalised as in &lt;code>genericRegionCoupledJump&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>regionCoupledMassTransferVelocityValue&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. Must contain &lt;code>capillaryInterface&lt;/code> and &lt;code>massTransferInterface&lt;/code>; the first entry is the one this BC &lt;code>update()&lt;/code>s&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value. Read if present. If missing, the patch values are not initialised&lt;/td>
&lt;td>in practice yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>mu&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, not used by this BC&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Read by the base class, not used, not written back&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>snGrad()&lt;/code> / matrix coefficients&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order face-normal gradient&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>rho&lt;/code> (and &lt;code>mu&lt;/code>) must be present in &lt;code>transportProperties&lt;/code> of both regions.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>No tutorial uses this BC. The entry below follows &lt;code>massTransferInterface&lt;/code>
and has not been run. Side B (second in &lt;code>coupledPatchPair&lt;/code>):&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">// 0/fluidB/U
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceShadow
&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 regionCoupledMassTransferVelocityValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&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;p>Partner on side A:&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">// 0/fluidA/U
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interface
&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 regionCoupledMassTransferVelocityFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&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;p>&lt;code>regionInterfaceProperties&lt;/code> (excerpt):&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">fluidAfluidB
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluidA interface)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluidB interfaceShadow)
&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;span class="line">&lt;span class="cl"> coupledFields
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> pUPimple
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> T
&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;span class="line">&lt;span class="cl"> capillaryInterfaceCoeffs { sigma sigma [1 0 -2 0 0 0 0] 0.07232; }
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> massTransferInterfaceCoeffs { hlv hlv [0 2 -2 0 0 0 0] 2.257e6; TSat TSat [0 0 0 1 0 0 0] 373.15; }
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The full case setup, including the &lt;code>T&lt;/code> coupling that drives $\dot m$, is in
&lt;code>massTransferInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Untested, no tutorial.&lt;/strong> The interface-tracking region type it was
written for (&lt;code>interTrackFluid&lt;/code>) is disabled in
&lt;code>src/multiRegionSystem/Make/files&lt;/code>.&lt;/li>
&lt;li>&lt;strong>$\dot m$ is only updated through another BC.&lt;/strong> See
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledmasstransfervelocityvalue/#implementation">Implementation&lt;/a>.&lt;/li>
&lt;li>&lt;strong>Must sit on side B&lt;/strong> (&lt;em>inferred&lt;/em>). &lt;code>mDotS()&lt;/code> lives on the side-A &lt;code>faMesh&lt;/code>
and is interpolated &amp;ldquo;from the neighbour&amp;rdquo;.&lt;/li>
&lt;li>&lt;strong>Neighbour must be flux-derived.&lt;/strong> The neighbour &lt;code>U&lt;/code> patch field is
&lt;code>refCast&lt;/code> to &lt;code>genericRegionCoupledFlux&amp;lt;vector&amp;gt;&lt;/code> (for a log line only); any
other type aborts.&lt;/li>
&lt;li>&lt;strong>Closed-volume correction ignores phase change.&lt;/strong> With &lt;code>closedVolume&lt;/code> on,
the global &lt;code>correctClosedVolumePhi()&lt;/code> forces zero net volume flux through
this patch, which contradicts a non-zero $\dot m$ (&lt;em>inferred&lt;/em>).&lt;/li>
&lt;li>&lt;strong>No normal mesh-velocity term.&lt;/strong> The normal velocity is not tied to the
mesh motion as in &lt;code>regionCoupledVelocityValue&lt;/code> (&lt;em>inferred from the
commented-out code; intent unclear&lt;/em>).&lt;/li>
&lt;li>&lt;strong>Log output on every call&lt;/strong>; &lt;code>diffusivity&lt;/code> and &lt;code>neighbourFieldName&lt;/code> are
ignored.&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;/td>
&lt;td>No tutorial uses &lt;code>regionCoupledMassTransferVelocityValue&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledPhaseChangeHeatFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledphasechangeheatflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledphasechangeheatflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code> is the flux side (Neumann side) of the
temperature coupling of &lt;code>massTransferInterface&lt;/code> (evaporation/condensation
between two fluid regions). It derives from
&lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code> (and so from &lt;code>fixedGradient&lt;/code>). It fixes the
normal temperature gradient so that the conductive heat fluxes of both sides
add up to the interfacial heat-flux jump $q_{sat}$, which
&lt;code>massTransferInterface&lt;/code> computes and consumes as latent heat. The interface
found through the first &lt;code>interfaceType&lt;/code> entry must be a
&lt;code>massTransferInterface&lt;/code>. The partner on the neighbour region must be a
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>-derived BC. The class does not prescribe
which one: &lt;code>regionCoupledScalarJump&lt;/code> with &lt;code>interfaceType (massTransferInterface)&lt;/code> and &lt;code>diffusivity k&lt;/code> fits (&lt;em>inferred&lt;/em>).
&lt;code>regionCoupledTemperatureJump&lt;/code> only works if a &lt;code>heatTransferInterface&lt;/code> on the
same patch pair is listed first in its own &lt;code>interfaceType&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $B$ be this patch and $A$ the neighbour (jump-side) patch:&lt;/p>
$$
k_B \frac{\partial T_B}{\partial n_B} + k_A \frac{\partial T_A}{\partial n_A} = q_{sat}
\quad \text{on } \Gamma
$$
&lt;p>imposed as the gradient&lt;/p>
$$
\left.\frac{\partial T_B}{\partial n}\right|_b
= \frac{-\,\mathcal{I}_{A\to B}\!\left(k_A\, \partial_n T_A\right) + q_{sat}}{k_B}
$$
&lt;p>followed by relaxation with the acceleration model. The flux jump is the
heat-flux imbalance at saturation computed by &lt;code>massTransferInterface&lt;/code>:&lt;/p>
$$
q_{sat} = k_A \left.\frac{\partial T_A}{\partial n_A}\right|_{T_\Gamma = T_{sat}} + k_B \left.\frac{\partial T_B}{\partial n_B}\right|_{T_\Gamma = T_{sat}},
\qquad
\dot m = -\frac{q_{sat}}{h_{lv}}
$$
&lt;p>The value continuity $T_A = T_B$ comes from the jump-side partner. This BC
does not fix $T_\Gamma$ to $T_{sat}$.&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>$T$&lt;/td>
&lt;td>Temperature (field &lt;code>T&lt;/code> in both regions)&lt;/td>
&lt;td>K&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$k_B$&lt;/td>
&lt;td>Thermal conductivity, diffusivity name fixed to &lt;code>k&lt;/code>&lt;/td>
&lt;td>W/(m K)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$k_A\,\partial_n T_A$&lt;/td>
&lt;td>&lt;code>flux()&lt;/code> of the jump-side partner (its own &lt;code>diffusivity&lt;/code>)&lt;/td>
&lt;td>W/m²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$q_{sat}$&lt;/td>
&lt;td>&lt;code>massTransferInterface::fluxMTJump()&lt;/code> (area field &lt;code>&amp;lt;patchA&amp;gt;fluxMTJump&lt;/code>)&lt;/td>
&lt;td>W/m²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$T_{sat}$, $h_{lv}$&lt;/td>
&lt;td>Saturation temperature and latent heat of the interface&lt;/td>
&lt;td>K, J/kg&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\dot m$&lt;/td>
&lt;td>Interfacial mass flux of the interface&lt;/td>
&lt;td>kg/(m² s)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>Run-time work is inherited from &lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code> (see
there). The class adds:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>&lt;code>fluxJump()&lt;/code>&lt;/strong>: returns the internal field of
&lt;code>massTransInterface().fluxMTJump()&lt;/code>, an &lt;code>areaScalarField&lt;/code> on the
interface&amp;rsquo;s finite-area mesh. It is used &lt;strong>as is&lt;/strong>, without interpolation
between the two sides.&lt;/li>
&lt;li>&lt;strong>&lt;code>massTransInterface()&lt;/code>&lt;/strong>: checks that the interface matched through the
first &lt;code>interfaceType&lt;/code> entry is a &lt;code>massTransferInterface&lt;/code>, otherwise
&lt;code>FatalError&lt;/code>. Called from &lt;code>fluxJump()&lt;/code>, i.e. in every &lt;code>updateCoeffs()&lt;/code> and
every residual evaluation.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivityName()&lt;/code>&lt;/strong>: hard-coded to &lt;code>k&lt;/code>. The &lt;code>diffusivity&lt;/code> keyword is
read by the base class but ignored. &lt;code>diffCoeff()&lt;/code> takes a &lt;code>volScalarField k&lt;/code>
of the local region if one is registered, otherwise the uniform &lt;code>k&lt;/code> from
the region&amp;rsquo;s &lt;code>transportProperties&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Per DNA iteration of &lt;code>T&lt;/code>, &lt;code>updateCoeffs()&lt;/code> first calls the interface&amp;rsquo;s
&lt;code>update()&lt;/code>. This runs &lt;code>massTransferInterface::correct()&lt;/code> → &lt;code>updateMDotS()&lt;/code>,
which recomputes $q_{sat}$ from copies of both &lt;code>T&lt;/code> fields with the interface
patches set to $T_{sat}$ (and sets $\dot m$ to zero at time index 1). The
jump-side partner triggers the same update. The BC then &lt;code>refCast&lt;/code>s the
neighbour &lt;code>T&lt;/code> patch field to &lt;code>genericRegionCoupledJumpFvPatchField&amp;lt;scalar&amp;gt;&lt;/code>,
interpolates and negates its &lt;code>flux()&lt;/code>, adds $q_{sat}$, divides by $k_B$,
relaxes and fixes the gradient. The flux residual
$|k_B g_B + \mathcal{I}(q_A) - q_{sat}|$ is checked against &lt;code>maxFluxRes&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>regionCoupledPhaseChangeHeatFlux&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>Interface type list. The &lt;strong>first&lt;/strong> entry must be &lt;code>massTransferInterface&lt;/code>.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read by the base class but &lt;strong>ignored&lt;/strong> (&lt;code>k&lt;/code> is always used)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read and written, not used&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name (&lt;code>T&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code> or &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (with warning)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: reused time steps&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order value evaluation&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial gradient; if given, the initial patch value is evaluated from it&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (only written)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The interface parameters ($T_{sat}$, $h_{lv}$) are read from
&lt;code>massTransferInterfaceCoeffs&lt;/code> in &lt;code>constant/regionInterfaceProperties&lt;/code>; see
&lt;code>docs/interfaces/massTransferInterface.md&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>There is no tutorial. Entry pattern (from
&lt;code>docs/interfaces/massTransferInterface.md&lt;/code>):&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">// 0/fluidB/T
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceShadow
&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 regionCoupledPhaseChangeHeatFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 373.15;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner on the other region (&lt;em>inferred&lt;/em>: the class only requires a
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>-derived BC):&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">// 0/fluidA/T
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interface
&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 regionCoupledScalarJump;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (massTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;k&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.75;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 373.15;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Both regions need a uniform &lt;code>k&lt;/code> in their &lt;code>transportProperties&lt;/code> (read by the
interface and by this BC). The patch pair is declared in
&lt;code>partitionedCoupledPatches&lt;/code> with &lt;code>interfaceType (... massTransferInterface)&lt;/code>,
&lt;code>coupledFields (T ...)&lt;/code> and a &lt;code>massTransferInterfaceCoeffs&lt;/code> sub-dictionary.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>No tutorial; untested.&lt;/strong> No case uses this BC or &lt;code>massTransferInterface&lt;/code>.
The &lt;code>interTrackFluid&lt;/code> region type it was written for is commented out in
&lt;code>src/multiRegionSystem/Make/files&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Needs &lt;code>massTransferInterface&lt;/code> first&lt;/strong> in &lt;code>interfaceType&lt;/code>; any other type
aborts in &lt;code>fluxJump()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Conformal patches assumed.&lt;/strong> $q_{sat}$ lives on the finite-area mesh of
the interface (built on side A) and is returned without mapping. If this BC
is on side B, the result is only correct when both patches have the same
faces in the same order (&lt;em>inferred&lt;/em>). Otherwise the field sizes do not
match.&lt;/li>
&lt;li>&lt;strong>Diffusivity name fixed to &lt;code>k&lt;/code>.&lt;/strong> The &lt;code>diffusivity&lt;/code> keyword is ignored,
yet &lt;code>write()&lt;/code> writes &lt;code>diffusivity k;&lt;/code>. A registered &lt;code>volScalarField k&lt;/code> takes
precedence over the &lt;code>transportProperties&lt;/code> entry. In a turbulent region that
field is the turbulent kinetic energy, not the conductivity (&lt;em>inferred&lt;/em>).&lt;/li>
&lt;li>&lt;strong>Interface update on every call.&lt;/strong> The interface&amp;rsquo;s &lt;code>correct()&lt;/code>
(recomputing $q_{sat}$ and $\dot m$, with an &lt;code>Info&lt;/code> line) runs in every
&lt;code>updateCoeffs()&lt;/code> of every BC coupled through this interface.&lt;/li>
&lt;li>&lt;strong>$T_{sat}$ is not imposed&lt;/strong> on the interface temperature; it only enters
$q_{sat}$.&lt;/li>
&lt;li>Inherited from &lt;code>genericRegionCoupledFlux&lt;/code>: partner must be a jump BC,
&lt;code>value&lt;/code> ignored on input, &lt;code>gradient&lt;/code> not written, first relaxation uses
the patch values as reference, &lt;code>neighbourFieldName&lt;/code> unused, &lt;code>IQNILS&lt;/code> not
parallel-consistent, partitioned only.&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;/td>
&lt;td>No tutorial uses &lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledPressureFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressureflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressureflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledPressureFlux&lt;/code> is the Neumann (flux) half of the partitioned
pressure coupling across a sharp, mesh-tracked fluid-fluid interface. It acts
on a &lt;code>volScalarField&lt;/code> (&lt;code>p&lt;/code> or &lt;code>pKin&lt;/code>) and derives from
&lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code>, i.e. from &lt;code>fixedGradient&lt;/code>. Although it is
built on the generic flux-matching scheme, its &lt;code>fluxJump()&lt;/code> cancels the
neighbour flux. The normal pressure gradient therefore depends only on the
local normal acceleration $\mathbf{n}\cdot\partial\mathbf{U}/\partial t$. The
partner condition on the other side is &lt;code>regionCoupledPressureValue&lt;/code> (or
&lt;code>regionCoupledMassTransferPressureValue&lt;/code>, &lt;em>inferred&lt;/em>: there is no mass-transfer
pressure-flux BC). It is used with &lt;code>capillaryInterface&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>The BC sits on side $B$ in all tutorials. $\mathbf{n}_B$ is the outward patch
normal and $\tilde F = \mathcal{I}_{A\to B}(F_A)$ the interpolated neighbour
flux &lt;code>snGrad(p_A)*k_A&lt;/code>. The generic flux BC sets
$k_B\,\partial p_B/\partial n = -\tilde F + \text{fluxJump}$ with&lt;/p>
$$
\text{fluxJump} = \tilde F - \mathbf{n}_B\cdot\left(\frac{\partial\mathbf{U}_B}{\partial t}\right)_b
$$
&lt;p>so that&lt;/p>
$$
k_B\,\frac{\partial p_B}{\partial n} = -\,\mathbf{n}_B\cdot\left(\frac{\partial\mathbf{U}_B}{\partial t}\right)_b
\quad \text{on } \Gamma_B
$$
&lt;p>This is the normal momentum balance at the interface without the convective
and viscous terms (the code that included them is commented out). The
gradient is relaxed by the acceleration model,
$g^{k} = g^{k-1} + \omega\,(g^{*} - g^{k-1})$, and the patch value is
reconstructed as $p_B = p_P + \mathbf{k}\cdot\nabla p_P + g/\Delta_f$
(first order) or $p_P + \mathbf{k}\cdot\nabla p_P + (g + \mathbf{n}\cdot\nabla p_P)/(2\Delta_f)$
(&lt;code>secondOrder yes&lt;/code>); the $\mathbf{k}$ term only with &lt;code>nonOrthCorr yes&lt;/code>.&lt;/p>
&lt;p>The diffusivity $k_B$ comes from &lt;code>diffCoeff()&lt;/code> with the hardcoded name &lt;code>v&lt;/code>:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field name&lt;/th>
&lt;th>Intended $k_B$&lt;/th>
&lt;th>Actual $k_B$&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>pKin&lt;/code>&lt;/td>
&lt;td>$1$&lt;/td>
&lt;td>$1$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>any other (e.g. &lt;code>p&lt;/code>)&lt;/td>
&lt;td>$1/\rho_B$&lt;/td>
&lt;td>$\rho_B$ (registered &lt;code>volScalarField rho&lt;/code>, else &lt;code>rho&lt;/code> from &lt;code>transportProperties&lt;/code>)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For &lt;code>p&lt;/code> the imposed gradient is therefore
$-\mathbf{n}_B\cdot\partial_t\mathbf{U}_B/\rho_B$ instead of
$-\rho_B\,\mathbf{n}_B\cdot\partial_t\mathbf{U}_B$ (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressureflux/#known-limitations">Known Limitations&lt;/a>).&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>$p$&lt;/td>
&lt;td>Pressure (&lt;code>p&lt;/code>) or kinematic pressure (&lt;code>pKin&lt;/code>)&lt;/td>
&lt;td>Pa or m²/s²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$(\partial\mathbf{U}/\partial t)_b$&lt;/td>
&lt;td>Patch value of &lt;code>fvc::ddt(U)&lt;/code> in the local region&lt;/td>
&lt;td>m/s²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$k_B$&lt;/td>
&lt;td>Diffusivity from &lt;code>diffCoeff()&lt;/code>&lt;/td>
&lt;td>see table&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Delta_f$&lt;/td>
&lt;td>Patch &lt;code>deltaCoeffs&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledFlux&lt;/code>:&lt;/p>
&lt;ol>
&lt;li>Return if updated or &lt;code>coupled no&lt;/code> (gradient frozen).&lt;/li>
&lt;li>Call &lt;code>update()&lt;/code> on the first &lt;code>interfaceType&lt;/code>.&lt;/li>
&lt;li>Look up the neighbour field by the local field name and &lt;code>refCast&lt;/code> its
patch field to &lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>; interpolate its
&lt;code>flux()&lt;/code> and negate it.&lt;/li>
&lt;li>Add &lt;code>fluxJump()&lt;/code>, divide by &lt;code>diffCoeff()&lt;/code>, relax, call
&lt;code>fixedGradient::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>&lt;code>fluxJump()&lt;/code> repeats step 3 to get $\tilde F$ and returns
$\tilde F - \mathbf{n}_B\cdot(\partial_t\mathbf{U})_b$. It also reads &lt;code>rho&lt;/code> and
&lt;code>mu&lt;/code> from the local &lt;code>transportProperties&lt;/code> (required to exist), but does not
use them. Unlike the other capillary BCs it never calls &lt;code>capInterface()&lt;/code>, so
it does not check the interface type.&lt;/p>
&lt;p>The &lt;code>p&lt;/code> flux residual of the &lt;code>pUPimple&lt;/code> DNA loop comes from this BC, because
the side-A pressure patch carries a jump BC. The neighbour flux cancels in it
as well:&lt;/p>
$$
r_\text{raw} = \left| k_B\,\partial_n p_B + \mathbf{n}_B\cdot(\partial_t\mathbf{U}_B)_b \right|
$$
&lt;p>normalised as described in &lt;code>genericRegionCoupledFlux&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>regionCoupledPressureFlux&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names; the first entry is updated by this BC. Tutorials use &lt;code>(capillaryInterface)&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial patch-normal gradient. Read if present; otherwise zero gradient and the patch value is set from the internal field&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (&lt;code>fixedGradient&lt;/code> ignores it). Written by &lt;code>write()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>v&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, not used by this BC&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model for the gradient: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order reconstruction of the patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> does not write &lt;code>gradient&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>&lt;code>tutorials/multiphaseFlow/2dRisingBubble/0/fluidB/orig/partitioned/p&lt;/code>
(side B):&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">interfaceShadow
&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 regionCoupledPressureFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;v&amp;#34;; // ignored, always v
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0; // not read
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner on side A, &lt;code>0/fluidA/orig/partitioned/p&lt;/code>:&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">interface
&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 regionCoupledPressureValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The interface and DNA entries are shown on the &lt;code>regionCoupledVelocityValue&lt;/code>
page and in &lt;code>capillaryInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Wrong diffusivity for &lt;code>p&lt;/code> (bug).&lt;/strong> &lt;code>diffCoeff()&lt;/code> renames &lt;code>v&lt;/code> to &lt;code>rho&lt;/code>
before it checks for &lt;code>v&lt;/code>, so the reciprocal is never taken and
$k_B = \rho_B$. For a field named &lt;code>p&lt;/code> the imposed gradient is off by a
factor $\rho_B^2$ and has the wrong units. &lt;code>pKin&lt;/code> is not affected. The
tutorials use &lt;code>p&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Simplified normal momentum balance.&lt;/strong> Convective and viscous
contributions to the normal pressure gradient are not included.&lt;/li>
&lt;li>&lt;strong>Neighbour flux has no effect.&lt;/strong> The interpolated neighbour flux cancels.
It is still computed, and the neighbour patch field must derive from
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>, otherwise the &lt;code>refCast&lt;/code> aborts.&lt;/li>
&lt;li>&lt;strong>No interface-type check.&lt;/strong> Any interface type listed first is accepted;
it is only &lt;code>update()&lt;/code>d.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> and &lt;code>neighbourFieldName&lt;/code> are ignored&lt;/strong>; &lt;code>gradient&lt;/code> is not
written to the time directories.&lt;/li>
&lt;li>&lt;strong>No runnable tutorial.&lt;/strong> The tutorials use the disabled &lt;code>interTrackFluid&lt;/code>.&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/multiphaseFlow/2dRisingBubble&lt;/code>&lt;/td>
&lt;td>2D rising gas bubble, &lt;code>interTrackFluid&lt;/code> + &lt;code>interTrackFluid&lt;/code> (region type currently disabled)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dDuineveldRisingBubble&lt;/code>&lt;/td>
&lt;td>3D rising bubble (Duineveld), same setup&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dOscillatingBubble&lt;/code>&lt;/td>
&lt;td>3D oscillating bubble, same setup&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The BC is set in the &lt;code>0/fluidB/orig/partitioned/p&lt;/code> variant of each tutorial.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledPressureValue</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressurevalue/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressurevalue/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledPressureValue&lt;/code> is the Dirichlet (jump) half of the partitioned
pressure coupling across a sharp, mesh-tracked fluid-fluid interface. It acts
on a &lt;code>volScalarField&lt;/code> (&lt;code>p&lt;/code>, or the kinematic pressure &lt;code>pKin&lt;/code>) and derives from
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>, i.e. from &lt;code>fixedValue&lt;/code>. The patch value is
the interpolated neighbour pressure plus the normal-stress jump: capillary
pressure $\sigma\kappa$, the viscous normal-stress jump and a hydrostatic
correction. The partner condition on the other side is
&lt;code>regionCoupledPressureFlux&lt;/code>. Both belong to &lt;code>capillaryInterface&lt;/code>, and this BC
aborts if the first entry of its &lt;code>interfaceType&lt;/code> list is not
&lt;code>capillaryInterface&lt;/code>. The variant with phase change is
&lt;code>regionCoupledMassTransferPressureValue&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Region $A$ is the first entry of &lt;code>coupledPatchPair&lt;/code> and carries the &lt;code>faMesh&lt;/code>
of the &lt;code>capillaryInterface&lt;/code>. This BC sits on side $A$ (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressurevalue/#known-limitations">Known Limitations&lt;/a>). $\mathcal{I}_{B\to A}$ is the
patch-to-patch interpolation.&lt;/p>
&lt;p>For a field named &lt;code>p&lt;/code>:&lt;/p>
$$
p_A^{*} = \mathcal{I}_{B\to A}(p_B) + 2(\mu_B - \mu_A)\,\nabla_s\cdot\mathbf{u}_s - \sigma\kappa + (\rho_B - \rho_A)\,(\mathbf{x}_f - \mathbf{x}_\text{ref})\cdot\mathbf{g}
\quad \text{on } \Gamma_A
$$
&lt;p>For a field named &lt;code>pKin&lt;/code> the same jump is applied in kinematic form:&lt;/p>
$$
p_{\text{kin},A}^{*} = \frac{1}{\rho_A}\Big[\rho_B\,\mathcal{I}_{B\to A}(p_{\text{kin},B}) + 2(\mu_B - \mu_A)\,\nabla_s\cdot\mathbf{u}_s - \sigma\kappa + (\rho_B - \rho_A)\,(\mathbf{x}_f - \mathbf{x}_\text{ref})\cdot\mathbf{g}\Big]
$$
&lt;p>The viscous term is the jump of $2\mu\,\partial u_n/\partial n$ with
$\partial u_n/\partial n = -\nabla_s\cdot\mathbf{u}_s$. The gravity term implies
that &lt;code>p&lt;/code> excludes the hydrostatic part
$\rho\,\mathbf{g}\cdot(\mathbf{x}-\mathbf{x}_\text{ref})$ (&lt;em>inferred from the
formula&lt;/em>). The value is then relaxed:
$p_A^{k} = p_A^{k-1} + \omega\,(p_A^{*} - p_A^{k-1})$.&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>$p$, $p_\text{kin}$&lt;/td>
&lt;td>Pressure / kinematic pressure&lt;/td>
&lt;td>Pa / m²/s²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{u}_s$&lt;/td>
&lt;td>Surface velocity on the &lt;code>faMesh&lt;/code> (&lt;code>Us()&lt;/code>)&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\sigma$&lt;/td>
&lt;td>Surface tension (&lt;code>sigma()&lt;/code> of the &lt;code>capillaryInterface&lt;/code>)&lt;/td>
&lt;td>N/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\kappa$&lt;/td>
&lt;td>Face curvature, &lt;code>faMesh::faceCurvatures()&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mu_A$, $\mu_B$&lt;/td>
&lt;td>&lt;code>mu&lt;/code> from each region&amp;rsquo;s &lt;code>transportProperties&lt;/code>&lt;/td>
&lt;td>Pa·s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\rho_A$, $\rho_B$&lt;/td>
&lt;td>&lt;code>rho&lt;/code> from each region&amp;rsquo;s &lt;code>transportProperties&lt;/code>&lt;/td>
&lt;td>kg/m³&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{g}$&lt;/td>
&lt;td>&lt;code>uniformDimensionedVectorField g&lt;/code> of region A&lt;/td>
&lt;td>m/s²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{x}_f$&lt;/td>
&lt;td>Patch face centres&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{x}_\text{ref}$&lt;/td>
&lt;td>&lt;code>PISO.pRefPoint&lt;/code> from region A&amp;rsquo;s &lt;code>fvSolution&lt;/code>&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledJump&lt;/code>: return if
updated or &lt;code>coupled no&lt;/code>; call &lt;code>update()&lt;/code> on the first &lt;code>interfaceType&lt;/code>
(curvature and $\mathbf{u}_s$); interpolate the neighbour field (looked up by
the local field name) onto this patch; add &lt;code>valueJump()&lt;/code>; relax; call
&lt;code>fixedValue::updateCoeffs()&lt;/code>.&lt;/p>
&lt;p>&lt;code>valueJump()&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>takes $\sigma$, $\kappa$ and $\mathbf{u}_s$ from the &lt;code>capillaryInterface&lt;/code>
and computes $\nabla_s\cdot\mathbf{u}_s$ with &lt;code>fac::div&lt;/code>;&lt;/li>
&lt;li>reads &lt;code>pRefPoint&lt;/code> from the &lt;code>PISO&lt;/code> sub-dictionary of region A&amp;rsquo;s
&lt;code>fvSolution&lt;/code> and looks up &lt;code>g&lt;/code> in region A (both required);&lt;/li>
&lt;li>reads &lt;code>mu&lt;/code> and &lt;code>rho&lt;/code> of both regions from their registered
&lt;code>transportProperties&lt;/code> dictionaries;&lt;/li>
&lt;li>for &lt;code>pKin&lt;/code> returns the bracket above divided by $\rho_A$, minus the
interpolated neighbour value, so that the base class sum gives the
kinematic formula.&lt;/li>
&lt;/ul>
&lt;p>It also computes the mesh flux and the patch normals, but does not use them.&lt;/p>
&lt;p>The jump residual for &lt;code>p&lt;/code> in the &lt;code>pUPimple&lt;/code> DNA loop is taken from this BC,
because side A is checked first:
$\lVert p_A - \mathcal{I}_{B\to A}(p_B) - \text{valueJump}\rVert_2$, normalised as
described in &lt;code>genericRegionCoupledJump&lt;/code>.&lt;/p>
&lt;p>&lt;code>flux()&lt;/code> (inherited) returns &lt;code>snGrad()*k&lt;/code> with $k$ from &lt;code>diffCoeff()&lt;/code> and the
hardcoded diffusivity name &lt;code>v&lt;/code>. &lt;code>diffCoeff()&lt;/code> maps &lt;code>v&lt;/code> to &lt;code>rho&lt;/code>, but the step
that should take the reciprocal is never reached, so $k = \rho_A$ instead of
$1/\rho_A$ ($k = 1$ for &lt;code>pKin&lt;/code>). The partner &lt;code>regionCoupledPressureFlux&lt;/code>
cancels this flux, so the error does not reach the solution.&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>regionCoupledPressureValue&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. The first entry must be &lt;code>capillaryInterface&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value. Read if present. If missing, the patch values are not initialised&lt;/td>
&lt;td>in practice yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>v&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, not used by this BC&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Read by the base class, not used, not written back&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>snGrad()&lt;/code> / matrix coefficients&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order face-normal gradient&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Entries read from other files:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Entry&lt;/th>
&lt;th>File&lt;/th>
&lt;th>Required&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>PISO { pRefPoint (x y z); }&lt;/code>&lt;/td>
&lt;td>&lt;code>system/&amp;lt;regionA&amp;gt;/fvSolution&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>g&lt;/code>&lt;/td>
&lt;td>&lt;code>constant/&amp;lt;regionA&amp;gt;/g&lt;/code> (registered &lt;code>uniformDimensionedVectorField&lt;/code>)&lt;/td>
&lt;td>yes&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>mu&lt;/code>, &lt;code>rho&lt;/code>&lt;/td>
&lt;td>&lt;code>constant/&amp;lt;region&amp;gt;/transportProperties&lt;/code>, both regions&lt;/td>
&lt;td>yes&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>&lt;code>tutorials/multiphaseFlow/2dRisingBubble/0/fluidA/orig/partitioned/p&lt;/code>
(side A):&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">interface
&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 regionCoupledPressureValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;v&amp;#34;; // ignored, always v
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner on side B, &lt;code>0/fluidB/orig/partitioned/p&lt;/code>:&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">interfaceShadow
&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 regionCoupledPressureFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;v&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>system/fluidA/fvSolution&lt;/code> must contain &lt;code>PISO { ... pRefPoint (0 0 0); }&lt;/code>.
The interface and DNA entries are shown on the &lt;code>regionCoupledVelocityValue&lt;/code>
page and in &lt;code>capillaryInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>&lt;code>capillaryInterface&lt;/code> only.&lt;/strong> &lt;code>capInterface()&lt;/code> aborts unless the first
&lt;code>interfaceType&lt;/code> entry is &lt;code>capillaryInterface&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Must sit on side A&lt;/strong> (&lt;em>inferred&lt;/em>). $\sigma$, $\kappa$ and
$\nabla_s\cdot\mathbf{u}_s$ are taken from the side-A &lt;code>faMesh&lt;/code> index by
index, without interpolation.&lt;/li>
&lt;li>&lt;strong>Constant properties.&lt;/strong> $\mu$ and $\rho$ are single scalars from
&lt;code>transportProperties&lt;/code>; registered &lt;code>mu&lt;/code> or &lt;code>rho&lt;/code> fields are not used.&lt;/li>
&lt;li>&lt;strong>&lt;code>PISO.pRefPoint&lt;/code> is required&lt;/strong>, even if the region solver uses a
&lt;code>PIMPLE&lt;/code> dictionary.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffCoeff()&lt;/code> returns $\rho$ instead of $1/\rho$&lt;/strong> for the diffusivity
&lt;code>v&lt;/code>. Without consequence for this BC (see &lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledpressurevalue/#implementation">Implementation&lt;/a>).&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> and &lt;code>neighbourFieldName&lt;/code> are ignored.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>The header example omits &lt;code>interfaceType&lt;/code>&lt;/strong>, which is required.&lt;/li>
&lt;li>&lt;strong>No runnable tutorial.&lt;/strong> The tutorials use the disabled &lt;code>interTrackFluid&lt;/code>.&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/multiphaseFlow/2dRisingBubble&lt;/code>&lt;/td>
&lt;td>2D rising gas bubble, &lt;code>interTrackFluid&lt;/code> + &lt;code>interTrackFluid&lt;/code> (region type currently disabled)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dDuineveldRisingBubble&lt;/code>&lt;/td>
&lt;td>3D rising bubble (Duineveld), same setup&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dOscillatingBubble&lt;/code>&lt;/td>
&lt;td>3D oscillating bubble, same setup&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The BC is set in the &lt;code>0/fluidA/orig/partitioned/p&lt;/code> variant of each tutorial.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledScalarFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledscalarflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledscalarflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledScalarFlux&lt;/code> is the concrete scalar flux side (Neumann side) of
the partitioned DNA coupling. It derives from
&lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code> (and so from &lt;code>fixedGradient&lt;/code>). It fixes the
patch-normal gradient so that the local diffusive flux is equal and opposite
to the flux of the value-side partner, i.e. flux continuity without a source
at the interface. It does not check the interface type and is normally used
with &lt;code>defaultInterface&lt;/code>. The partner on the neighbour patch must be a
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>-derived BC, usually
&lt;code>regionCoupledScalarJump&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $F$ be this patch and $J$ the neighbour (jump-side) patch:&lt;/p>
$$
\Gamma_F \frac{\partial \phi_F}{\partial n_F} + \Gamma_J \frac{\partial \phi_J}{\partial n_J} = 0
\quad \text{on } \Gamma
$$
&lt;p>imposed as the gradient&lt;/p>
$$
\left.\frac{\partial \phi_F}{\partial n}\right|_b
= -\frac{\mathcal{I}_{J\to F}\!\left(\Gamma_J\, \partial_n \phi_J\right)}{\Gamma_F}
$$
&lt;p>followed by relaxation with the acceleration model. &lt;code>fluxJump()&lt;/code> returns zero.&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>$\phi$&lt;/td>
&lt;td>Coupled scalar field (same name in both regions)&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Gamma_F$&lt;/td>
&lt;td>Diffusivity named by this BC&amp;rsquo;s &lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Gamma_J\,\partial_n\phi_J$&lt;/td>
&lt;td>&lt;code>flux()&lt;/code> of the jump-side partner, with the partner&amp;rsquo;s &lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathcal{I}_{J\to F}$&lt;/td>
&lt;td>Interface-to-interface interpolation&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>Everything except &lt;code>fluxJump()&lt;/code> is inherited from
&lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code>. In each DNA iteration &lt;code>updateCoeffs()&lt;/code>
updates the interface, &lt;code>refCast&lt;/code>s the neighbour patch field to
&lt;code>genericRegionCoupledJumpFvPatchField&amp;lt;scalar&amp;gt;&lt;/code>, takes its &lt;code>flux()&lt;/code>,
interpolates and negates it, adds &lt;code>fluxJump()&lt;/code> (= 0), divides by the local
&lt;code>diffCoeff()&lt;/code>, relaxes the gradient and fixes it. &lt;code>evaluate()&lt;/code> sets the
patch value from the gradient with optional non-orthogonal and second-order
corrections. The flux residual
$|\Gamma_F\,g_F + \mathcal{I}(q_J)|$ is checked against &lt;code>maxFluxRes&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>regionCoupledScalarFlux&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>Interface type list, e.g. &lt;code>(defaultInterface)&lt;/code>. Only the first entry is used; any type is accepted.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Diffusivity name (&lt;code>volScalarField&lt;/code> or &lt;code>transportProperties&lt;/code> entry)&lt;/td>
&lt;td>effectively yes&lt;/td>
&lt;td>&lt;code>word::null&lt;/code> (lookup fails)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read and written, not used&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code> or &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (with warning)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: reused time steps&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order value evaluation&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial gradient; if given, the initial patch value is evaluated from it&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (only written)&lt;/td>
&lt;td>no&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/electrochemistry/NTGKBatteryWithTabs/0/negTabRegion/orig/partitioned/T&lt;/code>
(flux side on the tab):&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">toCellFromNeg
&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 regionCoupledScalarFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;k&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner in &lt;code>0/batteryRegion/orig/partitioned/T&lt;/code>:&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">toNegTab
&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 regionCoupledScalarJump;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;k&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.75;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>regionInterfaceProperties&lt;/code> (&lt;code>cellToNegTab&lt;/code>, &lt;code>defaultInterface&lt;/code>,
&lt;code>coupledFields (phiPos phiNeg T)&lt;/code>) and the &lt;code>DNA&lt;/code> entries are shown in
&lt;code>regionCoupledScalarJump&lt;/code>. In this tutorial &lt;code>k&lt;/code> is a uniform entry in the
&lt;code>transportProperties&lt;/code> of the &lt;code>NTGK&lt;/code> and &lt;code>conductPotentialTemperature&lt;/code>
regions.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Partner must be a jump BC&lt;/strong> of the same field (bad-cast error
otherwise).&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> must be set&lt;/strong>; the default &lt;code>word::null&lt;/code> lookup fails.&lt;/li>
&lt;li>&lt;strong>No interfacial source.&lt;/strong> &lt;code>fluxJump()&lt;/code> is always zero. Use a derived BC
with its own &lt;code>fluxJump()&lt;/code> (e.g. &lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code>) for a
flux jump.&lt;/li>
&lt;li>&lt;strong>No consistency check&lt;/strong> between the diffusivities named on the two
sides.&lt;/li>
&lt;li>&lt;strong>&lt;code>value&lt;/code> is ignored on input&lt;/strong> and &lt;strong>&lt;code>gradient&lt;/code> is not written&lt;/strong>. On
restart the coupled gradient starts from zero unless &lt;code>gradient&lt;/code> is given.&lt;/li>
&lt;li>&lt;strong>First relaxation uses the patch values as reference&lt;/strong> (inherited; only
matters with &lt;code>relax&lt;/code> ≠ 1 or &lt;code>aitken&lt;/code>/&lt;code>IQNILS&lt;/code> on this side).&lt;/li>
&lt;li>Inherited from &lt;code>genericRegionCoupledFlux&lt;/code>: &lt;code>neighbourFieldName&lt;/code> unused,
&lt;code>nonOrthCorr&lt;/code>/&lt;code>secondOrder&lt;/code> only in the evaluated value, &lt;code>IQNILS&lt;/code> not
parallel-consistent, partitioned only.&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/electrochemistry/NTGKBatteryWithTabs&lt;/code>&lt;/td>
&lt;td>&lt;code>phiPos&lt;/code>: flux side on the battery (&lt;code>diffusivity sigmaPos&lt;/code>, initial &lt;code>gradient uniform 0.1266&lt;/code>). &lt;code>phiNeg&lt;/code>: flux side on the negative tab (&lt;code>diffusivity sigma&lt;/code>). &lt;code>T&lt;/code>: flux side on both tabs (&lt;code>diffusivity k&lt;/code>). All with &lt;code>defaultInterface&lt;/code> and &lt;code>directMap&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledScalarJump</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledscalarjump/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledscalarjump/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledScalarJump&lt;/code> is the concrete scalar value side (Dirichlet side)
of the partitioned DNA coupling. It derives from
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code> (and so from &lt;code>fixedValue&lt;/code>). It fixes the
patch value to the neighbour value interpolated onto this patch, scaled by a
jump (partition) coefficient $c$, which defaults to 1, i.e. continuity. It does
not check the interface type, so it works with any interface, in practice
&lt;code>defaultInterface&lt;/code>. It is the generic choice for potentials, temperatures
and concentrations that need no interface physics. The partner on the
neighbour patch is &lt;code>regionCoupledScalarFlux&lt;/code> (or any other
&lt;code>genericRegionCoupledFlux&amp;lt;scalar&amp;gt;&lt;/code>-derived BC, e.g.
&lt;code>regionCoupledPhaseChangeHeatFlux&lt;/code>).&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $J$ be this patch and $F$ the neighbour (flux-side) patch:&lt;/p>
$$
\phi_J = c\;\mathcal{I}_{F\to J}(\phi_F) \quad \text{on } \Gamma
$$
&lt;p>implemented as $\phi_J = \mathcal{I}_{F\to J}(\phi_F) + j$ with the value jump&lt;/p>
$$
j = \mathcal{I}_{F\to J}(\phi_F)\,(c - 1).
$$
&lt;p>The value is then relaxed by the acceleration model. The flux handed to the
partner is&lt;/p>
$$
q_J = \Gamma_J \left.\frac{\partial \phi_J}{\partial n}\right|_b
$$
&lt;p>with the coupled &lt;code>snGrad&lt;/code> of &lt;code>genericRegionCoupledJump&lt;/code> (optional
non-orthogonal and second-order corrections).&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>$\phi$&lt;/td>
&lt;td>Coupled scalar field (same name in both regions)&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$c$&lt;/td>
&lt;td>Jump (partition) coefficient, keyword &lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathcal{I}_{F\to J}$&lt;/td>
&lt;td>Interface-to-interface interpolation&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Gamma_J$&lt;/td>
&lt;td>Diffusivity named by &lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>All run-time work (interface lookup, &lt;code>updateCoeffs()&lt;/code>, relaxation, &lt;code>snGrad&lt;/code>,
&lt;code>flux()&lt;/code>, &lt;code>diffCoeff()&lt;/code>, residuals) is inherited from
&lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>. The class only implements
&lt;code>valueJump()&lt;/code>:&lt;/p>
&lt;ol>
&lt;li>Looks up the neighbour field under the local field name and interpolates
its neighbour patch values onto this patch.&lt;/li>
&lt;li>Determines $c$ per face:
&lt;ul>
&lt;li>if a &lt;code>volScalarField&lt;/code> named &lt;code>jumpCoefficient&lt;/code> is registered on the
&lt;strong>local&lt;/strong> region, its local patch values are used;&lt;/li>
&lt;li>else, if &lt;code>jumpCoefficient&lt;/code> is set, a uniform &lt;code>dimensionedScalar&lt;/code> of that
name is read from the local region&amp;rsquo;s &lt;code>transportProperties&lt;/code>;&lt;/li>
&lt;li>else $c = 1$.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Returns $\mathcal{I}_{F\to J}(\phi_F)\,(c - 1)$.&lt;/li>
&lt;/ol>
&lt;p>&lt;code>valueJump()&lt;/code> is evaluated in &lt;code>updateCoeffs()&lt;/code> and again in each residual
evaluation (jump residual $|\phi_J - \mathcal{I}(\phi_F) - j|$, checked
against &lt;code>maxJumpRes&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>regionCoupledScalarJump&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>Interface type list, e.g. &lt;code>(defaultInterface)&lt;/code>. Only the first entry is used to find the interface; any type is accepted.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Diffusivity name (&lt;code>volScalarField&lt;/code> or &lt;code>transportProperties&lt;/code> entry) used by &lt;code>flux()&lt;/code> for the partner&lt;/td>
&lt;td>effectively yes&lt;/td>
&lt;td>&lt;code>word::null&lt;/code> (lookup fails)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Name of the partition-coefficient field / &lt;code>transportProperties&lt;/code> entry&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>word::null&lt;/code> → $c = 1$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read and written, not used&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code> or &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (with warning)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: reused time steps&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction of &lt;code>snGrad&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order &lt;code>snGrad&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value (read if present, otherwise uninitialised)&lt;/td>
&lt;td>effectively 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/electrochemistry/NTGKBatteryWithTabs/0/posTabRegion/orig/partitioned/phiPos&lt;/code>
(jump side on the tab):&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">toCellFromPos
&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 regionCoupledScalarJump;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;sigma&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.1;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner in &lt;code>0/batteryRegion/orig/partitioned/phiPos&lt;/code>:&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">toPosTab
&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 regionCoupledScalarFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;sigmaPos&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> gradient uniform 0.1266;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Interface entry in &lt;code>constant/regionInterfaceProperties&lt;/code>:&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">cellToPosTab
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (defaultInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (batteryRegion toPosTab)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (posTabRegion toCellFromPos)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> );
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledFields
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> phiPos
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> phiNeg
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> T
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> );
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> defaultInterfaceCoeffs
&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;p>and a DNA entry per coupled field in &lt;code>constant/multiRegionProperties&lt;/code>:&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">DNA
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> phiPos
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxCoupleIter 50;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> residualControl
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxJumpRes 1e-05;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> outputJumpResField no;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxFluxRes 1e-05;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> outputFluxResField no;
&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;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For a partition coefficient (e.g. Henry&amp;rsquo;s law $C_A = H\,C_B$), add
&lt;code>jumpCoefficient H;&lt;/code> and provide &lt;code>H&lt;/code> either as a &lt;code>volScalarField&lt;/code> on the
jump-side region or as &lt;code>H H [0 0 0 0 0 0 0] 0.5;&lt;/code> in its
&lt;code>transportProperties&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>No interface-type check.&lt;/strong> Any interface type listed first in
&lt;code>interfaceType&lt;/code> is accepted. The interface&amp;rsquo;s own physics, if any, is not
used, except that its &lt;code>correct()&lt;/code> is called through &lt;code>update()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> must be set.&lt;/strong> The default &lt;code>word::null&lt;/code> makes the
&lt;code>diffCoeff()&lt;/code> lookup in &lt;code>transportProperties&lt;/code> fail as soon as the partner
asks for &lt;code>flux()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Diffusivities are not checked for consistency.&lt;/strong> Each side uses whatever
its &lt;code>diffusivity&lt;/code> names (in NTGK, &lt;code>sigmaPos&lt;/code> on the battery and &lt;code>sigma&lt;/code> on
the tab). Flux conservation requires the same units on both sides.&lt;/li>
&lt;li>&lt;strong>Jump coefficient is taken from the jump side only&lt;/strong> (local field or local
&lt;code>transportProperties&lt;/code>). With a &lt;code>volScalarField&lt;/code>, the local patch values
are used and not interpolated.&lt;/li>
&lt;li>&lt;strong>&lt;code>jumpCoefficient&lt;/code> is not written&lt;/strong> by &lt;code>write()&lt;/code>, so it disappears from
written time directories and after &lt;code>decomposePar&lt;/code>.&lt;/li>
&lt;li>Inherited limitations of &lt;code>genericRegionCoupledJump&lt;/code>: &lt;code>neighbourFieldName&lt;/code>
unused, side detection by patch name only, &lt;code>IQNILS&lt;/code> not parallel-consistent,
partitioned only.&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/electrochemistry/NTGKBatteryWithTabs&lt;/code>&lt;/td>
&lt;td>&lt;code>batteryRegion (NTGK)&lt;/code> coupled to two &lt;code>conductPotentialTemperature&lt;/code> tabs through &lt;code>defaultInterface&lt;/code>. &lt;code>phiPos&lt;/code>: jump side on the positive tab (&lt;code>diffusivity sigma&lt;/code>, Aitken 0.1). &lt;code>phiNeg&lt;/code>: jump side on the battery (&lt;code>diffusivity sigmaNeg&lt;/code>, Aitken 0.75). &lt;code>T&lt;/code>: jump side on the battery at both tabs (&lt;code>diffusivity k&lt;/code>, Aitken 0.75). &lt;code>directMap&lt;/code> transfer.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledTemperatureJump</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledtemperaturejump/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledtemperaturejump/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledTemperatureJump&lt;/code> is the value side (Dirichlet side) of the
temperature coupling of &lt;code>heatTransferInterface&lt;/code>, used for conjugate heat
transfer and thermo-FSI. It derives from &lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code>
(and so from &lt;code>fixedValue&lt;/code>). It fixes the patch temperature to the neighbour
temperature, interpolated onto this patch and scaled by the interface&amp;rsquo;s
&lt;code>jumpCoefficient&lt;/code> $c$ ($c = 1$: temperature continuity). It also supplies its
heat flux $\kappa\,\partial T/\partial n$ to the partner
&lt;code>regionCoupledHeatFlux&lt;/code> on the neighbour region. The interface found through
the first &lt;code>interfaceType&lt;/code> entry must be a &lt;code>heatTransferInterface&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $A$ be this patch and $B$ the neighbour (flux-side) patch:&lt;/p>
$$
T_A = c\;\mathcal{I}_{B\to A}(T_B) \quad \text{on } \Gamma
$$
&lt;p>implemented as $T_A = \mathcal{I}_{B\to A}(T_B) + j$ with&lt;/p>
$$
j = \mathcal{I}_{B\to A}(T_B)\,(c - 1),
$$
&lt;p>followed by relaxation with the acceleration model. The heat flux handed to
&lt;code>regionCoupledHeatFlux&lt;/code> is&lt;/p>
$$
q_A = \kappa_A \left.\frac{\partial T_A}{\partial n}\right|_b
$$
&lt;p>with the coupled &lt;code>snGrad&lt;/code> of &lt;code>genericRegionCoupledJump&lt;/code> (optional
non-orthogonal and second-order corrections).&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>$T$&lt;/td>
&lt;td>Temperature (field &lt;code>T&lt;/code> in both regions)&lt;/td>
&lt;td>K&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$c$&lt;/td>
&lt;td>&lt;code>heatTransferInterfaceCoeffs/jumpCoefficient&lt;/code> (uniform, constant)&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\kappa_A$&lt;/td>
&lt;td>Diffusivity named by &lt;code>diffusivity&lt;/code>, default &lt;code>kappa&lt;/code>&lt;/td>
&lt;td>W/(m K)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathcal{I}_{B\to A}$&lt;/td>
&lt;td>Interface-to-interface interpolation&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>Run-time work is inherited from &lt;code>genericRegionCoupledJump&amp;lt;scalar&amp;gt;&lt;/code> (see
there). The class adds:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>&lt;code>valueJump()&lt;/code>&lt;/strong>: looks up the neighbour &lt;code>T&lt;/code> under the local field name,
interpolates its neighbour patch values, and returns
$\mathcal{I}(T_B)\,(c - 1)$. Here $c$ is
&lt;code>heatTransInterface().jumpCoefficient().value()&lt;/code>, a single scalar.&lt;/li>
&lt;li>&lt;strong>&lt;code>heatTransInterface()&lt;/code>&lt;/strong>: checks that the interface matched through the
first &lt;code>interfaceType&lt;/code> entry has type &lt;code>heatTransferInterface&lt;/code>, otherwise
&lt;code>FatalError&lt;/code> (&amp;ldquo;BC can only be used in combination with a
heatTransferInterface&amp;rdquo;). It is called from &lt;code>valueJump()&lt;/code>, so the check
runs on the first &lt;code>updateCoeffs()&lt;/code> and on every residual evaluation.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivityName()&lt;/code>&lt;/strong>: returns the &lt;code>diffusivity&lt;/code> keyword if set,
otherwise &lt;code>kappa&lt;/code>. &lt;code>diffCoeff()&lt;/code> uses the &lt;code>volScalarField&lt;/code> with this name
on the local region if one is registered, else a uniform
&lt;code>dimensionedScalar&lt;/code> of that name from the region&amp;rsquo;s &lt;code>transportProperties&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Per DNA iteration of &lt;code>T&lt;/code>: the interface is updated (its &lt;code>correct()&lt;/code> is a
no-op), the value $\mathcal{I}(T_B) + j$ is set, relaxed (&lt;code>accType&lt;/code>, &lt;code>relax&lt;/code>)
and fixed. The jump residual $|T_A - \mathcal{I}(T_B) - j|$ is checked against
&lt;code>maxJumpRes&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>regionCoupledTemperatureJump&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>Interface type list. The &lt;strong>first&lt;/strong> entry must be &lt;code>heatTransferInterface&lt;/code>.&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Name of the thermal conductivity field / &lt;code>transportProperties&lt;/code> entry&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>kappa&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read and written, not used&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name (&lt;code>T&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Read by the base class but &lt;strong>ignored&lt;/strong> (the coefficient comes from the interface)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>word::null&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code> or &lt;code>IQNILS&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code> (with warning)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>Initial / fixed relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: reused time steps&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction of &lt;code>snGrad&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order &lt;code>snGrad&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value (read if present, otherwise uninitialised)&lt;/td>
&lt;td>effectively 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/conjugateHeatTransfer/flowOverHeatedPlate/0/fluid/orig/partitioned/T&lt;/code>:&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">interface
&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 regionCoupledTemperatureJump;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (heatTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> accType aitken;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> relax 0.75;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner in &lt;code>0/solid/orig/partitioned/T&lt;/code>:&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">top
&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 regionCoupledHeatFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (heatTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value $internalField;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Interface in &lt;code>constant/regionInterfacePropertiesPartitioned&lt;/code>:&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">partitionedCoupledPatches
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">(
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> fluidsolid
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (heatTransferInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluid interface)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (solid top)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> );
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledFields
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> T
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> );
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> heatTransferInterfaceCoeffs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> jumpCoefficient jumpCoefficient [ 0 0 0 0 0 0 0 ] 1;
&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;span class="line">&lt;span class="cl">);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>and the &lt;code>T&lt;/code> entry in the &lt;code>DNA&lt;/code> block of &lt;code>constant/multiRegionProperties&lt;/code>
(&lt;code>maxCoupleIter&lt;/code>, &lt;code>maxJumpRes&lt;/code>, &lt;code>maxFluxRes&lt;/code>). For thermo-FSI the interface
entry lists &lt;code>interfaceType (fsiInterface heatTransferInterface);&lt;/code>, while the
&lt;code>T&lt;/code> patches keep &lt;code>interfaceType (heatTransferInterface);&lt;/code>
(&lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code>).&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Needs &lt;code>heatTransferInterface&lt;/code> first&lt;/strong> in the BC&amp;rsquo;s &lt;code>interfaceType&lt;/code> list;
any other type aborts in &lt;code>valueJump()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Constant, uniform jump coefficient.&lt;/strong> $c$ is a single
&lt;code>dimensionedScalar&lt;/code> read once by the interface. The &lt;code>jumpCoefficient&lt;/code> patch
keyword (field lookup) of &lt;code>regionCoupledScalarJump&lt;/code> is not used here.&lt;/li>
&lt;li>&lt;strong>No unit check on &lt;code>kappa&lt;/code>.&lt;/strong> The flux balance with the partner only
conserves energy if both sides name conductivities in the same units
(e.g. not &lt;code>DT&lt;/code> in m²/s on one side).&lt;/li>
&lt;li>&lt;strong>Missing diffusivity is fatal&lt;/strong> when the partner first asks for &lt;code>flux()&lt;/code>
(no &lt;code>kappa&lt;/code> field and no &lt;code>kappa&lt;/code> in &lt;code>transportProperties&lt;/code>).&lt;/li>
&lt;li>Inherited from &lt;code>genericRegionCoupledJump&lt;/code>: &lt;code>neighbourFieldName&lt;/code> unused,
side detection by patch name only, acceleration state carried over time
steps, &lt;code>IQNILS&lt;/code> not parallel-consistent, partitioned only (the
&lt;code>*Monolithic&lt;/code> tutorial variants use other BCs).&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/conjugateHeatTransfer/flowOverHeatedPlate&lt;/code>&lt;/td>
&lt;td>Fluid side of &lt;code>fluid (pimpleFluid transportTemperature)&lt;/code> / &lt;code>solid (conductTemperature)&lt;/code>, Aitken 0.75, &lt;code>directMap&lt;/code>.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/conjugateHeatTransfer/ShellAndTubeHeatExchanger&lt;/code>&lt;/td>
&lt;td>Fluid side on &lt;code>inner_to_solid&lt;/code> and &lt;code>outer_to_solid&lt;/code>, &lt;code>nonOrthCorr true&lt;/code>, default &lt;code>fixed&lt;/code> relaxation, &lt;code>AMI&lt;/code>.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Fluid side of the thermo-FSI interface (&lt;code>diffusivity &amp;quot;kappa&amp;quot;&lt;/code>, Aitken 0.75), stacked with &lt;code>fsiInterface&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledTraction</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledtraction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledtraction/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledTraction&lt;/code> applies the fluid load to the solid in a partitioned
fluid-structure interaction. It acts on the solid displacement &lt;code>D&lt;/code>
(&lt;code>volVectorField&lt;/code>) and derives from &lt;code>genericRegionCoupledFlux&amp;lt;vector&amp;gt;&lt;/code>, i.e.
from &lt;code>fixedGradient&lt;/code>. It uses the &amp;ldquo;direct flux&amp;rdquo; path of the base class: the
gradient is computed entirely from the fluid traction and the solid stress
state, with no flux matching against a partner BC. There is no partner
coupled BC on the fluid side, because the fluid has no &lt;code>D&lt;/code> field. The fluid
side follows the solid through the &lt;code>interfaceTrackingFvMesh&lt;/code> mesh motion, and
its velocity usually uses &lt;code>movingWallVelocity&lt;/code>. The BC belongs to
&lt;code>fsiInterface&lt;/code> and aborts if the first entry of its &lt;code>interfaceType&lt;/code> list is
not &lt;code>fsiInterface&lt;/code>. The solid region must be &lt;code>solidStVK&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>The fluid traction is evaluated on the fluid patch, mapped to the solid patch
and its sign is flipped:&lt;/p>
$$
\mathbf{t} = -\,\mathcal{I}_{f\to s}\!\left(\boldsymbol{\sigma}_f\cdot\mathbf{n}_f\right)
$$
&lt;p>The normal displacement gradient is then&lt;/p>
$$
\frac{\partial \mathbf{D}}{\partial n} =
\frac{1}{K}\left[\,\mathbf{t} - \mathbf{n}\cdot\boldsymbol{\sigma}_s + K\,\mathbf{n}_0\cdot\nabla\mathbf{D}\,\right],
\qquad
\mathbf{n} = \frac{\mathbf{F}^{-T}\cdot\mathbf{n}_0}{\lvert\mathbf{F}^{-T}\cdot\mathbf{n}_0\rvert}
\quad \text{on } \Gamma_s
$$
&lt;p>This is the usual segregated traction condition: the explicit stress
$\mathbf{n}\cdot\boldsymbol{\sigma}_s$ is replaced by the implicit
$K\,\partial\mathbf{D}/\partial n$ part. At convergence of the solid Picard
loop $\mathbf{n}\cdot\boldsymbol{\sigma}_s = \mathbf{t}$ holds in the deformed
configuration. The gradient is relaxed by the acceleration model,
$g^{k} = g^{k-1} + \omega\,(g^{*} - g^{k-1})$, and the patch value is
reconstructed as $\mathbf{D}_b = \mathbf{D}_P + \mathbf{k}\cdot\nabla\mathbf{D}_P + g/\Delta_f$
(first order) or $\mathbf{D}_P + \mathbf{k}\cdot\nabla\mathbf{D}_P + (g + \mathbf{n}_0\cdot\nabla\mathbf{D}_P)/(2\Delta_f)$
(&lt;code>secondOrder yes&lt;/code>); the $\mathbf{k}$ term only with &lt;code>nonOrthCorr yes&lt;/code>.&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{D}$&lt;/td>
&lt;td>Solid total displacement&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\sigma}_f$&lt;/td>
&lt;td>Fluid Cauchy stress, &lt;code>volSymmTensorField sigma&lt;/code> of the fluid region&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}_f$&lt;/td>
&lt;td>Outward unit normal of the fluid patch&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\sigma}_s$&lt;/td>
&lt;td>Solid Cauchy stress (&lt;code>sigma&lt;/code> of the solid)&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}_0$&lt;/td>
&lt;td>Undeformed solid patch normal&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$&lt;/td>
&lt;td>Deformed solid patch normal&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{F}^{-1}$&lt;/td>
&lt;td>Inverse deformation gradient (&lt;code>Finv&lt;/code>)&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$K$&lt;/td>
&lt;td>Implicit stiffness (&lt;code>impK&lt;/code>); $1/K$ = &lt;code>rImpK&lt;/code>&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\nabla\mathbf{D}$&lt;/td>
&lt;td>Displacement gradient (&lt;code>gradD&lt;/code>)&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledFlux&lt;/code> with
&lt;code>useDirectFlux()&lt;/code> returning &lt;code>true&lt;/code>:&lt;/p>
&lt;ol>
&lt;li>Return if updated or if the interface has &lt;code>coupled no&lt;/code>. The gradient is
then frozen at its last value. With &lt;code>couplingStartTime&lt;/code>, the coupling is
switched on once that time is reached.&lt;/li>
&lt;li>Call &lt;code>update()&lt;/code> on the first &lt;code>interfaceType&lt;/code>, i.e. the &lt;code>fsiInterface&lt;/code>.&lt;/li>
&lt;li>Set &lt;code>gradient() = flux()&lt;/code>, relax it, call &lt;code>fixedGradient::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>&lt;code>flux()&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>checks that the first &lt;code>interfaceType&lt;/code> is &lt;code>fsiInterface&lt;/code>;&lt;/li>
&lt;li>looks up the fluid field named &lt;code>sigma&lt;/code> (hardcoded) in the neighbour region,
takes its patch values on the neighbour patch, dots them with the
neighbour patch normals, interpolates the result to the solid patch and
negates it;&lt;/li>
&lt;li>looks up &lt;code>impK&lt;/code>, &lt;code>rImpK&lt;/code>, &lt;code>gradD&lt;/code>, &lt;code>sigma&lt;/code> and &lt;code>Finv&lt;/code> on the solid patch
(all provided by &lt;code>solidStVK&lt;/code>);&lt;/li>
&lt;li>calls &lt;code>fsiInterface::setTotalForce()&lt;/code> with
$\sum \mathbf{t}\,\lvert\mathbf{S}_0\rvert$ (undeformed face areas). The
interface logs this value in &lt;code>info()&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>evaluate()&lt;/code> uses the registered &lt;code>grad(D)&lt;/code> if one exists. &lt;code>solidStVK&lt;/code>
registers its gradient as &lt;code>gradD&lt;/code>, so in practice &lt;code>fvc::grad(D)&lt;/code> is computed
on every evaluation.&lt;/p>
&lt;p>In the DNA loop for &lt;code>D&lt;/code> (&lt;code>multiRegionSystem::solve()&lt;/code>), each iteration runs
&lt;code>solvePIMPLE()&lt;/code> on the fluid (updating the fluid &lt;code>sigma&lt;/code>), then assembles and
solves &lt;code>D&lt;/code> with this BC, then &lt;code>meshMotionCorrector()&lt;/code> and
&lt;code>interfaces_-&amp;gt;update()&lt;/code>. Convergence is judged by the &lt;code>fsiInterface&lt;/code>
interface residual (&lt;code>maxIntRes&lt;/code>). The jump and flux residuals of the generic
base classes cannot be used: &lt;code>rawResidual()&lt;/code>/&lt;code>normResidual()&lt;/code> abort for a
direct-flux BC, and the fluid has no &lt;code>D&lt;/code> field anyway.&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>regionCoupledTraction&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. The first entry must be &lt;code>fsiInterface&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, but ignored: the fluid field is always looked up as &lt;code>sigma&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name (&lt;code>D&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial displacement gradient. Read if present; otherwise zero gradient and the patch value is set from the internal field&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (&lt;code>fixedGradient&lt;/code> ignores it). Written by &lt;code>write()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read by the base class, not used (direct flux)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model for the gradient: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order reconstruction of the patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> writes &lt;code>diffusivity&lt;/code> only if it was set, and does not write
&lt;code>gradient&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>Solid &lt;code>0/solid/D&lt;/code> from
&lt;code>tutorials/fluidStructureInteraction/HronTurekFsi3/0/solid/orig/partitioned/D&lt;/code>:&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">interface
&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 regionCoupledTraction;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> neighbourFieldName sigma; // ignored, sigma is hardcoded
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (fsiInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform (0 0 0); // not read
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The matching fluid patch has no coupled BC. In the tutorials it uses
&lt;code>movingWallVelocity&lt;/code> for &lt;code>U&lt;/code>, &lt;code>zeroGradient&lt;/code> for &lt;code>pKin&lt;/code>, and &lt;code>fixedValue&lt;/code> for
&lt;code>pointMotionU&lt;/code> (driven by &lt;code>interfaceTrackingFvMesh&lt;/code> with &lt;code>fsiInterface yes&lt;/code>).&lt;/p>
&lt;p>&lt;code>constant/regionInterfaceProperties&lt;/code>:&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">partitionedCoupledPatches
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">(
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> fluidsolid
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (fsiInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluid interfaceShadow)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (solid interface)
&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;span class="line">&lt;span class="cl"> coupledFields
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> D
&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;span class="line">&lt;span class="cl"> fsiInterfaceCoeffs
&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;span class="line">&lt;span class="cl">);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>constant/multiRegionProperties&lt;/code>:&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">DNA
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> D
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxCoupleIter 100;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> residualControl
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxIntRes 1e-7;
&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;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The full setup (dynamic mesh, transfer method, coupling start time) is
described in &lt;code>fsiInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>&lt;code>fsiInterface&lt;/code> and &lt;code>solidStVK&lt;/code> only.&lt;/strong> The interface type is checked;
the solid fields &lt;code>impK&lt;/code>, &lt;code>rImpK&lt;/code>, &lt;code>gradD&lt;/code>, &lt;code>sigma&lt;/code> and &lt;code>Finv&lt;/code> are only
provided by &lt;code>solidStVK&lt;/code>.&lt;/li>
&lt;li>&lt;strong>The fluid stress must be called &lt;code>sigma&lt;/code>.&lt;/strong> &lt;code>neighbourFieldName&lt;/code> is read
but not used.&lt;/li>
&lt;li>&lt;strong>No generic residuals.&lt;/strong> Use the &lt;code>fsiInterface&lt;/code> interface residual
(&lt;code>maxIntRes&lt;/code>); jump/flux residuals abort for this BC.&lt;/li>
&lt;li>&lt;strong>Relaxation history starts from the patch value&lt;/strong> (&lt;em>inferred&lt;/em>). The base
class initialises the acceleration model with the patch values of &lt;code>D&lt;/code> but
relaxes the gradient. With &lt;code>relax 1&lt;/code> (the default, used in all tutorials)
this has no effect.&lt;/li>
&lt;li>&lt;strong>Total force uses the undeformed area&lt;/strong> and is set on every call of
&lt;code>flux()&lt;/code>. It is a diagnostic only.&lt;/li>
&lt;li>&lt;strong>&lt;code>gradient&lt;/code> is not written&lt;/strong> to the time directories, so a restart starts
from zero gradient until the first update.&lt;/li>
&lt;li>&lt;strong>Partitioned only.&lt;/strong> There is no monolithic FSI path.&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>Hron-Turek FSI3 benchmark (&lt;code>pimpleFluid&lt;/code> + &lt;code>solidStVK&lt;/code>), AMI transfer, coupling starts at t = 2 s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/beamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Elastic beam in cross-flow (&lt;code>pimpleFluid&lt;/code> + &lt;code>solidStVK&lt;/code>), directMap transfer&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Heated elastic beam; &lt;code>fsiInterface&lt;/code> + &lt;code>heatTransferInterface&lt;/code> on one patch pair&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The BC is set in the &lt;code>0/solid/orig/partitioned/D&lt;/code> variant of each tutorial
(&lt;code>./Allrun -p&lt;/code>).&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledVelocityFlux</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledvelocityflux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledvelocityflux/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledVelocityFlux&lt;/code> is the Neumann (flux) half of the partitioned
velocity coupling across a sharp, mesh-tracked fluid-fluid interface. It acts
on a &lt;code>volVectorField&lt;/code> (the velocity &lt;code>U&lt;/code>) and derives from
&lt;code>genericRegionCoupledFlux&amp;lt;vector&amp;gt;&lt;/code>, i.e. from &lt;code>fixedGradient&lt;/code>. It sets the
normal velocity gradient so that the tangential viscous stress balances the
neighbour stress plus the tangential surface-tension force. The normal
component of the gradient follows from surface continuity. The partner
condition on the other side is &lt;code>regionCoupledVelocityValue&lt;/code>. Both belong to
&lt;code>capillaryInterface&lt;/code>, and this BC aborts if the first entry of its
&lt;code>interfaceType&lt;/code> list is not &lt;code>capillaryInterface&lt;/code>.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Region $A$ is the first entry of &lt;code>coupledPatchPair&lt;/code> and carries the
finite-area mesh (&lt;code>faMesh&lt;/code>) of the &lt;code>capillaryInterface&lt;/code>. This BC sits on side
$A$ (see &lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledvelocityflux/#known-limitations">Known Limitations&lt;/a>). $\mathbf{n}$ is the
&lt;code>faMesh&lt;/code> face normal (&lt;code>faceAreaNormals()&lt;/code>), $\mathcal{I}_{B\to A}$ the
patch-to-patch interpolation, and $\mathbf{F}_B$ the flux computed by
&lt;code>regionCoupledVelocityValue&lt;/code> on side B
($\mu_B$ times the tangential part of $\partial\mathbf{U}_B/\partial n_B$).
With $\tilde{\mathbf{F}} = \mathcal{I}_{B\to A}(\mathbf{F}_B)$, the gradient is&lt;/p>
$$
\mu_A \frac{\partial \mathbf{U}_A}{\partial n} =
-\tilde{\mathbf{F}} + \mathbf{n}(\mathbf{n}\cdot\tilde{\mathbf{F}}) + \mathbf{f}_{\sigma,t} - \mu_A\,\mathbf{n}\,(\nabla_s\cdot\mathbf{u}_s) + (\mu_B - \mu_A)\,(\nabla_s\mathbf{u}_s)\cdot\mathbf{n}
\quad \text{on } \Gamma_A
$$
&lt;p>The first two terms are $-(\mathbf{I}-\mathbf{n}\mathbf{n})\cdot\tilde{\mathbf{F}}$.
The tangential surface-tension force is&lt;/p>
$$
\mathbf{f}_{\sigma,t} = \sigma\,\frac{1}{S_f}\sum_{e} \mathbf{L}_e\,c_e \;-\; \sigma\kappa\,\mathbf{n}
$$
&lt;p>The normal term $-\mu_A\mathbf{n}\,\nabla_s\cdot\mathbf{u}_s$ uses
$\partial u_n/\partial n = -\nabla_s\cdot\mathbf{u}_s$ (incompressibility at
the surface). The gradient is relaxed by the acceleration model:
$g^{k} = g^{k-1} + \omega\,(g^{*} - g^{k-1})$.&lt;/p>
&lt;p>The patch value is reconstructed from the gradient in &lt;code>evaluate()&lt;/code>:&lt;/p>
$$
\mathbf{U}_A = \mathbf{U}_P + \mathbf{k}\cdot\nabla\mathbf{U}_P + \frac{1}{\Delta_f}\,\frac{\partial \mathbf{U}_A}{\partial n}
\qquad\text{or}\qquad
\mathbf{U}_A = \mathbf{U}_P + \mathbf{k}\cdot\nabla\mathbf{U}_P + \frac{1}{2\Delta_f}\left(\frac{\partial \mathbf{U}_A}{\partial n} + \mathbf{n}\cdot\nabla\mathbf{U}_P\right)
$$
&lt;p>(first order / &lt;code>secondOrder yes&lt;/code>; the $\mathbf{k}$ term only with &lt;code>nonOrthCorr yes&lt;/code>).&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}$&lt;/td>
&lt;td>Velocity&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{u}_s$&lt;/td>
&lt;td>Surface velocity on the &lt;code>faMesh&lt;/code> (&lt;code>Us()&lt;/code>)&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\sigma$&lt;/td>
&lt;td>Surface tension (&lt;code>sigma()&lt;/code> of the &lt;code>capillaryInterface&lt;/code>)&lt;/td>
&lt;td>N/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\kappa$&lt;/td>
&lt;td>Face curvature, &lt;code>faMesh::faceCurvatures()&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{L}_e$, $c_e$&lt;/td>
&lt;td>Edge length vectors and &lt;code>edgeLengthCorrection()&lt;/code> of the &lt;code>faMesh&lt;/code>&lt;/td>
&lt;td>m, –&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mu_A$, $\mu_B$&lt;/td>
&lt;td>&lt;code>mu&lt;/code> from each region&amp;rsquo;s &lt;code>transportProperties&lt;/code>&lt;/td>
&lt;td>Pa·s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Delta_f$&lt;/td>
&lt;td>Patch &lt;code>deltaCoeffs&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{k}$&lt;/td>
&lt;td>Non-orthogonal part of the face-to-cell vector&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledFlux&lt;/code>:&lt;/p>
&lt;ol>
&lt;li>Return if already updated or if the interface has &lt;code>coupled no&lt;/code> (the
gradient is then frozen).&lt;/li>
&lt;li>Call &lt;code>update()&lt;/code> on the first &lt;code>interfaceType&lt;/code> (refreshes curvature and
$\mathbf{u}_s$ of the &lt;code>capillaryInterface&lt;/code>).&lt;/li>
&lt;li>Look up the neighbour &lt;code>U&lt;/code> by the local field name and &lt;code>refCast&lt;/code> its patch
field to &lt;code>genericRegionCoupledJump&amp;lt;vector&amp;gt;&lt;/code>. Its &lt;code>flux()&lt;/code> is interpolated
onto this patch and negated.&lt;/li>
&lt;li>Add &lt;code>fluxJump()&lt;/code> and divide by &lt;code>k = diffCoeff()&lt;/code>. &lt;code>diffCoeff()&lt;/code> uses the
hardcoded name &lt;code>mu&lt;/code>: the patch values of a registered &lt;code>volScalarField mu&lt;/code>,
otherwise the scalar &lt;code>mu&lt;/code> from &lt;code>transportProperties&lt;/code>.&lt;/li>
&lt;li>Relax the gradient with the acceleration model and call
&lt;code>fixedGradient::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>&lt;code>fluxJump()&lt;/code> computes $\nabla_s\cdot\mathbf{u}_s$ (&lt;code>fac::div&lt;/code>),
$\nabla_s\mathbf{u}_s$ (&lt;code>fac::grad&lt;/code>) and the edge-integrated surface-tension
force on the &lt;code>faMesh&lt;/code>. $\mu_A$ and $\mu_B$ are always read from the
&lt;code>transportProperties&lt;/code> dictionaries, not from fields. If a region has a
&lt;code>pKin&lt;/code> field, its &lt;code>mu&lt;/code> must equal &lt;code>rho*nu&lt;/code> from the same dictionary
(exact floating-point comparison), otherwise the run stops with a fatal
error. Each call prints &lt;code>Us &amp;lt;value&amp;gt;&lt;/code> (the volume swept by $\mathbf{u}_s$ in
one time step) to the log.&lt;/p>
&lt;p>&lt;code>evaluate()&lt;/code> uses the registered &lt;code>grad(U)&lt;/code> if it exists, otherwise
&lt;code>fvc::grad(U)&lt;/code>.&lt;/p>
&lt;p>The &lt;code>U&lt;/code> flux residual of the &lt;code>pUPimple&lt;/code> DNA loop is taken from this BC
(side A is checked first):&lt;/p>
$$
r = \frac{\lVert \mu_A\,\partial_n\mathbf{U}_A + \tilde{\mathbf{F}} - \text{fluxJump}\rVert_2}
{\max\left(\min\left(\lVert\mu_A\,\partial_n\mathbf{U}_A\rVert_2,\ \lVert -\tilde{\mathbf{F}}+\text{fluxJump}\rVert_2\right),\ \text{SMALL}\right)}
$$
&lt;p>with $\partial_n\mathbf{U}_A$ from &lt;code>snGrad()&lt;/code> of the patch.&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>regionCoupledVelocityFlux&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. The first entry must be &lt;code>capillaryInterface&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial patch-normal gradient. Read if present; otherwise zero gradient and the patch value is set from the internal field&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (&lt;code>fixedGradient&lt;/code> ignores it). Written by &lt;code>write()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>mu&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager, not used by this BC&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model for the gradient: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code>, &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>evaluate()&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order reconstruction of the patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> does not write &lt;code>gradient&lt;/code>. After a restart or &lt;code>decomposePar&lt;/code> the
gradient therefore starts from zero.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>&lt;code>tutorials/multiphaseFlow/2dRisingBubble/0/fluidA/orig/partitioned/U&lt;/code>
(side A):&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">interface
&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 regionCoupledVelocityFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;mu&amp;#34;; // ignored, always mu
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> value uniform (0 0 0); // not read
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Partner on side B, &lt;code>0/fluidB/orig/partitioned/U&lt;/code>:&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">interfaceShadow
&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 regionCoupledVelocityValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&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;p>The &lt;code>regionInterfaceProperties&lt;/code> and &lt;code>multiRegionProperties&lt;/code> entries are shown
on the &lt;code>regionCoupledVelocityValue&lt;/code> page and in &lt;code>capillaryInterface&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>&lt;code>capillaryInterface&lt;/code> only.&lt;/strong> &lt;code>capInterface()&lt;/code> aborts unless the first
&lt;code>interfaceType&lt;/code> entry is &lt;code>capillaryInterface&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Must sit on side A&lt;/strong> (&lt;em>inferred&lt;/em>). The &lt;code>faMesh&lt;/code> normals,
$\mathbf{u}_s$, $\sigma$ and $\kappa$ are used index by index on the patch
without interpolation, which is only valid on the side that owns the
&lt;code>faMesh&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Partner must be jump-derived.&lt;/strong> The neighbour &lt;code>U&lt;/code> patch field is
&lt;code>refCast&lt;/code> to &lt;code>genericRegionCoupledJump&amp;lt;vector&amp;gt;&lt;/code>; any other type aborts.&lt;/li>
&lt;li>&lt;strong>Exact &lt;code>mu == rho*nu&lt;/code> check&lt;/strong> for regions with &lt;code>pKin&lt;/code>. Rounding in the
input values can trigger the fatal error.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> and &lt;code>neighbourFieldName&lt;/code> are ignored.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Relaxation history starts from the patch value&lt;/strong> (&lt;em>inferred&lt;/em>). The base
class initialises the acceleration model with the patch values but relaxes
the gradient. With &lt;code>relax 1&lt;/code> (the default, used in all tutorials) this has
no effect.&lt;/li>
&lt;li>&lt;strong>&lt;code>gradient&lt;/code> is not written&lt;/strong> to the time directories.&lt;/li>
&lt;li>&lt;strong>No runnable tutorial.&lt;/strong> The tutorials use the disabled &lt;code>interTrackFluid&lt;/code>.&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/multiphaseFlow/2dRisingBubble&lt;/code>&lt;/td>
&lt;td>2D rising gas bubble, &lt;code>interTrackFluid&lt;/code> + &lt;code>interTrackFluid&lt;/code> (region type currently disabled)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dDuineveldRisingBubble&lt;/code>&lt;/td>
&lt;td>3D rising bubble (Duineveld), same setup&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dOscillatingBubble&lt;/code>&lt;/td>
&lt;td>3D oscillating bubble, same setup&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The BC is set in the &lt;code>0/fluidA/orig/partitioned/U&lt;/code> variant of each tutorial.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: regionCoupledVelocityValue</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledvelocityvalue/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledvelocityvalue/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>regionCoupledVelocityValue&lt;/code> is the Dirichlet (jump) half of the partitioned
velocity coupling across a sharp, mesh-tracked fluid-fluid interface. It acts
on a &lt;code>volVectorField&lt;/code> (the velocity &lt;code>U&lt;/code>) and derives from
&lt;code>genericRegionCoupledJump&amp;lt;vector&amp;gt;&lt;/code>, i.e. from &lt;code>fixedValue&lt;/code>. The patch value is
the neighbour velocity, interpolated onto this patch, with its normal
component replaced by the normal velocity of the local mesh. The tangential
velocity is therefore continuous. The partner condition on the other side is
&lt;code>regionCoupledVelocityFlux&lt;/code>. Both belong to &lt;code>capillaryInterface&lt;/code>, and this BC
aborts if the first entry of its &lt;code>interfaceType&lt;/code> list is not
&lt;code>capillaryInterface&lt;/code>. The pressure is coupled by &lt;code>regionCoupledPressureValue&lt;/code>
and &lt;code>regionCoupledPressureFlux&lt;/code> in the same &lt;code>pUPimple&lt;/code> DNA loop.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Region $A$ is the first entry of &lt;code>coupledPatchPair&lt;/code> and carries the
finite-area mesh of the &lt;code>capillaryInterface&lt;/code>. This BC sits on side $B$ (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/coupled-boundary-conditions/regioncoupledvelocityvalue/#known-limitations">Known Limitations&lt;/a>). $\mathcal{I}_{A\to B}$ is the
patch-to-patch interpolation (&lt;code>interfaceTransferMethod&lt;/code>), $\mathbf{n}_B$ the
outward unit normal of the local patch.&lt;/p>
$$
\mathbf{U}_B^{*} = \mathcal{I}_{A\to B}(\mathbf{U}_A) - \mathbf{n}_B\left(\mathbf{n}_B\cdot\mathcal{I}_{A\to B}(\mathbf{u}_s)\right) + \mathbf{n}_B\,\frac{\phi_{\text{mesh},B}}{|\mathbf{S}_f|}
\quad \text{on } \Gamma_B
$$
&lt;p>$\mathbf{U}_B^{*}$ is then passed through the acceleration model:&lt;/p>
$$
\mathbf{U}_B^{k} = \mathbf{U}_B^{k-1} + \omega\left(\mathbf{U}_B^{*} - \mathbf{U}_B^{k-1}\right)
$$
&lt;p>with $\omega$ = &lt;code>relax&lt;/code> (&lt;code>fixed&lt;/code>), the Aitken factor (&lt;code>aitken&lt;/code>), or an IQN-ILS
update (&lt;code>IQNILS&lt;/code>).&lt;/p>
&lt;p>The surface velocity $\mathbf{u}_s$ of the &lt;code>capillaryInterface&lt;/code> is
$\mathbf{U}_A - (\mathbf{U}_A\cdot\mathbf{n}_A)\mathbf{n}_A + w_A\mathbf{n}_A$,
where $w_A$ is the side-A mesh normal velocity. The term
$-\mathbf{n}_B(\mathbf{n}_B\cdot\mathbf{u}_s)$ therefore removes the normal part
of $\mathbf{U}_A$ up to the side-A mesh motion. The last term imposes the side-B
mesh normal velocity.&lt;/p>
&lt;p>The diffusive momentum flux handed to &lt;code>regionCoupledVelocityFlux&lt;/code> is&lt;/p>
$$
\mathbf{F}_B = \mu_B\,(\mathbf{I}-\mathbf{n}_B\mathbf{n}_B)\cdot\frac{\partial\mathbf{U}_B}{\partial n},
\qquad
\frac{\partial\mathbf{U}_B}{\partial n} = \Delta_f\left(\mathbf{U}_B - \mathbf{U}_P - \mathbf{k}\cdot\nabla\mathbf{U}_P\right)
$$
&lt;p>The non-orthogonal term $\mathbf{k}\cdot\nabla\mathbf{U}_P$ is only present with
&lt;code>nonOrthCorr yes&lt;/code>. With &lt;code>secondOrder yes&lt;/code> the gradient is
$2\Delta_f(\mathbf{U}_B - \mathbf{U}_P - \mathbf{k}\cdot\nabla\mathbf{U}_P) - \mathbf{n}_B\cdot\nabla\mathbf{U}_P$.
In both cases the normal component is removed.&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}$&lt;/td>
&lt;td>Velocity&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{u}_s$&lt;/td>
&lt;td>Surface velocity of the &lt;code>capillaryInterface&lt;/code> (&lt;code>Us()&lt;/code>, on side A)&lt;/td>
&lt;td>m/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\phi_{\text{mesh},B}$&lt;/td>
&lt;td>Boundary value of &lt;code>fvc::meshPhi(rho, U)&lt;/code> if a &lt;code>volScalarField rho&lt;/code> is registered in region B, otherwise &lt;code>fvc::meshPhi(U)&lt;/code>&lt;/td>
&lt;td>m³/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{S}_f$&lt;/td>
&lt;td>Face area vector of the local patch&lt;/td>
&lt;td>m²&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mu_B$&lt;/td>
&lt;td>Diffusivity &lt;code>mu&lt;/code> of region B (field or &lt;code>transportProperties&lt;/code>)&lt;/td>
&lt;td>Pa·s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\Delta_f$&lt;/td>
&lt;td>Patch &lt;code>deltaCoeffs&lt;/code>&lt;/td>
&lt;td>1/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{k}$&lt;/td>
&lt;td>Non-orthogonal part of the face-to-cell vector, $\mathbf{d}-\mathbf{n}(\mathbf{n}\cdot\mathbf{d})$&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\omega$&lt;/td>
&lt;td>Relaxation factor from the acceleration model&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>updateCoeffs()&lt;/code> is the generic one of &lt;code>genericRegionCoupledJump&lt;/code>. Each call:&lt;/p>
&lt;ol>
&lt;li>Returns immediately if the patch is already updated or the interface has
&lt;code>coupled no&lt;/code>. In that case the patch keeps its last value.&lt;/li>
&lt;li>Calls &lt;code>update()&lt;/code> on the interface named first in &lt;code>interfaceType&lt;/code>. For
&lt;code>capillaryInterface&lt;/code> this refreshes the curvature and the surface velocity
$\mathbf{u}_s$ (&lt;code>correct()&lt;/code>).&lt;/li>
&lt;li>Looks up the neighbour field with the &lt;strong>local&lt;/strong> field name (&lt;code>U&lt;/code>),
interpolates its patch values onto this patch and adds &lt;code>valueJump()&lt;/code>.
&lt;code>valueJump()&lt;/code> returns
$-\mathbf{n}_B(\mathbf{n}_B\cdot\mathcal{I}_{A\to B}(\mathbf{u}_s)) + \mathbf{n}_B\,\phi_{\text{mesh},B}/|\mathbf{S}_f|$.&lt;/li>
&lt;li>Assigns the result, relaxes it with the acceleration model and calls
&lt;code>fixedValue::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>The matrix coefficients come from the vector specialisations in
&lt;code>genericRegionCoupledJump&lt;/code>. &lt;code>gradientInternalCoeffs()&lt;/code> is the &lt;code>fixedValue&lt;/code> one
($-\Delta_f$). &lt;code>gradientBoundaryCoeffs()&lt;/code> subtracts the normal part of the
current face gradient explicitly, using the current cell values. At
convergence only the tangential gradient enters the viscous term of the
momentum equation. &lt;code>snGrad()&lt;/code> drops the normal part in the same way. If a
&lt;code>volTensorField&lt;/code> named &lt;code>grad(U)&lt;/code> is registered, it is used for the
non-orthogonal and second-order terms; otherwise &lt;code>fvc::grad(U)&lt;/code> is computed on
every call.&lt;/p>
&lt;p>&lt;code>flux()&lt;/code> returns &lt;code>snGrad()*k&lt;/code>. &lt;code>k&lt;/code> comes from &lt;code>diffCoeff()&lt;/code> with the hardcoded
diffusivity name &lt;code>mu&lt;/code>: the patch values of a registered &lt;code>volScalarField mu&lt;/code>,
otherwise the scalar &lt;code>mu&lt;/code> from the region&amp;rsquo;s registered &lt;code>transportProperties&lt;/code>
dictionary.&lt;/p>
&lt;p>The DNA loop for &lt;code>pUPimple&lt;/code> (&lt;code>multiRegionSystem::solve()&lt;/code>) runs
&lt;code>solvePIMPLE()&lt;/code> on all regions, in which this BC is evaluated, then
&lt;code>meshMotionCorrector()&lt;/code> and &lt;code>interfaces_-&amp;gt;update()&lt;/code>. The jump residual for &lt;code>U&lt;/code>
is taken from this BC, because the side-A &lt;code>U&lt;/code> patch carries a flux BC:&lt;/p>
$$
r = \frac{\lVert \mathbf{U}_B - \mathcal{I}_{A\to B}(\mathbf{U}_A) - \text{valueJump}\rVert_2}
{\max\left(\min\left(\lVert\mathbf{U}_B\rVert_2,\ \lVert\mathcal{I}_{A\to B}(\mathbf{U}_A)+\text{valueJump}\rVert_2\right),\ \text{SMALL}\right)}
$$
&lt;p>The class also defines &lt;code>updatePhi()&lt;/code>, which would overwrite the boundary
&lt;code>phi&lt;/code> with the negated interpolated neighbour flux. The call in the base class
is commented out, so it is never executed.&lt;/p>
&lt;p>&lt;code>correctClosedVolumePhi()&lt;/code> (used by &lt;code>icoFluid&lt;/code> and &lt;code>interTrackFluid&lt;/code> when
&lt;code>closedVolume&lt;/code> is on in &lt;code>fvSolution&lt;/code>) looks for the patch carrying this BC (or
&lt;code>regionCoupledMassTransferVelocityValue&lt;/code>). It sets &lt;code>phi = U·Sf&lt;/code> there and
removes the net flux, weighted by $|\phi|$, so the net volume flux through the
interface is zero.&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>regionCoupledVelocityValue&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>List of interface type names. The first entry is the interface this BC belongs to and must be &lt;code>capillaryInterface&lt;/code>. The neighbour region and patch are taken from the matching interface entry in &lt;code>regionInterfaceProperties&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value. Read if present. If missing, the patch values are not initialised&lt;/td>
&lt;td>in practice yes&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>Read, but ignored: the BC always uses &lt;code>mu&lt;/code>&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>Read by the coupling manager. Not used by this BC, which looks up the neighbour field by the local name&lt;/td>
&lt;td>no&lt;/td>
&lt;td>local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>Read by the base class, not used, not written back&lt;/td>
&lt;td>no&lt;/td>
&lt;td>empty&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>Acceleration model: &lt;code>fixed&lt;/code>, &lt;code>aitken&lt;/code> or &lt;code>IQNILS&lt;/code>. A warning is printed if missing&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>fixed&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: number of previous time steps whose coupling data are reused&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction in &lt;code>snGrad()&lt;/code> / matrix coefficients&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order face-normal gradient&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>write()&lt;/code> writes &lt;code>interfaceType&lt;/code>, the resolved &lt;code>neighbourFieldName&lt;/code>,
&lt;code>diffusivity mu&lt;/code>, &lt;code>accType&lt;/code>, &lt;code>relax&lt;/code> (and &lt;code>couplingReuse&lt;/code> for &lt;code>IQNILS&lt;/code>),
&lt;code>nonOrthCorr&lt;/code>, &lt;code>secondOrder&lt;/code> and &lt;code>value&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>&lt;code>tutorials/multiphaseFlow/2dRisingBubble/0/fluidB/orig/partitioned/U&lt;/code>
(side B):&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">interfaceShadow
&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 regionCoupledVelocityValue;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;mu&amp;#34;; // ignored, always mu
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&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;p>Partner on side A, &lt;code>0/fluidA/orig/partitioned/U&lt;/code>:&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">interface
&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 regionCoupledVelocityFlux;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> diffusivity &amp;#34;mu&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder false;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nonOrthCorr false;
&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;p>&lt;code>constant/regionInterfaceProperties&lt;/code>:&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">partitionedCoupledPatches
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">(
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> fluidAfluidB
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> interfaceType (capillaryInterface);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> coupledPatchPair
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluidA interface) // side A: faMesh, VelocityFlux, PressureValue
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (fluidB interfaceShadow) // side B: VelocityValue, PressureFlux
&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;span class="line">&lt;span class="cl"> coupledFields
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> pUPimple
&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;span class="line">&lt;span class="cl"> capillaryInterfaceCoeffs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07232;
&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;span class="line">&lt;span class="cl">);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>constant/multiRegionProperties&lt;/code> (&lt;code>U&lt;/code> and &lt;code>p&lt;/code> must exist in both regions):&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">DNA
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> pUPimple
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> maxCoupleIter 10;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> residualControl
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> U { maxJumpRes 1e-5; maxFluxRes 1e-4; }
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> p { maxJumpRes 1e-5; maxFluxRes 1e-5; }
&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;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>&lt;code>capillaryInterface&lt;/code> only.&lt;/strong> &lt;code>capInterface()&lt;/code> aborts if the first
&lt;code>interfaceType&lt;/code> entry is not &lt;code>capillaryInterface&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Must sit on side B&lt;/strong> (&lt;em>inferred&lt;/em>). $\mathbf{u}_s$ lives on the side-A
finite-area mesh and is interpolated &amp;ldquo;from the neighbour&amp;rdquo;. On side A, the
side-A field would be mapped as if it belonged to side B.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity&lt;/code> is ignored.&lt;/strong> &lt;code>diffusivityName()&lt;/code> is hardcoded to &lt;code>mu&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>neighbourFieldName&lt;/code> has no effect.&lt;/strong> The neighbour velocity is looked up
by the local field name.&lt;/li>
&lt;li>&lt;strong>&lt;code>value&lt;/code> should be given.&lt;/strong> The base class reads it only if present and
does not initialise the patch otherwise.&lt;/li>
&lt;li>&lt;strong>&lt;code>updatePhi()&lt;/code> is dead code&lt;/strong>, so the boundary &lt;code>phi&lt;/code> is not set from the
neighbour by this BC.&lt;/li>
&lt;li>&lt;strong>The header example omits &lt;code>interfaceType&lt;/code>&lt;/strong>, which is required.&lt;/li>
&lt;li>&lt;strong>No runnable tutorial.&lt;/strong> All tutorials that use this BC run on
&lt;code>interTrackFluid&lt;/code>, which is commented out in
&lt;code>src/multiRegionSystem/Make/files&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Partitioned only.&lt;/strong> There is no monolithic variant.&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/multiphaseFlow/2dRisingBubble&lt;/code>&lt;/td>
&lt;td>2D rising gas bubble, &lt;code>interTrackFluid&lt;/code> + &lt;code>interTrackFluid&lt;/code> (region type currently disabled)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dDuineveldRisingBubble&lt;/code>&lt;/td>
&lt;td>3D rising bubble (Duineveld), same setup&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/multiphaseFlow/3dOscillatingBubble&lt;/code>&lt;/td>
&lt;td>3D oscillating bubble, same setup&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The BC is set in the &lt;code>0/fluidB/orig/partitioned/U&lt;/code> variant of each tutorial.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&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><item><title>Docs: solidSymmetry</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/solidsymmetry/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/solidsymmetry/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>solidSymmetry&lt;/code> is a symmetry-plane condition ported from the foam-extend
solid-mechanics toolbox (Cardiff, Tuković), where it is also known as
&lt;code>symmetryDisplacement&lt;/code>. It exists for two field types, both registered under
the same type name:&lt;/p>
&lt;ul>
&lt;li>&lt;code>solidSymmetryFvPatchVectorField&lt;/code>, intended for the total displacement &lt;code>D&lt;/code>
of a solid region (&lt;code>solidStVK&lt;/code>). It mirrors the near-wall displacement across
the plane, so the normal displacement on the patch is zero and the
tangential displacement is free. An optional second-order correction is
available.&lt;/li>
&lt;li>&lt;code>solidSymmetryFvPatchScalarField&lt;/code>, the scalar counterpart. It sets the patch
value to the corrected near-wall value (zero normal gradient).&lt;/li>
&lt;/ul>
&lt;p>Both classes derive from the stock &lt;code>symmetry&lt;/code> constraint
(&lt;code>symmetryFvPatchField&lt;/code>). They only replace &lt;code>snGrad()&lt;/code> and &lt;code>evaluate()&lt;/code>, so the
patch must be of mesh type &lt;code>symmetry&lt;/code>. The class keeps the matrix
coefficients (implicit part) of the stock condition.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>Let $\mathbf{n}$ be the patch unit normal, $\boldsymbol{\Delta}$ the patch delta
vector (face centre minus cell centre), $\delta = 1/\texttt{deltaCoeffs}$ the
cell-to-face distance, and $\mathbf{R} = \mathbf{I} - 2\,\mathbf{n}\mathbf{n}$
the reflection tensor. The non-orthogonal correction vector and the corrected
near-wall value are&lt;/p>
$$
\mathbf{k} = (\mathbf{I} - \mathbf{n}\mathbf{n}) \cdot \boldsymbol{\Delta},
\qquad
\mathbf{D}_P^{*} = \mathbf{D}_P + \mathbf{k} \cdot (\nabla \mathbf{D})_P
$$
&lt;h3 id="vector-field-first-order-default">Vector field, first order (default)&lt;/h3>
$$
\mathbf{D}_b = \tfrac{1}{2}\left(\mathbf{D}_P^{*} + \mathbf{R}\,\mathbf{D}_P^{*}\right)
= (\mathbf{I} - \mathbf{n}\mathbf{n})\,\mathbf{D}_P^{*},
\qquad
\left.\frac{\partial \mathbf{D}}{\partial n}\right|_b
= \frac{\mathbf{R}\,\mathbf{D}_P^{*} - \mathbf{D}_P^{*}}{2\,\delta}
= -\frac{(\mathbf{n}\cdot\mathbf{D}_P^{*})\,\mathbf{n}}{\delta}
$$
&lt;h3 id="vector-field-second-order-secondorder-yes">Vector field, second order (&lt;code>secondOrder yes&lt;/code>)&lt;/h3>
$$
\mathbf{D}_b = (\mathbf{I} - \mathbf{n}\mathbf{n}) \cdot
\left( \mathbf{D}_P^{*} + \tfrac{\delta}{2}\, \mathbf{n}\cdot(\nabla\mathbf{D})_P \right)
$$
$$
\left.\frac{\partial \mathbf{D}}{\partial n}\right|_b
= -\frac{2\,(\mathbf{n}\cdot\mathbf{D}_P^{*})\,\mathbf{n}}{\delta} - \mathbf{n}\left(\mathbf{n} \cdot \left[\mathbf{n}\cdot(\nabla\mathbf{D})_P\right]\right)
$$
&lt;p>The tangential part of the value is extrapolated over half a cell with the
mean of the zero face gradient and the cell gradient. The normal part of the
gradient is the one-sided second-order estimate
$2(\mathbf{D}_b - \mathbf{D}_P)\cdot\mathbf{n}/\delta - (\partial_n D_n)_P$.&lt;/p>
&lt;h3 id="scalar-field">Scalar field&lt;/h3>
&lt;p>A scalar is invariant under reflection, so $\mathbf{R}\,T = T$ and the
formulas above reduce to&lt;/p>
$$
T_b = T_P + \mathbf{k}\cdot(\nabla T)_P,
\qquad
\left.\frac{\partial T}{\partial n}\right|_b = 0
$$
&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{D}$, $T$&lt;/td>
&lt;td>Patch field (vector / scalar)&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$&lt;/td>
&lt;td>Patch unit normal (&lt;code>patch().nf()&lt;/code>)&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\Delta}$&lt;/td>
&lt;td>Patch delta vector (&lt;code>patch().delta()&lt;/code>)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\delta$&lt;/td>
&lt;td>$1/$&lt;code>patch().deltaCoeffs()&lt;/code>&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{k}$&lt;/td>
&lt;td>Non-orthogonal correction vector&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$(\nabla\mathbf{D})_P$&lt;/td>
&lt;td>Cell-centre gradient from the registered field &lt;code>gradD&lt;/code>&lt;/td>
&lt;td>field unit/m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$(\nabla T)_P$&lt;/td>
&lt;td>Cell-centre gradient from the registered field &lt;code>grad(&amp;lt;field&amp;gt;)&lt;/code>&lt;/td>
&lt;td>field unit/m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Note on OpenFOAM.com.&lt;/strong> In OpenFOAM.com (v2512 and v2606),
&lt;code>fvPatch::delta()&lt;/code> returns the patch-normal delta
$\mathbf{n}(\mathbf{n}\cdot(\mathbf{C}_f-\mathbf{C}_P))$ for all non-coupled
patches. Then $\mathbf{k} \equiv \mathbf{0}$, $\mathbf{D}_P^{*} = \mathbf{D}_P$,
and the non-orthogonal correction does nothing. It was written for
foam-extend, where &lt;code>delta()&lt;/code> is the full $\mathbf{C}_f - \mathbf{C}_P$. With
the default first-order setting, the vector condition therefore gives exactly
the values and normal gradient of the stock &lt;code>symmetry&lt;/code> condition. The scalar
condition is equivalent to stock &lt;code>symmetry&lt;/code> / &lt;code>zeroGradient&lt;/code> for scalars.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;strong>Construction.&lt;/strong> The dictionary constructor calls the stock &lt;code>symmetry&lt;/code>
constructor. That constructor ignores &lt;code>value&lt;/code> and evaluates the field once
with the stock symmetry formula. The constructor then checks that the patch
is exactly a &lt;code>symmetryFvPatch&lt;/code> (&lt;code>isType&lt;/code>). Any other patch type, including
&lt;code>symmetryPlane&lt;/code>, stops the run with a &lt;code>FatalIOError&lt;/code>. The vector version
reads the optional &lt;code>secondOrder&lt;/code> switch and prints it. Both versions print
&amp;ldquo;Symmetry boundary condition with non-orthogonal correction&amp;rdquo;.&lt;/p>
&lt;p>&lt;strong>&lt;code>evaluate()&lt;/code>&lt;/strong> (called from &lt;code>correctBoundaryConditions()&lt;/code>):&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Calls &lt;code>updateCoeffs()&lt;/code> if needed. This is the base no-op.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Looks up the cell gradient on the patch.&lt;/p>
&lt;ul>
&lt;li>Vector: the &lt;code>volTensorField&lt;/code> named &lt;strong>&lt;code>gradD&lt;/code>&lt;/strong>, whatever the name of the
field the BC is attached to.&lt;/li>
&lt;li>Scalar: the &lt;code>volVectorField&lt;/code> named &lt;strong>&lt;code>grad(&amp;lt;fieldName&amp;gt;)&lt;/code>&lt;/strong>, e.g.
&lt;code>grad(T)&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>The lookup is mandatory. If the field is not registered on the mesh, the
run stops with a fatal error.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Builds $\mathbf{D}_P^{*}$ and assigns the patch value with the formula
above.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Vector only: calls the base &lt;code>evaluate()&lt;/code>, which resets the &lt;code>updated&lt;/code> flag.
The scalar version does not call it.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>&lt;code>snGrad()&lt;/code>&lt;/strong> returns the normal gradient above. It is used wherever the
patch gradient is requested explicitly. The matrix coefficients are inherited
from the stock &lt;code>transform&lt;/code>/&lt;code>basicSymmetry&lt;/code> implementation: for vectors the
implicit diagonal is $|n_i|$ per component. Because
&lt;code>gradientBoundaryCoeffs()&lt;/code> is &lt;code>snGrad() - gradientInternalCoeffs()·D_P&lt;/code>, the
overridden &lt;code>snGrad()&lt;/code> (including the second-order term) enters
&lt;code>fvm::laplacian&lt;/code> as an explicit source. For scalars, the inherited
coefficients are those of a zero-gradient condition.&lt;/p>
&lt;p>&lt;strong>In &lt;code>solidStVK&lt;/code>.&lt;/strong> The momentum equation uses
&lt;code>fvm::laplacian(impKf, D, &amp;quot;laplacian(DD,D)&amp;quot;)&lt;/code>, which picks up the coefficients
above. &lt;code>gradD = fvc::grad(D)&lt;/code> is recomputed in &lt;code>postSolve()&lt;/code> from the patch
values set in &lt;code>evaluate()&lt;/code>. &lt;code>solidStVK&lt;/code> registers &lt;code>gradD&lt;/code>, so the vector BC
works on its &lt;code>D&lt;/code> field. It also works on any other vector field of that
region, but it always uses &lt;code>gradD&lt;/code>.&lt;/p>
&lt;h2 id="dictionary-entries">Dictionary Entries&lt;/h2>
&lt;p>Vector version:&lt;/p>
&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>solidSymmetry&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order correction of value and normal gradient (&lt;code>Switch&lt;/code>)&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>patchType&lt;/code>&lt;/td>
&lt;td>Generic &lt;code>fvPatchField&lt;/code> keyword, read by the stock base class&lt;/td>
&lt;td>no&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read. The initial value comes from the stock symmetry evaluation. Written on output.&lt;/td>
&lt;td>no&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Scalar version:&lt;/p>
&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>solidSymmetry&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>patchType&lt;/code>&lt;/td>
&lt;td>Generic &lt;code>fvPatchField&lt;/code> keyword&lt;/td>
&lt;td>no&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Not read (see above). Written on output.&lt;/td>
&lt;td>no&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The scalar version does not read &lt;code>secondOrder&lt;/code>.&lt;/p>
&lt;p>Required registered fields:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Needed by&lt;/th>
&lt;th>Provided by&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>gradD&lt;/code>&lt;/td>
&lt;td>&lt;code>volTensorField&lt;/code>&lt;/td>
&lt;td>vector version&lt;/td>
&lt;td>&lt;code>solidStVK&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>grad(&amp;lt;fieldName&amp;gt;)&lt;/code>&lt;/td>
&lt;td>&lt;code>volVectorField&lt;/code>&lt;/td>
&lt;td>scalar version&lt;/td>
&lt;td>no shipped region type&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>The mesh patch must be of type &lt;code>symmetry&lt;/code> (e.g. &lt;code>symmetry symmetry (...)&lt;/code> in
&lt;code>blockMeshDict&lt;/code>). From
&lt;code>tutorials/fluidStructureInteraction/beamInCrossFlow/0/solid/orig/partitioned/D&lt;/code>:&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">symmetry
&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 solidSymmetry;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> patchType symmetry;
&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;p>With the second-order correction:&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">symmetry
&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 solidSymmetry;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> secondOrder yes;
&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;p>For other fields of the solid region on the same patch, the tutorials use the
stock condition (e.g. &lt;code>T&lt;/code> in &lt;code>heatedBeamInCrossFlow&lt;/code>: &lt;code>type symmetry;&lt;/code>).&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Non-orthogonal correction has no effect in OpenFOAM.com.&lt;/strong> The patch delta
is patch-normal, so $\mathbf{k} = \mathbf{0}$ (see the note above). With
&lt;code>secondOrder no&lt;/code>, the vector BC is numerically identical to stock &lt;code>symmetry&lt;/code>.
It still needs &lt;code>gradD&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Hard-coded gradient name (vector).&lt;/strong> The vector version always reads
&lt;code>gradD&lt;/code>. It is only usable in a region that registers a &lt;code>volTensorField&lt;/code>
named &lt;code>gradD&lt;/code>, i.e. &lt;code>solidStVK&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Scalar version needs &lt;code>grad(&amp;lt;field&amp;gt;)&lt;/code>.&lt;/strong> No compiled region type registers
a &lt;code>volVectorField&lt;/code> with that name. Unless something else in the case
provides it, the scalar BC fails on its first evaluation. Because it is
equivalent to the stock condition in OpenFOAM.com, use &lt;code>symmetry&lt;/code> for
scalar fields instead.&lt;/li>
&lt;li>&lt;strong>Patch type &lt;code>symmetry&lt;/code> only.&lt;/strong> &lt;code>symmetryPlane&lt;/code> and other patch types are
rejected.&lt;/li>
&lt;li>&lt;strong>&lt;code>value&lt;/code> is ignored on read.&lt;/strong> The initial patch value is always the stock
symmetry evaluation of the internal field.&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>&lt;code>D&lt;/code> of the &lt;code>solidStVK&lt;/code> solid on the &lt;code>symmetry&lt;/code> patch (first order).&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tutorials/fluidStructureInteraction/heatedBeamInCrossFlow&lt;/code>&lt;/td>
&lt;td>Same &lt;code>D&lt;/code> setup in a thermo-FSI case. &lt;code>T&lt;/code> on the same patch uses stock &lt;code>symmetry&lt;/code>.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>No tutorial uses the scalar version or &lt;code>secondOrder yes&lt;/code>.&lt;/p>
&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><item><title>Docs: solidTraction</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/solidtraction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/solidtraction/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>solidTraction&lt;/code> imposes a known surface traction $\mathbf{t}$ and/or normal
pressure $p$ on the displacement field &lt;code>D&lt;/code> of a solid region. It is the
uncoupled counterpart of the FSI traction BC: use it for loaded or
traction-free solid surfaces that are not coupled to another region. The class
derives from &lt;code>fixedGradient&lt;/code> (vector only). In each update it recomputes the
displacement normal gradient so that the stress on the patch matches the
prescribed load. The traction and the pressure can each be given as a
constant field, as a time series, or as a separate volume field. It was
ported from the foam-extend solid-mechanics toolbox (Cardiff, Tuković). It
reads the fields of &lt;code>solidStVK&lt;/code> (&lt;code>impK&lt;/code>, &lt;code>rImpK&lt;/code>, &lt;code>gradD&lt;/code>, &lt;code>sigma&lt;/code>, &lt;code>Finv&lt;/code>).&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
&lt;p>The target condition is a traction balance in the current (deformed)
configuration:&lt;/p>
$$
\mathbf{n}_c \cdot \boldsymbol{\sigma} = \mathbf{t} - p\,\mathbf{n}_c
\quad \text{on } \partial\Omega_t,
\qquad
\mathbf{n}_c = \frac{\mathbf{F}^{-T}\cdot\mathbf{n}_0}{\lvert \mathbf{F}^{-T}\cdot\mathbf{n}_0 \rvert}
$$
&lt;p>It is imposed through the normal gradient of &lt;code>D&lt;/code>, in the segregated
&amp;ldquo;implicit stiffness&amp;rdquo; form used by &lt;code>solidStVK&lt;/code>:&lt;/p>
$$
\mathbf{g}^{\,new} = \frac{1}{K}\left[ \left(\mathbf{t} - p\,\mathbf{n}_c\right) - \mathbf{n}_c\cdot\boldsymbol{\sigma} + K\, \mathbf{n}_0\cdot\nabla\mathbf{D} \right],
\qquad
\mathbf{g} \leftarrow \omega\,\mathbf{g}^{\,new} + (1-\omega)\,\mathbf{g}^{\,old}
$$
&lt;p>$\boldsymbol{\sigma}$ and $\nabla\mathbf{D}$ are the current patch values.
When the iteration has converged, $\mathbf{g} = \mathbf{n}_0\cdot\nabla\mathbf{D}$,
so the bracket requires $\mathbf{n}_c\cdot\boldsymbol{\sigma} = \mathbf{t} - p\,\mathbf{n}_c$.
The $K\,\mathbf{n}_0\cdot\nabla\mathbf{D}$ term mirrors the implicit/explicit
Laplacian pair in the &lt;code>solidStVK&lt;/code> momentum equation.&lt;/p>
&lt;p>The patch value is then reconstructed from the gradient:&lt;/p>
$$
\mathbf{D}_b =
\begin{cases}
\mathbf{D}_P + \mathbf{k}\cdot(\nabla\mathbf{D})_P + \delta\,\mathbf{g} &amp; \text{first order} \\[1ex]
\mathbf{D}_P + \mathbf{k}\cdot(\nabla\mathbf{D})_P + \tfrac{\delta}{2}\left(\mathbf{g} + \mathbf{n}_0\cdot(\nabla\mathbf{D})_P\right) &amp; \texttt{secondOrder yes}
\end{cases}
$$
&lt;p>with $\mathbf{k} = (\mathbf{I}-\mathbf{n}_0\mathbf{n}_0)\cdot\boldsymbol{\Delta}$.&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{D}$&lt;/td>
&lt;td>Total displacement (patch field)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{t}$&lt;/td>
&lt;td>Prescribed traction (&lt;code>traction&lt;/code>, &lt;code>tractionSeries&lt;/code> or &lt;code>tractionField&lt;/code>)&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$p$&lt;/td>
&lt;td>Prescribed pressure, positive = compressive (&lt;code>pressure&lt;/code>, &lt;code>pressureSeries&lt;/code> or &lt;code>pressureField&lt;/code>)&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}_0$&lt;/td>
&lt;td>Patch unit normal of the undeformed mesh&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}_c$&lt;/td>
&lt;td>Deformed unit normal from &lt;code>Finv&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\sigma}$&lt;/td>
&lt;td>Cauchy stress, patch values of &lt;code>sigma&lt;/code>&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{F}^{-1}$&lt;/td>
&lt;td>Inverse deformation gradient, patch values of &lt;code>Finv&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$K$&lt;/td>
&lt;td>Implicit stiffness, patch values of &lt;code>impK&lt;/code> ($1/K$ from &lt;code>rImpK&lt;/code>)&lt;/td>
&lt;td>Pa&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{g}$&lt;/td>
&lt;td>Patch normal gradient (&lt;code>gradient&lt;/code>)&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\omega$&lt;/td>
&lt;td>&lt;code>relaxationFactor&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\delta$&lt;/td>
&lt;td>$1/$&lt;code>patch().deltaCoeffs()&lt;/code>&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\Delta}$, $\mathbf{k}$&lt;/td>
&lt;td>Patch delta vector and non-orthogonal correction vector&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Note on OpenFOAM.com.&lt;/strong> In OpenFOAM.com, &lt;code>fvPatch::delta()&lt;/code> is
patch-normal for non-coupled patches, so $\mathbf{k} \equiv \mathbf{0}$ and the
non-orthogonal term in $\mathbf{D}_b$ has no effect.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;strong>Construction.&lt;/strong> The dictionary constructor reads &lt;code>secondOrder&lt;/code>,
&lt;code>setEffectiveTraction&lt;/code> and &lt;code>relaxationFactor&lt;/code>. It reads &lt;code>gradient&lt;/code> and &lt;code>value&lt;/code>
if present, otherwise it starts from zero gradient and the patch-internal
value. It then sets up the traction and the pressure. For each, exactly one
of three forms is allowed. Giving two forms of the same quantity stops the
run (&lt;code>FatalError&lt;/code>):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Traction&lt;/th>
&lt;th>Pressure&lt;/th>
&lt;th>Behaviour&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>traction&lt;/code>&lt;/td>
&lt;td>&lt;code>pressure&lt;/code>&lt;/td>
&lt;td>Patch field (&lt;code>uniform&lt;/code> or &lt;code>nonuniform&lt;/code>), constant in time&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tractionSeries {...}&lt;/code>&lt;/td>
&lt;td>&lt;code>pressureSeries {...}&lt;/code>&lt;/td>
&lt;td>&lt;code>interpolationTable&lt;/code> sub-dictionary, interpolated at &lt;code>time().timeOutputValue()&lt;/code>. The value is uniform over the patch.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tractionField &amp;lt;name&amp;gt;&lt;/code>&lt;/td>
&lt;td>&lt;code>pressureField &amp;lt;name&amp;gt;&lt;/code>&lt;/td>
&lt;td>A &lt;code>volVectorField&lt;/code> / &lt;code>volScalarField&lt;/code> with that name is constructed by the BC (&lt;code>MUST_READ&lt;/code> from the time directory, &lt;code>AUTO_WRITE&lt;/code>), and its boundary values on this patch are used&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>If neither a series nor a field is given, &lt;code>traction&lt;/code> and &lt;code>pressure&lt;/code> are read
as plain patch fields, so both are required.&lt;/p>
&lt;p>&lt;strong>&lt;code>updateCoeffs()&lt;/code>&lt;/strong> (skipped if already updated in this evaluation):&lt;/p>
&lt;ol>
&lt;li>Once per time step (tracked through &lt;code>curTimeIndex_&lt;/code>), calls
&lt;code>correctBoundaryConditions()&lt;/code> on the &lt;code>tractionField&lt;/code> / &lt;code>pressureField&lt;/code>, if
one is used.&lt;/li>
&lt;li>Updates $\mathbf{t}$ and $p$ from the field or the series.&lt;/li>
&lt;li>If &lt;code>setEffectiveTraction&lt;/code> is on, subtracts the patch values of a
&lt;code>volScalarField&lt;/code> named &lt;code>p&lt;/code> from the pressure. This applies the effective
rather than the total traction, which is meant for poro-elastic solids.&lt;/li>
&lt;li>Looks up &lt;code>impK&lt;/code>, &lt;code>rImpK&lt;/code>, &lt;code>gradD&lt;/code>, &lt;code>sigma&lt;/code> and &lt;code>Finv&lt;/code> on the patch. All are
mandatory.&lt;/li>
&lt;li>Computes $\mathbf{n}_c$ and the relaxed gradient $\mathbf{g}$ above, then
calls &lt;code>fixedGradient::updateCoeffs()&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>&lt;code>evaluate()&lt;/code>&lt;/strong> calls &lt;code>updateCoeffs()&lt;/code> if needed. It looks up the cell
gradient field named &lt;code>grad&amp;lt;fieldName&amp;gt;&lt;/code> (i.e. &lt;code>gradD&lt;/code> for &lt;code>D&lt;/code>), sets
$\mathbf{D}_b$ by the formula above and resets the &lt;code>updated&lt;/code> flag. The matrix
coefficients are those of the stock &lt;code>fixedGradient&lt;/code> condition: the gradient
$\mathbf{g}$ enters the Laplacian as an explicit flux.&lt;/p>
&lt;p>&lt;strong>Interaction with &lt;code>solidStVK&lt;/code>.&lt;/strong> &lt;code>D&lt;/code> boundary conditions are updated when the
momentum equation for &lt;code>D&lt;/code> is assembled. &lt;code>sigma&lt;/code>, &lt;code>gradD&lt;/code> and &lt;code>Finv&lt;/code> come from
the previous Picard / DNA iteration (updated in &lt;code>solidStVK::postSolve()&lt;/code>), so
the traction is enforced iteratively. It converges together with the &lt;code>PICARD&lt;/code>
loop on &lt;code>D&lt;/code>. The &lt;code>relaxationFactor&lt;/code> gives extra under-relaxation of the
gradient if this loop oscillates.&lt;/p>
&lt;p>&lt;strong>&lt;code>write()&lt;/code>&lt;/strong> writes the form actually used for traction and pressure
(&lt;code>tractionField&lt;/code>/&lt;code>tractionSeries&lt;/code>/&lt;code>traction&lt;/code>, and likewise for pressure), then
&lt;code>secondOrder&lt;/code>, &lt;code>setEffectiveTraction&lt;/code>, &lt;code>relaxationFactor&lt;/code>, &lt;code>value&lt;/code> and
&lt;code>gradient&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>solidTraction&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>traction&lt;/code>&lt;/td>
&lt;td>Traction patch field (vector)&lt;/td>
&lt;td>yes, unless &lt;code>tractionSeries&lt;/code> or &lt;code>tractionField&lt;/code> is given&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tractionSeries&lt;/code>&lt;/td>
&lt;td>&lt;code>interpolationTable&amp;lt;vector&amp;gt;&lt;/code> sub-dictionary (&lt;code>file&lt;/code>, optional &lt;code>outOfBounds&lt;/code>, &lt;code>readerType&lt;/code>)&lt;/td>
&lt;td>alternative to &lt;code>traction&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tractionField&lt;/code>&lt;/td>
&lt;td>Name of a &lt;code>volVectorField&lt;/code> to read from the time directory&lt;/td>
&lt;td>alternative to &lt;code>traction&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>pressure&lt;/code>&lt;/td>
&lt;td>Pressure patch field (scalar, positive = compressive)&lt;/td>
&lt;td>yes, unless &lt;code>pressureSeries&lt;/code> or &lt;code>pressureField&lt;/code> is given&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>pressureSeries&lt;/code>&lt;/td>
&lt;td>&lt;code>interpolationTable&amp;lt;scalar&amp;gt;&lt;/code> sub-dictionary&lt;/td>
&lt;td>alternative to &lt;code>pressure&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>pressureField&lt;/code>&lt;/td>
&lt;td>Name of a &lt;code>volScalarField&lt;/code> to read from the time directory&lt;/td>
&lt;td>alternative to &lt;code>pressure&lt;/code>&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>Second-order reconstruction of the patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>setEffectiveTraction&lt;/code>&lt;/td>
&lt;td>Subtract the region&amp;rsquo;s &lt;code>p&lt;/code> field from the pressure&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>relaxationFactor&lt;/code>&lt;/td>
&lt;td>Under-relaxation $\omega$ of the gradient&lt;/td>
&lt;td>no&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>Initial normal gradient&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>Initial patch value&lt;/td>
&lt;td>no&lt;/td>
&lt;td>patch-internal value&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>In the series sub-dictionary, &lt;code>outOfBounds&lt;/code> defaults to &lt;code>warn&lt;/code> and
&lt;code>readerType&lt;/code> to &lt;code>openFoam&lt;/code>. Both are standard OpenFOAM &lt;code>interpolationTable&lt;/code>
keywords.&lt;/p>
&lt;p>Required registered fields on the solid mesh:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Provided by&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>impK&lt;/code>, &lt;code>rImpK&lt;/code>&lt;/td>
&lt;td>&lt;code>volScalarField&lt;/code>&lt;/td>
&lt;td>&lt;code>solidStVK&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradD&lt;/code>&lt;/td>
&lt;td>&lt;code>volTensorField&lt;/code>&lt;/td>
&lt;td>&lt;code>solidStVK&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>sigma&lt;/code>&lt;/td>
&lt;td>&lt;code>volSymmTensorField&lt;/code>&lt;/td>
&lt;td>&lt;code>solidStVK&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>Finv&lt;/code>&lt;/td>
&lt;td>&lt;code>volTensorField&lt;/code>&lt;/td>
&lt;td>&lt;code>solidStVK&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>grad&amp;lt;fieldName&amp;gt;&lt;/code>&lt;/td>
&lt;td>&lt;code>volTensorField&lt;/code>&lt;/td>
&lt;td>&lt;code>solidStVK&lt;/code> (&lt;code>gradD&lt;/code>, when the BC is on &lt;code>D&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>p&lt;/code>&lt;/td>
&lt;td>&lt;code>volScalarField&lt;/code>&lt;/td>
&lt;td>only with &lt;code>setEffectiveTraction yes&lt;/code>; no shipped solid region type provides it&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>Traction-free surface (&lt;code>0/&amp;lt;solid&amp;gt;/D&lt;/code>):&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">freeSurface
&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 solidTraction;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> traction uniform (0 0 0);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> pressure uniform 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;p>Uniform pressure ramped in time from a table file:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span class="line">&lt;span class="cl">&lt;span class="n">loadedSurface&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">type&lt;/span> &lt;span class="n">solidTraction&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">traction&lt;/span> &lt;span class="n">uniform&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="mi">0&lt;/span> &lt;span class="mi">0&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">pressureSeries&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">file&lt;/span> &lt;span class="s2">&amp;#34;$FOAM_CASE/constant/solid/pressureSeries&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">outOfBounds&lt;/span> &lt;span class="nb">clamp&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">relaxationFactor&lt;/span> &lt;span class="mf">0.8&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">value&lt;/span> &lt;span class="n">uniform&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="mi">0&lt;/span> &lt;span class="mi">0&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>with &lt;code>constant/solid/pressureSeries&lt;/code> in the &lt;code>openFoam&lt;/code> table format, e.g.
&lt;code>( (0 0) (1 1e4) )&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Only for &lt;code>solidStVK&lt;/code>.&lt;/strong> The fields &lt;code>impK&lt;/code>, &lt;code>rImpK&lt;/code>, &lt;code>gradD&lt;/code>, &lt;code>sigma&lt;/code> and
&lt;code>Finv&lt;/code> are looked up unconditionally. No other compiled region type
provides all of them.&lt;/li>
&lt;li>&lt;strong>Field and series data are uniform or per face only.&lt;/strong> &lt;code>tractionSeries&lt;/code> /
&lt;code>pressureSeries&lt;/code> give a value that is uniform over the patch.
&lt;code>traction&lt;/code> / &lt;code>pressure&lt;/code> are constant in time. For space- and time-varying
loads, use &lt;code>tractionField&lt;/code> / &lt;code>pressureField&lt;/code> and drive that field&amp;rsquo;s own
boundary conditions (they are corrected once per time step).&lt;/li>
&lt;li>&lt;strong>&lt;code>setEffectiveTraction&lt;/code> needs a &lt;code>p&lt;/code> field&lt;/strong> on the solid mesh. No shipped
solid region type registers one.&lt;/li>
&lt;li>&lt;strong>Non-orthogonal correction has no effect in OpenFOAM.com&lt;/strong> (patch-normal
&lt;code>delta()&lt;/code>; see the note above).&lt;/li>
&lt;li>&lt;strong>Copies lose the field link.&lt;/strong> The mapping and copy constructors do not
copy &lt;code>tractionFieldPtr_&lt;/code> / &lt;code>pressureFieldPtr_&lt;/code>. A cloned patch field (e.g. a
stored old-time or previous-iteration copy) keeps the last
traction/pressure values and stops following the field. The original
boundary condition of &lt;code>D&lt;/code> is not affected.&lt;/li>
&lt;li>&lt;strong>Inconsistent gradient names.&lt;/strong> &lt;code>updateCoeffs()&lt;/code> always reads &lt;code>gradD&lt;/code>,
while &lt;code>evaluate()&lt;/code> reads &lt;code>grad&amp;lt;fieldName&amp;gt;&lt;/code>. On a field other than &lt;code>D&lt;/code> the two
differ.&lt;/li>
&lt;/ul>
&lt;h2 id="tutorials">Tutorials&lt;/h2>
&lt;p>No tutorial uses &lt;code>solidTraction&lt;/code>. The FSI tutorials use
&lt;code>regionCoupledTraction&lt;/code> on the coupled solid surface and &lt;code>fixedValue&lt;/code> /
&lt;code>solidSymmetry&lt;/code> elsewhere.&lt;/p>
&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><item><title>Docs: zeroGradientCorrected</title><link>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/zerogradientcorrected/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/zerogradientcorrected/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>zeroGradientCorrected&lt;/code> is a zero-gradient condition for fields of any type
(scalar, vector, sphericalTensor, symmTensor, tensor). Instead of copying the
near-wall cell value, it sets the patch value to the cell value plus a
non-orthogonal correction $\mathbf{c}\cdot\nabla\phi_P$, evaluated on a small
sub-mesh around the patch. The same correction enters the matrix through
&lt;code>valueBoundaryCoeffs&lt;/code>. It comes from the foam-extend interface-tracking
solver (&lt;code>interTrackFoam&lt;/code>, Tuković). The BC is compiled into
&lt;code>libinterfaceTrackingFvMesh&lt;/code>. It derives from the common base
&lt;code>correctedFvPatchField&lt;/code> (type &lt;code>corrected&lt;/code>). The base class, the sub-mesh
machinery, the &lt;code>corrected&lt;/code> type and the porting status (&lt;code>interTrackFluid&lt;/code>
disabled, &lt;code>patchCorrected&lt;/code> snGrad not ported) are described on the
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/">fixedValueCorrected&lt;/a> page.&lt;/p>
&lt;h2 id="mathematical-formulation">Mathematical Formulation&lt;/h2>
$$
\left.\frac{\partial\phi}{\partial n}\right|_b = 0 \quad \text{on } \partial\Omega,
\qquad
\phi_b = \phi_P + \phi_c,
\qquad
\phi_c = \mathbf{c}\cdot(\nabla\phi)_P,
\quad
\mathbf{c} = \boldsymbol{\Delta} - \mathbf{n}\,(\mathbf{n}\cdot\boldsymbol{\Delta})
$$
&lt;p>Matrix coefficients:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Coefficient&lt;/th>
&lt;th>Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>valueInternalCoeffs&lt;/code>&lt;/td>
&lt;td>$1$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>valueBoundaryCoeffs&lt;/code>&lt;/td>
&lt;td>$\phi_c$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradientInternalCoeffs&lt;/code>&lt;/td>
&lt;td>$0$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradientBoundaryCoeffs&lt;/code>&lt;/td>
&lt;td>$0$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>snGrad()&lt;/code>&lt;/td>
&lt;td>$0$&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&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>$\phi$&lt;/td>
&lt;td>Patch field&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}$&lt;/td>
&lt;td>Patch unit normal&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\boldsymbol{\Delta}$&lt;/td>
&lt;td>Patch delta vector (&lt;code>patch().delta()&lt;/code>)&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{c}$&lt;/td>
&lt;td>Correction vector&lt;/td>
&lt;td>m&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\phi_c$&lt;/td>
&lt;td>Stored correction (&lt;code>corrVecGrad&lt;/code>), updated in &lt;code>updateCoeffs()&lt;/code>&lt;/td>
&lt;td>field unit&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Note on OpenFOAM.com.&lt;/strong> &lt;code>fvPatch::delta()&lt;/code> is patch-normal for every
non-coupled patch in OpenFOAM.com, so $\mathbf{c} \equiv \mathbf{0}$ and
$\phi_c \equiv 0$. The coefficients reduce to those of stock &lt;code>zeroGradient&lt;/code>.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Construction:&lt;/strong> the base class reads &lt;code>volFieldName&lt;/code> (required) and the
optional &lt;code>corrVecGrad&lt;/code>. The patch value is set to $\phi_P + \phi_c$. &lt;code>value&lt;/code>
is not read.&lt;/li>
&lt;li>&lt;strong>&lt;code>updateCoeffs()&lt;/code>&lt;/strong> (base class): recomputes $\mathbf{c}$ if the mesh moves,
rebuilds $\phi_c$ on the patch sub-mesh (gradient scheme
&lt;code>snGradCorr(&amp;lt;volFieldName&amp;gt;)&lt;/code>). It is called whenever an &lt;code>fvMatrix&lt;/code> for the
field is constructed, so &lt;code>valueBoundaryCoeffs&lt;/code> uses the current $\phi_c$.&lt;/li>
&lt;li>&lt;strong>&lt;code>evaluate()&lt;/code>:&lt;/strong> declared &lt;strong>without&lt;/strong> the &lt;code>Pstream::commsTypes&lt;/code> argument. It
does not override &lt;code>fvPatchField::evaluate(const Pstream::commsTypes)&lt;/code>, which
&lt;code>correctBoundaryConditions()&lt;/code> calls. The base version runs, and it only
resets the &lt;code>updated&lt;/code> flag. &lt;strong>The patch value is not recomputed&lt;/strong> after a
solve. It stays at the construction value $\phi_P + \phi_c$ of the initial
field, so it does not behave like a zero-gradient value at all.&lt;/li>
&lt;li>&lt;strong>Mapping:&lt;/strong> &lt;code>autoMap&lt;/code>/&lt;code>rmap&lt;/code> map the value only.&lt;/li>
&lt;li>&lt;strong>Sub-mesh motion:&lt;/strong> &lt;code>interfaceTrackingFvMesh::update()&lt;/code> moves the
sub-mesh only for &lt;code>U&lt;/code> and &lt;code>p&lt;/code>.&lt;/li>
&lt;li>&lt;strong>&lt;code>write()&lt;/code>:&lt;/strong> &lt;code>type&lt;/code>, &lt;code>volFieldName&lt;/code>, &lt;code>corrVecGrad&lt;/code>. No &lt;code>value&lt;/code> is written.&lt;/li>
&lt;/ul>
&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>zeroGradientCorrected&lt;/code>&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>–&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>volFieldName&lt;/code>&lt;/td>
&lt;td>Name of the volume field this patch field belongs to&lt;/td>
&lt;td>yes&lt;/td>
&lt;td>– (no default)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>corrVecGrad&lt;/code>&lt;/td>
&lt;td>Initial stored correction $\phi_c$&lt;/td>
&lt;td>no&lt;/td>
&lt;td>zero&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The library must be loaded with
&lt;code>libs (&amp;quot;libinterfaceTrackingFvMesh.so&amp;quot;);&lt;/code> in &lt;code>system/controlDict&lt;/code>.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&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">outlet
&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 zeroGradientCorrected;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> volFieldName U;
&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>Patch value frozen at its initial value&lt;/strong>, because the &lt;code>evaluate()&lt;/code>
signature does not match (see Implementation). Explicit operators that use
patch values (&lt;code>fvc::grad&lt;/code>, &lt;code>fvc::interpolate&lt;/code>, face fluxes) see the initial
value.&lt;/li>
&lt;li>&lt;strong>No correction in OpenFOAM.com&lt;/strong> (patch-normal &lt;code>delta()&lt;/code>). The cost of the
sub-mesh gradient remains on every &lt;code>updateCoeffs()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Interface-tracking context not available:&lt;/strong> &lt;code>interTrackFluid&lt;/code> is disabled
and &lt;code>patchCorrected&lt;/code> is not ported (see
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/boundary-conditions/uncoupled-boundary-conditions/fixedvaluecorrected/#known-limitations">fixedValueCorrected&lt;/a>).&lt;/li>
&lt;li>&lt;strong>&lt;code>volFieldName&lt;/code> has no default&lt;/strong> and must match the field name.&lt;/li>
&lt;li>&lt;strong>Sub-mesh motion only for &lt;code>U&lt;/code> and &lt;code>p&lt;/code>.&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>In practice, use the stock &lt;code>zeroGradient&lt;/code> instead.&lt;/p>
&lt;h2 id="tutorials">Tutorials&lt;/h2>
&lt;p>No tutorial uses &lt;code>zeroGradientCorrected&lt;/code>.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Tuković, Ž., Jasak, H., &lt;em>A moving mesh finite volume interface tracking method for surface tension dominated interfacial fluid flow&lt;/em>, Computers &amp;amp; Fluids 55, 2012. DOI: &lt;a href="https://doi.org/10.1016/j.compfluid.2011.11.003">10.1016/j.compfluid.2011.11.003&lt;/a>&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>