1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 ! Driver for stain0.f subroutine
3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8 Use Auxiliar_Procedures
16 !! GRID RESULTS OF STRAIN0
18 REAL, ALLOCATABLE
, DIMENSION(:,:,:) :: P_SPONT
,P_PIEZO
, &
19 EXX
,EYY
,EZZ
,EXZ
,EYZ
,EXY
, &
20 EEL
,EHHUP
,EHHDW
,ELHUP
, &
21 ELHDW
,ESOUP
,ESODW
,ELAST
25 SUBROUTINE PIEZO(P_SPONT
,P_PIEZO
)
26 REAL,DIMENSION(:,:,:) :: P_SPONT
,P_PIEZO
28 SUBROUTINE STRAIN0(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
29 REAL,DIMENSION(:,:,:) :: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
31 SUBROUTINE POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
32 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
34 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
36 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
39 SUBROUTINE POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
40 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
42 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
,POT
44 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
49 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
57 RD
= Rqd_Base
/RC
! RD = Rqd_Base normalized to RC
58 HD
= Hqd
/ZC
! HD = HQD normalized to ZC
60 D
=DWL
/ZC
! Wetting layer thick. normalized to ZC
63 !!! ELECTROSTATIC POTENTIAL AND STRAIN DISTRIBUTION !!!!!!!!!!!!!!!!!!
65 IF(PZO_Action
.EQ
.1.AND
.STR_Action
.EQ
.1) THEN
67 ALLOCATE (P_SPONT(1:XDim
,1:YDim
,1:ZDim
),&
68 P_PIEZO(1:XDim
,1:YDim
,1:ZDim
) )
69 ALLOCATE (EXX(1:XDim
,1:YDim
,1:ZDim
),EYY(1:XDim
,1:YDim
,1:ZDim
), &
70 EZZ(1:XDim
,1:YDim
,1:ZDim
),EXZ(1:XDim
,1:YDim
,1:ZDim
), &
71 EXY(1:XDim
,1:YDim
,1:ZDim
),EYZ(1:XDim
,1:YDim
,1:ZDim
) )
75 WRITE(6,*)"Begins the calculation of the Electrostatic Potential"
76 CALL PIEZO(P_SPONT
,P_PIEZO
)
77 WRITE(6,*)"Calculation of the Electrostatic Potential Ended"
78 WRITE(6,*)"Begins the calculation of the Strain Field"
79 CALL STRAIN0(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
80 WRITE(6,*)"Calculation of the Strain Field Ended"
82 CALL NCPACK_PZ(P_SPONT
,P_PIEZO
)
84 CALL NCPACK_CART(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
86 CALL NCPACK_CYL(EXX
,EYY
,EZZ
,EXZ
)
91 IF(PZO_Action
.EQ
.1) THEN
92 ALLOCATE (P_SPONT(1:XDim
,1:YDim
,1:ZDim
),&
93 P_PIEZO(1:XDim
,1:YDim
,1:ZDim
) )
97 WRITE(6,*)"Begins the calculation of the Electrostatic Potential"
98 CALL PIEZO(P_SPONT
,P_PIEZO
)
99 WRITE(6,*)"Calculation of the Electrostatic Potential Ended"
101 CALL NCPACK_PZ(P_SPONT
,P_PIEZO
)
104 IF(STR_Action
.EQ
.1) THEN
105 ALLOCATE (EXX(1:XDim
,1:YDim
,1:ZDim
),EYY(1:XDim
,1:YDim
,1:ZDim
), &
106 EZZ(1:XDim
,1:YDim
,1:ZDim
),EXZ(1:XDim
,1:YDim
,1:ZDim
), &
107 EXY(1:XDim
,1:YDim
,1:ZDim
),EYZ(1:XDim
,1:YDim
,1:ZDim
) )
109 CALL CONSTANTS_STR( )
111 WRITE(6,*)"Begins the calculation of the Strain Field"
112 CALL STRAIN0(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
113 WRITE(6,*)"Calculation of the Strain Field Ended"
116 CALL NCPACK_CART(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
118 CALL NCPACK_CYL(EXX
,EYY
,EZZ
,EXZ
)
125 IF(STR_Action
.EQ
.2) THEN
126 ALLOCATE (EXX(1:XDim
,1:YDim
,1:ZDim
),EYY(1:XDim
,1:YDim
,1:ZDim
), &
127 EZZ(1:XDim
,1:YDim
,1:ZDim
),EXZ(1:XDim
,1:YDim
,1:ZDim
), &
128 EXY(1:XDim
,1:YDim
,1:ZDim
),EYZ(1:XDim
,1:YDim
,1:ZDim
) )
130 CALL NCREAD_CART(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
132 CALL NCREAD_CYL(EXX
,EYY
,EZZ
,EXZ
)
136 IF(PZO_Action
.EQ
.2) THEN
137 ALLOCATE (P_SPONT(1:XDim
,1:YDim
,1:ZDim
),&
138 P_PIEZO(1:XDim
,1:YDim
,1:ZDim
) )
140 CALL NCREAD_PZ(P_SPONT
,P_PIEZO
)
144 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
145 !!! CONFINEMENT POTENTIAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
146 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
148 IF(POT_Action
.NE
.0) THEN
150 WRITE(6,*)"Begins the calculation of the Confinement Potential"
152 ALLOCATE (EEL(1:XDim
,1:YDim
,1:ZDim
),EHHUP(1:XDim
,1:YDim
,1:ZDim
), &
153 EHHDW(1:XDim
,1:YDim
,1:ZDim
),ELHUP(1:XDim
,1:YDim
,1:ZDim
), &
154 ELHDW(1:XDim
,1:YDim
,1:ZDim
),ESOUP(1:XDim
,1:YDim
,1:ZDim
), &
155 ESODW(1:XDim
,1:YDim
,1:ZDim
),ELAST(1:XDim
,1:YDim
,1:ZDim
))
160 IF(STR_Action
.GT
.0) THEN
161 CALL POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
162 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
165 CALL POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
169 IF(STR_Action
.NE
.0.AND
.PZO_Action
.NE
.0) THEN
170 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
171 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
176 IF(STR_Action
.NE
.0) &
177 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
178 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
181 IF(PZO_Action
.NE
.0) &
182 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
186 IF(STR_Action
.EQ
.0.AND
.PZO_Action
.EQ
.0) THEN
187 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
193 WRITE(6,*)"Calculation of the Confinement Potential Ended"
195 CALL NCPACK_PT(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&