Skip to content

Commit

Permalink
Merge pull request #200 from kreft/Chains-detached
Browse files Browse the repository at this point in the history
Chains detached
  • Loading branch information
Secondus2 authored Dec 7, 2020
2 parents bef13c7 + e81ce16 commit 62127bd
Show file tree
Hide file tree
Showing 63 changed files with 3,688 additions and 945 deletions.
152 changes: 152 additions & 0 deletions protocol/LinkerTest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8"?>
<document>
<simulation name="test" outputfolder="../results" log="NORMAL" randomSeed="22432423"
comment="This is a file for testing purposes only.">

<timer stepSize="1.0" endOfSimulation="1500.0" />

<speciesLib>
<!-- species/species library The species library contains all agent species
in the simulations. This may include microbial species, plasmid and vector
species, particle species etc. Species states are states that are in principal
identical for all agents of that species. However note that iDynoMiCS 2.0
does allow you to overwrite states on agent level. Thus if a state is defined
both on species level and on agent level, the agent state will be used in
the simulation. small test -->
<species name="AOB">
<aspect name="reactions" type="PRIMARY" class="InstantiableList">
<list class="RegularReaction" nodeLabel="reaction" entryClass="RegularReaction" keyClass="String" keyLabel="name">
<reaction name="testReact">
<expression value="bioMass * solute1 * k">
<constant name="k" value="0.0025" />
</expression>
<stoichiometric component="bioMass" coefficient="1.0" />
<stoichiometric component="solute1" coefficient="-5.0" />
<stoichiometric component="solute2" coefficient="0.5" />
</reaction>
</list>
</aspect>
<aspect name="pigment" type="PRIMARY" class="String" value="GREEN" />
<speciesModule name="coccoid" />
</species>
<species name="coccoid">
<aspect name="surfaces" type="CALCULATED" class="AgentSurfaces" />
<aspect name="morphology" type="PRIMARY" class="String" value="coccoid" />
<!-- NOTE for testing purposes as stateExpression -->
<aspect name="volume" type="CALCULATED" class="SimpleVolumeState" />
<aspect name="radius" type="CALCULATED" class="CoccoidRadius" />
<aspect name="divide" type="EVENT" class="FillialDivision" />
<aspect name="directionalDivision" class="Boolean" value="true" />
<aspect name="divisionMass" class="Double" value="0.3" />
<aspect name="#isLocated" type="PRIMARY" class="Boolean" value="true" />
<aspect name="updateBody" type="EVENT" class="UpdateBody" />
</species>
</speciesLib>

