programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Cooling towers examples

Local variables to be added

integer ifac, iel, ii, ivar
integer ilelt, nlelt, izone
integer, allocatable, dimension(:) :: lstelt

Initialization and finalization

Initialization and finalization is similar to that of the base examples

Example 1

Assign a free outlet for faces of color/group 2

call getfbr('2', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
izone = 1
izfppp(ifac) = izone
! outlet: zero flux for velocity and temperature, prescribed pressure
! note that pressure will be set to P0 on the free outlet face
! (isolib) closest to xyz0.
itypfb(ifac) = isolib
! Precribe a pressure profile for all faces
icodcl(ifac,ipr) = 1
rcodcl(ifac,ipr,1) = &
ro0*( gx*(cdgfbo(1,ifac)-xyzp0(1)) &
+ gy*(cdgfbo(2,ifac)-xyzp0(2)) &
+ gz*(cdgfbo(3,ifac)-xyzp0(3)))
enddo

Example 2

Assign a wall condition for faces of color/group 4

call getfbr('4', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
izone = 2
izfppp(ifac) = izone
itypfb(ifac) = iparoi
enddo

Example 3

Assign a symmetry for faces of color/group 5

call getfbr('5', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
izone = 3
izfppp(ifac) = izone
itypfb(ifac) = isymet
enddo