/*************************************************************************** * Test-13: Surface reactants cannot search for reaction partners * across restrictive region borders. * * If all of the reactants are behind restrictive region border * (REFLECTIVE/ABSORPTIVE) the reaction should not happen. * Restrictive border is considered "inside-out" when it is * e.g. REFLECTIVE relative to the molecule's own region, * or "outside-in" when REFLECTIVE to the neighbor region. * * We test here the property that reactant cannot look * for potential reaction partners across the restrictive * region border. Static surface molecules occupy all * available slots on the meshes. * * Note: all molecule counts except for "box_5.dat" and "box_8.dat" * should contain all zeros. * * Author: Boris Kaminsky * Date: 2011-06-27 * ****************************************************************************/ basename = "13-restricted_border_reaction" countdir = "dat/" & basename & "/" dt = 1e-6 TIME_STEP = dt TIME_STEP_MAX = dt ITERATIONS = 100 EFFECTOR_GRID_DENSITY = 10000 VACANCY_SEARCH_DISTANCE = 1 DEFINE_MOLECULES { /* for bimolecular reaction */ b_A {DIFFUSION_CONSTANT_2D = 0} b_B {DIFFUSION_CONSTANT_2D = 0} /* for trimolecular reaction */ t_A {DIFFUSION_CONSTANT_2D = 0} t_B {DIFFUSION_CONSTANT_2D = 0} t_C {DIFFUSION_CONSTANT_2D = 0} /* for products */ D {DIFFUSION_CONSTANT_2D = 0} } DEFINE_SURFACE_CLASSES { refl_b_A { REFLECTIVE = b_A; } absorb_b_B { ABSORPTIVE = b_B; } refl_t_AB { REFLECTIVE = t_A; REFLECTIVE = t_B; } } DEFINE_REACTIONS { b_A; + b_B; -> D; [1e2] t_A; + t_B; + t_C; -> D; [1e-2] } /* bimolecular reaction when b_A has restrictive region border property "inside_out" */ box_1 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ b_A' = 450 } SURFACE_CLASS = refl_b_A } r2{ ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK] MOLECULE_NUMBER{ b_B' = 2250 } } } } /* bimolecular reaction when b_A has restrictive region border property "outside_in" */ box_2 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ b_A' = 450 } } r2{ ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK] MOLECULE_NUMBER{ b_B' = 2250 } SURFACE_CLASS = refl_b_A } } TRANSLATE = [0.5, 0, 0] } /* trimolecular reaction when b_A and b_B have restrictive region border property "inside_out" */ box_3 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ t_A' = 225 } MOLECULE_NUMBER{ t_B' = 225 } SURFACE_CLASS = refl_t_AB } r2{ ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK] MOLECULE_NUMBER{ t_C' = 2250 } } } TRANSLATE = [1.0, 0, 0] } /* trimolecular reaction when b_A and b_B have restrictive region border property "outside_in" */ box_4 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ t_A' = 225 } MOLECULE_NUMBER{ t_B' = 225 } } r2{ ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK] MOLECULE_NUMBER{ t_C' = 2250 } SURFACE_CLASS = refl_t_AB } } TRANSLATE = [1.5, 0, 0] } /* "box_5" is a copy of "box_1" only the restrictive region border is removed */ box_5 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ b_A' = 450 } } r2{ ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK] MOLECULE_NUMBER{ b_B' = 2250 } } } TRANSLATE = [2.0, 0, 0] } /* bimolecular reaction when b_A has restrictive region border property "inside_out". Also there are multiple overlapped regions */ box_6 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ b_A' = 450 } SURFACE_CLASS = refl_b_A } r2{ ELEMENT_LIST = [TOP] MOLECULE_NUMBER{ b_B' = 450 } } r3{ ELEMENT_LIST = [TOP, LEFT, RIGHT] } r4{ ELEMENT_LIST = [TOP] } r5{ ELEMENT_LIST = [RIGHT] } } TRANSLATE = [2.5, 0, 0] } /* bimolecular reaction when b_B has restrictive region border property "outside_in". Also there are multiple overlapped regions */ box_7 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ b_A' = 450 } SURFACE_CLASS = absorb_b_B } r2{ ELEMENT_LIST = [TOP] MOLECULE_NUMBER{ b_B' = 450 } } r3{ ELEMENT_LIST = [TOP, RIGHT] SURFACE_CLASS = refl_b_A } } TRANSLATE = [3.0, 0, 0] } /* bimolecular reaction when b_A has restrictive region border property "inside_out". Also there are overlapped regions and restricted border constitutes the outer boundary for both regions. */ box_8 BOX { CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1] DEFINE_SURFACE_REGIONS { r1{ ELEMENT_LIST = [RIGHT] MOLECULE_NUMBER{ b_A' = 450 } } r2{ ELEMENT_LIST = [TOP] MOLECULE_NUMBER{ b_B' = 450 } } r3{ ELEMENT_LIST = [TOP, RIGHT] SURFACE_CLASS = refl_b_A } } TRANSLATE = [3.5, 0, 0] } INSTANTIATE world OBJECT { box_1 OBJECT box_1 {} box_2 OBJECT box_2 {} box_3 OBJECT box_3 {} box_4 OBJECT box_4 {} box_5 OBJECT box_5 {} box_6 OBJECT box_6 {} box_7 OBJECT box_7 {} box_8 OBJECT box_8 {} } REACTION_DATA_OUTPUT { STEP = dt HEADER = "# " { COUNT [D, world.box_1]: "D" } => countdir & "box_1.dat" { COUNT [D, world.box_2]: "D" } => countdir & "box_2.dat" { COUNT [D, world.box_3]: "D" } => countdir & "box_3.dat" { COUNT [D, world.box_4]: "D" } => countdir & "box_4.dat" { COUNT [D, world.box_6]: "D" } => countdir & "box_6.dat" { COUNT [D, world.box_7]: "D" } => countdir & "box_7.dat" } REACTION_DATA_OUTPUT { ITERATION_LIST = [[90 TO 100 STEP 1]] { COUNT [D, world.box_5]: "D" } => countdir & "box_5.dat" { COUNT [D, world.box_8]: "D" } => countdir & "box_8.dat" }