10-surf_properties_all_molecules.mdl 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /***************************************************************************
  2. * Test 010: Combination of ALL_MOLECULES with surface properties
  3. * (REFLECTIVE/TRANSPARENT/ABSORPTIVE)
  4. *
  5. * Volume molecules are released inside a set of enclosed meshes.
  6. * Let some of the meshes be REFLECTIVE, or TRANSPARENT, or ABSORPTIVE.
  7. * This test check validity of ALL_MOLECULES statement in combination
  8. * with REFLECTIVE/TRANSPARENT/ABSORPTIVE properties of meshes.
  9. *
  10. *
  11. * Author: Boris Kaminsky <[email protected]>
  12. * Date: 2011-03-04
  13. ***************************************************************************/
  14. basename = "10-surf_properties_all_molecules"
  15. countdir = "dat/" & basename & "/"
  16. dt = 1e-6
  17. TIME_STEP = dt
  18. TIME_STEP_MAX = dt
  19. ITERATIONS = 100
  20. EFFECTOR_GRID_DENSITY = 10000
  21. boxdims = 0.13
  22. VACANCY_SEARCH_DISTANCE = 1
  23. DEFINE_MOLECULES
  24. {
  25. A {DIFFUSION_CONSTANT_3D = 2e-7}
  26. B {DIFFUSION_CONSTANT_3D = 2e-7}
  27. C {DIFFUSION_CONSTANT_3D = 2e-7}
  28. }
  29. DEFINE_SURFACE_CLASS refl
  30. {
  31. REFLECTIVE = ALL_MOLECULES;
  32. }
  33. DEFINE_SURFACE_CLASS transp
  34. {
  35. TRANSPARENT = ALL_MOLECULES;
  36. }
  37. DEFINE_SURFACE_CLASS absorp
  38. {
  39. ABSORPTIVE = ALL_MOLECULES;
  40. }
  41. box_outer BOX
  42. {
  43. CORNERS = [-boxdims,-boxdims,-boxdims] , [boxdims,boxdims,boxdims]
  44. DEFINE_SURFACE_REGIONS
  45. {
  46. whole_mesh{
  47. ELEMENT_LIST = [ALL_ELEMENTS]
  48. SURFACE_CLASS = refl
  49. }
  50. }
  51. }
  52. box_inner_refl BOX
  53. {
  54. CORNERS = [-0.11,-0.11,-0.11] , [0.11,0.11,0.11]
  55. DEFINE_SURFACE_REGIONS
  56. {
  57. whole_mesh{
  58. ELEMENT_LIST = [ALL_ELEMENTS]
  59. SURFACE_CLASS = refl
  60. }
  61. }
  62. }
  63. box_inner_transp BOX
  64. {
  65. CORNERS = [-0.11,-0.11,-0.11] , [0.11,0.11,0.11]
  66. DEFINE_SURFACE_REGIONS
  67. {
  68. whole_mesh{
  69. ELEMENT_LIST = [ALL_ELEMENTS]
  70. SURFACE_CLASS = transp
  71. }
  72. }
  73. }
  74. box_inner_absorp BOX
  75. {
  76. CORNERS = [-0.11,-0.11,-0.11] , [0.11,0.11,0.11]
  77. DEFINE_SURFACE_REGIONS
  78. {
  79. whole_mesh{
  80. ELEMENT_LIST = [ALL_ELEMENTS]
  81. SURFACE_CLASS = absorp
  82. }
  83. }
  84. }
  85. /* Starting X position for box placement */
  86. x = 0
  87. fuzz = 0.01
  88. xleft = x - boxdims - fuzz
  89. case1 OBJECT
  90. {
  91. box_out OBJECT box_outer {}
  92. box_in OBJECT box_inner_refl {}
  93. A_release RELEASE_SITE {SHAPE = case1.box_in MOLECULE = A NUMBER_TO_RELEASE = 1000}
  94. B_release RELEASE_SITE {SHAPE = case1.box_in MOLECULE = B NUMBER_TO_RELEASE = 1000}
  95. C_release RELEASE_SITE {SHAPE = case1.box_in MOLECULE = C NUMBER_TO_RELEASE = 1000}
  96. TRANSLATE = [x,0,0]
  97. }
  98. x = x + 2*boxdims + fuzz
  99. case2 OBJECT
  100. {
  101. box_out OBJECT box_outer {}
  102. box_in OBJECT box_inner_transp {}
  103. A_release RELEASE_SITE {SHAPE = case2.box_in MOLECULE = A NUMBER_TO_RELEASE = 1000}
  104. B_release RELEASE_SITE {SHAPE = case2.box_in MOLECULE = B NUMBER_TO_RELEASE = 1000}
  105. C_release RELEASE_SITE {SHAPE = case2.box_in MOLECULE = C NUMBER_TO_RELEASE = 1000}
  106. TRANSLATE = [x,0,0]
  107. }
  108. x = x + 2*boxdims + fuzz
  109. case3 OBJECT
  110. {
  111. box_out OBJECT box_outer {}
  112. box_in OBJECT box_inner_absorp {}
  113. A_release RELEASE_SITE {SHAPE = case3.box_in MOLECULE = A NUMBER_TO_RELEASE = 1000}
  114. B_release RELEASE_SITE {SHAPE = case3.box_in MOLECULE = B NUMBER_TO_RELEASE = 1000}
  115. C_release RELEASE_SITE {SHAPE = case3.box_in MOLECULE = C NUMBER_TO_RELEASE = 1000}
  116. TRANSLATE = [x,0,0]
  117. }
  118. x = x + 2*boxdims + fuzz
  119. xright = x + boxdims
  120. PARTITION_X = [[xleft TO xright STEP 0.013]]
  121. PARTITION_Y = [[-boxdims-fuzz TO boxdims+fuzz STEP 0.013]]
  122. PARTITION_Z = [[-boxdims-fuzz TO boxdims+fuzz STEP 0.013]]
  123. INSTANTIATE world OBJECT
  124. {
  125. b1 OBJECT case1 {}
  126. b2 OBJECT case2 {}
  127. b3 OBJECT case3 {}
  128. }
  129. REACTION_DATA_OUTPUT
  130. {
  131. STEP = dt
  132. HEADER = "# "
  133. {
  134. (COUNT [A, world.b1.box_out] - COUNT [A, world.b1.box_in]): "A_diff",
  135. (COUNT [B, world.b1.box_out] - COUNT [B, world.b1.box_in]): "B_diff",
  136. (COUNT [C, world.b1.box_out] - COUNT [C, world.b1.box_in]): "C_diff"
  137. } => countdir & "refl.dat"
  138. {
  139. (COUNT [A, world.b2.box_out] - COUNT [A, world.b2.box_in]): "A_diff",
  140. (COUNT [B, world.b2.box_out] - COUNT [B, world.b2.box_in]): "B_diff",
  141. (COUNT [C, world.b2.box_out] - COUNT [C, world.b2.box_in]): "C_diff"
  142. } => countdir & "transp.dat"
  143. {
  144. (COUNT [A, world.b3.box_out] - COUNT [A, world.b3.box_in]): "A_diff",
  145. (COUNT [B, world.b3.box_out] - COUNT [B, world.b3.box_in]): "B_diff",
  146. (COUNT [C, world.b3.box_out] - COUNT [C, world.b3.box_in]): "C_diff"
  147. } => countdir & "absorp.dat"
  148. }