1] The default geometry is rxd.geometry.inside. This is effectively a single shell for the segment.

2] Specifying a geometry changes the way rxd handle the same space, e.g.

A region with rxd.Shell(lo, hi) is treated as a hollow cylinder extending from lo multiplied by the segments diameter, to hi multiplied by the segments diameter.

3] MultiCompartmentReaction has to deal with a flux between two compartments depending on the surface area between them. As the compartments may have different volumes, it would complicate things for users to specify the flux in the usually units of (amount/volume/time) as they would have to indicate which volume they intended to be used.

Instead the rates are given in amount (molecules) per surface area (μm²) per time (ms) then rxd uses the relative volumes to compute the flux.

The desired flux for radial diffusion of calcium from Fick's law is (D/dr)Ca

With the diffusion coefficient D (μm²/ms) and calcium Ca (mM or mol/m³) and shell thickness dr (μm)

Multiplying by Avogadro's number and by 1e-18 (note in future releases of NEURON these constants will be available as rxd.constants.NA and neuron.units.m**-3) gives the concentration Ca in (number of molecules per μm³) and the rate has the desired units i.e;

(D/dr)*Ca * rxd.constants.NA * neuron.units.m**-3 has units of number molecules per μm² per ms

4]

A common approach for radial diffusion is to define the same shells (as a proportion of the diameter) in each section, diffusion occurs between matched shells, i.e. outer to outer, inner to inner, etc. This does not make a lot of sense when there is an abrupt change in diameter or when one section is connected at an angle to another.

The simplest way to implement such a solution is to define the same regions (shells and borders) for both the head and neck, then let rxd use longitudinal diffusion (vertical in your schematic), for flux between the segments. Longitudinal diffusion is provided by rxd just by specifying a diffusion coefficient in the rxd.Species declaration. This is how diffusion between the dendrite and soma occurs in the

radial diffusion example.

Alternatively if you suspect the abrupt change in diameter or the angle between the neck and the dendrite makes mapping of shells an inappropriate solution, you can solve it in 3D, by calling rxd.set_solve_type. This will be slower and require more memory.

Here is a

3D and 1D/3D hybrid example.