Skip to main content
. 2022 Mar 23;19(188):20210922. doi: 10.1098/rsif.2021.0922

Algorithm 1.

Implementation of the tumour-induced brain deformation model.

1. Initialise: t=0, u(t=0)=u0, ωs(t=0)=ωs0 for s{w,g,c}
2. Compute tissue percentage by equation (2.14)
3. while (tT) do
4. Compute time step τ=min(τ1,τ2), where τ1 and τ2 are time steps constrained by the numerical stability of equations (2.1) and (2.11)
5. Compute the pressure p(t) by solving equations (2.15) and (2.16)
6. Compute the deformation field v(t) by solving equations (2.5) and (2.7)
7. Update the tumour state by solving equations (2.1) and (2.2)
8. Update the brain tissue by solving equations (2.11) and (2.12)
9. Recompute the tissue percentage by equation (2.14)
10. t=t+τ
11. end while