Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Heat conduction around solid particles: grid convergence of the immersed boundary method

A fluid of thermal conductivity kk occupies a square domain containing solid particles (disks). At every particle surface a Robin (contact-conductance) condition couples the outward heat flux to the surface temperature,

k ∂T∂nout+h TΓ  =  d,k\,\frac{\partial T}{\partial n_\text{out}} + h\,T_\Gamma \;=\; d ,

with hh a surface heat-transfer coefficient and noutn_\text{out} the outward (fluid-side) direction. We solve the steady conduction equation −∇ ⁣⋅ ⁣(k∇T)=q-\nabla\!\cdot\!(k\nabla T) = q and study the grid convergence of the immersed-boundary discretisation — in particular what happens when two particles touch.

The same physical problem is discretised in two ways:

  1. Full SDF description — the classical route: one global signed-distance field sdf = min_i(dist_i) sampled at the cell centres; construct_ibm(sdf, ...) locates the walls by linear interpolation of the SDF and construct_ibm_normal_derivative takes the surface normals from the SDF gradient.

  2. Particle description — the circles are described analytically by pymrm.Circle objects; construct_ibm_particles computes exact wall positions (quadratic solve per cut face) and exact outward normals.

A manufactured temperature field T∗T^{\ast} defines the source qq, the domain wall temperatures, and the Robin data dd, so the exact solution is known on every grid for any particle arrangement — including exact contact, where no analytic solution exists.

1. Manufactured solution and helpers

T∗(x,y)=300+20cos⁡(1.3πx)cos⁡(0.8πy)+8x+5y[K]T^{\ast}(x,y) = 300 + 20\cos(1.3\pi x)\cos(0.8\pi y) + 8x + 5y \quad [\mathrm{K}]

with k=2.5 W m−1K−1k = 2.5\ \mathrm{W\,m^{-1}K^{-1}} and h=8 W m−2K−1h = 8\ \mathrm{W\,m^{-2}K^{-1}}. The volumetric source is q=−k∇2T∗q = -k\nabla^2 T^{\ast}; the domain walls are held at T∗T^{\ast}; the Robin data is d=k ∂T∗/∂nout+h T∗d = k\,\partial T^{\ast}/\partial n_\text{out} + h\,T^{\ast} evaluated at the wall crossings with the exact geometric normal — the problem data is identical for both discretisations, only the geometric information inside the method differs.

2. Geometries

A single disk, and two disks in exact contact. Both are defined once as (centre, radius) pairs; the SDF route derives the union field from them, the particle route wraps them in analytic Circle objects. The exact outward normal of the owning disk provides the Robin problem data in both cases.

3. Shared discretisation

One solver serves both geometry descriptions. It receives the immersed boundary data (ibm), a field for fluid/solid classification in the reconstruction, and optionally overriding normals; everything else — the conduction operator −∇⋅(k∇T)-\nabla\cdot(k\nabla T) with Dirichlet T∗T^{\ast} domain walls, identity rows in the (unmodelled) solid, the GFD flux reconstruction, and the Robin elimination — is identical:

A T=b,A=Aibm+GoutH,A\,T = b, \qquad A = A_\text{ibm} + G_\text{out} H,

with HH from construct_ibm_boundary_values expressing the surface temperature TΓT_\Gamma in terms of the fluid field.

4. Method 1 — full SDF description

The union SDF is sampled at the cell centres; wall positions come from linear interpolation of the SDF along each cut face, and the surface normals from the interpolated SDF gradient (interface_normals, the library default).


=== SDF  |  single disk ===
    N          L1   ord          L2   ord        Linf   ord
   40   3.679e-03   nan   5.887e-03   nan   2.824e-02   nan
   80   8.819e-04  2.06   1.391e-03  2.08   5.806e-03  2.28
  160   2.165e-04  2.03   3.443e-04  2.01   1.364e-03  2.09
  320   5.568e-05  1.96   8.835e-05  1.96   3.582e-04  1.93

=== SDF  |  two touching disks ===
    N          L1   ord          L2   ord        Linf   ord
   40   1.480e-02   nan   4.018e-02   nan   5.509e-01   nan
   80   7.756e-03  0.93   2.406e-02  0.74   5.087e-01  0.11
  160   3.286e-03  1.24   1.116e-02  1.11   3.695e-01  0.46
  320   1.339e-03  1.29   5.073e-03  1.14   2.585e-01  0.52

