Skip to main content

Crate tpt_sci_electrophys

Crate tpt_sci_electrophys 

Source
Expand description

§tpt-sci-electrophys

Cardiac electrophysiology for the tpt-science pillar, built on tpt_sci_ode (for the membrane kinetics) and tpt_sci_grid (for the extracellular/bidomain diffusion operator). It provides:

  • A IonicModel trait so multiple membrane kinetics can drive the same tissue solver. Two implementations ship: the classic Hodgkin–Huxley giant-axon model (HodgkinHuxley) and the Ten Tusscher–Panfilov 2004 human-ventricular myocyte (TenTusscher).
  • A monodomain / bidomain tissue propagator Tissue that couples the membrane to a 2-D diffusion operator. The monodomain is dVm/dt = −I_ion/Cm + D·∇²Vm. Enabling bidomain adds the extracellular potential Ve, solved each step from the elliptic equation (σ_i + σ_e)·∇²Ve = −σ_i·∇²Vm (via tpt_sci_grid’s 2-D Laplacian) and coupling it back into the intracellular update dVm/dt = −I_ion/Cm + σ_i·∇²(Vm + Ve).
  • Anisotropic (tensor) diffusion: Tissue accepts a per-node 2×2 diffusivity tensor D, so fibre-orientation effects (faster conduction along fibres) are captured via ∇·(D∇Vm).

The model integrates dVi/dt = −I_ion/Cm + D·∇²V (monodomain) across a grid, so an action potential launched at one node propagates through the tissue.

§Example

use tpt_sci_electrophys::HodgkinHuxley;

let mut hh = HodgkinHuxley::resting();
// Depolarize; integrate the membrane ODE for a short time.
let y = hh.state();
assert!(y.len() == 4);
hh.step(0.01);
assert!(hh.voltage().is_finite());

Structs§

DiffusionTensor
A 2×2 symmetric positive-definite diffusion (or conductivity) tensor [Dxx, Dxy; Dxy, Dyy] (row-major [dxx, dxy, dyy]).
HodgkinHuxley
Classic Hodgkin–Huxley giant-axon membrane model.
TenTusscher
Ten Tusscher–Panfilov (2004) human-ventricular myocyte membrane model (epicardial variant). A genuine ionic model with fast Na, delayed-rectifier K (I_Kr, I_Ks), inward-rectifier I_K1, L-type Ca I_CaL, transient outward I_to, the Na/Ca exchanger I_NaCa, and a simple calcium balance.
Tissue
A 2-D tissue sheet coupling an IonicModel to a diffusion operator (monodomain, or full bidomain when enabled).

Enums§

Diffusivity
Diffusivity of a Tissue node: isotropic scalar D or a per-node 2×2 DiffusionTensor (enabling anisotropic, fibre-oriented conduction).
ElectrophysError
Errors raised by the electrophysiology model.

Traits§

IonicModel
A membrane ionic model (the reaction term of the tissue PDE).

Functions§

tensor_diffusion_2d
Tensor-weighted discrete Laplacian (anisotropic diffusion operator) ∇·(D·∇φ) on an nx × ny grid with Neumann (clamped) boundaries.

Type Aliases§

ConductivityTensor
Conductivity tensor used for the intracellular/extracellular conductivities σ_i / σ_e in the bidomain equations. It is exactly DiffusionTensor — the same 2×2 SPD object — just named for its physical role.