03-coincident_surfaces.mdl 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /****************************************************************************
  2. * Regression test 03: When two surfaces coincide and one of them is
  3. * transparent, odd things happen. Counting, for one, can become
  4. * confused. Essentially, the transparent surface may be re-collided in
  5. * certain cases.
  6. *
  7. * Failure: counts go negative, or extremely positive
  8. * total count of cannonballs != 500
  9. *
  10. * Success: for entire run, count 122L+122R == 122 == 500 AND
  11. * for entire run, count r122L+r122R == r122 == 500
  12. *
  13. * Author: Jed Wing <[email protected]>
  14. * Date: 2008-09-05
  15. * Note: As of 05/23/2011 we disallow overlapped walls, so the coodinates
  16. * of box122R are slightly shifted.
  17. * Modified by Boris Kaminsky
  18. * Date: 2011-05-23
  19. ****************************************************************************/
  20. EFFECTOR_GRID_DENSITY = 30000
  21. ITERATIONS = 10000
  22. TIME_STEP = 1e-6
  23. kfwd = 5e6
  24. kreset = 1e3
  25. eps = 0.001
  26. reforient = 1
  27. EPS_C = 1e-12
  28. NOTIFICATIONS
  29. {
  30. RELEASE_EVENT_REPORT = ON
  31. }
  32. PARTITION_X = [[-2 TO 2 STEP 0.08]]
  33. PARTITION_Y = [[-2 TO 2 STEP 0.08]]
  34. PARTITION_Z = [[-2 TO 2 STEP 0.08]]
  35. DEFINE_MOLECULES
  36. {
  37. cannonball { DIFFUSION_CONSTANT_3D = 4e-6 }
  38. tissue26 { DIFFUSION_CONSTANT_2D = 0 }
  39. kerchief26 { DIFFUSION_CONSTANT_2D = 0 }
  40. llabnonnac { DIFFUSION_CONSTANT_3D = 4e-6 }
  41. eussit26 { DIFFUSION_CONSTANT_2D = 0 }
  42. feihcrek26 { DIFFUSION_CONSTANT_2D = 0 }
  43. }
  44. DEFINE_REACTIONS
  45. {
  46. cannonball,, + tissue26, -> cannonball'' + kerchief26, [kfwd] : reac_26 kerchief26' -> tissue26' [kreset] // INVALID
  47. llabnonnac,, + eussit26, -> llabnonnac'' + feihcrek26, [kfwd] : caer_26 feihcrek26' -> eussit26' [kreset] // INVALID
  48. }
  49. p122a = [-0.2, -0.2, -0.2]
  50. p122b = [ 0.0, 0.2, 0.2]
  51. p122c = [ 0.0 + 2*EPS_C, -0.2, -0.2]
  52. p122d = [ 0.2 + 2*EPS_C, 0.2, 0.2]
  53. /* p122c = [ 0.0, -0.2, -0.2]
  54. p122d = [ 0.2, 0.2, 0.2] */
  55. boxes_reduced OBJECT
  56. {
  57. box122L BOX { CORNERS = p122a, p122b DEFINE_SURFACE_REGIONS { r { INCLUDE_ELEMENTS = [RIGHT] } } }
  58. box122R BOX { CORNERS = p122c, p122d DEFINE_SURFACE_REGIONS { l { INCLUDE_ELEMENTS = [LEFT] } } }
  59. }
  60. INSTANTIATE world OBJECT
  61. {
  62. boxes OBJECT boxes_reduced { }
  63. rscb26 RELEASE_SITE { SHAPE = SPHERICAL SITE_RADIUS = 0 MOLECULE = cannonball NUMBER_TO_RELEASE = 500 LOCATION = [- eps, 0, 0] }
  64. rsbc26 RELEASE_SITE { SHAPE = SPHERICAL SITE_RADIUS = 0 MOLECULE = llabnonnac NUMBER_TO_RELEASE = 500 LOCATION = [- eps, 0, 0] }
  65. rs_t26 RELEASE_SITE { SHAPE = world.boxes.box122L[r] MOLECULE = tissue26{-reforient} NUMBER_TO_RELEASE = 500 }
  66. rs_e26 RELEASE_SITE { SHAPE = world.boxes.box122R[l] MOLECULE = eussit26{-reforient} NUMBER_TO_RELEASE = 500 }
  67. }
  68. DEFINE_SURFACE_CLASS trans_cannon { TRANSPARENT = cannonball }
  69. DEFINE_SURFACE_CLASS trans_nonnac { TRANSPARENT = llabnonnac }
  70. MODIFY_SURFACE_REGIONS {
  71. world.boxes.box122R[l] { SURFACE_CLASS = trans_cannon }
  72. world.boxes.box122L[r] { SURFACE_CLASS = trans_nonnac }
  73. }
  74. REACTION_DATA_OUTPUT
  75. {
  76. OUTPUT_BUFFER_SIZE = 1000
  77. STEP = 1e-6
  78. HEADER = "# "
  79. {
  80. COUNT[cannonball, world.boxes.box122L] : "122L",
  81. COUNT[cannonball, world.boxes.box122R] : "122R",
  82. COUNT[cannonball, world.boxes.box122L] + COUNT[cannonball, world.boxes.box122R] : "122",
  83. COUNT[llabnonnac, world.boxes.box122L] : "r122L",
  84. COUNT[llabnonnac, world.boxes.box122R] : "r122R",
  85. COUNT[llabnonnac, world.boxes.box122L] + COUNT[llabnonnac, world.boxes.box122R] : "r122"
  86. } => "cannonballs.txt"
  87. }
  88. /*
  89. VIZ_OUTPUT
  90. {
  91. MODE = DREAMM_V3_GROUPED
  92. FILENAME = "world"
  93. MOLECULES
  94. {
  95. NAME_LIST { ALL_MOLECULES }
  96. TIME_POINTS { ALL_DATA @ [[0 TO 1e-3 STEP 1e-5]] }
  97. }
  98. MESHES
  99. {
  100. NAME_LIST { ALL_MESHES }
  101. TIME_POINTS { ALL_DATA @ [0] }
  102. }
  103. }
  104. */