cli123
C CLI123 SOURCE CB215821 20/11/25 13:20:02 10792 & ICHPSU,IROC,IVITC,IPC,IGAMC,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) C************************************************************************ C C PROJET : CASTEM 2000 C C NOM : CLI123 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, & RUZ.IZAFM, UXUZ.IZAFM, UYUZ.IZAFM, RETUZ.IZAFM, & UZR.IZAFM, UZUX.IZAFM, UZUY.IZAFM, UZRET.IZAFM, & UZUZ.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,RC,PC,UXC,UYC,GAMC,CNX,CNY,CTX,CTY & ,CNZ,CTZ,CT1X,CT1Y,CT1Z,UZC,UZF,UT1C,UT1,UZ & ,RF,PF,UXF,UYF & ,UNC,UNF,ASONC,ASONF,ASON * & ,UTF,SF & ,UTC,SC & ,GM1,USGM1,DSGM1,G1,G3,ASON2,S,UT,UN,RHO,P,UX,UY & ,DUNDG3,DASDG3,DRHDG3,DPDG3,DRHDS,DPDS & ,DUZDG3,DUZDUT,DUXUT1,DUYUT1,DUZUT1,DFMXU1,DFMYU1,DFMZU1 & ,DFMZG3,DFMZS,DFMZUT,DFEDU1,DG3DUZ,DUTDUZ & ,DU1DUX,DU1DUY,DU1DUZ,DROUZ,DUXUZ,DUYUZ,DPUZ & ,DUZRO,DUZUX,DUZUY,DUZUZ,DUZP * & ,CELL,EPS,CACCA & ,DUXDG3,DUYDG3,DUXDUT,DUYDUT & ,DFRDG3,DFRDS,DFMXG3,DFMXS,DFMXUT,DFMYG3,DFMYS,DFMYUT & ,DFEDG3,DFEDS,DFEDUT & ,DG3DR,DG3DP,DG3DUX,DG3DUY,DSDR,DSDP,DUTDUX,DUTDUY,COEF & ,DRORO,DROUX,DROUY,DROP & ,DUXRO,DUXUX,DUXUY,DUXP & ,DUYRO,DUYUX,DUYUY,DUYP & ,DPRO,DPUX,DPUY,DPP & ,COEF1,COEF2,COEF3,COEF4 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 = 25 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 C C C C C SEGDES MLMOTS MLMOTS=ILIINC SEGACT MLMOTS C C C C C C SEGDES MLMOTS NBEL = NFAC NBSOUS = 1 NP = 1 MP = 1 SEGINI RR , RUX , RUY , RUZ ,RRET , & UXR , UXUX , UXUY , UXUZ ,UXRET , & UYR , UYUX , UYUY , UYUZ , UYRET , & UZR , UZUX , UZUY , UZUZ , UZRET , & RETR , RETUX , RETUY, RETUZ , 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) = RUZ IMATRI.LIZAFM(1,5) = RRET C IMATRI.LIZAFM(1,6) = UXR IMATRI.LIZAFM(1,7) = UXUX IMATRI.LIZAFM(1,8) = UXUY IMATRI.LIZAFM(1,9) = UXUZ IMATRI.LIZAFM(1,10) = UXRET C IMATRI.LIZAFM(1,11) = UYR IMATRI.LIZAFM(1,12) = UYUX IMATRI.LIZAFM(1,13) = UYUY IMATRI.LIZAFM(1,14) = UYUZ IMATRI.LIZAFM(1,15) = UYRET C IMATRI.LIZAFM(1,16) = UZR IMATRI.LIZAFM(1,17) = UZUX IMATRI.LIZAFM(1,18) = UZUY IMATRI.LIZAFM(1,19) = UZUZ IMATRI.LIZAFM(1,20) = UZRET C IMATRI.LIZAFM(1,21) = RETR IMATRI.LIZAFM(1,22) = RETUX IMATRI.LIZAFM(1,23) = RETUY IMATRI.LIZAFM(1,24) = RETUZ IMATRI.LIZAFM(1,25) = 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=MPNORM.VPOCHA(NLF,1) CNY=MPNORM.VPOCHA(NLF,2) CNZ=MPNORM.VPOCHA(NLF,3) CTX=MPNORM.VPOCHA(NLF,4) CTY=MPNORM.VPOCHA(NLF,5) CTZ=MPNORM.VPOCHA(NLF,6) CT1X=MPNORM.VPOCHA(NLF,7) CT1Y=MPNORM.VPOCHA(NLF,8) CT1Z=MPNORM.VPOCHA(NLF,9) C Variables au centre RC=MPRC.VPOCHA(NLC,1) PC=MPPC.VPOCHA(NLC,1) UXC=MPVC.VPOCHA(NLC,1) UYC=MPVC.VPOCHA(NLC,2) UZC=MPVC.VPOCHA(NLC,3) GAMC=MPGAMC.VPOCHA(NLC,1) C Variables à la face RF=MPLIM.VPOCHA(NLCB,1) UXF=MPLIM.VPOCHA(NLCB,2) UYF=MPLIM.VPOCHA(NLCB,3) UZF=MPLIM.VPOCHA(NLCB,4) PF=MPLIM.VPOCHA(NLCB,IDIM+2) C C******* On calcule UN, UT ASON, S C UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ) UTC=(UXC*CTX)+(UYC*CTY)+(UZC*CTZ) UT1C=(UXC*CT1X)+(UYC*CT1Y)+(UZC*CT1Z) UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ) C ASONC=(GAMC*PC/RC)**0.5D0 ASONF=(GAMC*PF/RF)**0.5D0 C SC=PC/(RC**GAMC) C SF=PF/(RF**GAMC) C C******* Densite, vitesse, pression sur le bord C GM1=(GAMC-1.0D0) USGM1=1.0D0/GM1 DSGM1=2.0D0*USGM1 G1=UNF-(DSGM1*ASONF) G3=UNC+(DSGM1*ASONC) UN=0.5D0*(G1+G3) ASON=(0.5D0*(G3-G1)) ASON=ASON/DSGM1 ASON2=ASON*ASON S=SC UT=UTC UT1=UT1C RHO=ASON2/(GAMC*S) RHO=RHO**USGM1 P=RHO*ASON2/GAMC UX=(UN*CNX)+(UT*CTX)+(UT1*CT1X) UY=(UN*CNY)+(UT*CTY)+(UT1*CT1Y) UZ=(UN*CNZ)+(UT*CTZ)+(UT1*CT1Z) C C******* Derivatives C DUNDG3=0.5D0 DASDG3=0.5D0/DSGM1 DRHDG3=GAMC*S DRHDG3=1.0D0/DRHDG3 DRHDG3=DRHDG3**USGM1 DRHDG3=DRHDG3*DSGM1 DRHDG3=DRHDG3*(ASON**((3.0D0-GAMC)/(GAMC-1.0D0))) DRHDG3=DRHDG3*DASDG3 DRHDS=-1.0D0*USGM1*RHO/S DPDG3=((ASON2/GAMC)*DRHDG3)+(((2*ASON*RHO)/GAMC)*DASDG3) DPDS=(ASON2/GAMC)*DRHDS CC CC******* Test CC CC ...DG3 C EPS=1.0D-6 C G3=G3*(1+EPS) C CELL=UN C UN=0.5D0*(G1+G3) C write(*,*) DUNDG3, ((UN - CELL)/(EPS*G3)) C CELL=ASON C ASON=(0.5D0*(G3-G1)) C ASON=ASON/DSGM1 C write(*,*) DASDG3, ((ASON - CELL)/(EPS*G3)) C ASON2=ASON*ASON C S=SC C UT=UTC C CELL=RHO C RHO=ASON2/(GAMC*S) C RHO=RHO**USGM1 C write(*,*) DRHDG3, ((RHO - CELL)/(EPS*G3)) C CELL=P C P=RHO*ASON2/GAMC C write(*,*) DPDG3, ((P - CELL)/(EPS*G3)) CC CC******* Test CC CC ...DS C EPS=1.0D-6 C S=S*(1+EPS) C CELL=RHO C RHO=ASON2/(GAMC*S) C RHO=RHO**USGM1 C write(*,*) DRHDS, ((RHO - CELL)/(EPS*S)) C CELL=P C P=RHO*ASON2/GAMC C write(*,*) DPDS, ((P - CELL)/(EPS*S)) CC CC************************************************************ CC DUXDG3=DUNDG3*CNX DUYDG3=DUNDG3*CNY DUZDG3=DUNDG3*CNZ DUXDUT=CTX DUYDUT=CTY DUZDUT=CTZ DUXUT1=CT1X DUYUT1=CT1Y DUZUT1=CT1Z C DFRDG3=(DRHDG3*UN)+(RHO*DUNDG3) DFRDS=(DRHDS*UN) DFMXG3=(DRHDG3*UN*UX)+(RHO*DUNDG3*UX)+ & (RHO*UN*DUXDG3)+(DPDG3*CNX) DFMXS=(DRHDS*UN*UX)+(DPDS*CNX) DFMXUT=(RHO*UN*DUXDUT) DFMXU1=(RHO*UN*DUXUT1) DFMYG3=(DRHDG3*UN*UY)+(RHO*DUNDG3*UY)+ & (RHO*UN*DUYDG3)+(DPDG3*CNY) DFMYS=(DRHDS*UN*UY)+(DPDS*CNY) DFMYUT=(RHO*UN*DUYDUT) DFMYU1=(RHO*UN*DUYUT1) DFMZG3=(DRHDG3*UN*UZ)+(RHO*DUNDG3*UZ)+ & (RHO*UN*DUZDG3)+(DPDG3*CNZ) DFMZS=(DRHDS*UN*UZ)+(DPDS*CNZ) DFMZUT=(RHO*UN*DUZDUT) DFMZU1=(RHO*UN*DUZUT1) DFEDG3=(DUNDG3*GAMC*USGM1*P) + (UN*GAMC*USGM1*DPDG3) + & (0.5D0*DRHDG3*UN*((UN*UN)+(UT*UT)+(UT1*UT1))) + & (0.5D0*RHO*DUNDG3*((UN*UN)+(UT*UT)+(UT1*UT1))) + & (RHO*UN*UN*DUNDG3) DFEDS=(UN*GAMC*USGM1*DPDS) + & (0.5D0*DRHDS*UN*((UN*UN)+(UT*UT)+(UT1*UT1))) DFEDUT=RHO*UN*UT DFEDU1=RHO*UN*UT1 C C******* Jacobian with respect to primitive variables C DG3DR=-1*USGM1*ASONC/RC DG3DP=USGM1*ASONC/PC DG3DUX=CNX DG3DUY=CNY DG3DUZ=CNZ DSDR=-1*GAMC*S/RC DSDP=S/PC DUTDUX=CTX DUTDUY=CTY DUTDUZ=CTZ DU1DUX=CT1X DU1DUY=CT1Y DU1DUZ=CT1Z C COEF=-1*SURF/VOLU C DRORO=((DFRDG3*DG3DR)+(DFRDS*DSDR))*COEF DROUX=(DFRDG3*DG3DUX)*COEF DROUY=(DFRDG3*DG3DUY)*COEF DROUZ=(DFRDG3*DG3DUZ)*COEF DROP=((DFRDG3*DG3DP)+(DFRDS*DSDP))*COEF C DUXRO=((DFMXG3*DG3DR)+(DFMXS*DSDR))*COEF DUXUX=((DFMXG3*DG3DUX)+(DFMXUT*DUTDUX)+(DFMXU1*DU1DUX))*COEF DUXUY=((DFMXG3*DG3DUY)+(DFMXUT*DUTDUY)+(DFMXU1*DU1DUY))*COEF DUXUZ=((DFMXG3*DG3DUZ)+(DFMXUT*DUTDUZ)+(DFMXU1*DU1DUZ))*COEF DUXP=((DFMXG3*DG3DP)+(DFMXS*DSDP))*COEF C DUYRO=((DFMYG3*DG3DR)+(DFMYS*DSDR))*COEF DUYUX=((DFMYG3*DG3DUX)+(DFMYUT*DUTDUX)+(DFMYU1*DU1DUX))*COEF DUYUY=((DFMYG3*DG3DUY)+(DFMYUT*DUTDUY)+(DFMYU1*DU1DUY))*COEF DUYUZ=((DFMYG3*DG3DUZ)+(DFMYUT*DUTDUZ)+(DFMYU1*DU1DUZ))*COEF DUYP=((DFMYG3*DG3DP)+(DFMYS*DSDP))*COEF C DUZRO=((DFMZG3*DG3DR)+(DFMZS*DSDR))*COEF DUZUX=((DFMZG3*DG3DUX)+(DFMZUT*DUTDUX)+(DFMZU1*DU1DUX))*COEF DUZUY=((DFMZG3*DG3DUY)+(DFMZUT*DUTDUY)+(DFMZU1*DU1DUY))*COEF DUZUZ=((DFMZG3*DG3DUZ)+(DFMZUT*DUTDUZ)+(DFMZU1*DU1DUZ))*COEF DUZP=((DFMZG3*DG3DP)+(DFMZS*DSDP))*COEF CC DPRO=((DFEDG3*DG3DR)+(DFEDS*DSDR))*COEF DPUX=((DFEDG3*DG3DUX)+(DFEDUT*DUTDUX)+(DFEDU1*DU1DUX))*COEF DPUY=((DFEDG3*DG3DUY)+(DFEDUT*DUTDUY)+(DFEDU1*DU1DUY))*COEF DPUZ=((DFEDG3*DG3DUZ)+(DFEDUT*DUTDUZ)+(DFEDU1*DU1DUZ))*COEF DPP=((DFEDG3*DG3DP)+(DFEDS*DSDP))*COEF CC CC******* Jacobian with respect to conservative variables CC IF(IJAC.EQ.1)THEN COEF1=-1.0D0*UXC/RC COEF2=-1.0D0*UYC/RC COEF3=-1.0D0*UZC/RC COEF4=0.5D0*GM1*((UXC*UXC)+(UYC*UYC)+(UZC*UZC)) C RR.AM(IFAC,1,1)=DRORO+(DROUX*COEF1)+(DROUY*COEF2)+(DROUZ $ *COEF3)+(DROP*COEF4) RUX.AM(IFAC,1,1)=(DROUX/RC)-((UXC*GM1)*DROP) RUY.AM(IFAC,1,1)=(DROUY/RC)-((UYC*GM1)*DROP) RUZ.AM(IFAC,1,1)=(DROUZ/RC)-((UZC*GM1)*DROP) RRET.AM(IFAC,1,1)=GM1*DROP C UXR.AM(IFAC,1,1)=DUXRO+(DUXUX*COEF1)+(DUXUY*COEF2)+(DUXUZ $ *COEF3)+(DUXP*COEF4) UXUX.AM(IFAC,1,1)=(DUXUX/RC)-((UXC*GM1)*DUXP) UXUY.AM(IFAC,1,1)=(DUXUY/RC)-((UYC*GM1)*DUXP) UXUZ.AM(IFAC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UYUX.AM(IFAC,1,1)=DUYUX UYUY.AM(IFAC,1,1)=DUYUY UYUZ.AM(IFAC,1,1)=DUYUZ UYRET.AM(IFAC,1,1)=DUYP C UZR.AM(IFAC,1,1)=DUZRO UZUX.AM(IFAC,1,1)=DUZUX UZUY.AM(IFAC,1,1)=DUZUY UZUZ.AM(IFAC,1,1)=DUZUZ UZRET.AM(IFAC,1,1)=DUZP C RETR.AM(IFAC,1,1)=DPRO RETUX.AM(IFAC,1,1)=DPUX RETUY.AM(IFAC,1,1)=DPUY RETUZ.AM(IFAC,1,1)=DPUZ RETRET.AM(IFAC,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 , RUZ ,RRET , & UXR , UXUX , UXUY , UXUZ ,UXRET , & UYR , UYUX , UYUY , UYUZ , UYRET , & UZR , UZUX , UZUY , UZUZ , UZRET , & RETR , RETUX , RETUY, RETUZ , RETRET C 9999 CONTINUE RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales