11-surf_properties_all_volume_molecules.mdl 4.3 KB

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