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 >
Wrap
Text File
|
2004-02-26
|
3KB
|
73 lines
! --- Compute mass flow rate at outlet
CSET, NEWSET, FLUID
BSET, NEWSET, NAME, outletChannel
VIEW 0, 0, 1
ANGLE 0
CPLOT
FLUXSUM, INITIALIZE
GETCELL, FLUX
FLUXSUM, ZONE, ALL
! --- Compute mass flow rate at inlet
BSET, NEWSET, NAME, inletChannel
VIEW 0, 0, -1
ANGLE 0
CPLOT
FLUXSUM, INITIALIZE
GETCELL, FLUX
FLUXSUM, ZONE, ALL
! --- Calculate pressure at Inlet region:
CSET ALL
CSET, NEWSET, FLUID
OPER,CLEAR,1,6 ! Clear all post registers
OPER,GETC,P,1,RELATIVE ! Load pressure into register 1
OPER,GETC,VOLU,2 ! Load cell volume into register 2
OPER,MULT,1,2,3 ! Multiply register 1 by register 2, store in 3
BSET,NEWS,NAME,inletChannel ! Select boundary region named "inletChannel"
VSET,NEWS,BSET ! Get vertices in current boundary set
CSET,NEWS,VSET,ANY ! Get cells having any vertices in current VSET
CSET,SUBS,FLUID ! Make sure only fluid cells are selected
*GET,VOL1,RTOT,2 ! Store total of post register 2 in "VOL1"
*GET,PRS1,RTOT,3 ! Store total of post register 3 in "PRS1"
*SET,PIN,PRS1 / VOL1 ! Set value of "PIN" to PRS1/VOL1
! --- Calculate pressure at Outlet region:
!
CSET ALL
CSET, NEWSET, FLUID
BSET,NEWS,NAME,outletChannel ! Get boundary region named "ductOutlet"
VSET,NEWS,BSET ! and repeat ...
CSET,NEWS,VSET,ANY
CSET,SUBS,FLUID
*GET,VOL2,RTOT,2
*GET,PRS2,RTOT,3
*SET,POUT,PRS2 / VOL2
!
! --- Calculate the difference and list the result:
!
*SET,PDIF,PIN - POUT
*LIST,PDIF ! Print value of PDIF
! --- Calculate average temperature on bottom wall
!
CSET ALL
CSET, NEWSET, FLUID
OPER,CLEAR,1,6 ! Clear all post registers
OPER,GETC,T,1,ABSOLUTE ! Load temperature into register 1
OPER,GETC,VOLU,2 ! Load cell volume into register 2
OPER,MULT,1,2,3 ! Multiply register 1 by register 2, store in 3
BSET,NEWS,NAME,heater ! Select boundary region named "heater"
VSET,NEWS,BSET ! Get vertices in current boundary set
CSET,NEWS,VSET,ANY ! Get cells having any vertices in current VSET
CSET,SUBS,SOLID ! Make sure only fluid cells are selected
*GET,VOLW,RTOT,2 ! Store total of post register 2 in "VOLW"
*GET,TWTOT,RTOT,3 ! Store total of post register 3 in "TWTOT"
*SET,TWAVE,TWTOT / VOLW ! Set value of "TWAVE" to TWTOT/VOL1
*SET, WIDTH, TF2 + TC2
*SET, AWALL, LEN * WIDTH * 1e-6
*SET, DELT, TWAVE - TIN
*SET, HTC, QIN / DELT
*LIST HTC