Models

A so-called model defines the reaction term of the reaction diffusion equation. While Pigreads comes with a variety of pre-defined models, it is also easily possible to define a model.

Defining a model

A model can be defined by adding it to the dictionary of available models:

import pigreads as pig
from pigreads.schema.model import ModelDefinition

pig.Models.available["fitzhugh1961impulses"] = ModelDefinition(
    name="FitzHugh 1961 & Nagumo 1962",
    description="A 2D simplification of the Hodgkin-Huxley model.",
    dois=[
        "https://doi.org/10.1016/S0006-3495(61)86902-6",
        "https://doi.org/10.1109/JRPROC.1962.288235",
    ],
    variables={"u": 1.2, "v": -0.625},
    diffusivity={"u": 1.0},
    parameters={"a": 0.7, "b": 0.8, "c": 3.0, "z": 0.0},
    code="""
        *_new_u = u + dt * (v + u - u*u*u/3 + z + _diffuse_u);
        *_new_v = v + dt * (-(u - a + b*v)/c);
    """,
)

The definition must adhere to the schema in pigreads.schema.model.ModelDefinition.

Pre-defined models

Name

Key

Variables

Parameters

Aliev & Panfilov 1996

aliev1996simple

2

5

Bar & Eiswirth 1993

bar1993turbulence

2

3

Barkley 1991

barkley1991model

2

3

Beeler & Reuter 1977

beeler1977reconstruction

8

5

Bueno-Orovio et al. 2008

bueno2008minimal

4

28

Courtemanche et al. 1998

courtemanche1998ionic

21

43

Fenton & Karma 1998

fenton1998vortex

3

14

Gray & Scott 1982

gray1983autocatalytic

2

2

Hodgkin & Huxley 1952

hodgkin1952quantitative

4

10

Kabus et al. 2024

kabus2024fast

3

12

Luo & Rudy 1991

luo1991model

8

19

Luo & Rudy 1994

luo1994dynamic

12

46

Majumder et al. 2016

majumder2016mathematical

27

61

Maleckar et al. 2008

maleckar2008mathematical

30

47

Marcotte & Grigoriev 2017

marcotte2017dynamical

2

3

Mitchell & Schaeffer 2003

mitchell2003two

2

5

Nygren et al. 1998

nygren1998mathematical

29

46

Paci et al. 2013

paci2013computational

18

54

Ten Tusscher et al. 2006

tentusscher2006alternans

19

56

Tomek et al. 2019

tomek2019development

43

127

Trivial model

trivial

1

0