13-restricted_border_reaction.mdl 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. /***************************************************************************
  2. * Test-13: Surface reactants cannot search for reaction partners
  3. * across restrictive region borders.
  4. *
  5. * If all of the reactants are behind restrictive region border
  6. * (REFLECTIVE/ABSORPTIVE) the reaction should not happen.
  7. * Restrictive border is considered "inside-out" when it is
  8. * e.g. REFLECTIVE relative to the molecule's own region,
  9. * or "outside-in" when REFLECTIVE to the neighbor region.
  10. *
  11. * We test here the property that reactant cannot look
  12. * for potential reaction partners across the restrictive
  13. * region border. Static surface molecules occupy all
  14. * available slots on the meshes.
  15. *
  16. * Note: all molecule counts except for "box_5.dat" and "box_8.dat"
  17. * should contain all zeros.
  18. *
  19. * Author: Boris Kaminsky <[email protected]>
  20. * Date: 2011-06-27
  21. *
  22. ****************************************************************************/
  23. basename = "13-restricted_border_reaction"
  24. countdir = "dat/" & basename & "/"
  25. dt = 1e-6
  26. TIME_STEP = dt
  27. TIME_STEP_MAX = dt
  28. ITERATIONS = 100
  29. EFFECTOR_GRID_DENSITY = 10000
  30. VACANCY_SEARCH_DISTANCE = 1
  31. DEFINE_MOLECULES
  32. {
  33. /* for bimolecular reaction */
  34. b_A {DIFFUSION_CONSTANT_2D = 0}
  35. b_B {DIFFUSION_CONSTANT_2D = 0}
  36. /* for trimolecular reaction */
  37. t_A {DIFFUSION_CONSTANT_2D = 0}
  38. t_B {DIFFUSION_CONSTANT_2D = 0}
  39. t_C {DIFFUSION_CONSTANT_2D = 0}
  40. /* for products */
  41. D {DIFFUSION_CONSTANT_2D = 0}
  42. }
  43. DEFINE_SURFACE_CLASSES
  44. {
  45. refl_b_A {
  46. REFLECTIVE = b_A;
  47. }
  48. absorb_b_B {
  49. ABSORPTIVE = b_B;
  50. }
  51. refl_t_AB {
  52. REFLECTIVE = t_A;
  53. REFLECTIVE = t_B;
  54. }
  55. }
  56. DEFINE_REACTIONS
  57. {
  58. b_A; + b_B; -> D; [1e2]
  59. t_A; + t_B; + t_C; -> D; [1e-2]
  60. }
  61. /* bimolecular reaction when b_A has restrictive
  62. region border property "inside_out" */
  63. box_1 BOX
  64. {
  65. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  66. DEFINE_SURFACE_REGIONS
  67. {
  68. r1{
  69. ELEMENT_LIST = [RIGHT]
  70. MOLECULE_NUMBER{
  71. b_A' = 450
  72. }
  73. SURFACE_CLASS = refl_b_A
  74. }
  75. r2{
  76. ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK]
  77. MOLECULE_NUMBER{
  78. b_B' = 2250
  79. }
  80. }
  81. }
  82. }
  83. /* bimolecular reaction when b_A has restrictive
  84. region border property "outside_in" */
  85. box_2 BOX
  86. {
  87. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  88. DEFINE_SURFACE_REGIONS
  89. {
  90. r1{
  91. ELEMENT_LIST = [RIGHT]
  92. MOLECULE_NUMBER{
  93. b_A' = 450
  94. }
  95. }
  96. r2{
  97. ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK]
  98. MOLECULE_NUMBER{
  99. b_B' = 2250
  100. }
  101. SURFACE_CLASS = refl_b_A
  102. }
  103. }
  104. TRANSLATE = [0.5, 0, 0]
  105. }
  106. /* trimolecular reaction when b_A and b_B have restrictive
  107. region border property "inside_out" */
  108. box_3 BOX
  109. {
  110. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  111. DEFINE_SURFACE_REGIONS
  112. {
  113. r1{
  114. ELEMENT_LIST = [RIGHT]
  115. MOLECULE_NUMBER{
  116. t_A' = 225
  117. }
  118. MOLECULE_NUMBER{
  119. t_B' = 225
  120. }
  121. SURFACE_CLASS = refl_t_AB
  122. }
  123. r2{
  124. ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK]
  125. MOLECULE_NUMBER{
  126. t_C' = 2250
  127. }
  128. }
  129. }
  130. TRANSLATE = [1.0, 0, 0]
  131. }
  132. /* trimolecular reaction when b_A and b_B have restrictive
  133. region border property "outside_in" */
  134. box_4 BOX
  135. {
  136. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  137. DEFINE_SURFACE_REGIONS
  138. {
  139. r1{
  140. ELEMENT_LIST = [RIGHT]
  141. MOLECULE_NUMBER{
  142. t_A' = 225
  143. }
  144. MOLECULE_NUMBER{
  145. t_B' = 225
  146. }
  147. }
  148. r2{
  149. ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK]
  150. MOLECULE_NUMBER{
  151. t_C' = 2250
  152. }
  153. SURFACE_CLASS = refl_t_AB
  154. }
  155. }
  156. TRANSLATE = [1.5, 0, 0]
  157. }
  158. /* "box_5" is a copy of "box_1" only
  159. the restrictive region border is removed */
  160. box_5 BOX
  161. {
  162. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  163. DEFINE_SURFACE_REGIONS
  164. {
  165. r1{
  166. ELEMENT_LIST = [RIGHT]
  167. MOLECULE_NUMBER{
  168. b_A' = 450
  169. }
  170. }
  171. r2{
  172. ELEMENT_LIST = [TOP, BOTTOM, LEFT, FRONT, BACK]
  173. MOLECULE_NUMBER{
  174. b_B' = 2250
  175. }
  176. }
  177. }
  178. TRANSLATE = [2.0, 0, 0]
  179. }
  180. /* bimolecular reaction when b_A has restrictive
  181. region border property "inside_out".
  182. Also there are multiple overlapped regions
  183. */
  184. box_6 BOX
  185. {
  186. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  187. DEFINE_SURFACE_REGIONS
  188. {
  189. r1{
  190. ELEMENT_LIST = [RIGHT]
  191. MOLECULE_NUMBER{
  192. b_A' = 450
  193. }
  194. SURFACE_CLASS = refl_b_A
  195. }
  196. r2{
  197. ELEMENT_LIST = [TOP]
  198. MOLECULE_NUMBER{
  199. b_B' = 450
  200. }
  201. }
  202. r3{
  203. ELEMENT_LIST = [TOP, LEFT, RIGHT]
  204. }
  205. r4{
  206. ELEMENT_LIST = [TOP]
  207. }
  208. r5{
  209. ELEMENT_LIST = [RIGHT]
  210. }
  211. }
  212. TRANSLATE = [2.5, 0, 0]
  213. }
  214. /* bimolecular reaction when b_B has restrictive
  215. region border property "outside_in".
  216. Also there are multiple overlapped regions
  217. */
  218. box_7 BOX
  219. {
  220. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  221. DEFINE_SURFACE_REGIONS
  222. {
  223. r1{
  224. ELEMENT_LIST = [RIGHT]
  225. MOLECULE_NUMBER{
  226. b_A' = 450
  227. }
  228. SURFACE_CLASS = absorb_b_B
  229. }
  230. r2{
  231. ELEMENT_LIST = [TOP]
  232. MOLECULE_NUMBER{
  233. b_B' = 450
  234. }
  235. }
  236. r3{
  237. ELEMENT_LIST = [TOP, RIGHT]
  238. SURFACE_CLASS = refl_b_A
  239. }
  240. }
  241. TRANSLATE = [3.0, 0, 0]
  242. }
  243. /* bimolecular reaction when b_A has restrictive
  244. region border property "inside_out".
  245. Also there are overlapped regions and restricted border
  246. constitutes the outer boundary for both regions.
  247. */
  248. box_8 BOX
  249. {
  250. CORNERS = [-0.1,-0.1,-0.1] , [0.1,0.1,0.1]
  251. DEFINE_SURFACE_REGIONS
  252. {
  253. r1{
  254. ELEMENT_LIST = [RIGHT]
  255. MOLECULE_NUMBER{
  256. b_A' = 450
  257. }
  258. }
  259. r2{
  260. ELEMENT_LIST = [TOP]
  261. MOLECULE_NUMBER{
  262. b_B' = 450
  263. }
  264. }
  265. r3{
  266. ELEMENT_LIST = [TOP, RIGHT]
  267. SURFACE_CLASS = refl_b_A
  268. }
  269. }
  270. TRANSLATE = [3.5, 0, 0]
  271. }
  272. INSTANTIATE world OBJECT
  273. {
  274. box_1 OBJECT box_1 {}
  275. box_2 OBJECT box_2 {}
  276. box_3 OBJECT box_3 {}
  277. box_4 OBJECT box_4 {}
  278. box_5 OBJECT box_5 {}
  279. box_6 OBJECT box_6 {}
  280. box_7 OBJECT box_7 {}
  281. box_8 OBJECT box_8 {}
  282. }
  283. REACTION_DATA_OUTPUT
  284. {
  285. STEP = dt
  286. HEADER = "# "
  287. { COUNT [D, world.box_1]: "D"
  288. } => countdir & "box_1.dat"
  289. { COUNT [D, world.box_2]: "D"
  290. } => countdir & "box_2.dat"
  291. { COUNT [D, world.box_3]: "D"
  292. } => countdir & "box_3.dat"
  293. { COUNT [D, world.box_4]: "D"
  294. } => countdir & "box_4.dat"
  295. { COUNT [D, world.box_6]: "D"
  296. } => countdir & "box_6.dat"
  297. { COUNT [D, world.box_7]: "D"
  298. } => countdir & "box_7.dat"
  299. }
  300. REACTION_DATA_OUTPUT
  301. {
  302. ITERATION_LIST = [[90 TO 100 STEP 1]]
  303. { COUNT [D, world.box_5]: "D"
  304. } => countdir & "box_5.dat"
  305. { COUNT [D, world.box_8]: "D"
  306. } => countdir & "box_8.dat"
  307. }