Libby-Williams gas example
Local variables to be added
The following local variables need to be defined for the examples in this section:
integer          iel, mode, igg, izone
double precision hinit, coefg(
ngazgm)
 
double precision sommqf, sommqt, sommq, tentm, fmelm
character*80     chaine
integer          iscal, ivar, ii
double precision valmax, valmin
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:
enddo
  
  
    sommqf = sommqf + qimp(izone)*fment(izone)
    sommqt = sommqt + qimp(izone)*tkent(izone)
    sommq  = sommq  + qimp(izone)
  enddo
  if (abs(sommq).gt.
epzero) 
then 
    fmelm = sommqf / sommq
    tentm = sommqt / sommq
  else
  endif
  
  
    coefg(1) = fmelm
    coefg(2) = (1.d0-fmelm)
    mode     = -1
    
    
    
        hinit  , tentm )
  endif
    
    
    
    
    
    
    endif
    
    endif
  enddo
  
      valmax = max(valmax,rtp(iel,ivar))
      valmin = min(valmin,rtp(iel,ivar))
    enddo
    endif
    write(
nfecra,2010)chaine(1:8),valmin,valmax
 
  enddo
endif
  
Finalization
At the end of the subroutine, it is recommended to deallocate the work array lstelt, like in basic example.