Class Diffusion

  • All Implemented Interfaces:
    UpdateModule, Runnable

    public class Diffusion
    extends ConcentrationBasedModule<EntityDeltaFunction>
    Diffusion is the fundamental force governing the random movement of molecules in cells. As a ConcentrationBasedModule it has the DependentUpdate scope and is EntitySpecific. The module is only applied for automaton nodes for the entities specified during the build process (via Diffusion.DiffusionBuilder). Diffusion is parametrized by the Diffusivity Feature, therefore Diffusivity must be assigned to each entity or a FeatureProvider will try to resolve it.
      // define the feature to parametrize the diffusion
      Diffusivity diffusivity = new Diffusivity(Quantities.getValue(2.28E-05, SQUARE_CENTIMETRE_PER_SECOND),
             Evidence.MANUALLY_ANNOTATED);
      // assign it to the chemical entity
      SmallMolecule ammonia = new SmallMolecule.Builder("ammonia")
             .name("ammonia")
             .assignFeature(diffusivity)
             .build();
      // create the module
      Diffusion diffusion = Diffusion.inSimulation(simulation)
             .identifier("ammonia diffusion")
             .onlyFor(ammonia)
             .build(); 
    Author:
    cl