28-unimolecular_reaction_after_chkpt.mdl 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /****************************************************************************
  2. * Regression test 28: The results of unimolecular reaction with variable
  3. * rection rate were incorrect due to the bug.
  4. *
  5. * This is a bug encountered by Jun Ma. It represents itself as molecule's
  6. * negative lifetime. It happened under two simultaneous conditions:
  7. * checkpointing and unimolecular reactions with variable rates.
  8. * It appeared that variable rates files were not properly read and
  9. * and molecule's scheduling times were not properly set up.
  10. * For this test file the bug showed up as number of molecules B
  11. * equal to 10 right after checkpoint.
  12. *
  13. * Failure: final number of molecules B is 10
  14. * Success: final number of molecules B is less than 10
  15. *
  16. ****************************************************************************/
  17. dt = 1e-6
  18. TIME_STEP = dt
  19. TIME_STEP_MAX = 1000
  20. ITERATIONS = 10
  21. EFFECTOR_GRID_DENSITY = 10000
  22. CHECKPOINT_INFILE = "chkpt.tmp"
  23. CHECKPOINT_ITERATIONS = 5
  24. CHECKPOINT_OUTFILE = "chkpt.tmp"
  25. DEFINE_MOLECULES
  26. {
  27. A {DIFFUSION_CONSTANT_2D = 0}
  28. B {DIFFUSION_CONSTANT_2D = 0}
  29. }
  30. DEFINE_REACTIONS
  31. {
  32. A; -> B; ["28-A_B_rates.txt"]
  33. }
  34. box BOX
  35. {
  36. CORNERS = [-1,-1,-1] , [1,1,1]
  37. DEFINE_SURFACE_REGIONS
  38. {
  39. r1{
  40. ELEMENT_LIST = [TOP,BOTTOM,LEFT,RIGHT,FRONT,BACK]
  41. MOLECULE_NUMBER{A' = 10}
  42. }
  43. }
  44. }
  45. INSTANTIATE world OBJECT
  46. {
  47. box OBJECT box {}
  48. }
  49. REACTION_DATA_OUTPUT
  50. {
  51. STEP = dt
  52. {COUNT [B, WORLD]} => "B_World.dat"
  53. }