ottval
C OTTVAL SOURCE PV 21/10/28 21:15:07 11152 & NDEF,SIGG,VAR1,XVAL,NVAL,VAR02,VAR2,NVAR2,IERUT) * IMPLICIT INTEGER (I-N) IMPLICIT REAL*8 (A-H,O-Z) -INC CCREEL PARAMETER ( TOL1 = 1.D-16 ) PARAMETER ( TOL2 = 5.D-3 ) PARAMETER ( TOL3 = 5.D0 ) PARAMETER ( TOL4 = 1.D-6 ) PARAMETER ( TOL5 = 1.D-3 ) PARAMETER ( XUN = 1.D0) PARAMETER ( XZER = 0.D0) PARAMETER ( NAUX= 20 ) PARAMETER ( MCN = 10) DIMENSION SIGG0(*),SIGG(*),DEPSTT(*),XVAL(*),VAR01(*),VAR1(*) DIMENSION VAR02(*),VAR2(*) DIMENSION DD1(6),DD2(6),DD3(6) DIMENSION XSM(6),XRM(7),PWX0(10),PWX(10),TAIL(6),P(6) DIMENSION SS0(6),SS1(6),SS2(6),SS3(6),SS4(6),SS5(6),SS6(6) DIMENSION VV0(7),VV1(7),VV2(7),VV3(7),VV4(7) DIMENSION RCZ(10),QV1(10,6),QV2(10,6),QV3(10),XC(10) DIMENSION PWY(10),PWY1(10),PWY2(10),PWY3(10),PWY4(10) DIMENSION KR1(10),KR2(10),KR3(10),KR5(10),KR2N(10) DIMENSION VCA1(3),VCA2(3),VCA3(3),RCZ0(10),PWY5(10) DIMENSION VF1(3),VF2(3),VF3(3),FIL(3),OO(3,3),VERIN(3) * initialisations do i=1,10 pwx(i)=0.d0 pwy(i)=0.d0 enddo do i=1,6 ss1(i)=0.d0 ss2(i)=0.d0 ss3(i)=0.d0 ss4(i)=0.d0 ss5(i)=0.d0 ss6(i)=0.d0 enddo rsso= xpetit rssn= xpetit rttt= xpetit rpv = xpetit cu = xpetit YOUN = XVAL(1) XNU = XVAL(2) RTRAC = XVAL(3) BETA = XVAL(5) IF(NVAL.GE.6) THEN RCOMP = XVAL(6) ELSE RCOMP = 10.D0 * RTRAC ENDIF TOL6 = RTRAC*TOL4 DO 15 I=1,6 TAIL(I)=XVAL(I+6) P(I)=XVAL(I+12) 15 CONTINUE KFJ=0 KFL=0 ZSV=XZER USV=XUN DO I=1,NDEF SIGG(I)=SIGG0(I) ENDDO DO I=1,NVAR1 VAR1(I)=VAR01(I) ENDDO DO I=1,NVAR2 VAR2(I)=VAR02(I) ENDDO DO I=1,3 VF1(I)=VAR2(I) VF2(I)=VAR2(I+4) VF3(I)=VAR2(I+8) ENDDO XNF1 = VAR2( 4) XNF2 = VAR2( 8) XNF3 = VAR2(12) FIL(1)= VAR2(13) FIL(2)= VAR2(14) FIL(3)= VAR2(15) * iterations internes 111 CONTINUE IF(ZSV.GE.1.D0) GO TO 888 IERUT=3 RETURN ENDIF DO I=1,NDEF DD1(I)= USV*DEPSTT(I) ENDDO * repere de calcul IF (XNF1.NE.XZER) THEN VCA1(1)=VF1(1) VCA1(2)=VF1(2) VCA1(3)=VF1(3) IF (XNF3.NE.XZER) THEN VCA2(1)=VF2(1) VCA2(2)=VF2(2) VCA2(3)=VF2(3) VCA3(1)=VF3(1) VCA3(2)=VF3(2) VCA3(3)=VF3(3) ELSEIF (XNF2.NE.XZER) THEN VCA2(1)=VF2(1) VCA2(2)=VF2(2) VCA2(3)=VF2(3) VCA3(1)=VF1(2)*VF2(3)-VF1(3)*VF2(2) VCA3(2)=VF1(3)*VF2(1)-VF1(1)*VF2(3) VCA3(3)=VF1(1)*VF2(2)-VF1(2)*VF2(1) ELSE IF (ABS(VCA1(2)).GE.XSZPRE.OR. & ABS(VCA1(3)).GE.XSZPRE) THEN VCA2(1)=XZER VCA2(2)=-VCA1(3) VCA2(3)=VCA1(2) XVCA=SQRT(VCA2(1)*VCA2(1)+VCA2(2)*VCA2(2) . +VCA2(3)*VCA2(3)) VCA2(1)=VCA2(1)/XVCA VCA2(2)=VCA2(2)/XVCA VCA2(3)=VCA2(3)/XVCA ELSE VCA2(1)=XZER VCA2(2)=XUN VCA2(3)=XZER ENDIF VCA3(1)=VF1(2)*VCA2(3)-VF1(3)*VCA2(2) VCA3(2)=VF1(3)*VCA2(1)-VF1(1)*VCA2(3) VCA3(3)=VF1(1)*VCA2(2)-VF1(2)*VCA2(1) ENDIF ELSE VCA1(1)=XUN VCA1(2)=XZER VCA1(3)=XZER VCA2(1)=XZER VCA2(2)=XUN VCA2(3)=XZER VCA3(1)=XZER VCA3(2)=XZER VCA3(3)=XUN ENDIF DO I=1,3 IF(I.EQ.1) THEN XNFF=SQRT(VCA1(1)*VCA1(1)+VCA1(2)*VCA1(2) & +VCA1(3)*VCA1(3)) ELSE IF(I.EQ.2) THEN XNFF=SQRT(VCA2(1)*VCA2(1)+VCA2(2)*VCA2(2) & +VCA2(3)*VCA2(3)) ELSE IF(I.EQ.3) THEN XNFF=SQRT(VCA3(1)*VCA3(1)+VCA3(2)*VCA3(2) & +VCA3(3)*VCA3(3)) ENDIF IF((XNFF.GE.XSZPRE).AND. & (ABS(XNFF-1.).GE.XSZPRE)) THEN IERUT=2 RETURN ENDIF ENDDO * sortie elastique ? KFR=1 IF(IERUT.NE.0) RETURN & RCZ0,KR1,KR2,KR3,QV1,QV2,QV3,PWX0,XC,IERUT) IF(IERUT.NE.0) RETURN IF(KFQ.EQ.0) THEN DO I=1,NDEF SS5(I)=SS6(I)+SS4(I) ENDDO DO I=1,NVAR1 VV4(I)=VAR1(I) ENDDO KFM=0 DO I=1,NDEF SS0(I)=SS4(I) ENDDO GO TO 222 ENDIF * ecoulement - etape1 (predicteur) KFM=1 DO KV1=1,KFQ KV0=KR2(KV1) IF(KV0.NE.2.AND.KV0.NE.3.AND.KV0.NE.5.AND.KV0.NE.6 & .AND.KV0.NE.8.AND.KV0.NE.9) THEN * PWX(KV0)=PWX0(KV0)+RCZ0(KV0) PWX(KV0)=PWX0(KV0) ELSE PWX(KV0)=PWX0(KV0) ENDIF ENDDO KV1SF=1 & XVAL,SS0,VV0,VAR2,KR2,QV1,QV2,QV3,PWX,XC, & PWY1,KFQ,KV1SF,IERUT) IF(IERUT.NE.0) RETURN KFK=0 KFP=0 DO I=1,MCN KR2N(I)=0 ENDDO * tris avant etape2 DO KV1=1,KFQ KV0 = KR2(KV1) IF(PWY1(KV1).GT.0.) THEN KFK=KFK+1 KR2N(KFK)=KV0 ELSE IF(KV0.EQ.1.OR.KV0.EQ.4.OR.KV0.EQ.7) THEN KFP=1 KFK=KFK+1 KR2N(KFK)=KV0 + 1 ENDIF IF(KV0.EQ.2.OR.KV0.EQ.5.OR.KV0.EQ.8) THEN KFP=1 KFK=KFK+1 KR2N(KFK)=KV0 + 1 ENDIF IF(KV0.EQ.3.OR.KV0.EQ.6.OR.KV0.EQ.9) THEN KFP=1 KFK=KFK+1 KR2N(KFK)=KV0 - 1 ENDIF ENDIF ENDDO IF (KFK.EQ.0) THEN IERUT=2 RETURN ENDIF IF(KFK.LT.KFQ.OR.KFP.NE.0) THEN DO I=1,MCN KR2(I)=0 ENDDO KFQ = KFK DO KV1=1,KFQ KR2(KV1)=KR2N(KV1) ENDDO DO KV1=1,KFQ KV0=KR2(KV1) IF(KV0.NE.2.AND.KV0.NE.3.AND.KV0.NE.5.AND.KV0.NE.6 & .AND.KV0.NE.8.AND.KV0.NE.9) THEN * PWX(KV0)=PWX0(KV0)+RCZ0(KV0) PWX(KV0)=PWX0(KV0) ELSE PWX(KV0)=PWX0(KV0) ENDIF ENDDO & XVAL,SS0,VV0,VAR2,KR2,QV1,QV2,QV3,PWX,XC, & PWY1,KFQ,KV1SF,IERUT) IF(IERUT.NE.0) RETURN ENDIF FRG1 = VV0(1) IF(ABS(FRG1).GE.10.D0) THEN USV = MAX(0.5D0*USV,TOL4) KFJ=1 GO TO 111 ENDIF * ecoulement - etape2 (correcteur) DO I=1,NDEF SS3(I)=SS6(I)+SS0(I) ENDDO DO I=1,NVAR1 VV3(I)=VAR1(I)+VV0(I) ENDDO DO KV1=1,KFQ KV0=KR2(KV1) & TOL6,QV1,QV2,QV3,KV0,KR1,MCN,IERUT) IF(IERUT.NE.0) RETURN KFH=1 & XC,RCZ,KV0,KFH,TOL6,IERUT) IF(IERUT.NE.0) RETURN IF(KV0.NE.2.AND.KV0.NE.3.AND.KV0.NE.5.AND.KV0.NE.6 & .AND.KV0.NE.8.AND.KV0.NE.9) THEN * PWX(KV0)=PWX0(KV0)+RCZ(KV0) * PWX(KV0)=PWX0(KV0)+RCZ0(KV0) PWX(KV0)=PWX0(KV0) ELSE PWX(KV0)=PWX0(KV0) ENDIF ENDDO & XVAL,SS1,VV1,VAR2,KR2,QV1,QV2,QV3,PWX,XC, & PWY2,KFQ,KV1SF,IERUT) IF(IERUT.NE.0) RETURN FRG2 = VV1(1) IF(ABS(FRG2).GE.10.D0) THEN USV = MAX(0.5D0*USV,TOL4) KFJ=1 GO TO 111 ENDIF * preparation des tests DO I=1,NDEF SS5(I)=SS6(I)+0.5D0*(SS0(I)+SS1(I)) ENDDO DO I=1,NVAR1 VV4(I)=VAR1(I)+0.5D0*(VV0(I)+VV1(I)) ENDDO DO I=1,MCN IF (PWY1(I)+PWY2(I).LT.0.) THEN IF(USV.EQ.TOL4) THEN IERUT=3 RETURN ENDIF USV = MAX(0.5D0*USV,TOL4) KFJ=1 GO TO 111 ENDIF ENDDO KFQP = 0 DO I=1,MCN KR5(I)=0 ENDDO VCR = 0. DO KV1=1,KFQ KV0=KR2(KV1) KFH=1 & XC,RCZ,KV0,KFH,TOL6,IERUT) IF(IERUT.NE.0) RETURN KFQP=KFQP+1 KR5(KFQP)=KV0 VCR = MAX(VCR,ABS(RCZ(KV0))) ENDDO * affinage si besoin IF(VCR.LE.TOL6) THEN GO TO 333 ENDIF KFI=0 444 CONTINUE KFI = KFI + 1 IF(KFI.GT.NAUX) THEN USV = MAX(0.5D0*USV,TOL4) KFJ=1 GO TO 111 ENDIF DO KV1=1,KFQP KV0=KR5(KV1) PWX(KV0)=RCZ(KV0) & TOL6,QV1,QV2,QV3,KV0,KR1,MCN,IERUT) IF(IERUT.NE.0) RETURN ENDDO KV1SF=2 & XVAL,SS2,VV2,VAR2,KR5,QV1,QV2,QV3,PWX,XC, & PWY3,KFQP,KV1SF,IERUT) IF(IERUT.NE.0) RETURN DO I=1,NDEF SS1(I) = SS1(I) + 2.*SS2(I) SS5(I)=SS6(I)+0.5D0*(SS0(I)+SS1(I)) ENDDO DO I=1,NVAR1 VV1(I) = VV1(I) + 2.*VV2(I) VV4(I)=VAR1(I)+0.5D0*(VV0(I)+VV1(I)) ENDDO DO KV1=1,KFQP KV0=KR5(KV1) PWY2(KV0) = PWY2(KV0) + 2.*PWY3(KV0) ENDDO VCS=0. DO KV1=1,KFQP KV0=KR5(KV1) KFH=1 & XC,RCZ,KV0,KFH,TOL6,IERUT) IF(IERUT.NE.0) RETURN VCS = MAX(VCS,ABS(RCZ(KV0))) ENDDO IF(VCS.LE.VCR) THEN DO KV1=1,KFQP KV0=KR5(KV1) IF(PWY1(KV0)+PWY2(KV0).LT.0.D0) THEN USV = MAX(0.5D0*USV,TOL4) KFJ=1 GO TO 111 ENDIF ENDDO GO TO 777 ENDIF DO I=1,NDEF SS1(I) = SS1(I) + SS2(I) SS5(I)=SS6(I)+0.5D0*(SS0(I)+SS1(I)) ENDDO VCS=0. DO KV1=1,KFQP KV0=KR5(KV1) KFH=1 & XC,RCZ,KV0,KFH,TOL6,IERUT) IF(IERUT.NE.0) RETURN VCS = MAX(VCS,ABS(RCZ(KV0))) ENDDO 777 CONTINUE IF(VCS.LE.TOL6) THEN GO TO 333 ELSE VCR = VCS GO TO 444 ENDIF * fin d'iteration 333 CONTINUE DO I=1,NDEF * SS5(I)=SS6(I)+0.5D0*(SS0(I)+SS1(I)) XSM(I)=0.5D0*(SS0(I)+SS1(I)) ENDDO DO I=1,NVAR1 * VV4(I)=VAR1(I)+0.5D0*(VV0(I)+VV1(I)) XRM(I)=0.5D0*(VV0(I)+VV1(I)) ENDDO DO I=1,MCN PWY(I)=0.5*(PWY1(I)+PWY2(I)) IF(PWY(I).LT.0.D0) THEN IF(USV.EQ.TOL4) THEN IERUT=3 RETURN ENDIF USV = MAX(0.5D0*USV,TOL4) KFJ=1 GO TO 111 ENDIF ENDDO RSSN=0.D0 RSSO=0.D0 DO I=1,NDEF RSSN = MAX(RSSN,ABS(SS1(I)-SS0(I))) RSSO = MAX(RSSO,2.D0*ABS(SS5(I))) ENDDO RSSO = MAX(RSSO,TOL3) FHPT = VV4(1) FHPF = TOL2 RPV = (ABS(FRG2-FRG1))/MAX(2.D0*ABS(FHPT),FHPF) RTTT = MAX(RSSN/RSSO,RPV) RTTT = MAX(RTTT, TOL1) CU = 0.9D0*SQRT(TOL5/RTTT) IF(RTTT.GT.TOL5) THEN IF(USV.LE.TOL4) THEN IERUT=3 RETURN ENDIF QQ = MAX(CU,0.1D0) USV = MAX(QQ*USV,TOL4) KFJ=1 GO TO 111 ENDIF 222 CONTINUE * mise à jour VBS = 1.D0 DO 399 KV1=1,KFQ KV0=KR2(KV1) IF(KR1(KV0).GT.0) GO TO 399 & VAR2,TOL6,IERUT) IF(IERUT.NE.0) RETURN VBS = MIN(VBS,X) 399 CONTINUE X=VBS IF(X.LT.1.D0) THEN USV = X*USV KFJ = 1 GO TO 111 ENDIF VBS = 1.D0 KFH=0 DO 400 KV0=1,MCN & XC,RCZ,KV0,KFH,TOL6,IERUT) IF(IERUT.NE.0) RETURN IF(KR3(KV0).EQ.0) THEN IF(RCZ(KV0).GT.TOL6) THEN & VV0,VV1,VAR2,OO,TOL6,NDEF,X,RCZ0,RCZ,XC, & KFM,IERUT) IF(IERUT.NE.0) RETURN VBS = MIN(VBS,X) ENDIF ENDIF 400 CONTINUE X = VBS IF(X.LT.1.D0) THEN USV = X*USV KFJ = 1 GO TO 111 ENDIF 555 CONTINUE ZSV=ZSV+USV QQ = MIN(CU,1.1D0) IF(KFJ.EQ.1) THEN QQ = MIN(QQ,1.D0) ENDIF USV = QQ*USV KFJ=0 USV = MAX(USV,TOL4) USV = MIN(USV,1.D0-ZSV) DO I=1,3 ENDDO DO I=1,3 ENDDO DO I=1,NDEF SS6(I)=SS5(I) ENDDO DO I=1,NVAR1 VAR1(I)=VV4(I) ENDDO * nouvelle fissure? KFH=0 DO KV0=1,7,3 & XC,RCZ,KV0,KFH,TOL6,IERUT) IF(IERUT.NE.0) RETURN ENDDO IF(ABS(RCZ(1)).LE.TOL6.AND.XNF1.EQ.0.) THEN XNF1 = 1.D0 DO I=1,3 VF1(I)=OO(I,1) ENDDO IF (FIL(1).EQ.XZER) THEN KFV=1 IF(IERUT.NE.0) RETURN ENDIF IF(ABS(RCZ(4)).LE.TOL6.AND.XNF2.EQ.0.) THEN XNF2 = 1.D0 DO I=1,3 VF2(I)=OO(I,2) ENDDO IF (FIL(2).EQ.XZER) THEN KFV=2 IF(IERUT.NE.0) RETURN ENDIF IF(ABS(RCZ(7)).LE.TOL6.AND.XNF3.EQ.0.) THEN XNF3 = 1.D0 DO I=1,3 VF3(I)=OO(I,3) ENDDO IF (FIL(3).EQ.XZER) THEN KFV=3 IF(IERUT.NE.0) RETURN ENDIF ENDIF ENDIF ENDIF IF(ABS(RCZ(4)).LE.TOL6.AND.XNF2.EQ.0.D0) THEN IF(XNF1.EQ.0.D0) THEN IERUT = 2 RETURN ENDIF XNF2 = 1.D0 DO I=1,3 VF2(I)=VCA2(I)*OO(1,1)+VCA3(I)*OO(2,1) ENDDO IF (FIL(2).EQ.XZER) THEN KFV=2 IF(IERUT.NE.0) RETURN ENDIF IF(ABS(RCZ(7)).LE.TOL6.AND.XNF3.EQ.0.) THEN XNF3 = 1.D0 IF (FIL(3).EQ.XZER) THEN KFV=3 IF(IERUT.NE.0) RETURN ENDIF ENDIF ENDIF IF(ABS(RCZ(7)).LE.TOL6.AND.XNF3.EQ.0.) THEN IF(XNF1.EQ.0.D0 .OR.XNF2.EQ.0.D0) THEN IERUT = 2 RETURN ENDIF XNF3 = 1.D0 DO I=1,3 VF3(I)=VCA3(I) ENDDO IF (FIL(3).EQ.XZER) THEN KFV=3 IF(IERUT.NE.0) RETURN ENDIF ENDIF DO I=1,3 VAR2(I) =VF1(I) VAR2(I+4)=VF2(I) VAR2(I+8)=VF3(I) ENDDO VAR2( 4)=XNF1 VAR2( 8)=XNF2 VAR2(12)=XNF3 VAR2(13)=FIL(1) VAR2(14)=FIL(2) VAR2(15)=FIL(3) KFR=2 * passage a l'itération suivante GO TO 111 888 CONTINUE RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales