09-region_borders.mdl 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /**************************************************************************
  2. * Test 09: Region borders properties tested on cube.
  3. *
  4. * REFLECTIVE/ABSORPTIVE/TRANSPARENT properties of REGION border tested
  5. * on the cube for ALL_MOLECULES and ALL_SURFACE_MOLECULES keywords.
  6. *
  7. * Author: Boris Kaminsky <[email protected]>
  8. * Date: 2011-03-04
  9. ****************************************************************************/
  10. basename = "09-region_borders"
  11. countdir = "dat/" & basename & "/"
  12. boxdims = 0.25
  13. dt = 1e-6
  14. TIME_STEP = dt
  15. TIME_STEP_MAX = dt
  16. ITERATIONS = 100
  17. EFFECTOR_GRID_DENSITY = 10000
  18. VACANCY_SEARCH_DISTANCE = 1
  19. DEFINE_MOLECULES
  20. {
  21. A {DIFFUSION_CONSTANT_2D = 2e-4}
  22. B {DIFFUSION_CONSTANT_2D = 2e-4}
  23. }
  24. DEFINE_SURFACE_CLASSES
  25. {
  26. my_surf_1
  27. {
  28. TRANSPARENT = ALL_MOLECULES;
  29. }
  30. my_surf_2
  31. {
  32. REFLECTIVE = ALL_MOLECULES;
  33. }
  34. my_surf_3
  35. {
  36. ABSORPTIVE = ALL_MOLECULES;
  37. }
  38. my_surf_4
  39. {
  40. TRANSPARENT = ALL_SURFACE_MOLECULES;
  41. }
  42. my_surf_5
  43. {
  44. REFLECTIVE = ALL_SURFACE_MOLECULES;
  45. }
  46. my_surf_6
  47. {
  48. ABSORPTIVE = ALL_SURFACE_MOLECULES;
  49. }
  50. }
  51. /* Starting X position for box placement */
  52. x = 0
  53. fuzz = 0.01
  54. xleft = x - boxdims - fuzz
  55. /* TRANSPARENT for ALL_MOLECULES */
  56. case1 BOX
  57. {
  58. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  59. DEFINE_SURFACE_REGIONS
  60. {
  61. r1{
  62. ELEMENT_LIST = [TOP]
  63. MOLECULE_NUMBER{
  64. A' = 100
  65. B' = 100
  66. }
  67. SURFACE_CLASS = my_surf_1
  68. }
  69. r2{
  70. ELEMENT_LIST = [RIGHT, LEFT,FRONT, BACK, BOTTOM]
  71. }
  72. }
  73. TRANSLATE = [x,0,0]
  74. }
  75. x = x + 2*boxdims + fuzz
  76. /* REFLECTIVE for ALL_MOLECULES */
  77. case2 BOX
  78. {
  79. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  80. DEFINE_SURFACE_REGIONS
  81. {
  82. r1{
  83. ELEMENT_LIST = [TOP]
  84. MOLECULE_NUMBER{
  85. A' = 100
  86. B' = 100
  87. }
  88. SURFACE_CLASS = my_surf_2
  89. }
  90. r2{
  91. ELEMENT_LIST = [RIGHT, LEFT,FRONT, BACK, BOTTOM]
  92. }
  93. }
  94. TRANSLATE = [x,0,0]
  95. }
  96. x = x + 2*boxdims + fuzz
  97. /* ABSORPTIVE for ALL_MOLECULES */
  98. case3 BOX
  99. {
  100. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  101. DEFINE_SURFACE_REGIONS
  102. {
  103. r1{
  104. ELEMENT_LIST = [TOP]
  105. MOLECULE_NUMBER{
  106. A' = 100
  107. B' = 100
  108. }
  109. SURFACE_CLASS = my_surf_3
  110. }
  111. r2{
  112. ELEMENT_LIST = [RIGHT, LEFT,FRONT, BACK, BOTTOM]
  113. }
  114. }
  115. TRANSLATE = [x,0,0]
  116. }
  117. x = x + 2*boxdims + fuzz
  118. /* TRANSPARENT for ALL_SURFACE_MOLECULES */
  119. case4 BOX
  120. {
  121. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  122. DEFINE_SURFACE_REGIONS
  123. {
  124. r1{
  125. ELEMENT_LIST = [TOP]
  126. MOLECULE_NUMBER{
  127. A' = 100
  128. B' = 100
  129. }
  130. SURFACE_CLASS = my_surf_4
  131. }
  132. r2{
  133. ELEMENT_LIST = [RIGHT, LEFT,FRONT, BACK, BOTTOM]
  134. }
  135. }
  136. TRANSLATE = [x,0,0]
  137. }
  138. x = x + 2*boxdims + fuzz
  139. /* REFLECTIVE for ALL_SURFACE_MOLECULES */
  140. case5 BOX
  141. {
  142. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  143. DEFINE_SURFACE_REGIONS
  144. {
  145. r1{
  146. ELEMENT_LIST = [TOP]
  147. MOLECULE_NUMBER{
  148. A' = 100
  149. B' = 100
  150. }
  151. SURFACE_CLASS = my_surf_5
  152. }
  153. r2{
  154. ELEMENT_LIST = [RIGHT, LEFT,FRONT, BACK, BOTTOM]
  155. }
  156. }
  157. TRANSLATE = [x,0,0]
  158. }
  159. x = x + 2*boxdims + fuzz
  160. /* ABSORPTIVE for ALL_SURFACE_MOLECULES */
  161. case6 BOX
  162. {
  163. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  164. DEFINE_SURFACE_REGIONS
  165. {
  166. r1{
  167. ELEMENT_LIST = [TOP]
  168. MOLECULE_NUMBER{
  169. A' = 100
  170. B' = 100
  171. }
  172. SURFACE_CLASS = my_surf_6
  173. }
  174. r2{
  175. ELEMENT_LIST = [RIGHT, LEFT,FRONT, BACK, BOTTOM]
  176. }
  177. }
  178. TRANSLATE = [x,0,0]
  179. }
  180. x = x + 2*boxdims + fuzz
  181. xright = x + boxdims
  182. PARTITION_X = [[xleft TO xright STEP 0.025]]
  183. PARTITION_Y = [[-boxdims-fuzz TO boxdims+fuzz STEP 0.025]]
  184. PARTITION_Z = [[-boxdims-fuzz TO boxdims+fuzz STEP 0.025]]
  185. INSTANTIATE world OBJECT
  186. {
  187. b1 OBJECT case1 {}
  188. b2 OBJECT case2 {}
  189. b3 OBJECT case3 {}
  190. b4 OBJECT case4 {}
  191. b5 OBJECT case5 {}
  192. b6 OBJECT case6 {}
  193. }
  194. REACTION_DATA_OUTPUT
  195. {
  196. STEP = dt
  197. HEADER = "# "
  198. {
  199. COUNT ["A;", world.b1[r1]]: "r1_A",
  200. COUNT ["B;", world.b1[r1]]: "r1_B",
  201. COUNT ["A;", world.b1[r2]]: "r2_A",
  202. COUNT ["B;", world.b1[r2]]: "r2_B"
  203. } => countdir & "transp_all_mols.dat"
  204. {
  205. COUNT ["A;", world.b2[r1]]: "r1_A",
  206. COUNT ["B;", world.b2[r1]]: "r1_B",
  207. COUNT ["A;", world.b2[r2]]: "r2_A",
  208. COUNT ["B;", world.b2[r2]]: "r2_B"
  209. } => countdir & "refl_all_mols.dat"
  210. {
  211. COUNT ["A;", world.b4[r1]]: "r1_A",
  212. COUNT ["B;", world.b4[r1]]: "r1_B",
  213. COUNT ["A;", world.b4[r2]]: "r2_A",
  214. COUNT ["B;", world.b4[r2]]: "r2_B"
  215. } => countdir & "transp_all_surface_mols.dat"
  216. {
  217. COUNT ["A;", world.b5[r1]]: "r1_A",
  218. COUNT ["B;", world.b5[r1]]: "r1_B",
  219. COUNT ["A;", world.b5[r2]]: "r2_A",
  220. COUNT ["B;", world.b5[r2]]: "r2_B"
  221. } => countdir & "refl_all_surface_mols.dat"
  222. }
  223. REACTION_DATA_OUTPUT
  224. {
  225. TIME_LIST = [9e-5, [9.1e-5 TO 1e-4 STEP 1e-6]]
  226. HEADER = "# "
  227. {
  228. COUNT ["A;", world.b3[r1]]: "r1_A",
  229. COUNT ["B;", world.b3[r1]]: "r1_B",
  230. COUNT ["A;", world.b3[r2]]: "r2_A",
  231. COUNT ["B;", world.b3[r2]]: "r2_B"
  232. } => countdir & "absorb_all_mols.dat"
  233. {
  234. COUNT ["A;", world.b6[r1]]: "r1_A",
  235. COUNT ["B;", world.b6[r1]]: "r1_B",
  236. COUNT ["A;", world.b6[r2]]: "r2_A",
  237. COUNT ["B;", world.b6[r2]]: "r2_B"
  238. } => countdir & "absorb_all_surface_mols.dat"
  239. }