Télécharger sigf3dsu.eso

Retour à la liste

Numérotation des lignes :

sigf3dsu
  1. C SIGF3DSU SOURCE CB215821 16/04/21 21:18:25 8920
  2. SUBROUTINE sigf3d_sub(esigmaesave,x1,x2,sigmaf,H66,P2,pi2,
  3. . ag,i6,fc,fb,parahot3,idimpara3,lerror,lcp,
  4. . esigmae1,U,ldivide,n,xsub1,xsub2,esigmae)
  5.  
  6. c This subroutine deals with the subdivision of the plastic increments for
  7. c improving the convergence of the subroutine sigf3d_implicit (algorithm
  8. c to find the stress sigmaf from the trial stress esigmae and the plastic
  9. c increments x1 and x2)
  10.  
  11. IMPLICIT REAL*8 (A-B,D-H,O-Z)
  12. implicit integer (I-K,M,N)
  13. implicit logical (L)
  14. implicit character*10 (C)
  15.  
  16. dimension sigmaf(6),sigmai(6)
  17. c final stress vector
  18. dimension esigmae(6),esigmae1(6),dsigma(6)
  19. c trial stress vector
  20. dimension H66(6,6),pi2(6)
  21. dimension dgc(6),dgt(6),vloc(6),trav6(6),P2(6,6)
  22. dimension parahot3(idimpara3),rcossigmapr(3,3),B(6,6)
  23. dimension d2gc(6,6),d2gt(6,6),trav66(6,6),h(6),U(6,6)
  24. dimension esigmaesave(6)
  25.  
  26. i0 = 0
  27. i1 = 1
  28. i2 = 2
  29. i3 = 3
  30. i4 = 4
  31. i5 = 5
  32. i7 = 7
  33.  
  34. r2 = 2.
  35.  
  36. ldivide = .false.
  37. Dlambdat = xsub1
  38. Dlambdac = xsub2
  39. do jloc=1,6
  40. do iloc=1,6
  41. U(iloc,jloc) = 0.d0
  42. d2gc(iloc,jloc) = 0.d0
  43. d2gt(iloc,jloc) = 0.d0
  44. enddo
  45. enddo
  46. do iloc=1,6
  47. U(iloc,iloc) = 1.0d0
  48. enddo
  49.  
  50. c Case Dlambdat = 0 and Dlambdac = 0
  51. if ((Dlambdat.eq.0.).and.(Dlambdac.eq.0.)) then
  52. do iloc=1,6
  53. sigmaf(iloc) = esigmae(iloc)
  54. enddo
  55. return
  56. endif
  57.  
  58. c INITIALISATION
  59. c increment of stress
  60. do iloc=1,6
  61. dsigma(iloc) = 0.d0
  62. enddo
  63. c effective stress for the first iteration
  64. do iloc=i1,i6
  65. sigmai(iloc) = esigmae(iloc)
  66. end do
  67. if (lcp) then
  68. sigmai(3) = 0.d0
  69. sigmai(5) = 0.d0
  70. sigmai(6) = 0.d0
  71. endif
  72. c function h
  73. c case first iteration (sigmai = 0)
  74. rloc = 0.d0
  75. do iloc=1,6
  76. rloc = rloc + ABS(sigmai(iloc))
  77. enddo
  78. c if (rloc.lt.10.) then
  79. if (rloc.eq.0.) then
  80. call dsiggc(esigmae,dgc,ag,P2,pi2,i1,i6,fc,fb,lcp)
  81. call dsigRank(esigmae,dgt,i3,i6,parahot3,idimpara3,
  82. . rkappait,lcp)
  83. c effective stress
  84. do iloc=1,6
  85. sigmaf(iloc) = esigmae(iloc)
  86. end do
  87. else
  88. call dsiggc(sigmai,dgc,ag,P2,pi2,i1,i6,fc,fb,lcp)
  89. call dsigRank(sigmai,dgt,i3,i6,parahot3,idimpara3,
  90. . rkappait,lcp)
  91. c effective stress
  92. do iloc=1,6
  93. sigmaf(iloc) = sigmai(iloc)
  94. end do
  95. endif
  96. do iloc=i1,i6
  97. vloc(iloc) = Dlambdat*dgt(iloc) + Dlambdac*dgc(iloc)
  98. end do
  99. call mulAB(H66,VLOC,trav6,i6,i6,i6,i1)
  100. do iloc=1,6
  101. h(iloc) = sigmaf(iloc) - esigmae(iloc) + trav6(iloc)
  102. enddo
  103. c Jacobien
  104. if (Dlambdac.ne.0)
  105. . call ddsiggc(sigmaf,d2gc,ag,P2,pi2,i1,i6,fc,fb,lcp)
  106.  
  107. if (Dlambdat.ne.0)
  108. . call ddsigrank(sigmaf,d2gt,i1,i2,i3,i4,i5,i6,lcp,
  109. . parahot3,idimpara3)
  110. do jloc=1,6
  111. do iloc=1,6
  112. B(iloc,jloc) = Dlambdat * d2gt(iloc,jloc) +
  113. . Dlambdac * d2gc(iloc,jloc)
  114. enddo
  115. enddo
  116. call mulAB(H66,B,trav66,i6,i6,i6,i6)
  117. do jloc=1,6
  118. do iloc=1,6
  119. B(iloc,jloc) = U(iloc,jloc) + trav66(iloc,jloc)
  120. enddo
  121. enddo
  122.  
  123. c counter
  124. iter2 = 1
  125.  
  126. c ITERATIVE SOLVER
  127. c function to solve
  128. 15 continue
  129. rloc = 0.
  130. do iloc=1,6
  131. rloc = rloc + ABS(h(iloc))
  132. enddo
  133. if ((iter2.eq.1).or.((rloc.gt.10.).and.(iter2.lt.30))) then
  134.  
  135. call invert9(B,6,6)
  136. do jloc=1,6
  137. do iloc=1,6
  138. trav66(iloc,jloc) = -B(iloc,jloc)
  139. enddo
  140. enddo
  141.  
  142. call mulAB(trav66,h,dsigma,6,6,6,1)
  143. do iloc=1,6
  144. sigmaf(iloc) = sigmaf(iloc) + dsigma(iloc)
  145. enddo
  146. c calculation of dgt and dgc
  147. c test on sigma - if sigma close to 0, use sigma,tr for calculation of dgt and dgc
  148. rloc = 0.d0
  149. if (lcp) then
  150. rloc = (sigmaf(1))**2 + (sigmaf(2))**2 + (sigmaf(4))**2
  151. else
  152. rloc = (sigmaf(1))**2 + (sigmaf(2))**2 + (sigmaf(3))**2 +
  153. . (sigmaf(4))**2 + (sigmaf(5))**2 + (sigmaf(6))**2
  154. endif
  155. if (rloc.gt.0.) then
  156. call dsiggc(sigmaf,dgc,ag,P2,pi2,i1,i6,fc,fb,lcp)
  157. call dsigRank(sigmaf,dgt,i3,i6,parahot3,idimpara3,
  158. . rkappait,lcp)
  159. else
  160. call dsiggc(esigmae,dgc,ag,P2,pi2,i1,i6,fc,fb,lcp)
  161. call dsigRank(esigmae,dgt,i3,i6,parahot3,idimpara3,
  162. . rkappait,lcp)
  163. endif
  164. c function h
  165. do iloc=i1,i6
  166. vloc(iloc) = Dlambdat*dgt(iloc) + Dlambdac*dgc(iloc)
  167. end do
  168. call mulAB(H66,VLOC,trav6,i6,i6,i6,i1)
  169. do iloc=1,6
  170. h(iloc) = sigmaf(iloc) - esigmae(iloc) + trav6(iloc)
  171. enddo
  172. c Jacobien
  173. if (Dlambdac.ne.0)
  174. . call ddsiggc(sigmaf,d2gc,ag,P2,pi2,i1,i6,fc,fb,lcp)
  175. if (Dlambdat.ne.0)
  176. . call ddsigrank(sigmaf,d2gt,i1,i2,i3,i4,i5,i6,lcp,
  177. . parahot3,idimpara3)
  178. do jloc=1,6
  179. do iloc=1,6
  180. B(iloc,jloc) = Dlambdat*d2gt(iloc,jloc) +
  181. . Dlambdac * d2gc(iloc,jloc)
  182. enddo
  183. enddo
  184. call mulAB(H66,B,trav66,i6,i6,i6,i6)
  185. do jloc=1,6
  186. do iloc=1,6
  187. B(iloc,jloc) = U(iloc,jloc) + trav66(iloc,jloc)
  188. enddo
  189. enddo
  190. iter2 = iter2+1
  191.  
  192. go to 15
  193. endif
  194.  
  195. if (iter2.eq.30) then
  196. ldivide = .true.
  197. endif
  198.  
  199. RETURN
  200. END
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  

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