CompuCell3d manual and Tutorial Version 2


IX.2.12. PolarizationVector Plugin



Download 6.67 Mb.
Page37/66
Date26.04.2018
Size6.67 Mb.
#46944
1   ...   33   34   35   36   37   38   39   40   ...   66

IX.2.12. PolarizationVector Plugin

PolarizationVector plugin is a simple plugin whose only task is to ensure that each cell in CompuCell3D simulation has as its attribute 3-component vector of floating point numbers. This plugin is normally used in together with CellOrientation but it also can be reused in other applications, assuming that we do not use CellOrientation plugin at the same time. The XML syntax is very simple:


To access or modify polarization vector requires use of Python scripting.


self.polarizationPlugin.getPolarizationVector(cell)
or to change values of the polarization vector:
self.polarizationPlugin.getPolarizationVector(cell,0.1,0.2,0.3)

        1. IX.2.13. CenterOfMass Plugin

This plugin monitors changes n the lattice and updates centroids of the cell:



where i denotes pixels belonging to a given cell. To obtain coordinates of a center of mass f a given cell you need to divide centroids by cell volume:


This plugin is aware of boundary conditions and centroids are calculated properly regardless which boundary conditions are used. The XML syntax is very simple:


        1. IX.2.12. Contact Energy


Energy calculations for the foam simulation are based on the boundary or contact energy between cells (or surface tension, if you prefer).

Together with volume constraint contact energy is one of the most commonly used energy terms in the GGH Hamiltonian. In essence it describes how cells "stick" to each other.

The explicit formula for the energy is:



,

where i and j label two neighboring lattice sites ,'s denote cell Ids,'s denote cell types .

In the case of foam simulation the total energy of the foam is simply the total boundary length times the surface tension (here defined to be 2J).


Once again, in the above formula, you need to differentiate between cell types and cell Ids. This formula shows that cell types and cell Ids are not the same. The Contact plugin in the .xml file, defines the energy per unit area of contact between cells of different types () and the interaction range (NeighborOrder) of the contact:


3 0 0 2

In this case, the interaction range is 2, thus only up to second nearest neighbor pixels

of a pixel undergoing a change or closer will be used to calculate contact energy change. Foam cells have contact energy per unit area of 3 and Foam and Medium as well as Medium and Medium have contact energy of 0 per unit area.



        1. Download 6.67 Mb.

          Share with your friends:
1   ...   33   34   35   36   37   38   39   40   ...   66




The database is protected by copyright ©ininet.org 2024
send message

    Main page