Subroutine parameter mod
跳至導覽
跳至搜尋
subroutine parameter_mod is a powerful module. This subroutine is called after the program reads in all parameters and all node's material properties. After all parameters are assigned and users used this command $assignparbyfunc, The program will call this subroutine if 2D-ddcc-dyna.exe in linux version is used. You don't need to assigned or modify all parameters listed below. You only need to modify what you want to change.
This subroutine is only for experts. Any wrong assignment will lead the program to crash
subroutine parameter_mod use nrtype use global2d use global2dextra use utility, only : findinarray,lintp ,ifintriangleperiod !,callgeneration implicit none integer(I4B) :: i,j,k,i1,i2 ,ksk real(dp) :: const,temp1,temp2,temp3,KBT real(dp) :: xl, xr, yb ,yt , me_1,me_2,mhh,mlh, Incom, AA,BB,CC,DD, tempEg,TempM(4),tempPE(2),tempdi(2) logical :: notfind , errorstop
KBT=KB*par%t
const=2.0_dp*((M0*KB*par%t)/(TWOPI_D*HBAR*HBAR))**1.5
print *, "loading parameters to nodes"
do i = 1,me%nnode
if( (me%x(i)>xl) .and. (me%x(i)<xr) .and. (me%y(i)>yb) .and. (me%y(i)<yt) ) then
me%eg(i) = tempEg ! bandgap (eV)
me%dope(i) = 1.0e18 ! doping (1/cm^3)
me%ea(i) = 0.025 ! activation energy (eV)
me%ea(i) = 0.025 ! activation energy (eV)
me%efmass(1,i) = tempM(1) ! effective mass of electron
me%efmass(2,i) = tempM(2) ! effective mass of electron perp
me%efmass(3,i) = tempM(3) ! effective mass of HHnano
me%efmass(4,i) = tempM(4) ! effective mass of LF
me%pe(1,i) =tempPE(1) ! polarization of z
me%pe(2,i) =0.0 ! polarization of x
me%xnd(i)= 1.0e0 ! impurity doping of material
me%taun(i) = 1.0e-8 ! nonradiative lifetime electron
me%taup(i) = 1.0e-8 ! nonradiative lifetime hole
me%mun(i) = 300.0 ! electron mobility
me%mup(i) = 10.0 ! hole mobility
me%Ecoff(i) = 0.5 ! band offset
me%par(i) = 1 ! assign this region is equal to original input file's region number (If you don't know what it means, marked it !me%par(i)
me%xnc(i)= const*(me%efmass(1,i)*me%efmass(1,i)*me%efmass(2,i))**0.5 ! don't modify this part
me%generation(i)=real(i) ! generation rate here is simply a demo
affinity(i)=4.0_dp ! material affinity
affinitypar(me%par(i))=29.0_dp
end if
end do
! Here is to assign element's parameter
do i = 1,me%nelement
if( (me%xp(i) >= xl) .and. (me%xp(i) < xr) .and. &
(me%yp(i)<= yt) .and. (me%yp(i)> yb) ) then
me%diEL(1:2,i) = 12.90*8.85d-14 ! dielectri constant along x(1) y(2)
me%egEL(i) = 3.3 ! assign the element's eg (eV)
me%peEl(1,i) = 1.0e13 ! assign the element's polarization field in z
me%peEl(2,i) = 0.0 ! assign the element's polarization field in x
me%munEl(i) =300.0 ! electron mobility
me%mupEl(i) =10.0 ! hole mobility
me%parEl(i) = 1 ! assign this region is equal to original input file's region number (If you don't know what it means, marked it !me%parEl(i)
affinityEL(i) = 4.0_dp ! assign the affinity of element
end if
end do
print*,"This is a demo of libmodpar.f90. You should not use this one without proper changes. The program will be stopped unless you unmark stop command"
stop
end subroutine