Skip to content

Commit

Permalink
v 1.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramyalameha committed Jul 9, 2021
1 parent 3e9a7ec commit e32d317
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
24 changes: 14 additions & 10 deletions soc/Eatools_2Dadv.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
!```````````````````````````````````````````````````````````````````````````````````````````
! SUBROUTINE: fOR 2D MATERIAL , CALCULATED shear modulus.

!REF: Jasiukiewicz, Cz, T. Paszkiewicz, and S. Wolski. "Auxetic properties and anisotropy of elastic material constants of 2D crystalline media."
!physica status solidi (b) 245.3 (2008): 562-569.

SUBROUTINE adv_2D(phi,phi_pro,l,pro,method,Max_pro, Min_pro)
implicit none
CHARACTER(len=5) :: pro
Expand All @@ -29,11 +32,11 @@ SUBROUTINE adv_2D(phi,phi_pro,l,pro,method,Max_pro, Min_pro)

IF(method == 'adv' .and. pro == "shear" ) THEN
G_inver = S(1,1) * ( COS(phi)*COS(phi)*SIN(phi)*SIN(phi) ) +&
S(1,2) *-2.D0*( COS(phi)*SIN(phi)*SIN(phi)*COS(phi) ) +&
S(2,2) * ( SIN(phi)*SIN(phi)*COS(phi)*COS(phi) ) +&
S(1,3) * ( SIN(phi)*SIN(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*COS(phi)*COS(phi) )+&
S(2,3) * ( COS(phi)*COS(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*SIN(phi)*SIN(phi) )+&
S(3,3) * ( COS(phi)*COS(phi)*COS(phi)*COS(phi) - 2.D0*COS(phi)*SIN(phi)*SIN(phi)*COS(phi) + SIN(phi)*SIN(phi)*SIN(phi)*SIN(phi) ) * (1.d0/4.d0)
S(1,2) *-2.D0*( COS(phi)*SIN(phi)*SIN(phi)*COS(phi) ) +&
S(2,2) * ( SIN(phi)*SIN(phi)*COS(phi)*COS(phi) ) +&
S(1,3) * ( SIN(phi)*SIN(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*COS(phi)*COS(phi) )+&
S(2,3) * ( COS(phi)*COS(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*SIN(phi)*SIN(phi) )+&
S(3,3) * ( COS(phi)*COS(phi)*COS(phi)*COS(phi) - 2.D0*COS(phi)*SIN(phi)*SIN(phi)*COS(phi) + SIN(phi)*SIN(phi)*SIN(phi)*SIN(phi) ) * (1.d0/4.d0)
phi_pro(l) = 1.D0/(4.D0*G_inver)

ENDIF
Expand All @@ -47,7 +50,7 @@ SUBROUTINE adv_2D(phi,phi_pro,l,pro,method,Max_pro, Min_pro)
S(2,3) *2.d0*( SIN(phi)*COS(phi)*COS(phi)*COS(phi) )
phi_pro(l) = 1.D0 / E_inver

endif
ENDIF
IF(method == 'adv' .and. pro == "poi" ) THEN
E_inver = S(1,1) * ( COS(phi)*COS(phi)*COS(phi)*COS(phi) ) +&
S(1,2) *2.d0*( SIN(phi)*COS(phi)*SIN(phi)*COS(phi) ) +&
Expand All @@ -59,9 +62,9 @@ SUBROUTINE adv_2D(phi,phi_pro,l,pro,method,Max_pro, Min_pro)
poi_inver = S(1,1) * ( SIN(phi)*SIN(phi)*COS(phi)*COS(phi) ) +&
S(1,2) * ( SIN(phi)*SIN(phi)*SIN(phi)*SIN(phi) + COS(phi)*COS(phi)*COS(phi)*COS(phi) )+&
S(2,2) * ( SIN(phi)*SIN(phi)*COS(phi)*COS(phi) ) +&
S(1,3) * ( SIN(phi)*SIN(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*COS(phi)*COS(phi) )+&
S(1,3) * ( SIN(phi)*SIN(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*COS(phi)*COS(phi) )+&
S(2,3) * ( COS(phi)*COS(phi)*COS(phi)*SIN(phi) - SIN(phi)*COS(phi)*SIN(phi)*SIN(phi) )+&
S(3,3) * ( SIN(phi)*COS(phi)*COS(phi)*SIN(phi) * -1.D0 )
S(3,3) * ( SIN(phi)*COS(phi)*COS(phi)*SIN(phi) * -1.0D0 )
phi_pro(l) = -(poi_inver / E_inver)
!WRITE(*,*) phi*(180D0/3.1415),phi_pro(l) ,l
IF (l.EQ.0) THEN
Expand All @@ -72,10 +75,11 @@ SUBROUTINE adv_2D(phi,phi_pro,l,pro,method,Max_pro, Min_pro)
!WRITE(*,*) phi*(180D0/3.1415),Max_pro
END IF
IF (phi_pro(l).LE.Min_pro) THEN
Min_pro=phi_pro(l)
Min_pro=phi_pro(l)
!WRITE(*,*) Min_pro
END IF
END IF
ENDIF
!===============================================

END SUBROUTINE
END SUBROUTINE
15 changes: 7 additions & 8 deletions soc/Eatools_2Danalyz.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,21 @@ SUBROUTINE analiz_2D_sys(method)

phi_pro=0.0
Max_pro = 0D0
Min_pro = 3.5D0
Min_pro = 3.6D0
!!!!!!!!
pro = "poi"
call adv_2D(phi,phi_pro,j,pro,method,Max_pro,Min_pro)
phi_poisson=phi_pro(j)
phi_poisson = phi_pro(j)
poisson2dmax(j) = Max_pro
IF (Min_pro.GE.0D0) poisson2dminp(j) = Min_pro
IF (Min_pro.LE.0D0) poisson2dminn(j) = Max_pro
IF (Min_pro.GE.0.0D0) poisson2dminp(j) = Min_pro
IF (Min_pro.LE.0.0D0) poisson2dminn(j) = Min_pro
WRITE(62,"(F8.4,3F20.16)")phi*(180d0/PI), poisson2dmax(j) ,poisson2dminp(j), poisson2dminn(j)

!!!!!!
pro = "young"
call adv_2D(phi,phi_pro,j,pro,method,Max_pro,Min_pro)
WRITE(61,"(F8.4,2F21.16)") phi*(180D0/PI), phi_pro(j)
phi_young(j)=phi_pro(j)



!!!!!!
phi_pro=0.0
pro = "shear"
call adv_2D(phi,phi_pro,j,pro,method,Max_pro,Min_pro)
Expand Down
36 changes: 25 additions & 11 deletions soc/Eatools_main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -317,26 +317,34 @@ PROGRAM AAEP_main
CALL WELCOME()
WRITE(*,*) ' '
CALL SYSTEM('sleep 1.5')
CALL SYSTEM('clear')

225 CALL SYSTEM('clear')
WRITE(*,*)" > Select system dimension:" !> go to type of system
WRITE(*,*)"========================"
CALL SYSTEM('tput setaf 36;tput bold; echo " ========================";tput sgr0')
!WRITE(*,*)"========================"
WRITE(*,*)" 3D-Materials------ => 3"
WRITE(*,*)" 2D-Materials------ => 2"
WRITE(*,*)"========================"
!WRITE(*,*)"========================"
CALL SYSTEM('tput setaf 36;tput bold; echo " ========================";tput sgr0')
READ(*,*) d2d3


IF(d2d3 == 3) then !@@@@@@@@@@@@@@@@@@@@@@@ 2D_3D system start
CALL SYSTEM('clear')
WRITE(*,*)" > Select using output code:"
WRITE(*,*)"============================================================"
CALL SYSTEM('tput setaf 33;tput bold; echo "============================================================";tput sgr0')
!WRITE(*,*)"============================================================"
WRITE(*,*)" IRelast-----------------------( wein2k )-=> 1"
WRITE(*,*)" Elast-------------------------( wein2k )-=> 2"
WRITE(*,*)" AELAS-------------------------( VASP )-=> 3"
WRITE(*,*)" ElaStic-----------------------( QE,Wien2k,Exciting )-=> 4"
WRITE(*,*)" Using Cij Tensor in Cij.dat---( Other codes )-=> 5"
WRITE(*,*)" Using EC Databank-------------( MP )-=> 6"
WRITE(*,*)"============================================================"
Write(*,*)" Back --------------------------------------------------=> 0"
!WRITE(*,*)"============================================================"
CALL SYSTEM('tput setaf 33;tput bold; echo "============================================================";tput sgr0')
READ(*,*) Ncod
IF(Ncod .EQ. 0) then; Goto 225; endif
IF (Ncod .eq. 1 .OR. Ncod .eq. 2 .OR. Ncod .eq. 3 .OR. Ncod .eq. 4 .OR. Ncod .eq. 5.OR. Ncod .eq. 6 ) THEN
WRITE(*,*)" > Want to calculate phase and group velocities? (Y/n)" !> select code for calculate of phase and group velocities
READ(*,*)yn_veloc
Expand Down Expand Up @@ -541,14 +549,18 @@ PROGRAM AAEP_main
WRITE(140,"(I2)")1
WRITE(140,*)'N'
close(140)

226 call system('clear')
WRITE(*,*)" > Select using output code:"
WRITE(*,*)"====================================================="
CALL SYSTEM('tput setaf 12;tput bold; echo " =====================================================";tput sgr0')
!WRITE(*,*)"====================================================="
WRITE(*,*)" AELAS ( VASP ) => 1"
WRITE(*,*)" IRelast2D ( WIEN2K ) => 2"
WRITE(*,*)" Using Cij Tensor in Cij-2D.dat (other codes) => 3"
WRITE(*,*)"====================================================="
WRITE(*,*)" Back ----------------------------------------- => 0"
!WRITE(*,*)"====================================================="
CALL SYSTEM('tput setaf 12;tput bold; echo " =====================================================";tput sgr0')
read(*,*) Ncod
IF(Ncod .EQ. 0) then; Goto 225; endif
IF (Ncod .EQ. 1) then
call system("sed '1,2d' ELADAT > ELADAT_temp")
OPEN(79,FILE="Cij-2D.dat")
Expand Down Expand Up @@ -624,10 +636,12 @@ PROGRAM AAEP_main
write(*,*) "========================="
WRITE(*,*) " Default option => 1 "
WRITE(*,*) " Advanced option => 2 "
WRITE(*,*) " Back => 0 "
write(*,*) "========================="
read(*,*)adv_mubner
IF (adv_mubner == 2 ) adv = "adv"
IF (adv_mubner == 1 ) adv = "ndv"
IF (adv_mubner == 0 ) goto 226
OPEN(11,FILE="Cij-2D.dat",status='old', err=13691)
READ(11,*) C2D(1,1),C2D(1,2),C2D(1,3)
READ(11,*) C2D(2,1),C2D(2,2),C2D(2,3)
Expand All @@ -647,7 +661,7 @@ PROGRAM AAEP_main
END IF
CALL sleep(1)
!<
CALL proelast_2D ()
CALL proelast_2D()
CALL sleep(2)
END IF
ELSE
Expand Down Expand Up @@ -1999,8 +2013,8 @@ PROGRAM AAEP_main
STOP

1369 WRITE(*,*) " > NOT FOUNDE Cij.dat FILE" ; STOP
13691 WRITE(*,*) " > NOT FOUNDE Cij-2D.dat FILE" ; STOP
13692 WRITE(*,*) " > NOT FOUNDE ELC-matrix FILE" ; STOP
13691 WRITE(*,*) " > NOT FOUNDE Cij-2D.dat FILE" ; STOP
13692 WRITE(*,*) " > NOT FOUNDE ELC-matrix FILE" ; STOP
1367 WRITE(*,*) " > NOT FOUNDE INVELC-matrix FILE" ; STOP
1366 WRITE(*,*) " > NOT FOUNDE elast.output FILE " ; STOP
1361 WRITE(*,*) " > NOT FOUNDE ELADAT FILE " ; STOP
Expand Down

0 comments on commit e32d317

Please sign in to comment.