08-region_borders.mdl 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*****************************************************************************
  2. * Test 08: Region border properties tested on sphere.
  3. *
  4. * REFLECTIVE/ABSORPTIVE/TRANSPARENT properties of REGION border tested
  5. * on sphere with much more complex shape of the region and boundary
  6. * of the region crossing the sphere apex. Also tested HITS/CROSSINGS
  7. * statements with COUNT/TRIGGER statements.
  8. * Author: Boris Kaminsky <[email protected]>
  9. * Date: 2010-12-08
  10. ******************************************************************************/
  11. basename = "08-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-3}
  23. C {DIFFUSION_CONSTANT_2D = 2e-4}
  24. D {D_2D = 2e-4}
  25. E {D_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. }
  41. DEFINE_REACTIONS
  42. {
  43. D' @ my_surf_2; -> E'[4e3]
  44. }
  45. INCLUDE_FILE = "sphere_apex_region.mdl"
  46. INSTANTIATE world OBJECT
  47. {
  48. sphere OBJECT Sphere {}
  49. }
  50. REACTION_DATA_OUTPUT
  51. {
  52. STEP = dt
  53. HEADER = "# "
  54. {
  55. COUNT ["A;", world.sphere[r1]]: "r1_A",
  56. COUNT ["A;", world.sphere[r2]]: "r2_A"
  57. } => countdir & "A.dat"
  58. {
  59. COUNT ["C;", world.sphere[r1]]: "r1_C",
  60. COUNT ["C;", world.sphere[r2]]: "r2_C"
  61. } => countdir & "C.dat"
  62. {
  63. COUNT ["A;", world.sphere[r1], FRONT_HITS]: "A_fr_hits",
  64. COUNT ["A;", world.sphere[r1], BACK_HITS]: "A_back_hits",
  65. COUNT ["A;", world.sphere[r1], ALL_HITS]: "A_all_hits",
  66. COUNT ["C;", world.sphere[r1], FRONT_CROSSINGS]: "C_fr_cross",
  67. COUNT ["C;", world.sphere[r1], BACK_CROSSINGS]: "C_back_cross",
  68. COUNT ["C;", world.sphere[r1], ALL_CROSSINGS]: "C_all_cross"
  69. } => countdir & "A_hits_C_cross.dat"
  70. }
  71. REACTION_DATA_OUTPUT
  72. {
  73. STEP = dt
  74. SHOW_EXACT_TIME=OFF
  75. {TRIGGER["C;", world.sphere[r1], FRONT_HITS]} => countdir & "C_trigger_fr_hits.dat"
  76. {TRIGGER["C;", world.sphere[r1], BACK_HITS]} => countdir & "C_trigger_back_hits.dat"
  77. {TRIGGER["C;", world.sphere[r1], ALL_HITS]} => countdir & "C_trigger_all_hits.dat"
  78. {TRIGGER["C;", world.sphere[r1], FRONT_CROSSINGS]} => countdir & "C_trigger_fr_cross.dat"
  79. {TRIGGER["C;", world.sphere[r1], BACK_CROSSINGS]} => countdir & "C_trigger_back_cross.dat"
  80. {TRIGGER["C;", world.sphere[r1], ALL_CROSSINGS]} => countdir & "C_trigger_all_cross.dat"
  81. }
  82. REACTION_DATA_OUTPUT
  83. {
  84. TIME_LIST = [9.9e-5, 1e-4]
  85. HEADER = "# "
  86. {
  87. COUNT ["B;", world.sphere[r1]]: "r1_B",
  88. COUNT ["B;", world.sphere[r2]]: "r2_B"
  89. } => countdir & "B.dat"
  90. }
  91. REACTION_DATA_OUTPUT
  92. {
  93. STEP = dt
  94. HEADER = "# "
  95. {
  96. COUNT ["D;", world.sphere[r2]]: "r2_D",
  97. COUNT ["E;", world.sphere[r2]]: "r2_E"
  98. } => countdir & "r2.dat"
  99. }