home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / gerry / ME448 / channelPost.MAC next >
Text File  |  2004-02-26  |  3KB  |  73 lines

  1. ! --- Compute mass flow rate at outlet
  2. CSET, NEWSET, FLUID
  3. BSET, NEWSET, NAME, outletChannel
  4. VIEW 0, 0, 1
  5. ANGLE 0
  6. CPLOT
  7. FLUXSUM, INITIALIZE
  8. GETCELL, FLUX
  9. FLUXSUM, ZONE, ALL
  10.  
  11. ! --- Compute mass flow rate at inlet
  12. BSET, NEWSET, NAME, inletChannel
  13. VIEW 0, 0, -1
  14. ANGLE 0
  15. CPLOT
  16. FLUXSUM, INITIALIZE
  17. GETCELL, FLUX
  18. FLUXSUM, ZONE, ALL
  19.  
  20. ! --- Calculate pressure at Inlet region:
  21. CSET ALL
  22. CSET, NEWSET, FLUID
  23. OPER,CLEAR,1,6               ! Clear all post registers
  24. OPER,GETC,P,1,RELATIVE       ! Load pressure into register 1
  25. OPER,GETC,VOLU,2             ! Load cell volume into register 2
  26. OPER,MULT,1,2,3              ! Multiply register 1 by register 2, store in 3
  27. BSET,NEWS,NAME,inletChannel  ! Select boundary region named "inletChannel"
  28. VSET,NEWS,BSET               ! Get vertices in current boundary set
  29. CSET,NEWS,VSET,ANY           ! Get cells having any vertices in current VSET
  30. CSET,SUBS,FLUID              ! Make sure only fluid cells are selected
  31. *GET,VOL1,RTOT,2             ! Store total of post register 2 in "VOL1"
  32. *GET,PRS1,RTOT,3             ! Store total of post register 3 in "PRS1"
  33. *SET,PIN,PRS1 / VOL1         ! Set value of "PIN" to PRS1/VOL1
  34.  
  35. ! --- Calculate pressure at Outlet region:
  36. !
  37. CSET ALL
  38. CSET, NEWSET, FLUID
  39. BSET,NEWS,NAME,outletChannel ! Get boundary region named "ductOutlet"
  40. VSET,NEWS,BSET               !   and repeat ...
  41. CSET,NEWS,VSET,ANY
  42. CSET,SUBS,FLUID
  43. *GET,VOL2,RTOT,2
  44. *GET,PRS2,RTOT,3      
  45. *SET,POUT,PRS2 / VOL2
  46. !
  47. ! --- Calculate the difference and list the result:
  48. !
  49. *SET,PDIF,PIN - POUT
  50. *LIST,PDIF               !  Print value of PDIF
  51.  
  52. ! --- Calculate average temperature on bottom wall
  53. !
  54. CSET ALL
  55. CSET, NEWSET, FLUID
  56. OPER,CLEAR,1,6               ! Clear all post registers
  57. OPER,GETC,T,1,ABSOLUTE       ! Load temperature into register 1
  58. OPER,GETC,VOLU,2             ! Load cell volume into register 2
  59. OPER,MULT,1,2,3              ! Multiply register 1 by register 2, store in 3
  60. BSET,NEWS,NAME,heater        ! Select boundary region named "heater"
  61. VSET,NEWS,BSET               ! Get vertices in current boundary set
  62. CSET,NEWS,VSET,ANY           ! Get cells having any vertices in current VSET
  63. CSET,SUBS,SOLID              ! Make sure only fluid cells are selected
  64. *GET,VOLW,RTOT,2             ! Store total of post register 2 in "VOLW"
  65. *GET,TWTOT,RTOT,3             ! Store total of post register 3 in "TWTOT"
  66. *SET,TWAVE,TWTOT / VOLW       ! Set value of "TWAVE" to TWTOT/VOL1
  67.  
  68. *SET, WIDTH, TF2 + TC2
  69. *SET, AWALL, LEN * WIDTH * 1e-6
  70. *SET, DELT, TWAVE - TIN
  71. *SET, HTC, QIN / DELT
  72. *LIST HTC
  73.