21-enclosed_meshes_with_different_properties.mdl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* Volume molecules are released inside a set of enclosed meshes.
  2. Let some of the meshes be located very close one to another
  3. so that they are within the molecule random walk distance and
  4. they have different surface properties, say REFLECTIVE and TRANSPARENT.
  5. The bug in the diffusion code have resulted in leaking molecules
  6. through the REFLECTIVE mesh.
  7. */
  8. dt = 1e-6
  9. TIME_STEP = dt
  10. TIME_STEP_MAX = dt
  11. ITERATIONS = 100
  12. EFFECTOR_GRID_DENSITY = 10000
  13. VACANCY_SEARCH_DISTANCE = 1
  14. DEFINE_MOLECULES
  15. {
  16. A {DIFFUSION_CONSTANT_3D = 2e-7}
  17. }
  18. DEFINE_SURFACE_CLASS A_refl
  19. {
  20. REFLECTIVE = A;
  21. }
  22. DEFINE_SURFACE_CLASS A_transp
  23. {
  24. TRANSPARENT = A;
  25. }
  26. box_1 BOX
  27. {
  28. CORNERS = [-0.13,-0.13,-0.13] , [0.13,0.13,0.13]
  29. DEFINE_SURFACE_REGIONS
  30. {
  31. whole_mesh{
  32. ELEMENT_LIST = [ALL_ELEMENTS]
  33. SURFACE_CLASS = A_refl
  34. }
  35. }
  36. }
  37. box_2 BOX
  38. {
  39. CORNERS = [-0.11,-0.11,-0.11] , [0.11,0.11,0.11]
  40. DEFINE_SURFACE_REGIONS
  41. {
  42. whole_mesh{
  43. ELEMENT_LIST = [ALL_ELEMENTS]
  44. SURFACE_CLASS = A_refl
  45. }
  46. }
  47. }
  48. box_3 BOX
  49. {
  50. CORNERS = [-0.1099999999,-0.1099999999,-0.1099999999] , [0.1099999999,0.1099999999,0.1099999999]
  51. DEFINE_SURFACE_REGIONS
  52. {
  53. whole_mesh{
  54. ELEMENT_LIST = [ALL_ELEMENTS]
  55. SURFACE_CLASS = A_transp
  56. }
  57. }
  58. }
  59. A_release CUBIC_RELEASE_SITE
  60. {
  61. LOCATION = [0,0,0]
  62. MOLECULE = A
  63. NUMBER_TO_RELEASE = 1000
  64. SITE_DIAMETER = 0.2
  65. }
  66. INSTANTIATE world OBJECT
  67. {
  68. box_1 OBJECT box_1 {}
  69. box_2 OBJECT box_2 {}
  70. box_3 OBJECT box_3 {}
  71. A_release OBJECT A_release {}
  72. }
  73. /* Since "box_2" mesh is REFLECTIVE there should no molecules
  74. in the space between "box_1" and "box_2". It means that the COUNT
  75. statement below should be zero for all iterations. */
  76. REACTION_DATA_OUTPUT
  77. {
  78. STEP = dt
  79. {
  80. COUNT [A, world.box_1] -
  81. COUNT [A, world.box_2]
  82. } => "./A.dat"
  83. }