ottocp
C OTTOCP SOURCE CHAT 05/01/13 02:07:14 5004 & PRECIE,PRECIZ,XCOMP,XLC,KERRE) C========================================================================= C C ENTREES : C SIGMA, C C SORTIES : C FCRIT, C C========================================================================== C IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCOPTIO -INC CCREEL C PARAMETER (XZER=0.D0,UNDEMI=.5D0,UN=1.D0,DEUX=2.D0,TROIS=3.D0) C * DIMENSION XLTR(3) C C INITIALISATIONS C KERRE=0 RAC3=SQRT(TROIS) ****************************** IZOB=0 ****************************** * CAS 1 ****************************** IF(IZOB.EQ.0) THEN * *-------------------------------- * ON RECUPERE LES CONSTANTES *-------------------------------- * EPCMAX=XCOMP(1) EPCULT=XCOMP(2) RCBI =XCOMP(3) XK2 =XCOMP(4) XGB =XCOMP(5) XPA =XCOMP(6) RCMAX =XCOMP(7) XK1 =XCOMP(8) XGA =XCOMP(9) AL =XCOMP(10) BE =XCOMP(11) GAMA =XCOMP(12) XMU1 =XCOMP(14) XLCMAX=XCOMP(15) A2 =XCOMP(16) XMU2 =XCOMP(17) XLCULT=XCOMP(18) * IF(IIMPI.EQ.42) THEN * WRITE(IOIMP,89010) (XCOMP(I),I=1,18) *89010 FORMAT( 2X, ' OTTOCP - XCOMP'/6(1X,1PE12.5)/) * WRITE(IOIMP,80911) (SIGMA(I),I=1,6) *80911 FORMAT( 2X, ' ENTREE OTTOCP - SIGMA '/6(1X,1PE12.5)/) * WRITE(IOIMP,80912) XLC,XLCMAX,XLCULT *80912 FORMAT( 2X, ' XLC=',1PE12.5,2X,' XLCMAX=',1PE12.5,2X, * & ' XLCULT=',1PE12.5/) * ENDIF * * CALCUL DES DIFFERENTES EXPRESSIONS * XLAMC=RAC3*(UN+XGB-XGA/TROIS) DELTAP=EPCULT-EPCMAX IF(XLC.LE.XLCMAX) THEN SBAR=RCMAX*(UN+4.D0*X-DEUX*X*X)/TROIS FMU=XGA*SBAR*SBAR/TROIS/RCMAX + XLAMC*SBAR/RAC3 FMU=FMU/(XGB*SBAR+RCMAX) RR=RCMAX XGBP=XGB*(XPA-(UN+XPA)*X) * ELSE IF(XLC.GT.XLCMAX.AND.XLC.LE.XLCULT) THEN DLC=XLC-XLCMAX TRA=EXP(XMU2*DLC) X=A2*(TRA-UN)/(TRA+UN) SBAR=RCMAX*(UN-X*X) RR=XGA*SBAR*SBAR/TROIS/RCMAX +(UN-XGA/TROIS)*SBAR XGBP=-XGB FMU=1.D0 * ELSE RR=0.D0 XGBP=-XGB FMU=1.D0 ENDIF * PP=XI1/TROIS * DO I=1,3 ENDDO DO I=4,6 ENDDO * XJ2=UNDEMI*(S(1)*S(1) + S(2)*S(2) + S(3)*S(3)) & + S(4)*S(4) + S(5)*S(5) + S(6)*S(6) TAU=SQRT(XJ2) * XJ3= (S(1)**3 + S(2)**3 + S(3)**3)/TROIS & + S(4)*S(4)*(S(1)+S(2)) + S(5)*S(5)*(S(1)+S(3)) & + S(6)*S(6)*(S(2)+S(3)) + DEUX*S(4)*S(5)*S(6) * if(tau.NE.0.)THEN C3T=1.5D0*RAC3*XJ3/(TAU**3) C3T = MAX(-1.D0,C3T) C3T = MIN( 1.D0,C3T) else C3T=1. endif * IF(C3T.GE.0.D0) THEN PHI=ACOS(XK2*C3T)/TROIS ELSE PHI=(XPI-ACOS(-XK2*C3T))/TROIS ENDIF XLAM=XK1*COS(PHI) * FCRIT=XGA*XJ2/RCMAX + XLAM*TAU +FMU*(XGB*XI1-RR) * * * IF(IIMPI.EQ.42) THEN * WRITE(IOIMP,79000) XI1,TAU,XJ3 *79000 FORMAT( 2X, ' OTTOCP - I1=',1PE12.5,2X, * & 'TAU=',1PE12.5,2X,'J3=',1PE12.5/) * WRITE(IOIMP,79001) ZOZOB,XLAM,PHI *79001 FORMAT( 2X, ' OTTOCP - TETA=',1PE12.5,2X, * & 'XLAM=',1PE12.5,2X,'PHI=',1PE12.5/) * ENDIF * * ECOULEMENT * ---------- * DO I=1,6 DF(I)=XZER DG(I)=XZER ENDDO H=XZER * IF(TAU.GE.PRECIZ) THEN * DLA=(XK1*XK2*RAC3/DEUX)*SIN(PHI)/SQRT(UN-(XK2*C3T)**2) * AUX(1)=S(1)**2 + S(4)**2 + S(5)**2 AUX(2)=S(2)**2 + S(4)**2 + S(6)**2 AUX(3)=S(3)**2 + S(5)**2 + S(6)**2 AUX(4)=S(1)*S(4) + S(2)*S(4) + S(5)*S(6) AUX(5)=S(1)*S(5) + S(4)*S(6) + S(5)*S(3) AUX(6)=S(4)*S(5) + S(2)*S(6) + S(3)*S(6) * TAU4=XJ2*XJ2 DEUTAU=DEUX*TAU DEUTIE=DEUX/TROIS * DO I=1,3 TRA =(XGA/RCMAX)*S(I) & + DLA*(AUX(I)/XJ2 -DEUTIE -1.5D0*XJ3*S(I)/TAU4 ) & + XLAM*S(I)/DEUTAU DF(I)=TRA + XGB*FMU DG(I)=TRA - XGBP ENDDO * DO I=4,6 TRA =(XGA/RCMAX)*S(I) & + DLA*(AUX(I)/XJ2 -1.5D0*XJ3*S(I)/TAU4 ) & + XLAM*S(I)/DEUTAU DF(I)=TRA DG(I)=TRA ENDDO * ELSE DO I=1,3 DF(I)= XGB*FMU DG(I)= - XGBP ENDDO * ENDIF * * ECROUISSAGE * ----------- * IF(XLC.LE.XLCMAX) THEN H=XGB*XI1-RCMAX H=H*(XGA*XGB*SBAR*SBAR/TROIS/RCMAX +DEUX*XGA*SBAR/TROIS & +XLAMC*RCMAX/RAC3)/((XGB*SBAR+RCMAX)**2) H=H*4.D0*RCMAX*(UN-X)/TROIS ELSE IF(XLC.GT.XLCMAX.AND.XLC.LE.XLCULT) THEN TRA=EXP(XMU2*DLC) H= DEUX*XGA*SBAR/TROIS/RCMAX+UN-XGA/TROIS H= H*DEUX*X*RCMAX*DEUX*A2*XMU2*TRA/((UN+TRA)**2) ELSE H=0.D0 ENDIF ****************************** * FIN DU CAS 1 ****************************** ENDIF * ****************************** * CAS 2 ****************************** IF(IZOB.EQ.1) THEN * *-------------------------------- * ON RECUPERE LES CONSTANTES *-------------------------------- * EPCMAX=XCOMP(1) EPCULT=XCOMP(2) RCBI =XCOMP(3) REPS =XCOMP(4) A0 =XCOMP(6) RCMAX =XCOMP(7) AA =XCOMP(8) C0 =XCOMP(9) FAC =XCOMP(10) XLCMAX=XCOMP(1)*FAC XLCULT=XCOMP(2)*FAC * IF(IIMPI.EQ.42) THEN * WRITE(IOIMP,89010) (XCOMP(I),I=1,18) *89010 FORMAT( 2X, ' OTTOCP - XCOMP'/6(1X,1PE12.5)/) * WRITE(IOIMP,80911) (SIGMA(I),I=1,6) *80911 FORMAT( 2X, ' ENTREE OTTOCP - SIGMA '/6(1X,1PE12.5)/) * WRITE(IOIMP,80912) XLC,XLCMAX,XLCULT *80912 FORMAT( 2X, ' XLC=',1PE12.5,2X,' XLCMAX=',1PE12.5,2X, * & ' XLCULT=',1PE12.5/) * ENDIF * * CALCUL DES DIFFERENTES EXPRESSIONS * IF(XLC.LE.XLCMAX) THEN X=XLC/XLCMAX SBAR=RCMAX*(UN+4.D0*X-DEUX*X*X)/TROIS ELSE X=(XLC-XLCMAX)/(XLCULT-XLCMAX) SBAR=RCMAX*(UN-X*X) ENDIF TC= SBAR/AA TC=MAX(1.D-6,TC) * PP=-XI1/TROIS * DO I=1,3 ENDDO DO I=4,6 ENDDO * XJ2=UNDEMI*(S(1)*S(1) + S(2)*S(2) + S(3)*S(3)) & + S(4)*S(4) + S(5)*S(5) + S(6)*S(6) TAU=SQRT(XJ2) QQ=SQRT(3.D0)*TAU * ZEZE = 3.D0*QQ*QQ-A0*TC*PP ZEZE = MAX(ZEZE,1.D-7) FCRIT=SQRT(ZEZE) - TC * * IF(IIMPI.EQ.42) THEN * WRITE(IOIMP,79000) XI1,TAU,XJ3 *79000 FORMAT( 2X, ' OTTOCP - I1=',1PE12.5,2X, * & 'TAU=',1PE12.5,2X,'J3=',1PE12.5/) * WRITE(IOIMP,79001) ZOZOB,XLAM,PHI *79001 FORMAT( 2X, ' OTTOCP - TETA=',1PE12.5,2X, * & 'XLAM=',1PE12.5,2X,'PHI=',1PE12.5/) * ENDIF * * ECOULEMENT * ---------- * DO I=1,6 DF(I)=XZER DG(I)=XZER ENDDO H=XZER * FF = 1.D0+C0*(PP/TC)**2 DO I=1,3 DF(I)=(9.D0*S(I)+A0*TC) /2.D0/TC DG(I)=FF*DF(I) ENDDO * DO I=4,6 DF(I)=(9.D0*S(I)) /2.D0/TC DG(I)=FF*DF(I) ENDDO * * * ECROUISSAGE * ----------- * IF(XLC.LE.XLCMAX) THEN H=-4.D0*RCMAX*(UN-X)/TROIS H=H*(1.D0+ A0*PP/2.D0/SQRT(ZEZE) ) H=H/XLCMAX/AA ELSE IF(XLC.GT.XLCMAX.AND.XLC.LE.XLCULT) THEN H= 2.D0*RCMAX*X H=H*(1.D0+ A0*PP/2.D0/SQRT(ZEZE) ) H= H/(XLCULT-XLCMAX)/AA ELSE H=0.D0 ENDIF ****************************** * FIN DU CAS 2 ****************************** ENDIF * * IF(IIMPI.EQ.42) THEN * WRITE(IOIMP,77000) FCRIT *77000 FORMAT( 2X, ' OTTOCP - FCRIT '/(1X,1PE12.5)/) * WRITE(IOIMP,77001) (DF(I),I=1,6) *77001 FORMAT( 2X, ' OTTOCP - DF '/6(1X,1PE12.5)/) * WRITE(IOIMP,77002) (DG(I),I=1,6) *77002 FORMAT( 2X, ' OTTOCP - DG '/6(1X,1PE12.5)/) * WRITE(IOIMP,77003) H *77003 FORMAT( 2X, ' OTTOCP - H '/(1X,1PE12.5)/) * ENDIF * RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales