<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="4">
    <Description>
        <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:		Supplementary 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>
        <Title>Diffusion1b</Title>
    </Description>
    <Space>
        <Lattice class="linear">
            <Neighborhood>
                <Order>1</Order>
            </Neighborhood>
            <Size symbol="size" value="100, 0, 0"/>
            <BoundaryConditions>
                <Condition type="constant" boundary="x"/>
                <Condition type="constant" boundary="-x"/>
            </BoundaryConditions>
            <NodeLength symbol="dx" value="0.1"/>
        </Lattice>
        <SpaceSymbol symbol="space"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="100"/>
        <TimeSymbol symbol="time"/>
    </Time>
    <Global>
        <Field symbol="c" name="attractant" value="0">
            <Diffusion rate="0.5"/>
            <BoundaryValue boundary="x" value="5.0"/>
        </Field>
        <System time-step="0.5" solver="Runge-Kutta [fixed, O(4)]">
            <DiffEqn symbol-ref="c" name="attractant">
                <Expression>-k*c</Expression>
            </DiffEqn>
            <Constant symbol="k" name="decay rate" value="0.001"/>
        </System>
        <Function symbol="x">
            <Expression>dx*space.x</Expression>
        </Function>
    </Global>
    <Analysis>
        <Logger time-step="5" name="chemical profile">
            <Input>
                <Symbol symbol-ref="c"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot title="chemical profile">
                    <Style style="lines"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="x"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="c"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
        <ModelGraph format="svg" reduced="false" include-tags="#untagged"/>
    </Analysis>
</MorpheusModel>
