selft3
C SELFT3 SOURCE CHAT 05/01/13 03:13:30 5004 CCCCC C CALCUL DE LA SELF INDUCTANCE D'UN TRIANGLE C COPIE DE KALI1 DE CORFOU CCCCC IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCOPTIO REAL*8 XGAUSS(3) REAL*8 XE(3,NBNN) REAL*8 U(5),V(5),W(5) * NDIM=IDIM NDIM2=IDIM-1 * U1=XGAUSS(1) V1=XGAUSS(2) W1=XGAUSS(3) DO 10 I=1,NBNN U(I)=XE(1,I) V(I)=XE(2,I) W(I)=XE(3,I) 10 CONTINUE DO 11 I=1,2 U(NBNN+I)=U(I) V(NBNN+I)=V(I) W(NBNN+I)=W(I) 11 CONTINUE * QQ=0. DO 20 J=1,3 K1=J K2=J+1 K3=J+2 ALA=(U(K2)-U1)*(U(K3)-U(K2))+(V(K2)-V1)*(V(K3)-V(K2)) & +(W(K2)-W1)*(W(K3)-W(K2)) ALA=ALA/((U(K3)-U(K2))**2+(V(K3)-V(K2))**2+(W(K3)-W(K2))**2) XH=U(K2)-ALA*(U(K3)-U(K2)) YH=V(K2)-ALA*(V(K3)-V(K2)) ZH=W(K2)-ALA*(W(K3)-W(K2)) T3=(U(K2)-U1)*(V(K3)-V1)-(U(K3)-U1)*(V(K2)-V1) R1=(YH-V1)*(W(K2)-W1)-(ZH-W1)*(V(K2)-V1) R2=(ZH-W1)*(U(K2)-U1)-(XH-U1)*(W(K2)-W1) R3=(XH-U1)*(V(K2)-V1)-(YH-V1)*(U(K2)-U1) THETA1=1. IF(PSCA.LT.0.) THETA1=-1. R1=(YH-V1)*(W(K3)-W1)-(ZH-W1)*(V(K3)-V1) R2=(ZH-W1)*(U(K3)-U1)-(XH-U1)*(W(K3)-W1) R3=(XH-U1)*(V(K3)-V1)-(YH-V1)*(U(K3)-U1) THETA2=1. IF(PSCA.LT.0.)THETA2=-1. PSCA=(XH-U1)*(U(K2)-U1)+(YH-V1)*(V(K2)-V1)+(ZH-W1)*(W(K2)-W1) D0=SQRT((XH-U1)**2+(YH-V1)**2+(ZH-W1)**2) D1=SQRT((U(K2)-U1)**2+(V(K2)-V1)**2+(W(K2)-W1)**2) COSTH1=PSCA/(D0*D1) THETA1=THETA1*ACOS(COSTH1) PSCA=(XH-U1)*(U(K3)-U1)+(YH-V1)*(V(K3)-V1)+(ZH-W1)*(W(K3)-W1) D2=SQRT((U(K3)-U1)**2+(V(K3)-V1)**2+(W(K3)-W1)**2) COSTH2=PSCA/(D0*D2) THETA2=THETA2*ACOS(COSTH2) ATA1=TAN(THETA1/2.) ATA2=TAN(THETA2/2.) ATA=((ATA2+1.)*(1.-ATA1))/((1.-ATA2)*(ATA1+1.)) RATA=LOG(ATA) QQ=QQ+D0*RATA 20 CONTINUE RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales