Electric arcs example
Local variables to be added
The following local variables need to be defined for the examples in this section:
integer iel, mode
integer iesp , idimve
double precision tinit, hinit, coefe(
ngazem)
character(len=80) :: f_name
integer, allocatable, dimension(:) :: lstelt
double precision, dimension(:), pointer :: cvar_scalt, cvar_ycoel
double precision, dimension(:), pointer :: cvar_potr, cvar_poti
double precision, dimension(:,:), pointer :: cvar_potva
Allocation
Before user initialization, work arrays lstelt must be allocated, like in basic example.
Initialization
Classical initialization:
mode = -1
coefe(1) = 1.d0
coefe(iesp) = 0.d0
enddo
endif
call
elthht(mode,coefe,hinit,tinit)
else
mode = -1
endif
cvar_scalt(iel) = hinit
enddo
write(f_name,'(a13,i2.2)') 'esl_fraction_', 1
cvar_ycoel(iel) = 1.d0
enddo
write(f_name,'(a13,i2.2)') 'esl_fraction_',iesp
cvar_ycoel(iel) = 0.d0
enddo
enddo
endif
cvar_potr(iel) = 0.d0
enddo
cvar_poti(iel) = 0.d0
enddo
endif
cvar_potva(1, iel) = 0.d0
cvar_potva(2, iel) = 0.d0
cvar_potva(3, iel) = 0.d0
enddo
endif
endif
Finalization
At the end of the subroutine, it is recommended to deallocate the work array lstelt, like in basic example.