Diffusion with a draggable inclusion

Drag the object or its boundary points on the left; the solution and the flux follow live. All demos

$$-\nabla\!\cdot\big(k\,\nabla u\big) = 1 \ \text{ in } (0,1)^2,\qquad u = 0 \ \text{ on the boundary},\qquad k = \exp\!\Big(\sum_{j=1}^{50} y_j\, j^{-1}\psi_j(x) \;+\; c\,\mathbf 1_{D}(x)\Big),$$

$$D = \{\,x : |x - x_c| < r(\theta(x))\,\},\qquad r(\theta) = \text{trigonometric interpolant of the radii } r_m = 0.15\,(1 + 0.5\,\rho_m),\ m = 1,\dots,8 .$$

Parameters: centre \(x_c \in [0.25,0.75]^2\) (drag), control radii \(\rho_m \in [-1,1]\) (drag the points), log-contrast \(c \in [-4.6, 4.6]\) (\(k_{\rm in}/k_{\rm bg}\) from 0.01 to 100), background \(y_1,\dots,y_4 \in [-1,1]\).

waiting for the server…

log-coefficient, drag the object
solution u
flux |k ∇u|
full solver: u (press compare)