The single disk converges at the expected 2nd order. For the touching disks the order collapses to ~1 in L2 (and ~0.5 in the maximum norm): the union SDF is not differentiable on the contact medial axis, so the SDF-gradient normals carry an O(1) error in a fixed cluster of crossings at the contact, and the interpolated wall positions there are polluted by the other disk’s distance field.

5. Method 2 — analytic particle description

The same disks as Circle particles: construct_ibm_particles classifies the cells per particle (bounding-box windows), computes each cut-face wall position exactly (quadratic solve on the owning circle) and returns the exact outward normals in info.normals. The info.pseudo_sdf field (sign-correct union) serves the fluid/solid classification of the reconstruction; sub-cell gaps at the contact are walled off by the default contact="no_flux" policy (inert here, since the solid is not modelled).


=== Particles  |  single disk ===
    N          L1   ord          L2   ord        Linf   ord
   40   3.839e-03   nan   6.122e-03   nan   2.903e-02   nan
   80   9.214e-04  2.06   1.451e-03  2.08   5.993e-03  2.28
  160   2.258e-04  2.03   3.580e-04  2.02   1.400e-03  2.10
  320   5.791e-05  1.96   9.170e-05  1.96   3.677e-04  1.93

=== Particles  |  two touching disks ===
    N          L1   ord          L2   ord        Linf   ord
   40   3.542e-03   nan   7.599e-03   nan   1.408e-01   nan
   80   8.649e-04  2.03   1.907e-03  1.99   5.151e-02  1.45
  160   2.474e-04  1.81   5.998e-04  1.67   2.410e-02  1.10
  320   6.433e-05  1.94   1.639e-04  1.87   1.001e-02  1.27

The particle description leaves the single disk unchanged (~2nd order, marginally smaller constants from the exact walls) and restores the touching case to ~1.8 in L2, reducing the error by more than an order of magnitude on the finer grids.

6. Convergence comparison

<Figure size 1100x460 with 2 Axes>

7. Where the difference comes from

Two localized geometry errors of the SDF route at the contact, neither of which is a stencil problem:

  • Normals — the union SDF has a gradient kink on the contact medial axis; differencing across it tilts the normals by an O(1) angle in a fixed cluster of crossings (only shrinking as O(h) with resolution). The analytic particle normals are exact.

  • Wall positions — the interpolated theta uses the union value at the ghost cell, which near the contact belongs to the other disk. The particle route intersects each face with the owning circle exactly.

The GFD flux stencils themselves stay healthy (hardly any degree demotion, no unresolved crossings):

N=  40  normal err (deg): sdf max  15.62  particles max 1.2e-06   particle wall off-surface: 8.3e-17   degree<2: 6, unresolved: 0
N=  80  normal err (deg): sdf max  12.23  particles max 1.5e-06   particle wall off-surface: 8.3e-17   degree<2: 8, unresolved: 0
N= 160  normal err (deg): sdf max   9.13  particles max 1.2e-06   particle wall off-surface: 8.3e-17   degree<2: 8, unresolved: 0
N= 320  normal err (deg): sdf max   6.63  particles max 1.5e-06   particle wall off-surface: 8.3e-17   degree<2: 8, unresolved: 0

8. What the particle description provides beyond accuracy

At exact contact the two disks share solid cells, so a segmentation of the union SDF sees one body. The particle assembly keeps per-particle ownership: info.segmentation labels the disks separately (enabling per-particle surface conditions), and the sub-cell gap faces detected at the contact are walled off by the default no_flux policy — if the solid interiors were modelled (conjugate heat transfer), no matrix entry would couple the two particles directly:

contact crossings walled off : 8
per-particle segment sizes   : [622 622]
max |coupling| disk-1 rows x disk-2 cols: 0.0

9. Summary

casefull SDFanalytic particles
single disk~2.0~2.0
two touching disks (L2)~1.0~1.8
  • The immersed Robin/flux discretisation is 2nd order for isolated particles under either description.

  • At particle contact the full-SDF route degrades to ~1st order through purely geometric errors (kinked-gradient normals, polluted wall positions), not stencil failure.

  • The analytic particle description removes both error sources and restores ~1.8 (L2) / ~1.25 (L∞); the residual gap to 2 is a genuine PDE singularity of the re-entrant contact corner, beyond any fixed-stencil scheme.

  • The particle route additionally provides per-particle segmentation at contact and the no_flux contact policy for conjugate problems.

  • (The Dirichlet ghost-cell method apply_ibm is insensitive to all of this — it is 2nd order even for touching particles, as it uses no normals.)