Télécharger triple.eso

Retour à la liste

Numérotation des lignes :

triple
  1. C TRIPLE SOURCE CHAT 05/01/13 03:47:39 5004
  2. SUBROUTINE TRIPLE(ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  3. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,YUNG,XNU,SIGEL,DSIGP,DLAMBD,
  4. .XLAMBD,ICOUP,ICAS,ICRIT1,ICRIT2,ICRIME,ICRIMT,SIGMA,DSIGMA,XX,
  5. .PREC,RFSG,RFEP,RFPR,KERRE)
  6. C
  7. IMPLICIT INTEGER(I-N)
  8. IMPLICIT REAL*8(A-H,O-Z)
  9. -INC PPARAM
  10. -INC CCOPTIO
  11. C
  12. DIMENSION SIGEL(*),DSIGP(*),DLAMBD(*),XLAMBD(*)
  13. DIMENSION SIGMA(*),DSIGMA(*)
  14. DIMENSION DF1(6),DF2(6),DF3(6),SIGMAT(6),SIG(6)
  15. DIMENSION A(3,3),C(3),DDLAM(3)
  16. C
  17. C IC1 INDICE DU CRITERE 1
  18. C IC2 INDICE DU CRITERE 2
  19. C IC3 INDICE DU CRITERE 3
  20. C DLAMBD(IC1) INCREMENT DLMBDA POUR LE CRITERE 1
  21. C DLAMBD(IC2) INCREMENT DLMBDA POUR LE CRITERE 2
  22. C DLAMBD(IC3) INCREMENT DLMBDA POUR LE CRITERE 3
  23. C DDLAM1 CORRECTION A DLAMBD(IC1) AU COURS DES ITERATIONS INTERNES
  24. C DDLAM2 CORRECTION A DLAMBD(IC2) AU COURS DES ITERATIONS INTERNES
  25. C DDLAM3 CORRECTION A DLAMBD(IC3) AU COURS DES ITERATIONS INTERNES
  26. C SIG ETAT DE CONTRAINTES FINAL PROJETTE
  27. C SIGEL ETAT DE CONTRAINTES INITIAL
  28. C DSIGP INCREMENT DE CONTRAINTES A ECOULER
  29. C MAXITE NOMBRE MAXIMAL D'ITERATIONS INTERNES
  30. C PREC PRECISION POUR LA CONVERGENCE DES ITERATIONS INTERNES
  31. C
  32. DO 1 I=1,6
  33. SIGMAT(I)=SIGEL(I)+DSIGP(I)
  34. SIGMA(I)=SIGEL(I)
  35. 1 CONTINUE
  36. C
  37. IF(IIMPI.EQ.9) THEN
  38. WRITE(IOIMP,3001) (SIGEL(I),I=1,6)
  39. WRITE(IOIMP,3002) (DSIGP(I),I=1,6)
  40. WRITE(IOIMP,3003) (SIGMAT(I),I=1,6)
  41. ENDIF
  42. C
  43. DATA MAXITE/30/
  44. IC1=1
  45. IC2=2
  46. IC3=3
  47. DO 2 I=1,3
  48. DDLAM(I)=0.D0
  49. 2 CONTINUE
  50. TRSIGE=SIGEL(1)+SIGEL(2)+SIGEL(3)
  51. SIGEQ2=AVM(SIGEL,SIGEL)
  52. SIGEQ=SQRT(SIGEQ2)
  53. C
  54. SU=1.5*YUNG/(1.D0+XNU)
  55. DU=YUNG/(1.D0-2.D0*XNU)
  56. C
  57. C CALCUL DU: A11, A22, A33, A12, A23, A31
  58. C
  59. A(1,1)=PENTE3+DU/3.D0
  60. A(2,2)=SU+ALFADV*ALFADV*DU*3.D0
  61. A(3,3)=PENTE1+SU
  62. A(1,2)=-ALFADV*DU
  63. A(2,1)=A(1,2)
  64. A(2,3)=SU
  65. A(3,2)=SU
  66. A(3,1)=0.D0
  67. A(1,3)=0.D0
  68. C
  69. C CALCUL DU: C(1), C(2), C(3)
  70. C
  71. CALL KRITER(IC1,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  72. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,DDLAM(1),SIGEL,FSG,C(1),KERRE)
  73. CALL KRITER(IC2,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  74. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,DDLAM(2),SIGEL,FSG,C(2),KERRE)
  75. CALL KRITER(IC3,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  76. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,DDLAM(3),SIGEL,FSG,C(3),KERRE)
  77. C
  78. IF(IIMPI.EQ.9) WRITE(IOIMP,3004) (C(I),I=1,3)
  79. C
  80. TRDSIG=DSIGP(1)+DSIGP(2)+DSIGP(3)
  81. FF=SIGEL(1)*DSIGP(1)+SIGEL(2)*DSIGP(2)+SIGEL(3)*DSIGP(3)
  82. ZZ=2.D0*(SIGEL(4)*DSIGP(4)+SIGEL(5)*DSIGP(5)+SIGEL(6)*DSIGP(6))
  83. TRSIDS=FF+ZZ-TRSIGE*TRDSIG/3.D0
  84. C(1)=C(1)-TRDSIG/3.D0
  85. C(2)=C(2)+ALFADV*TRDSIG+1.5D0*TRSIDS/SIGEQ
  86. C(3)=C(3)+1.5D0*TRSIDS/SIGEQ
  87. C
  88. C CALCUL DU: DDLAM(1),DDLAM(2),DDLAM(3)
  89. C
  90. CALL RESNEQ(A,C,DDLAM,3,KERRE)
  91. C
  92. IF(IIMPI.EQ.9) THEN
  93. WRITE(IOIMP,3004) (C(I),I=1,3)
  94. WRITE(IOIMP,3005) (DDLAM(I),I=1,3)
  95. ENDIF
  96. C
  97. C INITIALISATIONS
  98. C
  99. ZR=0.D0
  100. ITER=0
  101. ICOUP=0
  102. ICRIT1=0
  103. ICRIT2=0
  104. ICRIME=0
  105. ICRIMT=0
  106. IBOU=6
  107. VMELA0=VMELAS
  108. DPEL20=DPELA2
  109. POREL0=PORELA
  110. DO 3 I=1,IBOU
  111. 3 SIG(I)=SIGEL(I)
  112. DLAM01=DLAMBD(IC1)
  113. DLAM02=DLAMBD(IC2)
  114. DLAM03=DLAMBD(IC3)
  115. DLAMBD(IC1)=DDLAM(1)
  116. DLAMBD(IC2)=DDLAM(2)
  117. DLAMBD(IC3)=DDLAM(3)
  118. C
  119. IF(ABS(DLAMBD(IC1)).LE.RFEP) DLAMBD(IC1)=0.D0
  120. IF(ABS(DLAMBD(IC2)).LE.RFEP) DLAMBD(IC2)=0.D0
  121. IF(ABS(DLAMBD(IC3)).LE.RFEP) DLAMBD(IC3)=0.D0
  122. C
  123. IF(DLAMBD(IC1).GT.0.D0.AND.DLAMBD(IC2).GT.0.D0.
  124. . AND.DLAMBD(IC3).GT.0.D0) GO TO 9
  125. IF(DLAMBD(IC1).GT.0.D0.OR.DLAMBD(IC2).GT.0.D0.
  126. . OR.DLAMBD(IC3).GT.0.D0) GO TO 309
  127. IF(DLAMBD(IC1).EQ.0.D0.AND.DLAMBD(IC2).EQ.0.D0.
  128. . AND.DLAMBD(IC3).EQ.0.D0) GO TO 313
  129. WRITE(IOIMP,901) IC1,DLAMBD(IC1),IC2,DLAMBD(IC2),IC3,DLAMBD(IC3)
  130. KERRE=640
  131. RETURN
  132. C
  133. 9 CONTINUE
  134. C
  135. C LE CALCUL DE DLAMBD PREMIERE ESTIMATION
  136. C
  137. ITER=1
  138. CALL KRITER(IC1,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  139. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,ZR,SIGMAT,FSG,C(1),KERRE)
  140. CALL KRITER(IC2,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  141. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,ZR,SIGMAT,FSG,C(2),KERRE)
  142. CALL KRITER(IC3,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  143. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,ZR,SIGMAT,FSG,C(3),KERRE)
  144. C
  145. C CALCUL DU: A11, A22, A33, A12, A23, A31
  146. C
  147. A(1,1)=PENTE3+DU/3.D0
  148. A(2,2)=SU+ALFADV*ALFADV*DU*3.D0
  149. A(3,3)=PENTE1+SU
  150. A(1,2)=-ALFADV*DU
  151. A(2,1)=A(1,2)
  152. A(2,3)=SU
  153. A(3,2)=SU
  154. A(3,1)=0.D0
  155. A(1,3)=0.D0
  156. C
  157. CALL RESNEQ(A,C,DDLAM,3,KERRE)
  158. C
  159. IF(IIMPI.EQ.9) THEN
  160. WRITE(IOIMP,3004) (C(I),I=1,3)
  161. WRITE(IOIMP,3005) (DDLAM(I),I=1,3)
  162. ENDIF
  163. C
  164. DLAMBD(IC1)=DDLAM(1)
  165. DLAMBD(IC2)=DDLAM(2)
  166. DLAMBD(IC3)=DDLAM(3)
  167. C
  168. CALL DDFDS(IC1,ALFADV,ALFAD1,ALFAD2,YUNG,XNU,SIGMAT,SIG,
  169. .DF1,KERRE)
  170. CALL DDFDS(IC2,ALFADV,ALFAD1,ALFAD2,YUNG,XNU,SIGMAT,SIG,
  171. .DF2,KERRE)
  172. CALL DDFDS(IC3,ALFADV,ALFAD1,ALFAD2,YUNG,XNU,SIGMAT,SIG,
  173. .DF3,KERRE)
  174. DO 4 I=1,IBOU
  175. SIG(I)=SIG(I)-DF1(I)*DDLAM(1)-DF2(I)*DDLAM(2)-DF3(I)*DDLAM(3)
  176. SIG(I)=SIG(I)+DSIGP(I)
  177. 4 CONTINUE
  178. C
  179. IF(IIMPI.EQ.9) THEN
  180. WRITE(IOIMP,3006) (DF1(I),I=1,6)
  181. WRITE(IOIMP,3007) (DF2(I),I=1,6)
  182. WRITE(IOIMP,3008) (DF3(I),I=1,6)
  183. WRITE(IOIMP,3009) (SIG(I),I=1,6)
  184. ENDIF
  185. C
  186. C ITERATIONS INTERNES
  187. C
  188. 333 ITER=ITER+1
  189. CALL KRITER(IC1,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  190. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,DDLAM(1),SIG,FSG,C(1),KERRE)
  191. CALL KRITER(IC2,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  192. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,DDLAM(2),SIG,FSG,C(2),KERRE)
  193. CALL KRITER(IC3,ALFADV,ALFAD1,ALFAD2,VMELAS,DPELAS,DPELA1,
  194. .DPELA2,PORELA,PENTE1,PENTE2,PENTE3,DDLAM(3),SIG,FSG,C(3),KERRE)
  195. C
  196. C CALCUL DU: A11, A22, A33, A12, A23, A31
  197. C
  198. A(1,1)=PENTE3+DU/3.D0
  199. A(2,2)=SU+ALFADV*ALFADV*DU*3.D0
  200. A(3,3)=PENTE1+SU
  201. A(1,2)=-ALFADV*DU
  202. A(2,1)=A(1,2)
  203. A(2,3)=SU
  204. A(3,2)=SU
  205. A(3,1)=0.D0
  206. A(1,3)=0.D0
  207. C
  208. CALL RESNEQ(A,C,DDLAM,3,KERRE)
  209. C
  210. IF(IIMPI.EQ.9) THEN
  211. WRITE(IOIMP,3004) (C(I),I=1,3)
  212. WRITE(IOIMP,3005) (DDLAM(I),I=1,3)
  213. ENDIF
  214. C
  215. CALL DDFDS(IC1,ALFADV,ALFAD1,ALFAD2,YUNG,XNU,SIG,SIG,
  216. .DF1,KERRE)
  217. CALL DDFDS(IC2,ALFADV,ALFAD1,ALFAD2,YUNG,XNU,SIG,SIG,
  218. .DF2,KERRE)
  219. CALL DDFDS(IC3,ALFADV,ALFAD1,ALFAD2,YUNG,XNU,SIG,SIG,
  220. .DF3,KERRE)
  221. DO 5 I=1,IBOU
  222. SIG(I)=SIG(I)-DF1(I)*DDLAM(1)-DF2(I)*DDLAM(2)-DF3(I)*DDLAM(3)
  223. 5 CONTINUE
  224. C
  225. IF(IIMPI.EQ.9) THEN
  226. WRITE(IOIMP,3006) (DF1(I),I=1,6)
  227. WRITE(IOIMP,3007) (DF2(I),I=1,6)
  228. WRITE(IOIMP,3008) (DF3(I),I=1,6)
  229. WRITE(IOIMP,3009) (SIG(I),I=1,6)
  230. ENDIF
  231. C
  232. DLAMBD(IC1)=DLAMBD(IC1)+DDLAM(1)
  233. DLAMBD(IC2)=DLAMBD(IC2)+DDLAM(2)
  234. DLAMBD(IC3)=DLAMBD(IC3)+DDLAM(3)
  235. C
  236. IF(ABS(DLAMBD(IC1)).LE.RFEP) DLAMBD(IC1)=0.D0
  237. IF(ABS(DLAMBD(IC2)).LE.RFEP) DLAMBD(IC2)=0.D0
  238. IF(ABS(DLAMBD(IC3)).LE.RFEP) DLAMBD(IC3)=0.D0
  239. C
  240. IF(DLAMBD(IC1).GT.0.D0.AND.DLAMBD(IC2).GT.0.D0.
  241. . AND.DLAMBD(IC3).GT.0.D0) GO TO 310
  242. IF(DLAMBD(IC1).GT.0.D0.OR.DLAMBD(IC2).GT.0.D0.
  243. . OR.DLAMBD(IC3).GT.0.D0) GO TO 309
  244. IF(DLAMBD(IC1).EQ.0.D0.AND.DLAMBD(IC2).EQ.0.D0.
  245. . AND.DLAMBD(IC3).EQ.0.D0) GO TO 313
  246. WRITE(IOIMP,901) IC1,DLAMBD(IC1),IC2,DLAMBD(IC2),IC3,DLAMBD(IC3)
  247. KERRE=640
  248. RETURN
  249. C
  250. C TESTS
  251. C
  252. 310 TEST1=ABS(DDLAM(1))/DLAMBD(IC1)
  253. TEST2=ABS(DDLAM(2))/DLAMBD(IC2)
  254. TEST3=ABS(DDLAM(3))/DLAMBD(IC3)
  255. IF(TEST1.LT.PREC.AND.TEST2.LT.PREC.AND.TEST3.LT.PREC) GO TO 311
  256. IF(ITER.LE.MAXITE) GO TO 333
  257. WRITE(IOIMP,900) IC1,TEST1,IC2,TEST2,IC3,TEST3
  258. KERRE=640
  259. RETURN
  260. C
  261. C IL Y A TRIPLAGE
  262. C
  263. 311 ICOUP=3
  264. ICRIT1=IC1
  265. ICRIT2=IC2
  266. ICRIT3=IC3
  267. C
  268. CALL KRITER(IC1,ALFADV,ALFAD1,ALFAD2,VMELA0,DPELAS,DPELA1,
  269. .DPEL20,POREL0,PENTE1,PENTE2,PENTE3,DLAMBD(IC1),SIG,FSG,C(1),KERRE)
  270. CALL KRITER(IC2,ALFADV,ALFAD1,ALFAD2,VMELA0,DPELAS,DPELA1,
  271. .DPEL20,POREL0,PENTE1,PENTE2,PENTE3,DLAMBD(IC2),SIG,FSG,C(2),KERRE)
  272. CALL KRITER(IC3,ALFADV,ALFAD1,ALFAD2,VMELA0,DPELAS,DPELA1,
  273. .DPEL20,POREL0,PENTE1,PENTE2,PENTE3,DLAMBD(IC3),SIG,FSG,C(3),KERRE)
  274. C
  275. VMELAS=VMELA0
  276. DPELA2=DPEL20
  277. PORELA=POREL0
  278. C
  279. DLAMBD(IC1)=DLAMBD(IC1)+DLAM01
  280. DLAMBD(IC2)=DLAMBD(IC2)+DLAM02
  281. DLAMBD(IC3)=DLAMBD(IC3)+DLAM03
  282. DO 7 I=1,5
  283. XLAMBD(I)=XLAMBD(I)+DLAMBD(I)
  284. DLAMBD(I)=0.D0
  285. 7 CONTINUE
  286. DO 8 I=1,IBOU
  287. SIGEL(I)=SIG(I)
  288. DSIGP(I)=0.D0
  289. DSIGMA(I)=SIGEL(I)-SIGMA(I)
  290. 8 CONTINUE
  291. RETURN
  292. C
  293. 309 ICAS=0
  294. IF(DLAMBD(IC1).GT.0.D0.AND.DLAMBD(IC2).GT.0.D0) ICAS=IC1+IC2-2
  295. IF(DLAMBD(IC1).GT.0.D0.AND.DLAMBD(IC3).GT.0.D0) ICAS=IC1+IC3-2
  296. IF(DLAMBD(IC2).GT.0.D0.AND.DLAMBD(IC3).GT.0.D0) ICAS=IC2+IC3-2
  297. IF(ICAS.NE.0) GO TO 312
  298. C
  299. C IL N Y A PAS NI DE TRIPLAGE NI DE COUPLAGE
  300. C
  301. IF(DLAMBD(IC1).GT.0.D0) ICRIT1=IC1
  302. IF(DLAMBD(IC2).GT.0.D0) ICRIT1=IC2
  303. IF(DLAMBD(IC3).GT.0.D0) ICRIT1=IC3
  304. C
  305. ICRIME=IC1
  306. ICRIMT=IC2
  307. IF(ICRIT1.EQ.IC1) ICRIME=IC3
  308. IF(ICRIT1.EQ.IC2) ICRIMT=IC3
  309. C
  310. ICOUP=1
  311. XX=0.D0
  312. DLAMBD(IC1)=DLAM01
  313. DLAMBD(IC2)=DLAM02
  314. DLAMBD(IC3)=DLAM03
  315. VMELAS=VMELA0
  316. DPELA2=DPEL20
  317. PORELA=POREL0
  318. RETURN
  319. C
  320. C IL N Y A PAS DE TRIPLAGE MAIS IL Y A COUPLAGE
  321. C
  322. 312 ICOUP=2
  323. IF(DLAMBD(IC1).EQ.0.D0) ICRIMT=IC1
  324. IF(DLAMBD(IC2).EQ.0.D0) ICRIMT=IC2
  325. IF(DLAMBD(IC3).EQ.0.D0) ICRIMT=IC3
  326. C
  327. XX=0.D0
  328. DLAMBD(IC1)=DLAM01
  329. DLAMBD(IC2)=DLAM02
  330. DLAMBD(IC3)=DLAM03
  331. VMELAS=VMELA0
  332. DPELA2=DPEL20
  333. PORELA=POREL0
  334. RETURN
  335. C
  336. C IL N Y A PAS D ENDOMMAGEMENT
  337. C
  338. 313 ICOUP=0
  339. XX=0.D0
  340. DLAMBD(IC1)=DLAM01
  341. DLAMBD(IC2)=DLAM02
  342. DLAMBD(IC3)=DLAM03
  343. VMELAS=VMELA0
  344. DPELA2=DPEL20
  345. PORELA=POREL0
  346. C
  347. 900 FORMAT(1X,'ERREUR DANS TRIPLE - NON CONVERGENCE '/
  348. . 1X,'ICRIT1=',I4,1X,'TEST1 =',1PE12.5,/,
  349. . 1X,'ICRIT2=',I4,1X,'TEST2 =',1PE12.5,/,
  350. . 1X,'ICRIT3=',I4,1X,'TEST3 =',1PE12.5)
  351. 901 FORMAT(1X,'ERREUR DANS TRIPLE: DLAMBD(',I1,')=',1PD12.5,1X,
  352. .'DLAMBD(',I1,')=',1PD12.5,1X,'DLAMBD(',I1,')=',1PD12.5)
  353. 3001 FORMAT(1X,'SIGEL =',6(1X,1PD12.5))
  354. 3002 FORMAT(1X,'DSIGP =',6(1X,1PD12.5))
  355. 3003 FORMAT(1X,'SIGMAT=',6(1X,1PD12.5))
  356. 3004 FORMAT(1X,'C =',3(1X,1PD12.5))
  357. 3005 FORMAT(1X,'DDLAM =',3(1X,1PD12.5))
  358. 3006 FORMAT(1X,'DF1 =',6(1X,1PD12.5))
  359. 3007 FORMAT(1X,'DF2 =',6(1X,1PD12.5))
  360. 3008 FORMAT(1X,'DF3 =',6(1X,1PD12.5))
  361. 3009 FORMAT(1X,'SIG =',6(1X,1PD12.5))
  362. C
  363. RETURN
  364. END
  365.  
  366.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales