<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>multiPhysicsFoam – Generic</title><link>https://multiphysicsfoam.com/tags/generic/</link><description>Recent content in Generic on multiPhysicsFoam</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://multiphysicsfoam.com/tags/generic/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: defaultInterface</title><link>https://multiphysicsfoam.com/docs/user-guide/interface-physics/defaultinterface/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://multiphysicsfoam.com/docs/user-guide/interface-physics/defaultinterface/</guid><description>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;code>defaultInterface&lt;/code> is the generic interface type. It adds no interface physics
of its own: &lt;code>correct()&lt;/code> is a no-op, &lt;code>getMinDeltaT()&lt;/code> returns &lt;code>GREAT&lt;/code> and
&lt;code>info()&lt;/code> prints nothing. All of its behaviour comes from the base class
&lt;code>regionInterfaceType&lt;/code>, which every interface type inherits: it pairs two
patches of two regions, builds the patch-to-patch mapping and provides the
residuals for the DNA (partitioned) coupling loop. The coupling conditions
themselves are set by the boundary conditions on the two patches.&lt;/p>
&lt;p>With the generic &lt;code>regionCoupledScalarJump&lt;/code> / &lt;code>regionCoupledScalarFlux&lt;/code> boundary
conditions, &lt;code>defaultInterface&lt;/code> couples a scalar quantity that is continuous
(or continuous up to a constant partition coefficient) and whose diffusive flux
is conserved across the interface. Examples are temperature and electric
potential across a perfectly conducting contact, as between an
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/region-physics/electrochemistry-models/ntgk/">&lt;code>NTGK&lt;/code>&lt;/a> battery region and its
&lt;a href="https://multiphysicsfoam.com/docs/user-guide/region-physics/electrochemistry-models/conductpotentialtemperature/">&lt;code>conductPotentialTemperature&lt;/code>&lt;/a>
current-collector tabs.&lt;/p>
&lt;p>This page also documents the base-class behaviour (interface naming,
dictionary keywords, interface-to-interface mapping, generic coupled boundary
conditions). It applies to every interface type unless the derived type
overrides it.&lt;/p>
&lt;h2 id="interface-conditions">Interface Conditions&lt;/h2>
&lt;p>The conditions are set by the boundary-condition pair, not by
&lt;code>defaultInterface&lt;/code>. One side of the interface carries a jump (Dirichlet) BC,
side $J$, and the other side carries a flux (Neumann) BC, side $F$. Which
region gets which BC does not depend on the patch order in
&lt;code>coupledPatchPair&lt;/code>. The tutorial uses different assignments for different
fields.&lt;/p>
&lt;h3 id="jump-condition">Jump condition&lt;/h3>
&lt;p>&lt;code>regionCoupledScalarJump&lt;/code> sets the patch value on side $J$ from the neighbour
value, interpolated onto the side-$J$ faces:&lt;/p>
$$
\phi_J = c \, \phi_F \quad \text{on } \Gamma
$$
&lt;p>Internally this is $\phi_J = \phi_F + \Delta\phi$ with
&lt;code>valueJump()&lt;/code> $\Delta\phi = (c - 1)\,\phi_F$. If the &lt;code>jumpCoefficient&lt;/code> keyword
is not given, $c = 1$, which gives continuity.&lt;/p>
&lt;h3 id="flux-condition">Flux condition&lt;/h3>
&lt;p>&lt;code>regionCoupledScalarFlux&lt;/code> sets the normal gradient on side $F$ so that the
diffusive flux matches the flux computed on side $J$:&lt;/p>
$$
\Gamma_F \nabla \phi_F \cdot \mathbf{n}_F + \Gamma_J \nabla \phi_J \cdot \mathbf{n}_J = 0 \quad \text{on } \Gamma
$$
&lt;p>In code this is &lt;code>gradient() = (-flux_J + fluxJump())/k_F&lt;/code>, where
&lt;code>flux_J = k_J * snGrad(phi_J)&lt;/code> is interpolated onto the side-$F$ faces.
&lt;code>regionCoupledScalarFlux::fluxJump()&lt;/code> returns zero.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Symbol&lt;/th>
&lt;th>Keyword / field&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>field listed in &lt;code>coupledFields&lt;/code> (e.g. &lt;code>T&lt;/code>, &lt;code>phiPos&lt;/code>, &lt;code>phiNeg&lt;/code>)&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_J$, $\Gamma_F$&lt;/td>
&lt;td>&lt;code>diffusivity&lt;/code> (BC keyword)&lt;/td>
&lt;td>Diffusivity on each side&lt;/td>
&lt;td>field-dependent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$c$&lt;/td>
&lt;td>&lt;code>jumpCoefficient&lt;/code> (jump-BC keyword)&lt;/td>
&lt;td>Value-jump (partition) coefficient, default 1&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>$\mathbf{n}_J$, $\mathbf{n}_F$&lt;/td>
&lt;td>—&lt;/td>
&lt;td>Outward patch normals of each side&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="interface-residuals">Interface residuals&lt;/h3>
&lt;p>The DNA loop (&lt;code>src/numerics/dnaSolutionControl&lt;/code>) measures convergence with
residuals computed by the BCs and collected by
&lt;code>regionInterfaceType::normJumpRes&lt;/code> / &lt;code>normFluxRes&lt;/code>:&lt;/p>
$$
r_\text{jump} = \frac{\lVert \phi_J - \phi_F - \Delta\phi \rVert_2}
{\max\left(\min\left(\lVert \phi_J \rVert_2,\ \lVert \phi_F + \Delta\phi \rVert_2\right),\ \text{SMALL}\right)}
$$
$$
r_\text{flux} = \frac{\lVert \Gamma_F \partial_n \phi_F + q_J \rVert_2}
{\max\left(\min\left(\lVert \Gamma_F \partial_n \phi_F \rVert_2,\ \lVert q_J \rVert_2\right),\ \text{SMALL}\right)}
$$
&lt;p>with $q_J = \Gamma_J \partial_n \phi_J$ interpolated onto side $F$, and with
the neighbour quantity always interpolated onto the evaluating side. These are
compared with &lt;code>maxJumpRes&lt;/code> / &lt;code>maxFluxRes&lt;/code> in &lt;code>multiRegionProperties&lt;/code>. If the
interface is not coupled (see &lt;code>coupled&lt;/code> below), both residuals are 0.&lt;/p>
&lt;h2 id="implementation">Implementation&lt;/h2>
&lt;p>&lt;code>defaultInterface&lt;/code> only implements the pure virtuals of &lt;code>regionInterfaceType&lt;/code>
(&lt;code>correct()&lt;/code>, &lt;code>getMinDeltaT()&lt;/code>, &lt;code>info()&lt;/code>) as no-ops. Everything below is
base-class behaviour.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Construction&lt;/strong> (&lt;code>regionInterfaceTypeList::reset&lt;/code>): for each entry of
&lt;code>partitionedCoupledPatches&lt;/code> (and &lt;code>monolithicCoupledPatches&lt;/code>) in
&lt;code>constant/regionInterfaceProperties&lt;/code>, the two patches of &lt;code>coupledPatchPair&lt;/code>
are looked up. One interface object is created &lt;strong>per entry of the
&lt;code>interfaceType&lt;/code> list&lt;/strong>, all on the same patch pair. The first pair entry
becomes side A and the second becomes side B.&lt;/li>
&lt;li>&lt;strong>Naming&lt;/strong>: the interface name is
&lt;code>&amp;lt;regionA&amp;gt;&amp;lt;PatchA&amp;gt;&amp;lt;RegionB&amp;gt;&amp;lt;PatchB&amp;gt;&amp;lt;InterfaceType&amp;gt;&lt;/code>, where every part after
the first is capitalised. For example, the tutorial gives
&lt;code>batteryRegionToNegTabNegTabRegionToCellFromNegDefaultInterface&lt;/code>. This name
appears in the log and in the DNA residual output.&lt;/li>
&lt;li>&lt;strong>interfaceKey&lt;/strong>: the interface is also an &lt;code>interfaceKey&lt;/code>, an unordered pair
of words. Equality is symmetric (&lt;code>(a,b) == (b,a)&lt;/code>) and the hash is the sum
of the two word hashes. The interface object itself is keyed by the two
&lt;strong>patch&lt;/strong> names. The coupled-field tables of &lt;code>regionInterfaceTypeList&lt;/code>
are keyed by &lt;code>(&amp;lt;regionA&amp;gt;&amp;lt;patchA&amp;gt;, &amp;lt;regionB&amp;gt;&amp;lt;patchB&amp;gt;)&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Global patches&lt;/strong>: on construction, a &lt;code>globalPolyPatch&lt;/code> is built for each
side. It is a copy of the patch reconstructed in full on every processor,
which is what makes the mapping work in parallel. The mapping object is
created at the same time (&lt;code>interfaceToInterface()&lt;/code>), so that a &lt;code>directMap&lt;/code>
can read its maps on restart.&lt;/li>
&lt;li>&lt;strong>Field transfer&lt;/strong>: the BCs call &lt;code>interpolateFacesFromA/B&lt;/code> (and the point
variants). These convert the patch field to the global patch, transfer it
with the selected &lt;code>interfaceToInterfaceMapping&lt;/code>, and scatter it back to the
local patch. Only &lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code> fields have specialisations. Other
types hit a &lt;code>notImplemented&lt;/code> fallback.&lt;/li>
&lt;li>&lt;strong>Update per BC evaluation&lt;/strong>: every coupled BC calls
&lt;code>regionInterfaceType::update()&lt;/code> in its &lt;code>updateCoeffs()&lt;/code>. This function
rebuilds the global patches after a topology change (mesh changing but not
moving), updates the finite-area curvature if an &lt;code>faMesh&lt;/code> exists, then calls
&lt;code>correct()&lt;/code>, which is a no-op for &lt;code>defaultInterface&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Update per time step&lt;/strong>: &lt;code>multiRegionSystem::preSolve()&lt;/code> calls
&lt;code>regionInterfaceTypeList::update()&lt;/code>. For interfaces whose mesh A is changing,
this rebuilds the mapping and global patches at the frequency set by
&lt;code>interpolatorUpdateFrequency&lt;/code> (and always after a topology change), then
calls &lt;code>info()&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Time step&lt;/strong>: &lt;code>getMinDeltaT()&lt;/code> returns &lt;code>GREAT&lt;/code>, so &lt;code>defaultInterface&lt;/code> never
limits the time step.&lt;/li>
&lt;/ol>
&lt;h3 id="interface-to-interface-mapping">Interface-to-interface mapping&lt;/h3>
&lt;p>The mapping is selected &lt;strong>globally&lt;/strong> for all interfaces by the top-level
keyword &lt;code>interfaceTransferMethod&lt;/code> in &lt;code>regionInterfaceProperties&lt;/code>. It is not set
per interface entry. The default is &lt;code>AMI&lt;/code>. The matching &lt;code>&amp;lt;method&amp;gt;Coeffs&lt;/code>
sub-dictionary is read with &lt;code>subDict&lt;/code>, so it &lt;strong>must exist even when it is
empty&lt;/strong>. Neither &lt;code>AMI&lt;/code> nor &lt;code>directMap&lt;/code> reads any keyword from it.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Method&lt;/th>
&lt;th>Class (&lt;code>src/numerics/interfaceToInterfaceMappings&lt;/code>)&lt;/th>
&lt;th>Behaviour&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>AMI&lt;/code> (default)&lt;/td>
&lt;td>&lt;code>amiInterfaceToInterfaceMapping&lt;/code>&lt;/td>
&lt;td>Wraps &lt;code>amiZoneInterpolation&lt;/code> (face-area weighted, &lt;code>requireMatch&lt;/code> on, &lt;code>lowWeightCorrection -1&lt;/code>) on the global patches; non-conformal patches allowed. Prints the max face-centre mapping error (&lt;code>interface-to-interface face error&lt;/code>) on construction.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>directMap&lt;/code>&lt;/td>
&lt;td>&lt;code>directMapInterfaceToInterfaceMapping&lt;/code>&lt;/td>
&lt;td>One-to-one face/point map for &lt;strong>conformal&lt;/strong> patches; fatal error if face or point counts differ. Faces/points are matched by centre/position within &lt;code>0.001 * min edge length&lt;/code>. Maps (&lt;code>zoneAToZoneBFaceMap_&amp;lt;patchA&amp;gt;_to_&amp;lt;patchB&amp;gt;&lt;/code>, …) are written to and re-read from the time directory.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>RBF&lt;/code>&lt;/td>
&lt;td>&lt;code>rbfInterfaceToInterfaceMapping&lt;/code>&lt;/td>
&lt;td>Radial basis function interpolation. &lt;strong>Disabled&lt;/strong>: commented out in &lt;code>src/multiRegionSystem/Make/files&lt;/code> (needs Eigen), so not selectable.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="generic-coupled-boundary-conditions">Generic coupled boundary conditions&lt;/h3>
&lt;p>&lt;code>genericRegionCoupledJump&amp;lt;Type&amp;gt;&lt;/code> (derived from &lt;code>fixedValue&lt;/code>) and
&lt;code>genericRegionCoupledFlux&amp;lt;Type&amp;gt;&lt;/code> (derived from &lt;code>fixedGradient&lt;/code>) are the base
classes of all partitioned coupling BCs. Both are registered for &lt;code>scalar&lt;/code> and
&lt;code>vector&lt;/code>, but their &lt;code>valueJump()&lt;/code> / &lt;code>fluxJump()&lt;/code> are &lt;code>notImplemented&lt;/code>, so they
cannot be used directly in a case. &lt;code>regionCoupledScalarJump&lt;/code> /
&lt;code>regionCoupledScalarFlux&lt;/code> are the concrete scalar versions and the only
coupled BCs that do not need a specific interface type. All other
&lt;code>regionCoupled*&lt;/code> BCs (&lt;code>regionCoupledTemperatureJump&lt;/code>,
&lt;code>regionCoupledVelocityValue&lt;/code>, &lt;code>regionCoupledTraction&lt;/code>, …) cast the interface to
&lt;code>heatTransferInterface&lt;/code>, &lt;code>capillaryInterface&lt;/code>, &lt;code>fsiInterface&lt;/code>, etc.&lt;/p>
&lt;p>Behaviour shared by both generic BCs:&lt;/p>
&lt;ul>
&lt;li>The owning interface is found from the BC&amp;rsquo;s &lt;code>interfaceType&lt;/code> list (only the
&lt;strong>first&lt;/strong> entry is used) and the local region/patch name. It is a fatal
error if no interface or more than one interface of that type contains the
patch. The neighbour region and patch are taken from the matched interface.&lt;/li>
&lt;li>The neighbour field is looked up under the &lt;strong>same name&lt;/strong> as the local field.&lt;/li>
&lt;li>If the interface is not &lt;code>coupled&lt;/code>, &lt;code>updateCoeffs()&lt;/code> returns early and the
BC keeps its last value or gradient.&lt;/li>
&lt;li>After the new value (jump side) or gradient (flux side) is set, it is
relaxed by the BC&amp;rsquo;s acceleration model (&lt;code>src/numerics/acceleration&lt;/code>).&lt;/li>
&lt;li>&lt;code>diffCoeff()&lt;/code> takes the diffusivity named by &lt;code>diffusivity&lt;/code> from a
&lt;code>volScalarField&lt;/code> of that name in the local region if one exists. Otherwise it
reads a &lt;code>dimensionedScalar&lt;/code> of that name from the region&amp;rsquo;s
&lt;code>transportProperties&lt;/code>. For a field named &lt;code>pKin&lt;/code> the diffusivity is forced
to 1.&lt;/li>
&lt;li>Snapping the gradient (&lt;code>snGrad&lt;/code>, jump side) and evaluating the patch value
(flux side) use the cell gradient (&lt;code>grad(&amp;lt;field&amp;gt;)&lt;/code> if registered, otherwise
&lt;code>fvc::grad&lt;/code>) for the optional non-orthogonal (&lt;code>nonOrthCorr&lt;/code>) and
second-order (&lt;code>secondOrder&lt;/code>) corrections.&lt;/li>
&lt;/ul>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Keyword&lt;/th>
&lt;th>Side&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>type&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>—&lt;/td>
&lt;td>&lt;code>regionCoupledScalarJump&lt;/code> or &lt;code>regionCoupledScalarFlux&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>List of interface type names, e.g. &lt;code>(defaultInterface)&lt;/code>; only the first is used&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>diffusivity&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;code>word::null&lt;/code>&lt;/td>
&lt;td>Name of the diffusivity (&lt;code>volScalarField&lt;/code> or &lt;code>transportProperties&lt;/code> entry). Effectively required: the flux side always needs it, and the jump side needs it to supply its flux to the flux side&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>jumpCoefficient&lt;/code>&lt;/td>
&lt;td>jump&lt;/td>
&lt;td>&lt;code>word::null&lt;/code> (→ $c = 1$)&lt;/td>
&lt;td>Name of a &lt;code>volScalarField&lt;/code> or &lt;code>transportProperties&lt;/code> entry giving $c$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>neighbourFieldName&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>local field name&lt;/td>
&lt;td>Read and written, but not used by the generic jump/flux evaluation, which always uses the local field name&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>accType&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;code>fixed&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;/tr>
&lt;tr>
&lt;td>&lt;code>relax&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;code>1.0&lt;/code>&lt;/td>
&lt;td>(Initial) relaxation factor&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingReuse&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;td>&lt;code>IQNILS&lt;/code> only: number of previous time steps reused&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nonOrthCorr&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;td>Non-orthogonal correction&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>secondOrder&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;td>Second-order patch gradient / value&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>value&lt;/code>&lt;/td>
&lt;td>both&lt;/td>
&lt;td>read if present&lt;/td>
&lt;td>Initial patch value&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>gradient&lt;/code>&lt;/td>
&lt;td>flux&lt;/td>
&lt;td>read if present&lt;/td>
&lt;td>Initial patch gradient&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="coupled-fields">Coupled Fields&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field&lt;/th>
&lt;th>Required boundary conditions (side A / side B)&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>any &lt;code>volScalarField&lt;/code> present in both regions under the same name&lt;/td>
&lt;td>&lt;code>regionCoupledScalarJump&lt;/code> / &lt;code>regionCoupledScalarFlux&lt;/code> (either order)&lt;/td>
&lt;td>Generic continuity + flux conservation, optional partition coefficient&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>T&lt;/code> (tutorial)&lt;/td>
&lt;td>&lt;code>regionCoupledScalarJump&lt;/code> (battery) / &lt;code>regionCoupledScalarFlux&lt;/code> (tab)&lt;/td>
&lt;td>Temperature, &lt;code>diffusivity &amp;quot;k&amp;quot;&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>phiNeg&lt;/code> (tutorial)&lt;/td>
&lt;td>&lt;code>regionCoupledScalarJump&lt;/code> (battery) / &lt;code>regionCoupledScalarFlux&lt;/code> (negative tab)&lt;/td>
&lt;td>Negative-electrode potential, &lt;code>diffusivity &amp;quot;sigmaNeg&amp;quot;&lt;/code> / &lt;code>&amp;quot;sigma&amp;quot;&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>phiPos&lt;/code> (tutorial)&lt;/td>
&lt;td>&lt;code>regionCoupledScalarFlux&lt;/code> (battery) / &lt;code>regionCoupledScalarJump&lt;/code> (positive tab)&lt;/td>
&lt;td>Positive-electrode potential, &lt;code>diffusivity &amp;quot;sigmaPos&amp;quot;&lt;/code> / &lt;code>&amp;quot;sigma&amp;quot;&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The flux side casts the neighbour patch field to
&lt;code>genericRegionCoupledJump&lt;/code>, so the BCs must be one jump and one flux. Two flux
BCs fail with a bad cast. A field listed in &lt;code>coupledFields&lt;/code> that is missing in
one of the regions is skipped by the DNA residual check (&lt;code>couplesField()&lt;/code>).
That is why the tutorial can list &lt;code>phiPos&lt;/code> and &lt;code>phiNeg&lt;/code> on both tab
interfaces, although each tab region holds only one of them.&lt;/p>
&lt;h2 id="compatible-region-types">Compatible Region Types&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Region type (side A)&lt;/th>
&lt;th>Region type (side B)&lt;/th>
&lt;th>Notes&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>NTGK&lt;/code>&lt;/td>
&lt;td>&lt;code>conductPotentialTemperature&lt;/code>&lt;/td>
&lt;td>Tested in tutorial: &lt;code>phiPos&lt;/code>/&lt;code>phiNeg&lt;/code> and &lt;code>T&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>any region that assembles the field in &lt;code>setCoupledEqns()&lt;/code>&lt;/td>
&lt;td>any such region&lt;/td>
&lt;td>The field must exist under the same name on both sides and the &lt;code>diffusivity&lt;/code> must be resolvable in each region. Not covered by a tutorial&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;a href="https://multiphysicsfoam.com/docs/user-guide/region-physics/heat-transfer-models/laplacianfluid/">&lt;code>laplacianFluid&lt;/code>&lt;/a> lists &lt;code>defaultInterface&lt;/code> for
&lt;code>T&lt;/code> in its coupling table, but no tutorial uses that combination (untested).&lt;/p>
&lt;h2 id="case-setup">Case Setup&lt;/h2>
&lt;h3 id="regioninterfaceproperties-entry">&lt;code>regionInterfaceProperties&lt;/code> entry&lt;/h3>
&lt;p>From &lt;code>tutorials/electrochemistry/NTGKBatteryWithTabs/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"> cellToNegTab
&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">
&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 toNegTab)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (negTabRegion 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">
&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">
&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;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&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"> // same, with (batteryRegion toPosTab) (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">);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">monolithicCoupledPatches
&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">curvatureCorrectedSurfacePatches 0();
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interpolatorUpdateFrequency 0;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">interfaceTransferMethod directMap;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">directMapCoeffs
&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 keywords:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Keyword&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>interfaceType&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>List of interface types; one interface object per entry is built on the same patch pair&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>coupledPatchPair&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>&lt;code>((regionA patchA) (regionB patchB))&lt;/code>; exactly two entries, otherwise a fatal error&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>coupledFields&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>Field names coupled through this patch pair; their union across all entries defines the partitioned-coupled fields&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>coupled&lt;/code>&lt;/td>
&lt;td>&lt;code>true&lt;/code>&lt;/td>
&lt;td>Switch the interface coupling on or off&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>couplingStartTime&lt;/code>&lt;/td>
&lt;td>&lt;code>0&lt;/code>&lt;/td>
&lt;td>If &lt;code>coupled false&lt;/code> and this value is &amp;gt; 0, coupling is switched on once &lt;code>time &amp;gt;= couplingStartTime&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>&amp;lt;interfaceType&amp;gt;Coeffs&lt;/code>&lt;/td>
&lt;td>—&lt;/td>
&lt;td>Not read by &lt;code>defaultInterface&lt;/code>. Kept for consistency with other interface types&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Top-level keywords (shared by all interfaces):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Keyword&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>partitionedCoupledPatches&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>List of partitioned interface entries&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>monolithicCoupledPatches&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>List of monolithic interface entries (may be empty: &lt;code>()&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>curvatureCorrectedSurfacePatches&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>&lt;code>faPatch&lt;/code> names for curvature correction at wedge axes (used only when an &lt;code>faMesh&lt;/code> exists); &lt;code>0()&lt;/code> otherwise&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interpolatorUpdateFrequency&lt;/code>&lt;/td>
&lt;td>&lt;code>1&lt;/code>&lt;/td>
&lt;td>Rebuild mapping/global patches every N time steps on changing meshes; &lt;code>0&lt;/code> disables periodic rebuild&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>interfaceTransferMethod&lt;/code>&lt;/td>
&lt;td>&lt;code>AMI&lt;/code>&lt;/td>
&lt;td>&lt;code>AMI&lt;/code> or &lt;code>directMap&lt;/code> (see above)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>&amp;lt;method&amp;gt;Coeffs&lt;/code>&lt;/td>
&lt;td>&lt;strong>required&lt;/strong>&lt;/td>
&lt;td>Sub-dictionary for the chosen method; may be empty&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>regionInterfaceProperties&lt;/code> is not read in &lt;code>singleRegionMode&lt;/code>.&lt;/p>
&lt;h3 id="multiregionproperties-dna-entry">&lt;code>multiRegionProperties&lt;/code> DNA entry&lt;/h3>
&lt;p>From the same tutorial:&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">regions
&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 (NTGK) )
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (negTabRegion (conductPotentialTemperature) )
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> (posTabRegion (conductPotentialTemperature) )
&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">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">
&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;span class="line">&lt;span class="cl"> phiNeg { maxCoupleIter 25; residualControl { maxJumpRes 1e-05; maxFluxRes 1e-05; } }
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> T { maxCoupleIter 10; residualControl { maxJumpRes 1e-05; maxFluxRes 1e-05; } }
&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>maxCoupleIter&lt;/code> defaults to 1. Either both &lt;code>maxJumpRes&lt;/code> and &lt;code>maxFluxRes&lt;/code>, or a
single &lt;code>maxIntRes&lt;/code>, may be given. &lt;code>defaultInterface&lt;/code> does not override
&lt;code>normIntRes()&lt;/code>, which returns 0, so use &lt;code>maxJumpRes&lt;/code> / &lt;code>maxFluxRes&lt;/code>.&lt;/p>
&lt;h3 id="boundary-conditions">Boundary conditions&lt;/h3>
&lt;p>Jump side, &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>Flux side, &lt;code>0/negTabRegion/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">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>Flux side with an initial gradient, &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>On a patch where a field is not coupled (e.g. &lt;code>phiNeg&lt;/code> on the battery&amp;rsquo;s
&lt;code>toPosTab&lt;/code>), use an ordinary BC such as &lt;code>zeroGradient&lt;/code>.&lt;/p>
&lt;h2 id="known-limitations">Known Limitations&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>No interface physics&lt;/strong>: &lt;code>correct()&lt;/code> and &lt;code>info()&lt;/code> are empty and the
&lt;code>defaultInterfaceCoeffs&lt;/code> dictionary is never read. Any jump or source at the
interface must come from the BCs. With the generic BCs, this is limited to a
constant or field-valued partition coefficient (&lt;code>jumpCoefficient&lt;/code>) and a zero
flux jump.&lt;/li>
&lt;li>&lt;strong>Scalar fields only in practice&lt;/strong>: field transfer is specialised only for
&lt;code>scalar&lt;/code> and &lt;code>vector&lt;/code>. The only concrete BCs usable with &lt;code>defaultInterface&lt;/code>
are &lt;code>regionCoupledScalarJump&lt;/code> / &lt;code>regionCoupledScalarFlux&lt;/code>. The generic
&lt;code>vector&lt;/code> BCs have &lt;code>notImplemented&lt;/code> jumps, and all vector &lt;code>regionCoupled*&lt;/code> BCs
require &lt;code>capillaryInterface&lt;/code>, &lt;code>fsiInterface&lt;/code> or a mass-transfer interface.
Coupling a vector field via &lt;code>defaultInterface&lt;/code> would need a new BC.&lt;/li>
&lt;li>&lt;strong>Same field name on both sides&lt;/strong>: the generic BCs always look up the
neighbour field under the local field name. &lt;code>neighbourFieldName&lt;/code> is ignored
there.&lt;/li>
&lt;li>&lt;strong>Global mapping choice&lt;/strong>: &lt;code>interfaceTransferMethod&lt;/code> and its &lt;code>Coeffs&lt;/code>
sub-dictionary are top-level keywords. All interfaces in a case share one
mapping method. &lt;code>directMap&lt;/code> requires conformal patches. &lt;code>RBF&lt;/code> is not
compiled.&lt;/li>
&lt;li>&lt;strong>Only the first BC &lt;code>interfaceType&lt;/code> is used&lt;/strong>: if several interface types
are listed on one patch, the BC binds to the first. A patch may belong to at
most one interface of a given type.&lt;/li>
&lt;li>&lt;strong>Neighbour detection by patch name only&lt;/strong>
(&lt;code>interfaceToInterfaceCoupleManager::nbrPatch()/nbrMesh()/interpolateFromNbrField()&lt;/code>):
the local patch is compared with &lt;code>patchA&lt;/code> by &lt;strong>name only&lt;/strong>, without the
region. If both sides of an interface use the same patch name, side B would
identify itself as A and couple to itself (inferred from the code,
untested). Give the two patches different names.&lt;/li>
&lt;li>&lt;strong>&lt;code>diffusivity &amp;quot;v&amp;quot;&lt;/code> handling is ineffective&lt;/strong> (inferred from the code):
&lt;code>diffCoeff()&lt;/code> renames &lt;code>&amp;quot;v&amp;quot;&lt;/code> to &lt;code>&amp;quot;rho&amp;quot;&lt;/code> before it checks for &lt;code>&amp;quot;v&amp;quot;&lt;/code> to take
the reciprocal, so the reciprocal is never applied.&lt;/li>
&lt;li>&lt;strong>Monolithic coupling not available&lt;/strong>: &lt;code>monolithicCoupledPatches&lt;/code> is parsed,
but the monolithic solve in &lt;code>multiRegionSystem::solve()&lt;/code> is commented out.&lt;/li>
&lt;li>&lt;strong>Residual control requires generic BCs&lt;/strong>: if neither patch field derives
from &lt;code>genericRegionCoupledJump&lt;/code> / &lt;code>genericRegionCoupledFlux&lt;/code>, a warning is
printed and the residual is set to &lt;code>GREAT&lt;/code>. The DNA loop then always runs to
&lt;code>maxCoupleIter&lt;/code> (inferred).&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>NTGK&lt;/code> battery cell coupled to a negative and a positive &lt;code>conductPotentialTemperature&lt;/code> tab via two &lt;code>defaultInterface&lt;/code> entries (&lt;code>phiPos&lt;/code>, &lt;code>phiNeg&lt;/code>, &lt;code>T&lt;/code>; &lt;code>directMap&lt;/code>; &lt;code>./Allrun -p -S&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: 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></channel></rss>