Skip to content

Core and periphery vasculature under anti-angiogenic therapy

A tumour with a live core, a live periphery, and a necrotic core.

  • Class: VascularCorePeripherySystem
  • Import: from skcomplex.systems.biology.oncology import VascularCorePeripherySystem
  • Field: biology/oncology
  • Topics: anti-angiogenic therapy, ode, angiogenesis, necrosis, dosing
  • References:
    • Padmanabhan, Meskin, and Al Moustafa 2021
    • Csercsik et al. 2017

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.biology.oncology import VascularCorePeripherySystem

trajectory = VascularCorePeripherySystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
Vx 0.005
xi_e 0.8
du 0.17773004629742187
dose 5.0
period 7.0
width 1.0
start 0.0
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class VascularCorePeripherySystem(DynamicalSystem):
    """A tumour with a live core, a live periphery, and a necrotic core.

    Each compartment is fed by its own vasculature.

    The radius grows once the periphery is dense, cells pass from the periphery to the core as it grows, and core cells
    die when the core vasculature is too sparse. Starved cells release angiogenic factor, which grows both vascular
    compartments, and the inhibitor lowers the angiogenesis by `exp(-xi_e U)`. The book writes the radius, core volume,
    and tumour volume as increments. They are read as rates, so the increment of the radius is `dAr/dt` and the others
    follow from it per unit time, which is how the bi-compartmental system of Csercsik et al. advances. The book does
    not give the density `Vx` of the surrounding vasculature, which is set to the reference vascular fraction `rv_ref`,
    nor a schedule, which is a one-day infusion of 5 mg/kg/day every week. The other parameters and the initial state
    are the book's, the clearance `du` is `log(2) / 3.9` per day, lengths are in mm, volumes in mm³, time in days, and
    the inhibitor in mg/kg. The system has the radius `tumour.Ar`, the cells `tumour.Ac`, `tumour.Ap`, and `tumour.An`,
    the vascular volumes `tumour.Vbc` and `tumour.Vbp`, and the inhibitor `tumour.U`.

    Args:
        Vx:
            The vascular density of the surrounding tissue.

        xi_e:
            The efficiency of the inhibitor.

        du:
            The clearance rate of the inhibitor.

        dose:
            The infusion rate during a dose, 0 for no treatment.

        period:
            The time between the starts of doses.

        width:
            The duration of a dose.

        start:
            The time of the first dose.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.biology.oncology import VascularCorePeripherySystem
        >>> VascularCorePeripherySystem(dose=0.0).prepare().system_.elements[0].values['dose']
        0.0
    """

    field = 'biology/oncology'
    topics = ('anti-angiogenic therapy', 'ode', 'angiogenesis', 'necrosis', 'dosing')
    references = (BOOK_REFERENCE, 'Csercsik et al. 2017')
    until = 60.0
    dt = 0.2

    def __init__(
        self,
        *,
        Vx: float = 0.005,
        xi_e: float = 0.8,
        du: float = INHIBITOR_CLEARANCE,
        dose: float = 5.0,
        period: float = 7.0,
        width: float = 1.0,
        start: float = 0.0,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label=label, solver=solver, backend=backend)
        self.Vx = Vx
        self.xi_e = xi_e
        self.du = du
        self.dose = dose
        self.period = period
        self.width = width
        self.start = start

    def _get_solver(self) -> BaseSolver:
        """Return the solver the system is tuned to."""
        return ScipyODESolver(method='LSODA', rtol=1e-8, atol=1e-8)

    def _get_element_label(self) -> str:
        """Return the label of the element that holds the states."""
        return 'tumour'

    def _get_states(self) -> dict[str, object]:
        """Return the initial value of every state by name."""
        return {
            'Ar': 13.0,
            'Ac': 3.0,
            'Ap': 495.0,
            'An': 0.0,
            'Vbc': 0.0,
            'Vbp': 0.0,
            'U': 0.0,
        }

    def _get_parameters(self) -> dict[str, object]:
        """Return the value of every parameter by name."""
        return {
            'r1': 1.2,
            'r2': 12.0,
            'r3': 0.06,
            'm': 1.0,
            'a1': 1.0,
            'p1': 1.0,
            'p2': 400000.0,
            'p3': 0.2,
            'p4': 0.45,
            'p_g': 400000.0,
            'kappa1': 0.17,
            'kappa2': -45000.0,
            'kappa3': -0.04,
            'kappa4': -0.06,
            'kappa_g': 55000.0,
            'theta1': 0.3,
            'theta2': 0.3,
            'beta': 1.2,
            'xi_e': self.xi_e,
            'rv_ref': 0.005,
            'Vx': self.Vx,
            'du': self.du,
            'dose': self.dose,
        }

    def _get_equations(self) -> Equations:
        """Return the growth of the radius, the balances, and the inhibitor kinetics."""
        return {
            'Ar': self._get_growth,
            'Ac': lambda s: self._transfer(s) * s.target.Ap - self._get_necrosis(s),
            'Ap': lambda s: -self._transfer(s) * s.target.Ap + self._get_proliferation(s),
            'An': self._get_necrosis,
            'Vbc': lambda s: self._get_internalization(s) + self._get_angiogenesis(s),
            'Vbp': lambda s: s.target.Vx * self._get_volume_increment(s)
            - self._get_internalization(s)
            + self._get_angiogenesis(s),
            'U': lambda s: self._get_infusion(s) - s.target.du * s.target.U,
        }

    def _get_ratio(self, s: SimpleNamespace) -> Expression:
        """Return `ratio` from the namespace of an equation."""
        return VascularCorePeripherySystem._get_core_ratio(s.target.Ar)

    def _get_core(self, s: SimpleNamespace) -> Expression:
        """Return `core` from the namespace of an equation."""
        return VascularCorePeripherySystem._get_ball(self._get_ratio(s) * s.target.Ar)

    def _get_periphery(self, s: SimpleNamespace) -> Expression:
        """Return `periphery` from the namespace of an equation."""
        return VascularCorePeripherySystem._get_ball(s.target.Ar) - self._get_core(s)

    def _get_density(self, s: SimpleNamespace) -> Expression:
        """Return `density` from the namespace of an equation."""
        return s.target.Ap / self._get_periphery(s)

    def _get_growth(self, s: SimpleNamespace) -> Expression:
        """Return `growth` from the namespace of an equation."""
        return s.target.r1 * logistic(self._get_density(s), s.target.p_g, s.target.kappa_g)

    def _get_core_increment(self, s: SimpleNamespace) -> Expression:
        """Return `core_increment` from the namespace of an equation."""
        return VascularCorePeripherySystem._get_ball(
            self._get_ratio(s) * (s.target.Ar + self._get_growth(s)),
        ) - self._get_core(s)

    def _get_volume_increment(self, s: SimpleNamespace) -> Expression:
        """Return `volume_increment` from the namespace of an equation."""
        return VascularCorePeripherySystem._get_ball(
            s.target.Ar + self._get_growth(s),
        ) - VascularCorePeripherySystem._get_ball(
            s.target.Ar,
        )

    def _transfer(self, s: SimpleNamespace) -> Expression:
        """Return `transfer` from the namespace of an equation."""
        return self._get_core_increment(s) / self._get_periphery(s)

    def _get_core_nutrient(self, s: SimpleNamespace) -> Expression:
        """Return `core_nutrient` from the namespace of an equation."""
        return s.target.Vbc / (self._get_core(s) * s.target.rv_ref)

    def _get_periphery_nutrient(self, s: SimpleNamespace) -> Expression:
        """Return `periphery_nutrient` from the namespace of an equation."""
        return s.target.Vbp / (self._get_periphery(s) * s.target.rv_ref)

    def _get_necrosis(self, s: SimpleNamespace) -> Expression:
        """Return `necrosis` from the namespace of an equation."""
        return (
            s.target.m
            * logistic(self._get_core_nutrient(s), s.target.p3, s.target.kappa3) ** s.target.theta1
            * s.target.Ac
        )

    def _get_proliferation(self, s: SimpleNamespace) -> Expression:
        """Return `proliferation` from the namespace of an equation."""
        return (
            s.target.r2
            * logistic(self._get_periphery_nutrient(s), s.target.p1, s.target.kappa1)
            * logistic(self._get_density(s), s.target.p2, s.target.kappa2)
            * s.target.Ap
        )

    def _get_signal(self, s: SimpleNamespace) -> Expression:
        """Return `signal` from the namespace of an equation."""
        return logistic(self._get_core_nutrient(s), s.target.p4, s.target.kappa4) ** s.target.theta2

    def _get_angiogenesis(self, s: SimpleNamespace) -> Expression:
        """Return `angiogenesis` from the namespace of an equation."""
        return s.target.a1 * exp(-s.target.xi_e * s.target.U) * self._get_signal(s) * s.target.Vbp

    def _get_internalization(self, s: SimpleNamespace) -> Expression:
        """Return `internalization` from the namespace of an equation."""
        return s.target.r3 * s.target.Ar**s.target.beta * self._transfer(s) * s.target.Vbp

    def _get_infusion(self, s: SimpleNamespace) -> Expression:
        """Return `infusion` from the namespace of an equation."""
        return s.target.dose * pulse_train(s.t, self.period, self.width, start=self.start)

    @staticmethod
    def _get_ball(radius: Expression) -> Expression:
        """Return the volume of a ball of a radius."""
        return 4 * pi * radius**3 / 3

    @staticmethod
    def _get_core_ratio(radius: Expression) -> Expression:
        """Return the core-periphery ratio of a tumour radius.

        The ratio is `(1 / (1 + exp((0.5 - Ar) / 0.333)))^2.2 - 0.15`.
        """
        return logistic(radius, 0.5, 0.333) ** 2.2 - 0.15

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

