29-unimolecular_FOREVER.mdl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**********************************************************************
  2. * Regression test 29: This test checks the correct use of FOREVER
  3. * as optimization design tool.
  4. *
  5. * There was a bug reported by Jacob Czech about reactions stalling.
  6. * The study finds a bug in the use of FOREVER constant in the
  7. * context of unimolecular reactions.
  8. *
  9. * Failure: The equilibrium number of molecules "S1{-1}" is exactly
  10. * equal to the initial value (reactions stalled)
  11. * Success: The equilibrium number of molecules "S1{-1}" is about the half
  12. * of the initial value.
  13. *
  14. * Author: Boris Kaminsky and Jacob Czech
  15. * Date: 2012-06-25
  16. ***********************************************************************/
  17. dt = 1e-7
  18. iterations = 15000
  19. r_int = 0.003
  20. halfbox = 0.2
  21. TIME_STEP = dt
  22. ITERATIONS = iterations
  23. INTERACTION_RADIUS = r_int
  24. VACANCY_SEARCH_DISTANCE = 0.003
  25. PARTITION_X = [[-halfbox TO halfbox STEP halfbox/5]]
  26. PARTITION_Y = [[-halfbox TO halfbox STEP halfbox/5]]
  27. PARTITION_Z = [[-halfbox TO halfbox STEP halfbox/5]]
  28. DEFINE_MOLECULES {
  29. S1 { DIFFUSION_CONSTANT_2D = 2e-6 }
  30. S2 { DIFFUSION_CONSTANT_2D = 2e-6 }
  31. }
  32. DEFINE_SURFACE_CLASSES {
  33. empty {}
  34. }
  35. DEFINE_REACTIONS {
  36. S1, @ empty' -> S1' + S2' [1e5]: rxn1
  37. S2' + S1' @ empty' -> S1, [1e3]: rxn2
  38. }
  39. box BOX {
  40. CORNERS = [-halfbox,-halfbox,-halfbox],[halfbox,halfbox,halfbox]
  41. DEFINE_SURFACE_REGIONS {
  42. all {
  43. ELEMENT_LIST = [ALL_ELEMENTS]
  44. SURFACE_CLASS = empty
  45. }
  46. }
  47. }
  48. INSTANTIATE world OBJECT {
  49. box OBJECT box {}
  50. rel1 RELEASE_SITE {
  51. SHAPE = world.box
  52. MOLECULE = S1'
  53. NUMBER_TO_RELEASE = 280
  54. }
  55. rel2 RELEASE_SITE {
  56. SHAPE = world.box
  57. MOLECULE = S1,
  58. NUMBER_TO_RELEASE = 20
  59. }
  60. }
  61. REACTION_DATA_OUTPUT {
  62. STEP = 1*dt
  63. {COUNT["S1,",world.box[all]]}=> "./S1_down.dat"
  64. }