Télécharger fatig3.eso

Retour à la liste

Numérotation des lignes :

fatig3
  1. C FATIG3 SOURCE KICH 22/09/22 21:15:03 11465
  2. SUBROUTINE FATIG3(sig,p,raytau,nbrobl,nombre,icri,
  3. &alpha,beta,ycrit,s,ib,igau)
  4. IMPLICIT INTEGER(I-N)
  5. IMPLICIT REAL*8 (A-H,O-Z)
  6. REAL*8 centre(5),stab(3,3),d(3),e(3),v(3),xnorm(3,3),u(5)
  7. REAL*8 sig(nbrobl,nombre),p(nombre),raytau(nombre)
  8. REAL*8 s(nbrobl-1,nombre)
  9.  
  10. SQ2 = DSQRT(2.d0)
  11. SQ6 = DSQRT(6.d0)
  12. C
  13. c *********************************************************
  14. c appel des critere
  15. c *********************************************************
  16. c
  17. if (icri.eq.3) then
  18. C PAPADOPOULOS
  19. c
  20. * call dvpoly(s,centre,elmin,nbrobl,nombre,ib,igau)
  21. call dvboul(s,centre,ray,nbrobl,nombre,ib,igau)
  22. c
  23. * pmax = -1.0d10
  24. * pmin = 1.0d10
  25. pmax = p(1)
  26. c
  27. ycri = -1.D10
  28. rayon = 0.D0
  29. do i=1,nombre
  30. stab(1,2) = 0.d0
  31. stab(2,1) = stab(1,2)
  32. stab(1,3) = 0.d0
  33. stab(3,1) = stab(1,3)
  34. if (p(i).gt.pmax) pmax = p(i)
  35. * if (p(i).lt.pmin) pmin = p(i)
  36. stab(1,1) = (s(1,i) - centre(1))/SQ2
  37. . +(s(2,i) - centre(2))/SQ6
  38. stab(2,2) =-(s(1,i) - centre(1))/SQ2
  39. . +(s(2,i) - centre(2))/SQ6
  40. stab(3,3) = - stab(1,1) - stab(2,2)
  41. if(nbrobl.gt.4) then
  42. stab(1,2) = s(5,i) - centre(5)
  43. stab(2,1) = s(5,i) - centre(5)
  44. stab(1,3) = s(4,i) - centre(4)
  45. stab(3,1) = s(4,i) - centre(4)
  46. endif
  47. stab(2,3) = s(3,i) - centre(3)
  48. stab(3,2) = s(3,i) - centre(3)
  49. raytau(i) = dsqrt(stab(1,1)**2+stab(2,2)**2+stab(3,3)**2+
  50. . 2.*(stab(1,2)**2+stab(2,3)**2+stab(1,3)**2))/SQ2
  51.  
  52. ycri0 = (raytau(i) + alpha*p(i) - beta)/(beta-alpha*p(i))
  53. * write(6,*) 'PP',i,p(i),raytau(i),ycri
  54. if (raytau(i).gt.rayon) rayon=raytau(i)
  55. if (ycri0.gt.ycri) ycri=ycri0
  56. enddo
  57. c ycrit0 = (ray + alpha*pmax - beta)/(beta-alpha*pmax)
  58. ycrit = (rayon + alpha*pmax - beta)/(beta-alpha*pmax)
  59. * write(6,*) 'PPF',pmax,ray,rayon,ycrit,ycri
  60. c
  61. return
  62. endif
  63. c
  64. if(icri.eq.2) then
  65. C DANG VAN
  66. c
  67. critere = -1.d10
  68. c
  69. call dvboul(s,centre,ray,nbrobl,nombre,ib,igau)
  70. * if (ib.eq.1.and.igau.eq.1) then
  71. * write(6,*) 'ct',((centre(jj)/1.e6),jj= 1,5)
  72. * write(6,*) (ray/1.e6),nbrobl,nombre
  73. * endif
  74. c
  75. do i=1,nombre
  76. stab(1,2) = 0.d0
  77. stab(2,1) = stab(1,2)
  78. stab(1,3) = 0.d0
  79. stab(3,1) = stab(1,3)
  80. stab(1,1) = (s(1,i) - centre(1))/SQ2
  81. . +(s(2,i) - centre(2))/SQ6
  82. stab(2,2) =-(s(1,i) - centre(1))/SQ2
  83. . +(s(2,i) - centre(2))/SQ6
  84. stab(3,3) = - stab(1,1) - stab(2,2)
  85. if(nbrobl.gt.4) then
  86. stab(1,2) = s(5,i) - centre(5)
  87. stab(2,1) = s(5,i) - centre(5)
  88. stab(1,3) = s(4,i) - centre(4)
  89. stab(3,1) = s(4,i) - centre(4)
  90. endif
  91. stab(2,3) = s(3,i) - centre(3)
  92. stab(3,2) = s(3,i) - centre(3)
  93. call dvdiag(stab,d)
  94. c
  95. c Classement des valeurs propres
  96. c
  97. d3 = dabs(d(1)-d(2))
  98. d2 = dabs(d(1)-d(3))
  99. d1 = dabs(d(3)-d(2))
  100. if (d1.lt.1.d-04) d(2) = d(3)
  101. if (d2.lt.1.d-04) d(1) = d(3)
  102. if (d3.lt.1.d-04) d(2) = d(1)
  103. c
  104. n1 = 1
  105. n2 = 2
  106. n3 = 3
  107. if (d(2).gt.d(1).and.d(3).gt.d(2)) then
  108. n1 = 3
  109. n2 = 2
  110. n3 = 1
  111. endif
  112. if (d(2).gt.d(3).and.d(3).gt.d(1)) then
  113. n1 = 2
  114. n2 = 3
  115. n3 = 1
  116. endif
  117. if (d(3).gt.d(1).and.d(1).gt.d(2)) then
  118. n1 = 3
  119. n2 = 1
  120. n3 = 2
  121. endif
  122. if (d(1).gt.d(3).and.d(3).gt.d(2)) then
  123. n1 = 1
  124. n2 = 3
  125. n3 = 2
  126. endif
  127. if (d(2).gt.d(1).and.d(1).gt.d(3)) then
  128. n1 = 2
  129. n2 = 1
  130. n3 = 3
  131. endif
  132. c
  133. raytau(i) = dabs(d(n1)-d(n3))/2.
  134. crit = raytau(i) + alpha*p(i) - beta
  135. crit = crit / beta
  136. c
  137. c
  138. if (crit.gt.critere) then
  139. critere = crit
  140. * critere = crit / (beta-alpha*p(i))
  141. v(1) = d(n1)
  142. v(2) = d(n2)
  143. v(3) = d(n3)
  144. xnorm(1,1) = stab(1,n1)
  145. xnorm(2,1) = stab(2,n1)
  146. xnorm(3,1) = stab(3,n1)
  147. xnorm(1,2) = stab(1,n2)
  148. xnorm(2,2) = stab(2,n2)
  149. xnorm(3,2) = stab(3,n2)
  150. xnorm(1,3) = stab(1,n3)
  151. xnorm(2,3) = stab(2,n3)
  152. xnorm(3,3) = stab(3,n3)
  153. endif
  154. enddo
  155. c
  156. ycrit = critere
  157. c
  158. return
  159. endif
  160.  
  161. if(icri.eq.4) then
  162. C SINES
  163. c
  164. dmax = 0.d0
  165. do i=1,nombre-1
  166. do j=i+1,nombre
  167. dist = (s(1,i)-s(1,j))**2+(s(2,i)-s(2,j))**2
  168. . +2.d0*((s(3,i)-s(3,j))**2)
  169. if (nbrobl.gt.4) then
  170. dist = dist + 2.d0*((s(4,i)-s(4,j))**2
  171. . +(s(5,i)-s(5,j))**2)
  172. endif
  173. dist = dsqrt(dist)
  174. if (dist.gt.dmax) then
  175. dmax=dist
  176. endif
  177. enddo
  178. enddo
  179. dmax = dmax/2.d0/SQ2
  180. c
  181. pmoyenne = 0.d0
  182. do i=1,nombre
  183. pmoyenne = pmoyenne+p(i)
  184. enddo
  185. pmoyenne = pmoyenne/float(nombre)
  186. raytau(1) = pmoyenne
  187. raytau(2) = dmax
  188. ycrit = (dmax+alpha*pmoyenne-beta)/(beta-alpha*pmoyenne)
  189. return
  190. endif
  191.  
  192. if(icri.eq.5) then
  193. C CROSS
  194. c
  195. dmax = 0.d0
  196. do i=1,nombre-1
  197. do j=i+1,nombre
  198. dist = (s(1,i)-s(1,j))**2+(s(2,i)-s(2,j))**2
  199. . +2.d0*((s(3,i)-s(3,j))**2)
  200. if (nbrobl.gt.4) then
  201. dist = dist + 2.d0*((s(4,i)-s(4,j))**2
  202. . +(s(5,i)-s(5,j))**2)
  203. endif
  204. dist = dsqrt(dist)
  205. if (dist.gt.dmax) then
  206. dmax=dist
  207. endif
  208. enddo
  209. enddo
  210. dmax = dmax/2.d0/SQ2
  211. c
  212. * pmax = -1.0d10
  213. pmax = p(1)
  214. do i=1,nombre
  215. if (p(i).gt.pmax) pmax=p(i)
  216. enddo
  217. raytau(1) = pmax
  218. raytau(2) = dmax
  219. ycrit = (dmax + alpha*pmax - beta)/(beta - alpha*pmax)
  220. return
  221. endif
  222.  
  223. if(icri.eq.6) then
  224. C DC
  225. c
  226. dmax = 0.d0
  227. dmaxp = 0.d0
  228. c
  229. c ***********************
  230. c plus grand diametre ...
  231. c ***********************
  232. do i=1,nombre-1
  233. do j=i+1,nombre
  234. dist = (s(1,i)-s(1,j))**2+(s(2,i)-s(2,j))**2
  235. . +2.d0*((s(3,i)-s(3,j))**2)
  236. if (nbrobl.gt.4) then
  237. dist = dist + 2.d0*((s(4,i)-s(4,j))**2
  238. . +(s(5,i)-s(5,j))**2)
  239. endif
  240. dist = dsqrt(dist)
  241. if (dist.gt.dmax) then
  242. dmax=dist
  243. ic = i
  244. jc = j
  245. endif
  246. enddo
  247. enddo
  248. if(dmax.eq.0.) then
  249. dmaxp = 0.
  250. else
  251. c ***********************
  252. c deuxieme diametre ...
  253. c ***********************
  254. do k=1,nbrobl-1
  255. u(k) = (s(k,ic)-s(k,jc))/dmax
  256. enddo
  257. do k=1,nombre
  258. prod = u(1)*s(1,k)+u(2)*s(2,k)
  259. . +2.d0*u(3)*s(3,k)
  260. if (nbrobl.gt.4) then
  261. prod = prod + 2.d0*(u(4)*s(4,k)+u(5)*s(5,k))
  262. endif
  263. do kj=1,nbrobl-1
  264. s(kj,k) = s(kj,k)-prod*u(kj)
  265. enddo
  266. enddo
  267. do i=1,nombre-1
  268. do j=i+1,nombre
  269. dist = (s(1,i)-s(1,j))**2+(s(2,i)-s(2,j))**2
  270. . +2.*((s(3,i)-s(3,j))**2)
  271. if (nbrobl.gt.4) then
  272. dist = dist + 2.d0*((s(4,i)-s(4,j))**2
  273. . +(s(5,i)-s(5,j))**2)
  274. endif
  275. dist = dsqrt(dist)
  276. if (dist.gt.dmaxp) dmaxp = dist
  277. enddo
  278. enddo
  279. endif
  280. c
  281. * pmax = -1.0d10
  282. pmax = p(1)
  283. do i=1,nombre
  284. if (p(i).gt.pmax) pmax=p(i)
  285. enddo
  286. c write(6,*) 'dc',pmax,dmax,dmaxp
  287. a = dsqrt((dmax/2.)**2+(dmaxp/2.)**2)/SQ2
  288. raytau(1) = pmax
  289. raytau(2) = a
  290. ycrit = (a + alpha*pmax - beta)/(beta - alpha*pmax)
  291. return
  292. endif
  293.  
  294. if(ICRI.eq.7) then
  295. C VON MISES
  296. c
  297. vonmax = 0.d0
  298. do i=1,nombre
  299. if (nbrobl.gt.4) then
  300. von = dsqrt(s(1,i)**2+s(2,i)**2
  301. . +2.*(s(3,i)**2+s(4,i)**2+s(5,i)**2))/SQ2
  302. else
  303. von = dsqrt(s(1,i)**2+s(2,i)**2
  304. . +2.*(s(3,i)**2))/SQ2
  305. endif
  306. if (von.gt.vonmax) then
  307. vonmax = von
  308. endif
  309. enddo
  310. c
  311. ycrit = vonmax
  312. return
  313. endif
  314.  
  315. c
  316. 900 format(9x,'1 = dvk',/9x,'2 = papado',/9X,'3 = cross',
  317. . /9X,'4 = sines',/9X,'5 = dc',/9X,'6 = vm'/)
  318. c
  319. c
  320. c
  321. end
  322.  
  323.  
  324.  
  325.  
  326.  

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