Interactions:

class AnnotatedElement(Element):
    """An element of values by name, with the allowed values and quantities of some.

    It holds what a class would write in `Annotated`, for values known only as data. The values
    `{'n': 40.0}` with `allowed={'n': RealSet.closed_open(0, oo)}` and `quantities={'n': 'people'}` are read as
    `n: Annotated[float, RealSet.closed_open(0, oo), Quantity('people')] = 40.0`, so a negative `n` is rejected and the
    conservation monitor follows the people. The generic systems that build one element from a mapping of states, such
    as `DynamicalSystem` and `StockFlowSystem`, build this element.

    Unlike `Element`, whose subclass writes the allowed values and quantities in `Annotated` on its arguments, it takes
    them as data. Choose it when the names of the values are known only when a system is built.

    It appears in many fields. The stocks of a bathtub, the people of a diffusion of innovations, and the oil of an
    economy are each its values.

    Args:
        label:
            The name of the element, unique among the components of its system, such as `'population'`.

        values:
            The values by name, such as `{'n': 40.0, 'r': 0.5}`, or `None` for none.

        allowed:
            The allowed values of some values by name, a `RealSet` such as `RealSet.closed_open(0, oo)` or a set such
            as `{'S', 'I', 'R'}`, or `None` for none.

        quantities:
            The quantity some values hold by name, such as `{'n': 'people'}`, or `None` for none.

    Examples:
        >>> from sage.all__sagemath_symbolics import oo
        >>> from sage.sets.real_set import RealSet
        >>> from skcomplex.systems.general.dynamics import AnnotatedElement
        >>> from skcomplex.core.errors import ValidationError
        >>> from skcomplex.core.systems import System
        >>> tank = AnnotatedElement('tank', values={'level': -1.0}, allowed={'level': RealSet.closed_open(0, oo)})
        >>> try:
        ...     System(elements=[tank]).prepare()
        ... except ValidationError as error:
        ...     print(error)
        The system is not valid, with 1 error(s):
        - tank: tank.level = -1.0 is not in its domain [0, +oo). Correct the component as the message describes. [value]
    """

    def __init__(
        self,
        label: str,
        *,
        values: Mapping[str, object] | None = None,
        allowed: Mapping[str, object] | None = None,
        quantities: Mapping[str, str] | None = None,
    ) -> None:
        super().__init__(label, values=values)
        self.allowed = allowed
        self.quantities = quantities

    def _get_hints(self) -> dict[str, object]:
        """Return the hint of every value with allowed values or a quantity.

        Each hint is what `Annotated` would write. The arguments `allowed` and `quantities` describe the values, so they
        are no values themselves.
        """
        allowed, quantities = self.allowed or {}, self.quantities or {}
        hints: dict[str, object] = {}
        for name in [*allowed, *(name for name in quantities if name not in allowed)]:
            items = [allowed[name]] if name in allowed else []
            items += [Quantity(quantities[name])] if name in quantities else []
            hints[name] = Annotated[object, *items]
        return hints

