Function usefielddependent p(indEl, matind, Ex, Ey, T, xp, yp)

出自 DDCC Documentation
前往: 導覽搜尋

Function usefielddependent_n(indEl, matind ,Ex,Ey,T,xp,yp) is activated by the command $usefieldmufunc. This function is similar to command $useemunfunc, $useemupfunc. But this function provide more parameters for use to assign in the input file. Therefore, this function can be continuous expanded to many different mobility models.

Here

Ex is the electric field in x direction
Ey is the electric field in y direction
T is the element's temperature
matind is which region assign in input file the element's belongs to 
indEl is the element's index number
   function usefielddependent_p(indEl, matind, Ex, Ey, T, xp, yp)
   use global2Dextra3
   use nrtype
   use global2D, only : KB
   implicit none
   real(dp)  ::  usefielddependent_p
   integer(i4b),intent(in)  :: indEl, matind
   integer(i4b)  :: i,j,k
   real(dp),intent(in) :: Ex, Ey ,T ,xp,yp
   real(dp) :: mu, E, muconst
   if(munpfunctype(matind)==1) then
       if(Ey<0) then
           E=0
       else
           E=Ey
       end if
       !E=abs(Ey)
       if(munpfuncpara(4,matind)*sqrt(E) < 50.0_dp) then
           mu= munpfuncpara(3,matind)*exp(munpfuncpara(4,matind)*sqrt(E))
       else
           mu= munpfuncpara(3,matind)*exp(50.0_dp)
       end if
       usefielddependent_p=mu
   elseif(munpfunctype(matind)==11) then
       if(Ey>0) then
           E=0
       else
           E=abs(Ey)
       end if
       !E=abs(Ey)
       if(munpfuncpara(4,matind)*sqrt(E) < 50.0_dp) then
           mu= munpfuncpara(3,matind)*exp(munpfuncpara(4,matind)*sqrt(E))
       else
           mu= munpfuncpara(3,matind)*exp(50.0_dp)
       end if
       usefielddependent_p=mu
   elseif(munpfunctype(matind)==2) then
       if(Ex<0) then
           E=0
       else
           E=Ex
       end if
       !E=abs(Ey)
       if(munpfuncpara(4,matind)*sqrt(E) < 50.0_dp) then
           mu= munpfuncpara(3,matind)*exp(munpfuncpara(4,matind)*sqrt(E))
       else
           mu= munpfuncpara(3,matind)*exp(50.0_dp)
       end if
       usefielddependent_p=mu
   elseif(munpfunctype(matind)==21) then
       if(Ex>0) then
           E=0
       else
           E=abs(Ex)
       end if
       !E=abs(Ey)
       if(munpfuncpara(4,matind)*sqrt(E) < 50.0_dp) then
           mu= munpfuncpara(3,matind)*exp(munpfuncpara(4,matind)*sqrt(E))
       else
           mu= munpfuncpara(3,matind)*exp(50.0_dp)
       end if
       usefielddependent_p=mu
   end if
   !stop
   end function