Skip to content

Screened diffusion

jax_morph.physics.FreeScreenedDiffusion #

FreeScreenedDiffusion(
    *,
    n_field_species,
    n_space_dim,
    diffusion=1.0,
    degradation=1.0,
    source_name='secretion_rate',
    field_name='chemical',
)

Quasistatic free-space field: superpose each cell's finite-size screened-diffusion Green's function.

Every alive cell of radius \(a = r_i\) - a sphere (3-D), disk (2-D), or segment (1-D) - emits at a total rate \(S\). The steady concentration solves the screened-diffusion (modified Helmholtz) equation

\[D\,\nabla^2 c - k\,c = -S,\]

so the field at cell \(i\) superposes the per-source open-boundary Green's functions,

\[c_i = \sum_j S_j\, G(r_{ij}),\]

with inverse screening length \(\kappa = \sqrt{k / D}\) (\(D\) = diffusion, \(k\) = degradation). The near / self field is regularized by clamping the receiver distance to the source surface, \(r \to \max(r, a)\).

Field-agnostic: source_name / field_name name the state fields read (per-cell source rate) and written (the resulting field), defaulting to secretion_rate / chemical. Override them to model any diffusing quantity (heat, a signaling molecule, ...).

diffusion and degradation are shared scalars or per-species arrays of shape (n_field_species,). Screening (degradation > 0) is required in 1-D and 2-D, where the unscreened field is unbounded; 3-D admits degradation = 0.

Attributes:

  • n_field_species

    Static number of chemical species; source and field arrays have shape (capacity, n_field_species).

  • n_space_dim

    Static spatial dimension selecting the segment, disk, or sphere kernel.

  • diffusion

    Diffusion coefficient, scalar or shape (n_field_species,). Defaults to 1.0.

  • degradation

    Degradation coefficient, scalar or shape (n_field_species,). Defaults to 1.0.

  • source_name

    Name of the per-cell source-rate state field. Defaults to 'secretion_rate'.

  • field_name

    Name of the computed per-cell field. Defaults to 'chemical'.

Parameters:

  • n_field_species

    Number of field species.

  • n_space_dim

    Spatial dimension; must be 1, 2, or 3.

  • diffusion

    Diffusion coefficient, scalar or per-species array. Defaults to 1.0.

  • degradation

    Degradation coefficient, scalar or per-species array. Defaults to 1.0.

  • source_name

    Per-cell source-rate field name. Defaults to 'secretion_rate'.

  • field_name

    Per-cell output field name. Defaults to 'chemical'.

Raises:

  • ValueError

    If the spatial dimension is unsupported or a static low-dimensional degradation is nonpositive.

state_reads #

state_reads()

Reads each cell's per-species source rate (the source_name field).

state_writes #

state_writes()

Writes the per-cell field (field_name, recomputed each macro-step, not heritable).