In this section we overview XML syntax for all the plugins available in CompuCell3D. Plugins are either energy functions, lattice monitors or store user assigned data that CompuCell3D uses internally to configure simulation before it is run.
An example of the plugin that stores user assigned data that is used to configure simulation before it is run is a CellType Plugin. This plugin is responsible for defining cell types and storing cell type information. It is a basic plugin used by virtually every CompuCell simulation. The syntax is straight forward as can be seen in the example below:
Here we have defined three cell types that will be present in the simulation: Medium,Fluid,Wall. Notice that we assign a number – TypeId – to every cell type. It is strongly recommended that TypeId’s are consecutive positive integers (e.g. 0,1,2,3...). Medium is traditionally given TypeId=0 but this is not a requirement. However every CC3D simulation mut define CellType Plugin and include at least Medium specification.
Notice that in the example above cell type “Wall” has extra attribute Freeze=””. This attribute tells CompuCell that cells of “frozen” type will not be altered by spin flips. Freezing certain cell types is a very useful technique in constructing different geometries for simulations or for restricting ways in which cells can move. In the example below we have frozen cell types wall to create tube geometry for fluid flow studies.
One of the most commonly used energy term in the GGH Hamiltonian is a term that restricts variation of single cell volume. Its simplest form can be coded as show below:
25 2.0
By analogy we may define a term which will put similar constraint regarding the surface of the cell:
20 1.5
These two plugins inform CompuCell that the Hamiltonian will have two additional terms associated with volume and surface conservation. That is when spin flip is attempted one cell will increase its volume and another cell will decrease. Thus overall energy of the system may or will change. Volume constraint essentially ensures that cells maintain the volume which close (this depends on thermal fluctuations) to target volume . The role of surface plugin is analogous to volume, that is to “preserve” surface. Note that surface plugin is commented out in the example above.
Energy terms for volume and surface constraints have the form:
Remark:
Notice that flipping a single spin may cause surface change in more that two cells – this is especially true in 3D.
Share with your friends: |