<compartment name="second" tree="SPLITTREE">
<shape class="Rectangle">
<dimension name="X" isCyclic="false" targetResolution="1.0" max="16.0">
</dimension>
<dimension name="Y" isCyclic="false" targetResolution="1.0" max="16.0">
</dimension>
</shape>
<solutes>
<solute name="solute1" concentration="1.0" defaultDiffusivity="1.0" biofilmDiffusivity="0.5"/>
<solute name="solute2" concentration="0.0" defaultDiffusivity="1.0" biofilmDiffusivity="0.5" />
</solutes>
<reactions>
</reactions>
<agents>
<agent>
<aspect name="species" type="PRIMARY" class="String" value="AOB" />
<aspect name="mass" class="InstantiableMap">
<map entryClass="Double" keyType="String">
<item key="bioMass" value="0.2" />
</map>
</aspect>
<aspect name="density" type="PRIMARY" class="Double" value="1" />
<aspect name="pigment" type="PRIMARY" class="String" value="RED" />
<aspect name="body" type="PRIMARY" class="Body">
<point position="14.2, 14.2" />
</aspect>
</agent>
<agent>
<aspect name="species" type="PRIMARY" class="String" value="AOB" />
<aspect name="mass" class="InstantiableMap">
<map entryClass="Double" keyType="String">
<item key="bioMass" value="0.2" />
</map>
</aspect>
<aspect name="density" type="PRIMARY" class="Double" value="1" />
<aspect name="pigment" type="PRIMARY" class="String" value="BLUE" />
<aspect name="body" type="PRIMARY" class="Body">
<point position="12.0, 5.3" />
</aspect>
</agent>
<agent>
<aspect name="species" type="PRIMARY" class="String" value="AOB" />
<aspect name="mass" class="InstantiableMap">
<map entryClass="Double" keyType="String">
<item key="bioMass" value="0.2" />
</map>
</aspect>
<aspect name="density" type="PRIMARY" class="Double" value="1.0" />
<aspect name="pigment" type="PRIMARY" class="String" value="GREEN" />
<aspect name="body" type="PRIMARY" class="Body">
<point position="5.3, 12.2" />
</aspect>
</agent>
</agents>
<processManagers>
<process name="svgWriter" class="GraphicalOutput" priority="-3"
firstStep="0.0" timerStepSize="1.0">
<aspect name="outputWriter" type="PRIMARY" class="String" value="SvgExport" />
</process>
<process name="povWriter" class="GraphicalOutput" priority="-3"
firstStep="0.0" timerStepSize="1.0">
<aspect name="outputWriter" type="PRIMARY" class="String" value="PovExport" />
</process>
<process name="svgWriter" class="GraphicalOutput" priority="-3"
firstStep="0.0" timerStepSize="1.0">
<aspect name="solute" type="PRIMARY" class="String" value="solute1" />
<aspect name="maxConcentration" type="PRIMARY" class="Double" value="2.0" />
<aspect name="outputWriter" type="PRIMARY" class="String" value="SvgExport" />
</process>
<process name="svgWriter" class="GraphicalOutput" priority="-3"
firstStep="0.0" timerStepSize="1.0">
<aspect name="maxConcentration" type="PRIMARY" class="Double" value="2.0" />
<aspect name="solute" type="PRIMARY" class="String" value="solute2" />
<aspect name="outputWriter" type="PRIMARY" class="String" value="SvgExport" />
</process>
<process name="svgWriter" class="GraphicalOutput" priority="-3"
firstStep="0.0" timerStepSize="1.0">
<aspect name="maxConcentration" type="PRIMARY" class="Double" value="2.0" />
<aspect name="solute" type="PRIMARY" class="String" value="solute2" />
<aspect name="arrayType" type="PRIMARY" class="String" value="PRODUCTIONRATE" />
<aspect name="outputWriter" type="PRIMARY" class="String" value="SvgExport" />
</process>
<process name="svgWriter" class="GraphicalOutput" priority="-3"
firstStep="0.0" timerStepSize="1.0">
<aspect name="maxConcentration" type="PRIMARY" class="Double" value="1.0" />
<aspect name="solute" type="PRIMARY" class="String" value="solute1" />
<aspect name="arrayType" type="PRIMARY" class="String" value="DIFFUSIVITY" />
<aspect name="outputWriter" type="PRIMARY" class="String" value="SvgExport" />
</process>
<process name="agentRelax" class="AgentRelaxation" priority="-2"
firstStep="0.0" timerStepSize="0.5">
<aspect name="maxMovement" type="PRIMARY" class="Double" value="0.01" />
<aspect name="stressThreshold" type="PRIMARY" class="Double" value="0.0" />
<aspect name="relaxationMethod" type="PRIMARY" class="String" value="EULER" />
</process>
<process name="solveDiffusionTransient" class="SolveDiffusionTransient" priority="-1"
firstStep="0.0" timerStepSize="0.5">
</process>
<process name="summary" class="processManager.library.Summary" priority="2"
firstStep="0.0" timerStepSize="0.5">
<aspect name="tableSpecification" type="PRIMARY" class="String"
value="0 ~ mass | mass > 0.2, mass > 0.15, mass > 0.1, mass > 0.0 | species = AOB | pigment = RED, pigment = BLUE, pigment = GREEN" />
</process>
</processManagers>
</compartment>
</simulation>
</document>
194 changes: 194 additions & 0 deletions protocol/Strep/3D_strep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<document>
<simulation name="strep" outputfolder="../results" log="EXPRESSIVE" randomSeed="124324235"
comment="this is a file for testing purposes only.">
<!-- minutes -->
<timer stepSize="5.0" endOfSimulation="432000.0" />
<speciesLib>
<species name="heterotroph">
<speciesModule name="coccoid" />
<aspect name="reactions" type="PRIMARY" class="InstantiableList">
<list class="RegularReaction" nodeLabel="reaction"
entryClass="RegularReaction" keyClass="String" keyLabel="name">
<reaction name="growth">
<expression value="biomass * mumax *
( COD / ( COD + Ks ) ) *
( oxygen / ( oxygen + Kox ) )">
<!-- pg/µm3 -->
<constant name="Ks" value="35.00E-06" />
<constant name="Kox" value="3.00E-07" />
<!-- per minute -->
<constant name="mumax" value="5.5E-03" />
</expression>
<stoichiometric component="biomass" coefficient="1.0" />
<stoichiometric component="COD" coefficient="-2.63" />
<stoichiometric component="oxygen" coefficient="-1.40" />
</reaction>
<reaction name="decay">
<expression value="biomass * ( b )">
<!-- pg/µm3 -->
<!-- per minute -->
<constant name="b" value="1.0E-5" />
</expression>
<stoichiometric component="biomass" coefficient="-1.0" />
</reaction>
</list>
</aspect>
</species>

