programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cooling_towers example

cooling_towers example

Local variables to be added

The following local variables need to be defined for the examples in this section:

integer iel, iutile
integer ilelt, nlelt
double precision d2s3
integer, allocatable, dimension(:) :: lstelt

Allocation

Before user initialization, work arrays lstelt must be allocated, like in basic example.

Initialization

The following initialization block needs to be added for the following examples:

allocate(lstelt(ncel)) ! temporary array for cells selection
d2s3 = 2.d0/3.d0
!===============================================================================
! Variables initialization:
!
! ONLY done if there is no restart computation
!===============================================================================
if (isuite.eq.0) then
! --- Initialisation de la temperature de l'air a 11 deg Celsius
! de l'humidite de l'air a 0.0063
! pour toutes les cellules
do iel = 1, ncel
rtp(iel,isca(itemp4)) = 11.d0
rtp(iel,isca(ihumid)) = 0.0063d0
enddo
! --- Initialisation de la temperature de l'air a 20 deg Celsius
! de l'humidite de l'air a 0.012
! de la vitesse
! uniquement pour les cellules de couleur 6
call getcel('6', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
iel = lstelt(ilelt)
rtp(iel,iu) = -0.5d0
rtp(iel,isca(itemp4)) = 20.d0
rtp(iel,isca(ihumid)) = 0.012d0
enddo
endif

Finalization

At the end of the subroutine, it is recommended to deallocate the work array lstelt, like in basic example.