class EquationInteraction(Interaction):
    """An interaction that gives one state of an element its rate or its next value.

    In continuous time the equation is the rate of the state, or of its derivative of order `k` when the state is named
    with `k` primes, such as `"x''"` for an acceleration, and a noise amplitude adds a noise in the Itô or Stratonovich
    convention. In discrete time the equation is the next value of the state, read from the values at the start of the
    step. An equation and a noise are functions of the namespace whose `target` holds the values of the element and
    whose `t` holds the time.

    Unlike `Interaction`, which a subclass gives laws of its own, it takes the equation as a function. Choose it when
    one state follows one formula, with no class of its own.

    It appears in many fields. The decay of a tank, the logistic map of a population, and the income of an economy are
    each one equation of one state.

    Args:
        label:
            The label of the interaction, unique among the components of its system.

        target:
            The path of the element whose state the equation changes.

        state:
            The name of the state, with a prime for every order of the derivative the equation gives.

        equation:
            The rate or the next value as a function of the namespace, or `None` for a noise alone.

        noise:
            The noise amplitude as a function of the namespace or a number, or `None` for none.

        convention:
            The stochastic calculus of the noise, `'ito'` or `'stratonovich'`.

        time:
            The time of the equation, `'continuous'` for a rate or `'discrete'` for a next value.

    Examples:
        >>> from skcomplex.core.components.elements import Element
        >>> from skcomplex.core.systems import System
        >>> from skcomplex.systems.general.dynamics import EquationInteraction
        >>> decay = EquationInteraction('decay', target='tank', state='x', equation=lambda s: -s.target.k * s.target.x)
        >>> system = System(elements=[Element('tank', values={'x': 1.0, 'k': 0.5})], interactions=[decay])
        >>> round(float(system.prepare().simulate(until=2.0, dt=2.0).get_values('tank.x')[-1]), 4)
        0.3679
    """

    law_classes: ClassVar[tuple[type[BaseLaw], ...]] = (RateLaw, NoiseLaw, UpdateLaw)

    def __init__(
        self,
        label: str,
        *,
        target: Role,
        state: str,
        equation: Callable[[SimpleNamespace], object] | None = None,
        noise: Callable[[SimpleNamespace], object] | float | None = None,
        convention: str = 'ito',
        time: str = 'continuous',
    ) -> None:
        super().__init__(label)
        self.target = target
        self.state = state
        self.equation = equation
        self.noise = noise
        self.convention = convention
        self.time = time

    def _get_tags(self) -> Tags:
        """Return the tags of the update, or of the rate and the noise the equation has."""
        if self.time == 'discrete':
            return self._get_variant_tags((UpdateLaw,))
        classes = (RateLaw,) if self.equation is not None else ()
        return self._get_variant_tags((*classes, NoiseLaw) if self.noise is not None else classes)

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the rate and the noise, or the next value, of the state.

        Args:
            context:
                The namespace of the element.
        """
        super()._prepare(context)
        name = self.state.rstrip("'")
        order = len(self.state) - len(name)
        state = getattr(context.target, name)
        laws: list[BaseLaw] = []
        if self.time == 'discrete' and self.equation is not None:
            laws.append(UpdateLaw(state, self.equation(context)))
        elif self.equation is not None:
            laws.append(RateLaw(state.diff(context.t, max(order, 1)), self.equation(context)))
        if self.time != 'discrete' and self.noise is not None:
            noise = self.noise(context) if callable(self.noise) else self.noise
            laws.append(NoiseLaw(state.diff(context.t, max(order, 1)), noise, convention=self.convention))
        self.laws_: list[BaseLaw] = laws

Equations

The equations are those that symbolic returns for the system with its default parameters.

tumour.Ar: diff(Ar_tumour(t), t) == 1/2*r1_tumour*(tanh(-1/8*(4*p_g_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa_g_tumour) + 1)
tumour.Ac: diff(Ac_tumour(t), t) == -m_tumour*(1/2*tanh(-1/8*(4*p3_tumour - 3*Vbc_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*rv_ref_tumour*Ar_tumour(t)^3))/kappa3_tumour) + 1/2)^theta1_tumour*Ac_tumour(t) - 1/8*(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*(r1_tumour*(tanh(-1/8*(4*p_g_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa_g_tumour) + 1) + 2*Ar_tumour(t))^3 - 8*pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3)*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3)
tumour.Ap: diff(Ap_tumour(t), t) == 1/4*r2_tumour*(tanh(-1/8*(4*p1_tumour + 3*Vbp_tumour(t)/((pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3)*rv_ref_tumour))/kappa1_tumour) + 1)*(tanh(-1/8*(4*p2_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa2_tumour) + 1)*Ap_tumour(t) + 1/8*(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*(r1_tumour*(tanh(-1/8*(4*p_g_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa_g_tumour) + 1) + 2*Ar_tumour(t))^3 - 8*pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3)*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3)
tumour.An: diff(An_tumour(t), t) == m_tumour*(1/2*tanh(-1/8*(4*p3_tumour - 3*Vbc_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*rv_ref_tumour*Ar_tumour(t)^3))/kappa3_tumour) + 1/2)^theta1_tumour*Ac_tumour(t)
tumour.Vbc: diff(Vbc_tumour(t), t) == a1_tumour*(1/2*tanh(-1/8*(4*p4_tumour - 3*Vbc_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*rv_ref_tumour*Ar_tumour(t)^3))/kappa4_tumour) + 1/2)^theta2_tumour*Vbp_tumour(t)*e^(-xi_e_tumour*U_tumour(t)) - 1/8*(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*(r1_tumour*(tanh(-1/8*(4*p_g_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa_g_tumour) + 1) + 2*Ar_tumour(t))^3 - 8*pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3)*r3_tumour*Ar_tumour(t)^beta_tumour*Vbp_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3)
tumour.Vbp: diff(Vbp_tumour(t), t) == a1_tumour*(1/2*tanh(-1/8*(4*p4_tumour - 3*Vbc_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*rv_ref_tumour*Ar_tumour(t)^3))/kappa4_tumour) + 1/2)^theta2_tumour*Vbp_tumour(t)*e^(-xi_e_tumour*U_tumour(t)) + 1/8*(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*(r1_tumour*(tanh(-1/8*(4*p_g_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa_g_tumour) + 1) + 2*Ar_tumour(t))^3 - 8*pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3)*r3_tumour*Ar_tumour(t)^beta_tumour*Vbp_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3) + 1/6*(pi*(r1_tumour*(tanh(-1/8*(4*p_g_tumour + 3*Ap_tumour(t)/(pi*((1/2*tanh(1.5015015015015014*Ar_tumour(t) - 0.7507507507507507) + 1/2)^2.2 - 0.15)^3*Ar_tumour(t)^3 - pi*Ar_tumour(t)^3))/kappa_g_tumour) + 1) + 2*Ar_tumour(t))^3 - 8*pi*Ar_tumour(t)^3)*Vx_tumour
tumour.U: diff(U_tumour(t), t) == -du_tumour*U_tumour(t) + dose_tumour*where(both(t >= 0.0, mod(t, 7.0) < 1.0), 1.0, 0)