Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ABSORPTIVE = ALL_MOLECULES #24

Open
jczech opened this issue Nov 11, 2015 · 0 comments
Open

ABSORPTIVE = ALL_MOLECULES #24

jczech opened this issue Nov 11, 2015 · 0 comments
Labels

Comments

@jczech
Copy link
Contributor

jczech commented Nov 11, 2015

A strange bug can be triggered when creating a surface class where all molecules should be absorbed (i.e. ABSORPTIVE = ALL_MOLECULES). The problem is that volume molecules are not absorbed after the first time step. This seems to require a fairly specific set of conditions to trigger. The following conditions are sufficient (and possibly necessary):

  • Release both surface and volume molecules on an object
  • Assign an absorptive surface class to the ALL region of the object using the ALL_MOLECULES keyword

If you make any of the following changes, the bug will not happen:

  • Assign the surface class to a region which is a subset of the object (e.g. sr region is example below)
  • Release only volume molecules
  • Use the ALL_VOLUME_MOLECULES keyword instead of ALL_MOLECULES

Here is an example of a test that triggers the bug:

ITERATIONS = 1000
TIME_STEP = 1e-06

DEFINE_MOLECULES
{
  vm { DIFFUSION_CONSTANT_3D = 1e-06 }
  sm { DIFFUSION_CONSTANT_2D = 1e-05 }
}

DEFINE_SURFACE_CLASSES
{
  sc
  {
    /*ABSORPTIVE = ALL_VOLUME_MOLECULES;*/
    /*ABSORPTIVE = ALL_SURFACE_MOLECULES;*/
    ABSORPTIVE = ALL_MOLECULES;
  }
}

Cube POLYGON_LIST
{
  VERTEX_LIST
  {
    [  0.1,  0.1, -0.1 ]
    [  0.1, -0.1, -0.1 ]
    [ -0.1, -0.1, -0.1 ]
    [ -0.1,  0.1, -0.1 ]
    [  0.1,  0.1,  0.1 ]
    [  0.1, -0.1,  0.1 ]
    [ -0.1, -0.1,  0.1 ]
    [ -0.1,  0.1,  0.1 ]
  }
  ELEMENT_CONNECTIONS
  {
    [ 0, 1, 2 ]
    [ 4, 7, 5 ]
    [ 0, 4, 1 ]
    [ 1, 5, 2 ]
    [ 2, 6, 7 ]
    [ 4, 0, 7 ]
    [ 3, 0, 2 ]
    [ 4, 5, 1 ]
    [ 0, 3, 7 ]
    [ 7, 6, 5 ]
    [ 3, 2, 7 ]
    [ 5, 6, 2 ]
  }
  DEFINE_SURFACE_REGIONS
  {
    sr
    {
      INCLUDE_ELEMENTS = [4, 10]
    }
  }
}

MODIFY_SURFACE_REGIONS
{
  /*Cube[sr]*/
  Cube[ALL]
  {
    SURFACE_CLASS = sc
  }
}

INSTANTIATE Scene OBJECT
{
  Cube OBJECT Cube {}
  rel_vm RELEASE_SITE
  {
   SHAPE = Scene.Cube
   MOLECULE = vm
   NUMBER_TO_RELEASE = 1000
  }
  rel_sm RELEASE_SITE
  {
   SHAPE = Scene.Cube
   MOLECULE = sm'
   NUMBER_TO_RELEASE = 1000
  }
}

/*VIZ_OUTPUT*/
/*{*/
/*  MODE = CELLBLENDER*/
/*  FILENAME = "./viz_data/Scene"*/
/*  MOLECULES*/
/*  {*/
/*    NAME_LIST {ALL_MOLECULES}*/
/*    ITERATION_NUMBERS {ALL_DATA @ ALL_ITERATIONS}*/
/*  }*/
/*}*/

REACTION_DATA_OUTPUT
{
  STEP=1e-06
  {COUNT[sm,WORLD]}=> "./react_data/sm.World.dat"
  {COUNT[vm,WORLD]}=> "./react_data/vm.World.dat"
}
@jczech jczech added the bug label Nov 11, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant