My Project
programmer's documentation
Gas 3 PTCHEM example

Gas 3 PTCHEM example

Local variables to be added

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

integer iel, igg
double precision coefg(ngazgm)
integer, allocatable, dimension(:) :: lstelt
double precision, dimension(:), pointer :: cvar_fm, cvar_fp2m, cvar_scalt

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
! Control output
write(nfecra,9001)
do igg = 1, ngazgm
coefg(igg) = zero
enddo
!===============================================================================
! Variables initialization:
!
! ONLY done if there is no restart computation
!===============================================================================
if ( isuite.eq.0 ) then
do iel = 1, ncel
! ----- Mean Mixture Fraction
cvar_fm(iel) = fs(1)
! ----- Variance of Mixture Fraction
cvar_fp2m(iel) = zero
! ----- Enthalpy
if ( ippmod(icod3p).eq.1 ) then
cvar_scalt(iel) = hinfue*fs(1)+hinoxy*(1.d0-fs(1))
endif
enddo
endif

Finalization

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