Skip to content

Using Dynamic Geometries

Jacob Czech edited this page Jun 19, 2015 · 5 revisions

Dynamic Geometries

This is a brief write-up that explains how to use dynamic geometries. This option is currently only available in the dynamic_meshes branch.

In your main MDL, you should include a line like this:

DYNAMIC_GEOMETRY = "list_of_geometry.mdl

The entire main.mdl could be as simple as this:

TIME_STEP = 1E-5
ITERATIONS = 152

DYNAMIC_GEOMETRY = "list_of_geometry.txt"

DEFINE_MOLECULES { vm { DIFFUSION_CONSTANT_3D = 1e-05 } }

INCLUDE_FILE = "divide.001.mdl"

INSTANTIATE Scene OBJECT {
  Icosphere OBJECT Icosphere{}
  Release_Site RELEASE_SITE {
    SHAPE = Scene.Icosphere
    MOLECULE = vm
    NUMBER_TO_RELEASE = 100
  }
}

The list_of_geometry.txt file is formatted similar to a variable rate constant file. Time is in one column and a file name is in the other. The contents of it should be similar to this:

1e-05 divide.002.mdl
2e-05 divide.003.mdl
3e-05 divide.004.mdl
4e-05 divide.005.mdl
5e-05 divide.006.mdl
6e-05 divide.007.mdl
7e-05 divide.008.mdl
8e-05 divide.009.mdl
9e-05 divide.010.mdl
0.0001 divide.011.mdl

One of these geometry files (e.g. divide.002.mdl) should only contain the polygon objects and a new instantiation block (and optionally partitions) like this:

Icosphere POLYGON_LIST {
  VERTEX_LIST {
    [ 1.30580268820069e-11, -2.61160459374293e-15, -0.999780893325806 ]
    [ 0.723563373088837, -0.525693416595459, -0.447192370891571 ]
    ...
    [ 0.370742291212082, 0.761781990528107, 0.531000852584839 ]
    [ 0.318294435739517, 0.795699238777161, 0.515025854110718 ]
  }
  ELEMENT_CONNECTIONS {
    [ 0, 27, 26 ]
    [ 1, 41, 71 ]
    ...
    [ 2561, 372, 461 ]
    [ 372, 9, 461 ]
  }
}

INSTANTIATE Scene OBJECT {
  Icosphere OBJECT Icosphere{}
}

Using other MDL commands in one of these "geometry" files may or may not work.

Clone this wiki locally