1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 ! Driver for stain0.f subroutine
3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8 Use Auxiliar_Procedures
17 !! GRID RESULTS OF STRAIN0
19 REAL, ALLOCATABLE
, DIMENSION(:,:,:) :: P_SPONT
,P_PIEZO
, &
20 EXX
,EYY
,EZZ
,EXZ
,EYZ
,EXY
, &
21 EEL
,EHHUP
,EHHDW
,ELHUP
, &
22 ELHDW
,ESOUP
,ESODW
,ELAST
,&
27 SUBROUTINE PIEZO(P_SPONT
,P_PIEZO
)
28 REAL,DIMENSION(:,:,:) :: P_SPONT
,P_PIEZO
30 SUBROUTINE STRAIN0(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
31 REAL,DIMENSION(:,:,:) :: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
33 SUBROUTINE DISPLACEMENT(UR
,UX
,UY
,UZ
)
34 REAL,DIMENSION(:,:,:) :: UR
,UX
,UY
,UZ
36 SUBROUTINE POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
37 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
39 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
41 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
44 SUBROUTINE POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
45 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
47 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
,POT
49 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
54 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
62 RD
= Rqd_Base
/RC
! RD = Rqd_Base normalized to RC
63 HD
= Hqd
/ZC
! HD = HQD normalized to ZC
65 D
=DWL
/ZC
! Wetting layer thick. normalized to ZC
68 !!! ELECTROSTATIC POTENTIAL AND STRAIN DISTRIBUTION !!!!!!!!!!!!!!!!!!
70 IF(PZO_Action
.EQ
.1.AND
.STR_Action
.EQ
.1) THEN
72 ALLOCATE (P_SPONT(1:XDim
,1:YDim
,1:ZDim
),&
73 P_PIEZO(1:XDim
,1:YDim
,1:ZDim
) )
74 ALLOCATE (EXX(1:XDim
,1:YDim
,1:ZDim
),EYY(1:XDim
,1:YDim
,1:ZDim
), &
75 EZZ(1:XDim
,1:YDim
,1:ZDim
),EXZ(1:XDim
,1:YDim
,1:ZDim
), &
76 EXY(1:XDim
,1:YDim
,1:ZDim
),EYZ(1:XDim
,1:YDim
,1:ZDim
) )
80 WRITE(6,*)"Begins the calculation of the Electrostatic Potential"
81 CALL PIEZO(P_SPONT
,P_PIEZO
)
82 WRITE(6,*)"Calculation of the Electrostatic Potential ended"
83 WRITE(6,*)"Begins the calculation of the Strain Field"
84 CALL STRAIN0(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
85 WRITE(6,*)"Calculation of the Strain Field ended"
87 CALL NCPACK_PZ(P_SPONT
,P_PIEZO
)
89 CALL NCPACK_CART(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
91 CALL NCPACK_CYL(EXX
,EYY
,EZZ
,EXZ
)
96 IF(PZO_Action
.EQ
.1) THEN
97 ALLOCATE (P_SPONT(1:XDim
,1:YDim
,1:ZDim
),&
98 P_PIEZO(1:XDim
,1:YDim
,1:ZDim
) )
100 CALL CONSTANTS_PZO( )
102 WRITE(6,*)"Begins the calculation of the Electrostatic Potential"
103 CALL PIEZO(P_SPONT
,P_PIEZO
)
104 WRITE(6,*)"Calculation of the Electrostatic Potential ended"
106 CALL NCPACK_PZ(P_SPONT
,P_PIEZO
)
109 IF(STR_Action
.EQ
.1) THEN
110 ALLOCATE (EXX(1:XDim
,1:YDim
,1:ZDim
),EYY(1:XDim
,1:YDim
,1:ZDim
), &
111 EZZ(1:XDim
,1:YDim
,1:ZDim
),EXZ(1:XDim
,1:YDim
,1:ZDim
), &
112 EXY(1:XDim
,1:YDim
,1:ZDim
),EYZ(1:XDim
,1:YDim
,1:ZDim
) )
114 CALL CONSTANTS_STR( )
116 WRITE(6,*)"Begins the calculation of the Strain Field"
117 CALL STRAIN0(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
118 WRITE(6,*)"Calculation of the Strain Field ended"
121 CALL NCPACK_CART(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
123 CALL NCPACK_CYL(EXX
,EYY
,EZZ
,EXZ
)
130 IF(STR_Action
.EQ
.2) THEN
131 ALLOCATE (EXX(1:XDim
,1:YDim
,1:ZDim
),EYY(1:XDim
,1:YDim
,1:ZDim
), &
132 EZZ(1:XDim
,1:YDim
,1:ZDim
),EXZ(1:XDim
,1:YDim
,1:ZDim
), &
133 EXY(1:XDim
,1:YDim
,1:ZDim
),EYZ(1:XDim
,1:YDim
,1:ZDim
) )
135 CALL NCREAD_CART(EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
)
137 CALL NCREAD_CYL(EXX
,EYY
,EZZ
,EXZ
)
141 IF(PZO_Action
.EQ
.2) THEN
142 ALLOCATE (P_SPONT(1:XDim
,1:YDim
,1:ZDim
),&
143 P_PIEZO(1:XDim
,1:YDim
,1:ZDim
) )
145 CALL NCREAD_PZ(P_SPONT
,P_PIEZO
)
149 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
150 !!! CONFINEMENT POTENTIAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
151 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
153 IF(POT_Action
.NE
.0) THEN
155 WRITE(6,*)"Begins the calculation of the Confinement Potential"
157 ALLOCATE (EEL(1:XDim
,1:YDim
,1:ZDim
),EHHUP(1:XDim
,1:YDim
,1:ZDim
), &
158 EHHDW(1:XDim
,1:YDim
,1:ZDim
),ELHUP(1:XDim
,1:YDim
,1:ZDim
), &
159 ELHDW(1:XDim
,1:YDim
,1:ZDim
),ESOUP(1:XDim
,1:YDim
,1:ZDim
), &
160 ESODW(1:XDim
,1:YDim
,1:ZDim
),ELAST(1:XDim
,1:YDim
,1:ZDim
))
165 IF(STR_Action
.GT
.0) THEN
166 CALL POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
167 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
170 CALL POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
174 IF(STR_Action
.NE
.0.AND
.PZO_Action
.NE
.0) THEN
175 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
176 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
181 IF(STR_Action
.NE
.0) &
182 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
183 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
186 IF(PZO_Action
.NE
.0) &
187 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
191 IF(STR_Action
.EQ
.0.AND
.PZO_Action
.EQ
.0) THEN
192 CALL POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
198 WRITE(6,*)"Calculation of the Confinement Potential ended"
200 CALL NCPACK_PT(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
204 IF(DPL_Action
.EQ
.1) THEN
206 IF(.NOT
.(STR_Action
.EQ
.1.AND
.PZO_Action
.EQ
.1)) &
207 CALL CONSTANTS_DSP( )
209 ALLOCATE (UX(1:XDim
,1:YDim
,1:ZDim
),UY(1:XDim
,1:YDim
,1:ZDim
), &
210 UZ(1:XDim
,1:YDim
,1:ZDim
), UR(1:XDim
,1:YDim
,1:ZDim
) )
212 WRITE(6,*)"Begins the calculation of the Displacement Field"
213 CALL DISPLACEMENT(UR
,UX
,UY
,UZ
)
214 WRITE(6,*)"Calculation of the Displacement Field ended"
217 CALL NCPACK_DPL_CART(UX
,UY
,UZ
)
219 CALL NCPACK_DPL_CYL(UR
,UZ
)