19-enclosed_surfmol_miscount.mdl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /****************************************************************************
  2. * Regression test 19: surface molecule diffusion gives incorrect counts for
  3. * "enclosed" counts.
  4. *
  5. * Failure: Counts remain 50/50/0
  6. * Success: Counts equilibrate to around 50/25/25
  7. *
  8. * Author: Jed Wing <[email protected]>
  9. * Date: 2009-07-31
  10. * Note: As of 5/23/2011 we disallow overlapped walls, so the coordinates
  11. * of "counter_right" box are slightly shifted to allow for
  12. * the overlap test to pass.
  13. * Modified by Boris Kaminsky
  14. * Date: 2011-05-23
  15. ****************************************************************************/
  16. iterations = 10000
  17. time_step = 1e-6
  18. ITERATIONS = iterations
  19. TIME_STEP = time_step
  20. VACANCY_SEARCH_DISTANCE = 0.1
  21. EPS_C = 1e-12
  22. DEFINE_MOLECULES
  23. {
  24. A { DIFFUSION_CONSTANT_2D = 2e-5 }
  25. }
  26. INSTANTIATE World OBJECT
  27. {
  28. system BOX
  29. {
  30. CORNERS = [0.0,0.0,0.0],[0.1,0.1,0.1]
  31. DEFINE_SURFACE_REGIONS
  32. {
  33. whole_box
  34. {
  35. INCLUDE_ELEMENTS = [LEFT]
  36. MOLECULE_NUMBER
  37. {
  38. A' = 50
  39. }
  40. }
  41. }
  42. }
  43. counter_left BOX
  44. {
  45. CORNERS = [-0.01,-0.01,-0.01],[0.05,0.11,0.11]
  46. }
  47. counter_right BOX
  48. {
  49. /* CORNERS = [0.05,-0.01,-0.01],[0.11,0.11,0.11] */
  50. CORNERS = [0.05 + 2*EPS_C,-0.01,-0.01],[0.11,0.11,0.11]
  51. }
  52. }
  53. REACTION_DATA_OUTPUT
  54. {
  55. STEP = time_step
  56. {
  57. COUNT[A,WORLD],
  58. COUNT[A,World.counter_left,ALL_ENCLOSED],
  59. COUNT[A,World.counter_right,ALL_ENCLOSED]
  60. } => "A.dat"
  61. }