07-region_borders.mdl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /**************************************************************************
  2. * Test 07: Region borders properties tested on cube.
  3. *
  4. *
  5. * REFLECTIVE/ABSORPTIVE/TRANSPARENT properties of REGION border tested
  6. * on the cube.
  7. *
  8. * Author: Boris Kaminsky <[email protected]>
  9. * Date: 2010-11-30
  10. ****************************************************************************/
  11. basename = "07-region_borders"
  12. countdir = "dat/" & basename & "/"
  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. C {DIFFUSION_CONSTANT_2D = 2e-4}
  24. D {DIFFUSION_CONSTANT_2D = 2e-4}
  25. E {DIFFUSION_CONSTANT_2D = 2e-4}
  26. }
  27. DEFINE_SURFACE_CLASSES
  28. {
  29. my_surf_1
  30. {
  31. REFLECTIVE = A;
  32. ABSORPTIVE = B;
  33. TRANSPARENT = C;
  34. }
  35. my_surf_2
  36. {
  37. REFLECTIVE = D;
  38. REFLECTIVE = E;
  39. }
  40. refl_A{
  41. REFLECTIVE = A;
  42. }
  43. }
  44. DEFINE_REACTIONS
  45. {
  46. D' @ my_surf_2; -> E'[4e3]
  47. }
  48. box_1 BOX
  49. {
  50. CORNERS = [-0.13,-0.13,-0.13] , [0.13,0.13,0.13]
  51. DEFINE_SURFACE_REGIONS
  52. {
  53. r1{
  54. ELEMENT_LIST = [RIGHT]
  55. MOLECULE_NUMBER{
  56. A' = 100
  57. B' = 100
  58. C' = 100
  59. }
  60. SURFACE_CLASS = my_surf_1
  61. }
  62. r2{
  63. ELEMENT_LIST = [TOP,BOTTOM,LEFT,FRONT,BACK]
  64. }
  65. r3{
  66. ELEMENT_LIST = [TOP]
  67. MOLECULE_NUMBER{
  68. D' = 100
  69. }
  70. SURFACE_CLASS = my_surf_2
  71. }
  72. }
  73. }
  74. /* Here we test overlapped restricted region
  75. with non-restricted region */
  76. box_2 BOX
  77. {
  78. CORNERS = [-0.13,-0.13,-0.13] , [0.13,0.13,0.13]
  79. DEFINE_SURFACE_REGIONS
  80. {
  81. r1 {
  82. ELEMENT_LIST = [TOP, RIGHT]
  83. SURFACE_CLASS = refl_A
  84. }
  85. r2 {
  86. ELEMENT_LIST = [TOP]
  87. MOLECULE_NUMBER{A' = 200}
  88. }
  89. r3{
  90. ELEMENT_LIST = [RIGHT]
  91. }
  92. r4{
  93. ELEMENT_LIST = [LEFT, BOTTOM, BACK, FRONT]
  94. }
  95. }
  96. TRANSLATE = [0.5, 0, 0]
  97. }
  98. /* Here we test multiple overlapped restricted regions */
  99. box_3 BOX
  100. {
  101. CORNERS = [-0.13,-0.13,-0.13] , [0.13,0.13,0.13]
  102. DEFINE_SURFACE_REGIONS
  103. {
  104. r1 {
  105. ELEMENT_LIST = [TOP, RIGHT]
  106. SURFACE_CLASS = refl_A
  107. }
  108. r2 {
  109. ELEMENT_LIST = [TOP, LEFT]
  110. SURFACE_CLASS = refl_A
  111. }
  112. r3{
  113. ELEMENT_LIST = [TOP, FRONT]
  114. SURFACE_CLASS = refl_A
  115. }
  116. r4{
  117. ELEMENT_LIST = [TOP, BACK]
  118. SURFACE_CLASS = refl_A
  119. }
  120. r5{
  121. ELEMENT_LIST = [TOP]
  122. MOLECULE_NUMBER{A' = 200}
  123. }
  124. r6{
  125. ELEMENT_LIST = [LEFT, RIGHT, BOTTOM, BACK, FRONT]
  126. }
  127. }
  128. TRANSLATE = [1.0, 0, 0]
  129. }
  130. INSTANTIATE world OBJECT
  131. {
  132. box_1 OBJECT box_1 {}
  133. box_2 OBJECT box_2 {}
  134. box_3 OBJECT box_3 {}
  135. }
  136. REACTION_DATA_OUTPUT
  137. {
  138. STEP = dt
  139. HEADER = "# "
  140. {
  141. COUNT ["A;", world.box_1[r1]]: "r1_A",
  142. COUNT ["A;", world.box_1[r2]]: "r2_A"
  143. } => countdir & "box_1_A.dat"
  144. {
  145. COUNT ["C;", world.box_1[r1]]: "r1_C",
  146. COUNT ["C;", world.box_1[r2]]: "r2_C"
  147. } => countdir & "box_1_C.dat"
  148. }
  149. REACTION_DATA_OUTPUT
  150. {
  151. TIME_LIST = [7e-5, [7.1e-5 TO 1e-4 STEP 1e-6]]
  152. HEADER = "# "
  153. {
  154. COUNT ["B;", world.box_1[r1]]: "r1_B",
  155. COUNT ["B;", world.box_1[r2]]: "r2_B"
  156. } => countdir & "box_1_B.dat"
  157. {
  158. COUNT ["A;", world.box_2[r2]]: "r2_A",
  159. COUNT ["A;", world.box_2[r3]]: "r3_A"
  160. } => countdir & "box_2_A.dat"
  161. {
  162. COUNT ["A;", world.box_2[r4]]: "r4_A"
  163. } => countdir & "box_2_r4.dat"
  164. {
  165. COUNT ["A;", world.box_3[r5]]: "r5_A"
  166. } => countdir & "box_3_r5.dat"
  167. {
  168. COUNT ["A;", world.box_3[r6]]: "r6_A"
  169. } => countdir & "box_3_r6.dat"
  170. }
  171. REACTION_DATA_OUTPUT
  172. {
  173. STEP = dt
  174. HEADER = "# "
  175. {
  176. COUNT ["D;", world.box_1[r3]]: "r3_D",
  177. COUNT ["E;", world.box_1[r3]]: "r3_E"
  178. } => countdir & "box_1_r3.dat"
  179. }