Télécharger selft3.eso

Retour à la liste

Numérotation des lignes :

selft3
  1. C SELFT3 SOURCE CHAT 05/01/13 03:13:30 5004
  2. SUBROUTINE SELFT3(XGAUSS,NBNN,XE,QQ)
  3. CCCCC
  4. C CALCUL DE LA SELF INDUCTANCE D'UN TRIANGLE
  5. C COPIE DE KALI1 DE CORFOU
  6. CCCCC
  7. IMPLICIT INTEGER(I-N)
  8. IMPLICIT REAL*8(A-H,O-Z)
  9.  
  10. -INC PPARAM
  11. -INC CCOPTIO
  12. REAL*8 XGAUSS(3)
  13. REAL*8 XE(3,NBNN)
  14. REAL*8 U(5),V(5),W(5)
  15. *
  16. NDIM=IDIM
  17. NDIM2=IDIM-1
  18. *
  19. U1=XGAUSS(1)
  20. V1=XGAUSS(2)
  21. W1=XGAUSS(3)
  22. DO 10 I=1,NBNN
  23. U(I)=XE(1,I)
  24. V(I)=XE(2,I)
  25. W(I)=XE(3,I)
  26. 10 CONTINUE
  27. DO 11 I=1,2
  28. U(NBNN+I)=U(I)
  29. V(NBNN+I)=V(I)
  30. W(NBNN+I)=W(I)
  31. 11 CONTINUE
  32. *
  33. QQ=0.
  34. DO 20 J=1,3
  35. K1=J
  36. K2=J+1
  37. K3=J+2
  38. ALA=(U(K2)-U1)*(U(K3)-U(K2))+(V(K2)-V1)*(V(K3)-V(K2))
  39. & +(W(K2)-W1)*(W(K3)-W(K2))
  40. ALA=ALA/((U(K3)-U(K2))**2+(V(K3)-V(K2))**2+(W(K3)-W(K2))**2)
  41. XH=U(K2)-ALA*(U(K3)-U(K2))
  42. YH=V(K2)-ALA*(V(K3)-V(K2))
  43. ZH=W(K2)-ALA*(W(K3)-W(K2))
  44. T1=(V(K2)-V1)*(W(K3)-W1)-(V(K3)-V1)*(W(K2)-W1)
  45. T2=(W(K2)-W1)*(U(K3)-U1)-(W(K3)-W1)*(U(K2)-U1)
  46. T3=(U(K2)-U1)*(V(K3)-V1)-(U(K3)-U1)*(V(K2)-V1)
  47. R1=(YH-V1)*(W(K2)-W1)-(ZH-W1)*(V(K2)-V1)
  48. R2=(ZH-W1)*(U(K2)-U1)-(XH-U1)*(W(K2)-W1)
  49. R3=(XH-U1)*(V(K2)-V1)-(YH-V1)*(U(K2)-U1)
  50. PSCA=T1*R1+T2*R2+T3*R3
  51. THETA1=1.
  52. IF(PSCA.LT.0.) THETA1=-1.
  53. R1=(YH-V1)*(W(K3)-W1)-(ZH-W1)*(V(K3)-V1)
  54. R2=(ZH-W1)*(U(K3)-U1)-(XH-U1)*(W(K3)-W1)
  55. R3=(XH-U1)*(V(K3)-V1)-(YH-V1)*(U(K3)-U1)
  56. PSCA=T1*R1+T2*R2+T3*R3
  57. THETA2=1.
  58. IF(PSCA.LT.0.)THETA2=-1.
  59. PSCA=(XH-U1)*(U(K2)-U1)+(YH-V1)*(V(K2)-V1)+(ZH-W1)*(W(K2)-W1)
  60. D0=SQRT((XH-U1)**2+(YH-V1)**2+(ZH-W1)**2)
  61. D1=SQRT((U(K2)-U1)**2+(V(K2)-V1)**2+(W(K2)-W1)**2)
  62. COSTH1=PSCA/(D0*D1)
  63. THETA1=THETA1*ACOS(COSTH1)
  64. PSCA=(XH-U1)*(U(K3)-U1)+(YH-V1)*(V(K3)-V1)+(ZH-W1)*(W(K3)-W1)
  65. D2=SQRT((U(K3)-U1)**2+(V(K3)-V1)**2+(W(K3)-W1)**2)
  66. COSTH2=PSCA/(D0*D2)
  67. THETA2=THETA2*ACOS(COSTH2)
  68. ATA1=TAN(THETA1/2.)
  69. ATA2=TAN(THETA2/2.)
  70. ATA=((ATA2+1.)*(1.-ATA1))/((1.-ATA2)*(ATA1+1.))
  71. RATA=LOG(ATA)
  72. QQ=QQ+D0*RATA
  73. 20 CONTINUE
  74. RETURN
  75. END
  76.  
  77.  
  78.  

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