Subroutine readEG

出自 DDCC TCAD TOOL Manual
於 2017年12月5日 (二) 09:34 由 Yrwu (對話 | 貢獻) 所做的修訂 (已建立頁面,內容為 "Subroutine readEG is the subroutine belong to the strain-stress solver, which is activated by the command $uselocalelement. This subroutine is called after the s...")

(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
前往: 導覽搜尋

Subroutine readEG is the subroutine belong to the strain-stress solver, which is activated by the command $uselocalelement. This subroutine is called after the strain-stress solver read in the input file and allocated all parameters to the global memory. The subroutine allows users to modify the coefficients locally according to the special conditions. Example:

   subroutine readEG
   use meshelement
   use Strain3Dglobal
 
   implicit none
   real(dp) :: x,y,z,xp,yp,zp,dd,cc
   real,parameter :: GaN_horri_lattice=3.189,GaN_vertical_lattice=5.185
   real,parameter :: InN_horri_lattice=3.54, InN_vertical_lattice=5.705
   real,parameter :: GaN_c11_elastic=36.7,GaN_c12_elastic=13.5,GaN_c13_elastic=10.3,GaN_c33_elastic=40.5,GaN_c44_elastic=9.5,GaN_c66_elastic=11.6
   real,parameter :: InN_c11_elastic=22.3,InN_c12_elastic=11.5,InN_c13_elastic= 9.2,InN_c33_elastic=22.4,InN_c44_elastic=4.8,InN_c66_elastic= 5.4
   real,parameter :: GaN_e31=-0.49,GaN_e33=0.73,GaN_e15=-0.4
   real,parameter :: InN_e31=-0.49,InN_e33=0.73,InN_e15=-0.4
   real,parameter :: AlN_horri_lattice=3.112,AlN_vertical_lattice=4.982
   real,parameter :: AlN_c11_elastic=39.6,AlN_c12_elastic=13.7,AlN_c13_elastic=10.8,AlN_c33_elastic=37.3,AlN_c44_elastic=11.6,AlN_c66_elastic=12.95
   real,parameter :: AlN_e33=1.55,AlN_e31=-0.58,AlN_e15=-0.48
   real           :: Incom ,Psp_InGaN, Psp_GaN, Ppz_InGaN_GaN ,zmid,Ppz_AlGaN_GaN,Psp_AlGaN,summ,temp
   real, allocatable      ::Incomm(:)
   real, allocatable      ::Alcomm(:)
   real,allocatable::horizontalstrain(:),verticalstrain(:),shearstrain(:),approx_pol(:),approx_pol2(:)
   integer*4:: nodetype ,i ,j,k,test, Lx,Ly,Lz,Nx,Ny,Nz,ii,jj,kk,ix,iy,iz
   character(len=30) :: nonsense
   allocate(Incomm(totalnodes))
   allocate(Alcomm(totalnodes))
   Incomm=0.0
   Alcomm=0.0
   open(unit =61, file='In.out', status='old' )
   open(unit =62, file='Al.out', status='old' )
   do i=1,10
       read(61,*) nonsense
       read(62,*) nonsense
   end do
   read(61,*)i
   read(62,*)i
   do j=1,i
       read(61,*) k,Incomm(j)
       read(62,*)k,Alcomm(j)
   end do



   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   allocate(approx_pol(totalelements))
   allocate(approx_pol2(totalelements))
   approx_pol=0.0d0
   approx_pol2=0.0d0
   do j=1,totalelements!mshel%tetraelenumstart,mshel%n
       node1=elementsnodes(j,6)
       node2=elementsnodes(j,7)
       node3=elementsnodes(j,8)
       node4=elementsnodes(j,9)
     
       incom=(incomm(node1)+incomm(node2)+incomm(node3)+incomm(node4))/4.0
       elementlatticeconstant(j,1)=InN_horri_lattice*incom+GaN_horri_lattice*(1-incom)
       elementlatticeconstant(j,2)=elementlatticeconstant(j,1)
       elementlatticeconstant(j,3)=InN_vertical_lattice*incom+GaN_vertical_lattice*(1-incom)
       elementelasticconstant(1,1,j)=InN_c11_elastic*incom+GaN_c11_elastic*(1-incom)
       elementelasticconstant(1,2,j)=InN_c12_elastic*incom+GaN_c12_elastic*(1-incom)
       elementelasticconstant(1,3,j)=InN_c13_elastic*incom+GaN_c13_elastic*(1-incom)
       elementelasticconstant(2,1,j)=elementelasticconstant(1,2,j)
       elementelasticconstant(2,2,j)=elementelasticconstant(1,1,j)
       elementelasticconstant(2,3,j)=elementelasticconstant(1,3,j)
       elementelasticconstant(3,1,j)=elementelasticconstant(1,3,j)
       elementelasticconstant(3,2,j)=elementelasticconstant(1,3,j)
       elementelasticconstant(3,3,j)=InN_c33_elastic*incom+GaN_c33_elastic*(1-incom)
       elementelasticconstant(4,4,j)=InN_c44_elastic*incom+GaN_c44_elastic*(1-incom)
       elementelasticconstant(5,5,j)=elementelasticconstant(4,4,j)
       elementelasticconstant(6,6,j)=InN_c66_elastic*incom+GaN_c66_elastic*(1-incom)
       elementepiezoelectric(1,j)=InN_e33*incom+GaN_e33*(1-incom)
      
       elementepiezoelectric(2,j)=InN_e31*incom+GaN_e31*(1-incom)
       elementepiezoelectric(3,j)=InN_e15*incom+GaN_e15*(1-incom)
       incom=(Alcomm(node1)+Alcomm(node2)+Alcomm(node3)+Alcomm(node4))/4.0   !AlGaN
       if(abs(incom) > 1.0e-6 ) then
           elementlatticeconstant(j,1)=AlN_horri_lattice*incom+GaN_horri_lattice*(1-incom)
           elementlatticeconstant(j,2)=elementlatticeconstant(j,1)
           elementlatticeconstant(j,3)=AlN_vertical_lattice*incom+GaN_vertical_lattice*(1-incom)
           elementelasticconstant(1,1,j)=AlN_c11_elastic*incom+GaN_c11_elastic*(1-incom)
           elementelasticconstant(1,2,j)=AlN_c12_elastic*incom+GaN_c12_elastic*(1-incom)
           elementelasticconstant(1,3,j)=AlN_c13_elastic*incom+GaN_c13_elastic*(1-incom)
           elementelasticconstant(2,1,j)=elementelasticconstant(1,2,j)
           elementelasticconstant(2,2,j)=elementelasticconstant(1,1,j)
           elementelasticconstant(2,3,j)=elementelasticconstant(1,3,j)
           elementelasticconstant(3,1,j)=elementelasticconstant(1,3,j)
           elementelasticconstant(3,2,j)=elementelasticconstant(1,3,j)
           elementelasticconstant(3,3,j)=AlN_c33_elastic*incom+GaN_c33_elastic*(1-incom)
           elementelasticconstant(4,4,j)=AlN_c44_elastic*incom+GaN_c44_elastic*(1-incom)
           elementelasticconstant(5,5,j)=elementelasticconstant(4,4,j)
           elementelasticconstant(6,6,j)=AlN_c66_elastic*incom+GaN_c66_elastic*(1-incom)
           elementepiezoelectric(1,j)=AlN_e33*incom+GaN_e33*(1-incom)
           elementepiezoelectric(2,j)=AlN_e31*incom+GaN_e31*(1-incom)
           elementepiezoelectric(3,j)=AlN_e15*incom+GaN_e15*(1-incom)
       end if
   end do