Fluxes
- class tissue_forge.Fluxes
A flux is defined between a pair of types, and acts on the state vector between a pair of instances.
The indices of the species in each state vector are most likely different, so Tissue Forge tracks the indices in each type, and the transport constatants.
A flux between a pair of types, and pair of respective species needs:
(1) type A, (2) type B, (3) species id in A, (4) species id in B, (5) transport constant.
Allocates Flux as a single block, member pointers point to offsets in these blocks.
Allocated size is: sizeof(Fluxes) + 2 * alloc_size * sizeof(int32) + alloc_size * sizeof(FPTYPE)
- static flux(*args, **kwargs) TissueForge::Fluxes *
Alias of fluxFick.
- Parameters:
A (
ParticleType
) – first typeB (
ParticleType
) – second typename (string) – name of species
k (float) – transport coefficient
decay (float) – optional decay. Defaults to 0.0.
cutoff (float) – optional cutoff distance. Defaults to global cutoff
- Return type:
- Returns:
Fluxes*
- static fluxFick(*args, **kwargs) TissueForge::Fluxes *
Creates and binds a Fickian diffusion flux.
Fickian diffusion flux implements the analogous reaction:
\[a.S \leftrightarrow b.S ; k \left(1 - \frac{r}{r_{cutoff}} \right)\left(a.S - b.S\right) ,\]\[a.S \rightarrow 0 ; \frac{d}{2} a.S ,\]\[b.S \rightarrow 0 ; \frac{d}{2} b.S ,\]where \(a.S\) is a chemical species located at object \(a\), and likewise for \(b\), \(k\) is the flux constant, \(r\) is the distance between the two objects, \(r_{cutoff}\) is the global cutoff distance, and \(d\) is an optional decay term.
Automatically updates when running on a CUDA device.
- Parameters:
A (
ParticleType
) – first typeB (
ParticleType
) – second typename (string) – name of species
k (float) – transport coefficient
decay (float) – optional decay. Defaults to 0.0.
cutoff (float) – optional cutoff distance. Defaults to global cutoff
- Return type:
- Returns:
Fluxes*
- static secrete(*args, **kwargs) TissueForge::Fluxes *
Creates a secretion flux by active pumping.
Secretion flux implements the analogous reaction:
\[a.S \rightarrow b.S ; k \left(1 - \frac{r}{r_{cutoff}} \right)\left(a.S - a.S_{target} \right) ,\]\[a.S \rightarrow 0 ; \frac{d}{2} a.S ,\]\[b.S \rightarrow 0 ; \frac{d}{2} b.S ,\]where \(a.S\) is a chemical species located at object \(a\), and likewise for \(b\), \(k\) is the flux constant, \(r\) is the distance between the two objects, \(r_{cutoff}\) is the global cutoff distance, and \(d\) is an optional decay term.
Automatically updates when running on a CUDA device.
- Parameters:
A (
ParticleType
) – first typeB (
ParticleType
) – second typename (string) – name of species
k (float) – transport coefficient
target (float) – target concentration
decay (float) – optional decay. Defaults to 0.0
cutoff (float) – optional cutoff distance. Defaults to global cutoff
- Return type:
- Returns:
Fluxes*
- static uptake(*args, **kwargs) TissueForge::Fluxes *
Creates an uptake flux by active pumping.
Uptake flux implements the analogous reaction:
\[a.S \rightarrow b.S ; k \left(1 - \frac{r}{r_{cutoff}}\right)\left(b.S - b.S_{target} \right)\left(a.S\right) ,\]\[a.S \rightarrow 0 ; \frac{d}{2} a.S ,\]\[b.S \rightarrow 0 ; \frac{d}{2} b.S ,\]where \(a.S\) is a chemical species located at object \(a\), and likewise for \(b\), \(k\) is the flux constant, \(r\) is the distance between the two objects, \(r_{cutoff}\) is the global cutoff distance, and \(d\) is an optional decay term.
Automatically updates when running on a CUDA device.
- Parameters:
A (
ParticleType
) – first typeB (
ParticleType
) – second typename (string) – name of species
k (float) – transport coefficient
target (float) – target concentration
decay (float) – optional decay. Defaults to 0.0
cutoff (float) – optional cutoff distance. Defaults to global cutoff
- Return type:
- Returns:
Fluxes*