<species name="autotroph">
<speciesModule name="coccoid" />
<aspect name="reactions" type="PRIMARY" class="InstantiableList">
<list class="RegularReaction" nodeLabel="reaction"
entryClass="RegularReaction" keyClass="String" keyLabel="name">
<reaction name="growth">
<expression value="biomass * mumax *
( COD / ( COD + Ks ) ) *
( oxygen / ( oxygen + Kox ) )">
<!-- pg/µm3 -->
<constant name="Ks" value="35.00E-06" />
<constant name="Kox" value="3.00E-07" />
<!-- per minute -->
<constant name="mumax" value="5.5E-03" />
</expression>
<stoichiometric component="biomass" coefficient="1.0" />
<stoichiometric component="COD" coefficient="-2.63" />
<stoichiometric component="oxygen" coefficient="-1.40" />
</reaction>
<reaction name="decay">
<expression value="biomass * ( b )">
<!-- pg/µm3 -->
<!-- per minute -->
<constant name="b" value="1.0E-5" />
</expression>
<stoichiometric component="biomass" coefficient="-1.0" />
</reaction>
</list>
</aspect>
</species>

<species name="coccoid">
<aspect name="density" type="PRIMARY" class="Double" value="0.015" />
<aspect name="surfaces" type="CALCULATED" class="AgentSurfaces" />
<aspect name="divisionMass" type="PRIMARY" class="Double" value="2.0" />
<aspect name="divide" type="EVENT" class="FillialDivision" />
<aspect name="directionalDivision" class="Boolean" value="true" />
<aspect name="updateBody" type="EVENT" class="UpdateBody" />
<aspect name="volume" type="CALCULATED" class="SimpleVolumeState" />
<aspect name="radius" type="CALCULATED" class="CoccoidRadius" />
<aspect name="torsionStiffness" class="Double" value="1e6" />
<aspect name="torsionFunction" class="Expression" value="stiffness * dif * dif * 1000"/>
<aspect name="linearStiffness" class="Double" value="1e6" />
<aspect name="linearFunction" class="Expression" value="stiffness * dh * 10.0 "/>

</species>

