Appendix S2. Flux sweeping algorithm - PLOS

32 downloads 0 Views 104KB Size Report
10.1371/journal.pone.0171212. Appendix S2. Flux sweeping algorithm. The description of flux sweeping is reproduced from the book [1] written in Russian.
Full paper: Nesterenko A.M., Kuznetsov M.B., Korotkova D.D., Zaraisky A.G. Morphogene Adsorption on the Extacellular Matrix as a Possible Turing Instability Regulator in Multicellular Embryonic Systems. PLoS ONE (2017): 10.1371/journal.pone.0171212

Appendix S2. Flux sweeping algorithm The description of flux sweeping is reproduced from the book [1] written in Russian with adaptation to our case. Let us rewrite diffusion equation ∂2u ∂u =D 2 ∂t ∂x into the flux form:

∂u ∂j ∂u = D =j ∂t ∂x ∂x Let us consider the system on the linear grid of M points, where xm = mh, h = L/M . Discrete equations at the grid nodes are the following: jm+1/2 − jm−1/2 un+1 − unm m = , m = 1, 2, .., M − 1, τ h un+1 − un+1 m D m+1 = jm+1/2 , m = 0, 1, 2, .., M − 1. h Let us write sweeping relation in the following form:

(S2.1)

un+1 = Pm jm+1/2 + Rm , m = 0, 1, 2, .., M − 1, m where Pm and Rm — supplementary (“sweeping”) coefficients that should be determined. First pair of these coefficients can be determined from left edge condition ∂u(0, t)/∂x = 0 (we consider Neuman condition): P0 = 2τ /h,

R0 = un0 .

(S2.2)

Next supplementary coefficients Pm , Rm can be determined recurrently at the first stage (forward sweeping):   h h A=1+ Pm + , τ D   1 h Pm+1 = Pm + , (S2.3) A D    1 h h n Rm+1 = Pm + u + Rm . A D τ m+1 At the second stage (backward sweeping) we starts with calculating un+1 from right M edge condition ∂u(L, t)/∂x = 0: un+1 = M

2τ DRM −1 + (h + PM −1 D) hunM , h2 + hPM −1 D + 2τ D  h un − un+1 . jM −1 = M 2τ M

1

(S2.4)

Next, values of variable u and its flux j in the left grid points are calculated sequentially: h n+1 h n u + um , τ m τ = Pm−1 jm−1/2 + Rm−1 .

jm−1/2 = jm+1/2 − un+1 m−1

(S2.5)

Equations (S2.3),(S2.5) are called flux sweeping equations, whereas Eq (S2.2) and Eq (S2.4) can be modified according to edge conditions.

References 1. Fedorenko RP. Introduction to Computational Physics. Moscow, Russia: MPTI; 1994.

2