12-all_enclosed_test.mdl 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /***************************************************************************
  2. * Reactions test-12: Testing of the REACTION_DATA_OUTPUT statement
  3. * COUNT[name, region, ALL_ENCLOSED]
  4. *
  5. * Surface molecules A are placed on the surfaces of both "outer" and
  6. * "inner" cubes, such that "inner" cube is completely inside "outer" one.
  7. * The COUNT statement above written for "outer" cube will effectively
  8. * calculate number of molecules A for the inner cube.
  9. *
  10. * Failure: the count of molecules A is incorrect.
  11. * Success: the count of molecules A is correct.
  12. *
  13. * Author: Boris Kaminsky <[email protected]>
  14. * Date: 2011-03-25
  15. ***************************************************************************/
  16. basename = "12-all_enclosed_test"
  17. countdir = "dat/" & basename & "/"
  18. dt = 1e-6
  19. TIME_STEP = dt
  20. TIME_STEP_MAX = dt
  21. ITERATIONS = 100
  22. SURFACE_GRID_DENSITY = 10000
  23. VACANCY_SEARCH_DISTANCE = 1
  24. DEFINE_MOLECULES
  25. {
  26. A {DIFFUSION_CONSTANT_2D = 2e-7}
  27. }
  28. outer BOX
  29. {
  30. CORNERS = [-0.13,-0.13,-0.13] , [0.13,0.13,0.13]
  31. DEFINE_SURFACE_REGIONS
  32. {
  33. whole_mesh{
  34. ELEMENT_LIST = [ALL_ELEMENTS]
  35. MOLECULE_NUMBER {
  36. A; = 200
  37. }
  38. }
  39. }
  40. }
  41. inner BOX
  42. {
  43. CORNERS = [-0.05,-0.05,-0.05] , [0.05,0.05,0.05]
  44. DEFINE_SURFACE_REGIONS
  45. {
  46. whole_mesh{
  47. ELEMENT_LIST = [ALL_ELEMENTS]
  48. MOLECULE_NUMBER {
  49. A; = 100
  50. }
  51. }
  52. }
  53. }
  54. INSTANTIATE world OBJECT
  55. {
  56. outer OBJECT outer {}
  57. inner OBJECT inner {}
  58. }
  59. REACTION_DATA_OUTPUT
  60. {
  61. STEP = dt
  62. { COUNT [A, world.outer[whole_mesh], ALL_ENCLOSED] } => countdir & "A.dat"
  63. }