cli182
C CLI182 SOURCE CB215821 20/11/25 13:20:23 10792 & ICHPSU,IROC,IVITC,IPC,IGAMC,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) C************************************************************************ C C PROJET : CASTEM 2000 C C NOM : CLI182 C C DESCRIPTION : Subroutine appellée par CLIM11 C C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI) C C AUTEUR : A. BECCANTINI, DRN/DMT/SEMT/LTMF C C************************************************************************ C C APPELES (Calcul) : C C************************************************************************ C C HISTORIQUE (Anomalies et modifications éventuelles) C C HISTORIQUE : C C************************************************************************ C IMPLICIT INTEGER(I-N) -INC PPARAM -INC CCOPTIO -INC SMLMOTS -INC SMELEME POINTEUR MELEFC.MELEME -INC SMLENTI POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI -INC SMCHPOI POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL, & MPVC.MPOVAL, MPPC.MPOVAL, MPGAMC.MPOVAL, MPLIM.MPOVAL -INC SMMATRIK POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RRET.IZAFM, & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXRET.IZAFM, & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYRET.IZAFM, & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETRET.IZAFM C C**** Variables de COOPTIO C C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES C & ,IECHO, IIMPI, IOSPI C & ,IDIM, IFICLE, IPREFI C & ,MCOORD C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU C & ,NORINC,NORVAL,NORIND,NORVAD C & ,NUCROU, IPSAUV C INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC & ,IGAMC,ICHLIM,ICEL,NFAC,IFAC,MELRES,IJACO & ,NGF,NGC,NLF,NLC,NLCB & ,ILIINC,ILIINP,IJAC & ,MP, NBEL, NBME, NBSOUS, NKID, NKMT, NMATRI, NP, NRIGE REAL*8 VOLU,SURF,GAMC,CNX,CNY,CTX,CTY,GM1 & ,RC,UXC,UYC,UNC,CC,ACEL,BCEL,CCEL & ,PC,PSRF,RHOUF,P,PSTAR,RHO,UN,UT,UX,UY,ECIN & ,DADR,DADP,DBDR,DBDP,DBDUX,DBDUY,DCDP & ,DPSDA,DPSDB,DPSDC,DPDR,DPDP,DPDUX,DPDUY & ,DUXDP,DUYDP,DECINP,DF2DP,DF3DP,DF4DP & ,DRORO,DROUX,DROUY,DROP & ,DUXRO,DUXUX,DUXUY,DUXP & ,DUYRO,DUYUX,DUYUY,DUYP & ,DPRO,DPUX,DPUY,DPP & ,COEF1,COEF2,COEF3,COEF C & ,YCAC,YCAC2,YCAC3,XCAC,F1,F2,F3,F4,USGM1 CHARACTER*(8) TYPE C C C**** KRIPAD pour la correspondance global/local C C SEGINI MLEMC C SEGINI MLEMCB C SEGINI MLEMF C C**** CHPOINTs de la table DOMAINE C C C**** LICHT active les MPOVALs en *MOD C C SEGACT MPNORM*MOD C SEGACT MPOVSU*MOD C SEGACT MPOVOL*MOD C C C**** CHPOINTs des variables C C C SEGACT *MOD C SEGACT *MOD C SEGACT *MOD C SEGACT *MOD C SEGACT *MOD C C C**** Boucle sur le face pour le calcul des invariants de C Riemann et du flux C SEGACT MELEFC NFAC=MELEFC.NUM(/2) C C**** Objet MATRIK C NRIGE = 7 NMATRI = 1 NKID = 9 NKMT = 7 C SEGINI MATRIK IJACO = MATRIK MATRIK.IRIGEL(1,1) = MELRES MATRIK.IRIGEL(2,1) = MELRES C C**** Matrice non symetrique C MATRIK.IRIGEL(7,1) = 2 C NBME = 16 NBSOUS = 1 SEGINI IMATRI IF(IJAC.EQ.1)THEN MLMOTS=ILIINC ELSEIF(IJAC.EQ.2)THEN MLMOTS=ILIINP ENDIF SEGACT MLMOTS MATRIK.IRIGEL(4,1) = IMATRI C C SEGDES MLMOTS MLMOTS=ILIINC SEGACT MLMOTS C C SEGDES MLMOTS NBEL = NFAC NBSOUS = 1 NP = 1 MP = 1 SEGINI RR , RUX , RUY , RRET , & UXR , UXUX , UXUY , UXRET , & UYR , UYUX , UYUY , UYRET , & RETR , RETUX , RETUY , RETRET C C**** Duale = IMATRI.LISDUA(1) = 'RN' C Primale = IMATRI.LISPRI(1) = 'RN' C -> IMATRI.LIZAFM(1,1) = RR C IMATRI.LIZAFM(1,1) = RR IMATRI.LIZAFM(1,2) = RUX IMATRI.LIZAFM(1,3) = RUY IMATRI.LIZAFM(1,4) = RRET IMATRI.LIZAFM(1,5) = UXR IMATRI.LIZAFM(1,6) = UXUX IMATRI.LIZAFM(1,7) = UXUY IMATRI.LIZAFM(1,8) = UXRET IMATRI.LIZAFM(1,9) = UYR IMATRI.LIZAFM(1,10) = UYUX IMATRI.LIZAFM(1,11) = UYUY IMATRI.LIZAFM(1,12) = UYRET IMATRI.LIZAFM(1,13) = RETR IMATRI.LIZAFM(1,14) = RETUX IMATRI.LIZAFM(1,15) = RETUY IMATRI.LIZAFM(1,16) = RETRET C SEGDES MATRIK SEGDES IMATRI C C**** Fin definition MATRIK C DO IFAC=1,NFAC,1 NGF=MELEFC.NUM(1,IFAC) NGC=MELEFC.NUM(2,IFAC) NLF=MLEMF.LECT(NGF) NLC=MLEMC.LECT(NGC) NLCB=MLEMCB.LECT(NGF) VOLU=MPVOL.VPOCHA(NLC,1) SURF=MPSURF.VPOCHA(NLF,1) C In CASTEM les normales sont sortantes CNX=-1*MPNORM.VPOCHA(NLF,1) CNY=-1*MPNORM.VPOCHA(NLF,2) CTX=-1*CNY CTY=CNX C Variables au centre GAMC=MPGAMC.VPOCHA(NLC,1) GM1=GAMC-1.0D0 PC=MPPC.VPOCHA(NLC,1) RC=MPRC.VPOCHA(NLC,1) UXC=MPVC.VPOCHA(NLC,1) UYC=MPVC.VPOCHA(NLC,2) UNC=(UXC*CNX)+(UYC*CNY) CC=GAMC*PC/RC CC=CC**0.5D0 C Variables à la face RHOUF=MPLIM.VPOCHA(NLCB,1) PSRF=MPLIM.VPOCHA(NLCB,2) C C******* Variables à l'interface C ACEL=CC/GAMC BCEL=ACEL - UNC CCEL=(RHOUF / PC) * PSRF PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0) PSTAR=PSTAR/(2*ACEL) P=PSTAR*PC RHO=P/PSRF UN=RHOUF/RHO UT=0.0D0 UX=UN*CNX+UT*CTX UY=UN*CNY+UT*CTY ECIN=0.5D0*((UX*UX)+(UY*UY)) C C******* Derivatives of ACEL, BCEL, CCEL with respect to the C variables at centers C DADR = -0.5D0*CC/(RC*GAMC) DADP = 0.5D0*CC/(PC*GAMC) DBDR = DADR DBDP = DADP DBDUX = -1*CNX DBDUY = -1*CNY DCDP = -1*CCEL/PC C C******* Derivatives of PSTAR with respect to ACEL,BCEL,CCEL C DPSDA = -1*(PSTAR*PSTAR)/((2*ACEL*PSTAR)-BCEL) DPSDB = PSTAR/((2*ACEL*PSTAR)-BCEL) DPSDC = 1/((2*ACEL*PSTAR)-BCEL) C C******* Derivatives of PC*PSTAR with respect to RC,PC,UXC,UYC C DPDR=(DPSDA*DADR)+(DPSDB*DBDR) DPDR=DPDR*PC DPDP=(DPSDA*DADP)+(DPSDB*DBDP)+(DPSDC*DCDP) DPDP=(DPDP*PC)+PSTAR DPDUX=(DPSDB*DBDUX)*PC DPDUY=(DPSDB*DBDUY)*PC CC CC******* Test 1 CC CC We check dpdp CC C YCAC=P C XCAC=PC C PC=PC*(1+1.0D-4) C CC=GAMC*PC/RC C CC=CC**0.5D0 CC C ACEL=CC/GAMC C BCEL=ACEL - UNC C CCEL=(RHOUF / PC) * PSRF C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0) C PSTAR=PSTAR/(2*ACEL) C P=PSTAR*PC C write(*,*) ((P - YCAC)/(PC - XCAC)), DPDP CC CC We check dpdr CC C YCAC=P C XCAC=RC C RC=RC*(1+1.0D-4) C CC=GAMC*PC/RC C CC=CC**0.5D0 CC C ACEL=CC/GAMC C BCEL=ACEL - UNC C CCEL=(RHOUF / PC) * PSRF C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0) C PSTAR=PSTAR/(2*ACEL) C P=PSTAR*PC C write(*,*) ((P - YCAC)/(RC - XCAC)), DPDR CC CC We check dpdux CC C YCAC=P C XCAC=UXC C UXC=UXC*(1+1.0D-4) C UNC=(UXC*CNX)+(UYC*CNY) C CC=GAMC*PC/RC C CC=CC**0.5D0 CC C ACEL=CC/GAMC C BCEL=ACEL - UNC C CCEL=(RHOUF / PC) * PSRF C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0) C PSTAR=PSTAR/(2*ACEL) C P=PSTAR*PC C write(*,*) ((P - YCAC)/(UXC - XCAC)), DPDUX CC CC We check dpduy CC C YCAC=P C XCAC=UYC C UYC=UYC*(1+1.0D-4) C UNC=(UXC*CNX)+(UYC*CNY) C CC=GAMC*PC/RC C CC=CC**0.5D0 CC C ACEL=CC/GAMC C BCEL=ACEL - UNC C CCEL=(RHOUF / PC) * PSRF C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0) C PSTAR=PSTAR/(2*ACEL) C P=PSTAR*PC C write(*,*) ((P - YCAC)/(UYC - XCAC)), DPDUY C CC CC******* Fin test 1 C C C******* The interfacial state is thus given by C RHOUF,PSRF,P and UT (UT=0) C Let us now compute the derivative of the residuum with C respect to P. C The residuum is given by C C F1=RHOUF*SURF/VOLU C F2=(RHOUF*UX+P*CNX)*SURF/VOLU C F3=(RHOUF*UY+P*CNY)*SURF/VOLU C F4=(RHOUF*((GAMC*USGM1*PSRF)+ECIN))*SURF/VOLU C C In these expression: UX, UY, P and ECIN depends on P C COEF=SURF/VOLU DUXDP=-1*UX/P DUYDP=-1*UY/P DECINP=-2*ECIN/P DF2DP=((RHOUF*DUXDP)+CNX)*COEF DF3DP=((RHOUF*DUYDP)+CNY)*COEF DF4DP=(RHOUF*DECINP)*COEF CC CC******* Test 2 CC CC We check DF2P CC C USGM1=1/GM1 C F2=(RHOUF*UX+P*CNX)*COEF C F3=(RHOUF*UY+P*CNY)*COEF C F4=(RHOUF*((GAMC*USGM1*PSRF)+ECIN))*COEF CC C YCAC=F2 C YCAC2=F3 C YCAC3=F4 C XCAC=P C P=P*(1+1.0D-4) C RHO=P/PSRF C UN=RHOUF/RHO C UT=0.0D0 C UX=UN*CNX+UT*CTX C UY=UN*CNY+UT*CTY C ECIN=0.5D0*((UX*UX)+(UY*UY)) C C F2=(RHOUF*UX+P*CNX)*COEF C F3=(RHOUF*UY+P*CNY)*COEF C F4=(RHOUF*((GAMC*USGM1*PSRF)+ECIN))*COEF C write(*,*) ((F2 -YCAC)/(P-XCAC)),DF2DP C write(*,*) ((F3 -YCAC2)/(P-XCAC)),DF3DP C write(*,*) ((F4 -YCAC3)/(P-XCAC)),DF4DP CC CC******* Fin test 2 CC C C******* Jacobian with respect to primitive variables C C DF1D... C DRORO=0.0D0 DROUX=0.0D0 DROUY=0.0D0 DROP=0.0D0 C C DF4D... C DPRO=DF4DP*DPDR DPUX=DF4DP*DPDUX DPUY=DF4DP*DPDUY DPP=DF4DP*DPDP C C DF2D... C DUXRO=DF2DP*DPDR DUXUX=DF2DP*DPDUX DUXUY=DF2DP*DPDUY DUXP =DF2DP*DPDP C C DF3D C DUYRO=DF3DP*DPDR DUYUX=DF3DP*DPDUX DUYUY=DF3DP*DPDUY DUYP =DF3DP*DPDP C C******* Jacobian with respect to conservative variables C IF(IJAC.EQ.1)THEN COEF1=-1.0D0*UXC/RC COEF2=-1.0D0*UYC/RC COEF3=0.5D0*GM1*((UXC*UXC)+(UYC*UYC)) C RR.AM(IFAC,1,1)=DRORO+(DROUX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1,1)=DPP ENDIF ENDDO C SEGDES MELEFC C SEGSUP MLEMC SEGSUP MLEMCB SEGSUP MLEMF C SEGDES MPNORM SEGDES MPVOL SEGDES MPSURF SEGDES MPRC SEGDES MPPC SEGDES MPVC SEGDES MPGAMC SEGDES MPLIM C SEGDES RR , RUX , RUY , RRET , & UXR , UXUX , UXUY , UXRET , & UYR , UYUX , UYUY , UYRET , & RETR , RETUX , RETUY , RETRET C 9999 CONTINUE RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales