Persistent Identifier

Use this permanent link to cite or share this Morpheus model:

Simulations of a diffusing field


Here, we build up a simulation of diffusion over three successive files by:

  1. Starting with 1D and a short time scale in Diffusion1a_main.xml ,
  2. simulating for longer times in Diffusion1b.xml and
  3. extending to 2D in Diffusion2a.xml .


Chemical diffusion and decay are easily simulated in Morpheus in 1D or 2D. We demonstrate the numerical simulation of the PDE and boundary conditions:

$$\begin{align} \frac{\partial c}{\partial t} = D \frac{\partial^2 c}{\partial x^2} - kc \quad c(0) = 0, c(L) = 5 \end{align}$$


Building up a simulation of diffusion in Morpheus: (a) Starting with 1D and short time scale (Diffusion1a_main.xml), (b) for longer times (Diffusion1b.xml), and (c) extension to 2D (Diffusion2a.xml).


Get this model via:

  • Morpheus-Link or
  •  Download: Diffusion1a_main.xml
  • XML Preview

    <?xml version='1.0' encoding='UTF-8'?>
    <MorpheusModel version="4">
            <Details>Full title:		Diffusion
    Authors:		L. Edelstein-Keshet
    Contributors:	Y. Xiao
    Date:		23.06.2022
    Software:		Morpheus (open-source). Download from https://morpheus.gitlab.io
    Model ID:		https://identifiers.org/morpheus/M2017
    File type:		Main model
    Reference:		L. Edelstein-Keshet: Mathematical Models in Cell Biology
    Comment:		A 1D domain with a chemical that diffuses at rate D and decays at rate k. Simple time plots in 1D of the chemical to show its diffusion into the domain.</Details>
            <Lattice class="linear">
                <Size symbol="size" value="100, 0, 0"/>
                    <Condition type="constant" boundary="x"/>
                    <Condition type="constant" boundary="-x"/>
            <SpaceSymbol symbol="space"/>
            <StartTime value="0"/>
            <StopTime value="50"/>
            <TimeSymbol symbol="time"/>
            <Field symbol="c" value="0">
                <Diffusion rate="0.5"/>
                <BoundaryValue boundary="x" value="5.0"/>
            <System time-step="0.5" solver="Runge-Kutta [fixed, O(4)]">
                <DiffEqn symbol-ref="c" name="attractant">
                <Constant symbol="k" name="decay rate" value="0.001"/>
            <Logger time-step="5" name="chemical profile">
                    <Symbol symbol-ref="c"/>
                        <Style style="lines"/>
                        <Terminal terminal="png"/>
                            <Symbol symbol-ref="space.x"/>
                            <Symbol symbol-ref="c"/>
            <ModelGraph format="svg" reduced="false" include-tags="#untagged"/>

    Model Graph
    Model Graph


    Files associated with this model: