Open
Description
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_MOLECULE
529D
S;*/
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"
}