This tutorial describes the Spherical Diffusion applet, which models radial diffusion of a solute into or out of a sphere. Three physical scenarios are available. In all cases the applet simultaneously displays a concentration profile (top canvas) and a fractional uptake or release curve (bottom canvas). For the mathematical background, see the Solution Tutorial.
- Model selector — dropdown at the very top chooses the diffusion scenario. Changing model clears all curves.
- Left panel — parameters, scaling controls, and Compute / Clear buttons.
- Top canvas — concentration profile C(r) at a fixed time, or C(t) at a fixed radius.
- Bottom canvas — fractional uptake, release, or fraction filled — always vs time.
- Right panel — live cursor readouts for both canvases, active curves list, Show Data Table, and tutorial links.
| Model | Scenario | Initial Condition | Boundary Condition |
|---|---|---|---|
| 1 | Uptake into empty sphere | C = 0 everywhere inside | C = Câ‚€ at r = a (constant, for all t > 0) |
| 2 | Release from uniformly loaded sphere | C = Câ‚€ uniform inside | C = 0 at r = a (infinite clean bath) |
| 3 | Release from non-uniformly loaded sphere | Non-uniform profile from prior uptake phase with Dâ‚‚ for time tâ‚€ | C = 0 at r = a during release |
Parameters
| Parameter | Description |
|---|---|
| Diffusion Coefficient (D) | Single diffusion coefficient for transport into the sphere. |
| Concentration outside Sphere (c) | Constant concentration maintained at the sphere surface for all t > 0. |
| Sphere Radius (a) | Radius of the sphere. The profile plots r from 0 to a. |
Fixed Time vs Fixed Distance
- Fixed Time — the top canvas shows C vs r (concentration profile) at that time snapshot, showing how far the diffusion front has penetrated.
- Fixed Distance — the top canvas shows C vs t at a fixed radial position, showing how quickly concentration builds up at that depth inside the sphere.
The bottom canvas always shows fractional uptake f(t) = Mₜ/M∞ vs time regardless of which radio button is selected.
Parameters
| Parameter | Description |
|---|---|
| Diffusion Coefficient (D) | Diffusion coefficient for mass release out of the sphere. |
| Concentration inside Sphere (c) | The uniform initial concentration inside the sphere at t = 0. The outside is clean (C = 0) for all t. |
| Sphere Radius (a) | Radius of the sphere. |
The same Fixed Time / Fixed Distance controls apply as in Model 1, but the labels read "Release" instead of "Uptake". The top canvas shows the declining concentration profile as mass leaves the sphere. The bottom canvas shows fractional release.
Parameters
| Parameter | Description |
|---|---|
| Diffusion Coeff. for Release (D1) | Diffusion coefficient used during the release phase. |
| Diffusion Coeff. for Uptake (D2) | Diffusion coefficient used during the initial loading phase. Can differ from D1 to simulate hysteresis. |
| Concentration outside Sphere (c) | The concentration maintained outside the sphere during loading. During release the outside is clean. |
| Sphere Radius (a) | Radius of the sphere. |
| Fixed Time for Release (t) | The elapsed release time at which the concentration profile is plotted on the top canvas. |
| Fixed Time for Uptake (tâ‚€) | How long the sphere was loaded before release began. Controls the shape of the non-uniform initial profile. |
There is no Fixed Distance option for Model 3 — the top canvas always shows C vs r at the specified release time. The bottom canvas shows fraction of sphere filled (mass remaining / maximum possible mass) vs release time.
- Automatic — t-range is set to span roughly from 0 to the time at which f ≈ 0.97 (i.e., Dπ²t/a² ≈ 3). Good default for most parameters.
- Manual — type explicit Min t and Max t. Min/Max fields are disabled in Automatic mode and enabled when Manual is selected. Use this to zoom in on early-time behavior or to compare curves over a specific time window.
More points give smoother curves; 101 is sufficient for most cases.
- Multiple Plots — when checked, each Compute adds a new curve in a new color without removing previous ones. Uncheck to replace all curves on each click.
Top Canvas — Concentration Profile
Shows the concentration C(r) at a fixed time (or C(t) at a fixed radius for Models 1 & 2). The x-axis label changes accordingly: Distance from Center or Time. Each curve is drawn in a different color and the legend is shown in the upper-left of the canvas.
Bottom Canvas — Fractional Uptake / Release
Always shows the fractional quantity vs time:
- Model 1: Fractional Uptake f = Mₜ/M∞ (rises from 0 → 1 as sphere fills)
- Model 2: Fractional Release f = Mₜ/M₀ (falls from 1 → 0 as sphere empties)
- Model 3: Fraction of Sphere Filled = mass remaining / maximum possible mass
Move the cursor over either canvas to read exact values. A dashed vertical line follows the cursor on the active canvas.
| Canvas | Readout updates | Clears when |
|---|---|---|
| Top (Concentration) | Radius or Time coordinate + interpolated C value. When multiple curves are plotted all Y values are shown separated by "/". | Mouse leaves the top canvas |
| Bottom (Fractional) | Time coordinate + interpolated f value. When multiple curves are plotted all Y values are shown separated by "/". | Mouse leaves the bottom canvas |
Once at least one curve has been computed, an Active Curves list appears in the right panel. Each entry shows a colored swatch and the curve label (derived from the parameter values used).
- Click the ✕ button on any curve to remove it from both canvases immediately.
- The cursor readouts are also cleared when a curve is deleted.
- The list disappears when no curves remain.
| Button | Action |
|---|---|
| Compute Curve | Solves the analytical equations with current parameters and adds the curve to both canvases. If Multiple Plots is unchecked, all existing curves are cleared first. |
| Clear Curves | Removes all curves from both canvases and resets cursor readouts and the Active Curves list. |
Any validation errors (e.g., D ≤ 0, invalid radius) are shown in a red message below the checkboxes in the left panel.
The Show Data Table, UI Tutorial, and Solution Tutorial buttons are located at the bottom of the right panel, below the Active Curves list.
Clicking Show Data Table opens a modal with two rows of tabs:
- Graph tabs (top row): switch between Concentration data and Fractional data.
- Curve tabs (second row): select which curve's data to view. Each tab is color-coded to match the curve on the canvas.
- Click CSV to download the currently displayed graph + curve as a comma-separated file.