Calculo correcto del desplazamiento en la capa mojante.
[ptslat.git] / input_str.f90
blob5c67c1acfc7b9ad7a71e5258b5350799f961004d
1 MODULE Input_Data
2 IMPLICIT NONE
4 REAL, SAVE :: A_S,B_S,C_S ! -> Superlattice constants
5 REAL, DIMENSION(3), SAVE :: A1_S,A2_S,A3_S ! -> Superlattice vectors
6 INTEGER, SAVE :: NMin_X,NMax_X,NMin_Y,NMax_Y,NMin_Z,NMax_Z
7 REAL, SAVE :: X_Min,X_Max,Y_Min,Y_Max,Z_Min,Z_Max
8 REAL, SAVE :: X_Inc,Y_Inc,Z_Inc
9 INTEGER, SAVE :: XDim,YDim,ZDim
10 INTEGER, SAVE :: KCOOR
12 !!! Material Parameters
13 REAL, SAVE :: XLAMB,XMU,C13,C33,C11,EPSC,EPSA
14 !!! Calculation Constants
15 REAL, SAVE :: ETA1,ETA2,ETA_DIF,CN02_1,CN02_2,CN42_1,CN42_2,&
16 CN31_1,CN31_2,CN1_2G,BISUM,BIZZ,BIAUX
18 !!! Normalized Dot Parameters
19 REAL, SAVE :: RC,ZC,D,RD,HD
21 CONTAINS
23 SUBROUTINE READ_INPUT()
25 Use Dot_Geometry
26 Use Auxiliar_Procedures, ONLY : AISO, MTYPE
28 IMPLICIT NONE
30 INTEGER :: NDots_X,NDots_Y,NDots_Z
31 INTEGER :: G_Method
32 REAL :: D_Z
33 REAL,DIMENSION(3) :: V_AUX
37 !!!!! read data from data file !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
39 READ (*,*)
40 READ (*,*)
41 READ (*,*)
42 READ (*,*)
43 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
44 READ (*,*)
45 READ (*,*) DWL ! Wetting layer thickness (A)
46 READ (*,*) ISHAPE ! Shape of the dot
47 READ (*,*) HQD ! Height of the quantum dot (A)
48 READ (*,*) Rqd_Base ! Base Radius (A)
49 READ (*,*) Rqd_Top ! Top Radius (A)
50 !!! Superlattice Begins !!!!
51 READ (*,*)
52 READ (*,*) A_S,B_S,C_S
53 READ (*,*) A1_S(1),A1_S(2),A1_S(3)
54 READ (*,*) A2_S(1),A2_S(2),A2_S(3)
55 READ (*,*) A3_S(1),A3_S(2),A3_S(3)
56 READ (*,*) NDots_X,NDots_Y,NDots_Z
57 V_AUX=(/A_S,B_S,C_S/)
58 A1_S=A1_S*V_AUX
59 A2_S=A2_S*V_AUX
60 A3_S=A3_S*V_AUX
61 IF(MOD(NDots_X,2).EQ.0) THEN
62 NDots_X=NDots_X+1
63 WRITE(6,'(A,1X,I3)')"Warning: NDots_X Even -> NDots_X=",NDots_X
64 END IF
65 IF(MOD(NDots_Y,2).EQ.0) THEN
66 NDots_Y=NDots_Y+1
67 WRITE(6,'(A,1X,I3)')"Warning: NDots_Y Even -> NDots_Y=",NDots_Y
68 END IF
69 IF(MOD(NDots_Z,2).EQ.0) THEN
70 NDots_Z=NDots_Z+1
71 WRITE(6,'(A,1X,I3)')"Warning: NDots_Z Even -> NDots_Z=",NDots_Z
72 END IF
73 IF(NDots_X.EQ.1) THEN
74 NMin_X=0; NMax_X=0
75 ELSE
76 NMin_X=-(NDots_X-1)/2; NMax_X=-NMin_X
77 END IF
78 IF(NDots_Y.EQ.1) THEN
79 NMin_Y=0; NMax_Y=0
80 ELSE
81 NMin_Y=-(NDots_Y-1)/2; NMax_Y=-NMin_Y
82 END IF
83 IF(NDots_Z.EQ.1) THEN
84 NMin_Z=0; NMax_Z=0
85 ELSE
86 NMin_Z=-(NDots_Z-1)/2; NMax_Z=-NMin_Z
87 END IF
88 !!! Grid Begins !!!!
89 READ (*,*)
90 READ (*,*) G_Method
91 READ (*,*) X_Min,X_Max
92 READ (*,*) Y_Min,Y_Max
93 READ (*,*) Z_Min,Z_Max
94 READ (*,*) XDim,YDim,ZDim
96 IF(G_Method.EQ.1) THEN
97 IF(XDim.EQ.1) THEN
98 X_Max=X_Min
99 ELSE
100 X_Max=A1_S(1)/2.E0
101 X_Min=0.E0
102 END IF
103 IF(YDim.EQ.1) THEN
104 Y_Max=Y_Min
105 ELSE
106 Y_Max=A2_S(2)/2.E0
107 Y_Min=0.E0
108 END IF
109 IF(ZDim.EQ.1) THEN
110 Z_Max=Z_Min
111 ELSE
112 Z_Max=A3_S(3)/2.E0
113 D_Z=Z_Max-(Hqd+DWL)/2.E0
114 Z_Max=Hqd+D_Z
115 Z_Min=-DWL-D_Z
116 END IF
117 END IF
119 IF (XDim.EQ.1) THEN
120 X_Inc=0.E0
121 ELSE
122 X_Inc=(X_Max-X_Min)/REAL(XDim-1)
123 END IF
124 IF (YDim.EQ.1) THEN
125 Y_Inc=0.E0
126 ELSE
127 Y_Inc=(Y_Max-Y_Min)/REAL(YDim-1)
128 END IF
129 IF (ZDim.EQ.1) THEN
130 Z_Inc=0.E0
131 ELSE
132 Z_Inc=(Z_Max-Z_Min)/REAL(ZDim-1)
133 END IF
135 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
137 READ (*,*)
138 READ (*,*) C11,C13,C33 ! Elastic modulus
139 READ (*,*) XLAMB,XMU ! Lame constants
140 READ (*,*) EPSA ! Misfit strain: EPS0
141 READ (*,*) EPSC ! Misfit strain: EPSC
142 READ (*,*) MTYPE ! MTYPE: 1-> ZBI, 2-> WZI, 3-> WZA
143 IF (MTYPE.LT.3) THEN
144 AISO=1
145 ELSE
146 AISO=0
147 END IF
148 READ (*,*) KCOOR ! KCOOR=0 Cartesian Coordinates
149 ! KCOOR=1 Cylindrical Coordinates
150 IF(KCOOR.EQ.1.AND.YDIM.GT.1) THEN
151 WRITE(6,*)"ERROR: Selected coordinates are cylindrical and YDIM.GT.1"
152 WRITE(6,*)" Exiting Program"
153 STOP
154 END IF
155 READ (*,*)
156 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
159 RETURN
161 END SUBROUTINE READ_INPUT
163 SUBROUTINE CONSTANTS( )
165 IMPLICIT NONE
167 REAL :: ALPHA,BETA,GAMA
168 REAL :: R,S,A1,A2,B1,B2
169 REAL :: CN1_1,CN1_2,CN3_1,CN3_2,CN4_1,CN4_2
170 REAL :: ETA_AUX
172 !!!! Remember: XLAMB=C12, XMU=C44 !!!!!
174 !!! ISO CONSTANTS
175 BISUM = 2.*EPSA ! Biaxial strain components
176 BIZZ = -2.*EPSA*XLAMB/(XLAMB+2.*XMU)
177 BIAUX = EPSA-BIZZ
179 R=(C11+XLAMB+C13)*EPSA+C13*(EPSC-EPSA)
180 S=(C33+C13-XLAMB-C11)*EPSA+(C33-C13)*(EPSC-EPSA)
182 ALPHA=-XMU*C33
184 R=R/ALPHA; S=S/ALPHA
186 A1=R*(C33-XMU-C13)-S*(C13+XMU)
187 A2=R*XMU
189 B1=S*(C13+2.E0*XMU)-R*(C33-C13-2.E0*XMU)
190 B2=S*C11-R*(C13+2.E0*XMU-C11)
192 BETA=( C13*(C13+2.E0*XMU)-C11*C33 )/(-XMU*C33)
193 GAMA=C11/C33
195 CN1_1=A1; CN1_2=A2
196 CN3_1=A1+B1; CN3_2=A2+B2
197 CN4_1=A1+B1/2.E0; CN4_2=A2+B2/2.E0
199 ETA_AUX=SQRT(BETA**2 - 4.E0*GAMA)
200 ETA1=(-BETA+ETA_AUX)/2.E0
201 ETA2=(-BETA-ETA_AUX)/2.E0
202 IF(ETA1.GT.0.E0.OR.ETA2.GT.0.E0) THEN
203 WRITE(6,*)"ERROR: ETA1 AND ETA2 ARE GREATHER THAN ZERO"
204 STOP
205 END IF
206 ETA1=ABS(ETA1)
207 ETA2=ABS(ETA2)
209 ETA_DIF=ETA1-ETA2
211 CN02_1=(CN1_2/ETA2-CN1_1)
212 CN02_2=(CN1_2/ETA1-CN1_1)
214 CN31_1=(CN4_1*SQRT(ETA2)-CN4_2/SQRT(ETA2))
215 CN31_2=(CN4_1*SQRT(ETA1)-CN4_2/SQRT(ETA1))
217 CN42_1=(CN3_1*ETA2-CN3_2)
218 CN42_2=(CN3_1*ETA1-CN3_2)
220 CN1_2G=CN1_2/GAMA
222 RETURN
224 END SUBROUTINE CONSTANTS
227 END MODULE INPUT_DATA