</speciesLib>
<compartment name="chemostat">
<shape class="Dimensionless" volume="1e9">
<boundary class="constantConcentrationToChemostat" volumeFlowRate="1.1e7">
<solute name="ammonium" concentration="6.00E-06"/>
<solute name="oxygen" concentration="1.0E-5"/>
<solute name="COD" concentration="3.0E-5" />
</boundary>
<boundary class="chemostatOut" agentRemoval="false" constantVolume="true" >
</boundary>
</shape>
<solutes>
<!-- pg / µm3 -->
<solute name="ammonium" concentration="6.0E-06" defaultDiffusivity="118055.556" />
<solute name="oxygen" concentration="1.0E-5" defaultDiffusivity="138888.889" />
<solute name="COD" concentration="3.0E-5" defaultDiffusivity="69444.444" />
</solutes>
<processManagers>
<process name="solveChemostat" class="ChemostatSolver" priority="0"
firstStep="0.0">
<aspect name="soluteNames" type="PRIMARY" class="String[]" value="ammonium,COD" />
<aspect name="hMax" type="PRIMARY" class="Double" value="6.0" />
<aspect name="solver" type="PRIMARY" class="String" value="heun" />
<aspect name="tolerance" class="Double" value="1.0E-6" />
</process>
</processManagers>
</compartment>
<compartment name="first">
<shape class="Cuboid">
<!-- µm -->
<dimension name="X" isCyclic="true" targetResolution="25.0" max="250.0"/>
<dimension name="Y" isCyclic="false" targetResolution="25.0" max="250.0">
<boundary extreme="1" class="BiofilmBoundaryLayer" partnerCompartment="chemostat" layerThickness = "0.0"/>
</dimension>
<dimension name="Z" isCyclic="true" targetResolution="25.0" max="250.0"/>
</shape>
<solutes>
<!-- Initial concentrations pg / µm2 -->
<solute name="COD" concentration="3e-5" defaultDiffusivity="69444.444" />
<solute name="ammonium" concentration="6e-6" defaultDiffusivity="118055.556"/>
<solute name="oxygen" concentration="1e-5" defaultDiffusivity="138888.889"/>
</solutes>
<reactions>
</reactions>
<spawn class="randomSpawner" domain="250.0, 50.0, 250.0" priority="0" number="1" morphology="COCCOID">
<templateAgent>
<aspect name="species" type="PRIMARY" class="String" value="heterotroph" />
<aspect name="mass" class="InstantiableMap">
<map entryClass="Double" keyType="String">
<item key="biomass" value="2.0" />
<item key="inert" value="0.0" />
</map>
</aspect>
</templateAgent>
</spawn>
<!-- <agent identity="1" >
<aspect name="species" type="PRIMARY" class="String" value="heterotroph" />
<aspect name="mass" class="InstantiableMap">
<map entryClass="Double" keyType="String">
<item key="biomass" value="2.0" />
<item key="inert" value="0.0" />
</map>
</aspect>
<aspect name="body" class="Body" >
<body morphology="COCCOID" >
<point position="120.0, 120.0, 120.0" />
</body>
</aspect>
</agent> -->
<spawn class="randomSpawner" domain="200.0, 150.0, 200.0" priority="0" number="0" morphology="COCCOID">
<templateAgent>
<aspect name="species" type="PRIMARY" class="String" value="autotroph" />
<aspect name="mass" class="InstantiableMap">
<map entryClass="Double" keyType="String">
<item key="biomass" value="2.0" />
<item key="inert" value="0.0" />
</map>
</aspect>
</templateAgent>
</spawn>
<processManagers>
<!-- minute -->
<process name="agentRelax" class="AgentRelaxation" priority="0"
firstStep="0.0">
<!-- µm -->
<aspect name="maxMovement" type="PRIMARY" class="Double" value="0.1" />
<aspect name="maxIterations" type="PRIMARY" class="Integer" value="100" />
<aspect name="relaxationMethod" type="PRIMARY" class="String" value="EULER" />
<aspect name="agentDecompression" type="PRIMARY" class="Boolean" value="FALSE" />
<aspect name="decompressionThreshold" type="PRIMARY" class="Double" value="20000000.0" />
<aspect name="decompressionCellLength" type="PRIMARY" class="Double" value="10.0" />
<aspect name="traversingFraction" class="Double" value="0.10" />
<aspect name="stressThreshold" type="PRIMARY" class="Double" value="1e8" />
</process>
<!-- minute -->
<process name="SolveDiffusionSteadyState" class="SolveDiffusionSteadyState" priority="-1"
firstStep="0.0">
<aspect name="vCycles" class="Integer" value="1" />
<aspect name="preSteps" class="Integer" value="10" />
<aspect name="coarseSteps" class="Integer" value="16" />
<aspect name="postSteps" class="Integer" value="10" />
<!-- In principle they are not all the same but all in the
same order of magnitude ~ 2.0e-4 m2.day-1 values here in
µm^2/ minute-->
</process>
</processManagers>
</compartment>
</simulation>
</document>
Loading

0 comments on commit 62127bd

Please sign in to comment.