ylap13
C YLAP13 SOURCE CB215821 20/11/25 13:44:03 10792 & IGRTC,IVIMP,ITAUIM,IQIMP, & MELEMC,MELEMF,MELEFL,ISURF,INORM,IDIAM, & ICHFLU,DT) C C**** Traitement des conditions aux bords C C**** 'VIMP' : la vitesse imposé n'importe ou! C C 'QIMP' : flux de chaleur imposé n'importe ou C C 'TAUI' : tenseur de contraintes visqueux imposé n'importe ou C IMPLICIT INTEGER(I-N) -INC PPARAM -INC CCOPTIO -INC CCREEL -INC SMCHPOI -INC SMELEME -INC SMCOORD -INC SMLENTI -INC SMLMOTS C POINTEUR MPROC.MPOVAL, MPVITC.MPOVAL, MPGRVF.MPOVAL, & MPGRTF.MPOVAL, & MPVIMP.MPOVAL, MPTAUI.MPOVAL, MPQIMP.MPOVAL, & MPSURF.MPOVAL, MPNORM.MPOVAL, MPDIAM.MPOVAL, & MPFLUX.MPOVAL C POINTEUR MELEMC.MELEME,MELEMF.MELEME,MELEFL.MELEME POINTEUR MLCENT.MLENTI,MLEVIM.MLENTI,MLEQIM.MLENTI,MLETAI.MLENTI 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 CC & ,MCOORD C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU C & ,NORINC,NORVAL,NORIND,NORVAD C & ,NUCROU, IPSAUV C INTEGER IROC,IVITC,IGRVC,IGRTC,IVIMP,ITAUIM,IQIMP & ,ISURF,INORM,IDIAM,ICHFLU & ,NFAC, NLCF, NGCF, NGCF1, NGCEG, NGCED & ,NLCEG,NLCED,NLFVI,NLFTI,NLFQI & , ICOORX, IGEOM REAL*8 MU,KAPPA,CV,LAMBRO,DT, UNSDT & ,UXG,UYG & ,XG,YG,XFMXG,YFMYG,DRG & ,UXD,UYD & ,XD,YD,XFMXD,YFMYD,DRD,ALPHA,UMALPH & ,UXF,UYF,DUXXF,DUXYF,DUYXF,DUYYF,DTXF,DTYF & ,DSTDU,TAUXX,TAUXY,TAUYY,QX,QY,XF,YF & ,CNX, CNY, ORIENT, RO, DIAM, DIAM2, CELL, SURF & ,ZF,ZG,ZD,ZFMZD,UZF,UZG,UZD,TAUZZ,TAUXZ,TAUYZ & ,DUXZF,DUYZF,DUZXF,DUZYF,DUZZF,QZ,DTZF,CNZ,ZFMZG C CHARACTER*8 TYPE C C**** Initialisation de 1/DT C UNSDT = 0.0D0 LAMBRO = KAPPA / CV C C**** KRIPAD pour la correspondance global/local de centre C C C EN KRIPAD C SEGACT MELEMC C SEGACT MLCENT C C C EN LICHT C SEGACT*MOD MPROC C SEGACT*MOD MPVITC C SEGACT*MOD MPGRVF C SEGACT*MOD MPGRTF C SEGACT*MOD MPSURF C SEGACT*MOD MPNORM C SEGACT*MOD MPDIAM C SEGACT*MOD MPFLUX C IF(IVIMP .GT. 0)THEN C SEGACT*MOD MPVIMP C SEGACT IGEOM C SEGACT MLEVIM MELEME = IGEOM SEGDES MELEME ENDIF IF(ITAUIM .GT. 0)THEN C SEGACT*MOD MPTAUI C SEGACT IGEOM C SEGACT MLETAI MELEME = IGEOM SEGDES MELEME ENDIF IF(IQIMP .GT. 0)THEN C SEGACT*MOD MPQIMP C SEGACT IGEOM C SEGACT MLEQIM MELEME = IGEOM SEGDES MELEME ENDIF C SEGACT MELEFL SEGACT MELEMF NFAC = MELEMF.NUM(/2) C C**** Boucle sur les faces C DO NLCF = 1, NFAC, 1 C C******* NLCF = numero local du centre de facel C NGCF = numero global du centre de facel C NLCF1 = numero local du centre de face C NGCEG = numero global du centre ELT "gauche" C NLCEG = numero local du centre ELT "gauche" C NGCED = numero global du centre ELT "droite" C NLCED = numero local du centre ELT "droite" C NGCF = MELEMF.NUM(1,NLCF) NGCF1 = MELEFL.NUM(2,NLCF) IF(NGCF .NE. NGCF1)THEN MOTERR(1:40)= 'FACEL et FACE = ? ' WRITE(IOIMP,*) MOTERR(1:40) MOTERR(1:40)= & 'LAPN , subroutine ylap13.eso. ' WRITE(IOIMP,*) MOTERR(1:40) GOTO 9999 ENDIF C NGCEG = MELEFL.NUM(1,NLCF) NGCED = MELEFL.NUM(3,NLCF) NLCEG = MLCENT.LECT(NGCEG) NLCED = MLCENT.LECT(NGCED) C C******* On controlle si sur NGCF on impose de CL C C NLFVI = numero local du centre de face sul le maillage des C "vitesses" "imposées" C C NLFTI = numero local du centre de face sul le maillage des C "tau" "imposés" C C NLFQI = numero local du centre de face sul le maillage des C "q" "imposés" C IF(IVIMP .GT. 0)THEN NLFVI = MLEVIM.LECT(NGCF) ELSE NLFVI = 0 ENDIF C IF(ITAUIM .GT. 0)THEN NLFTI = MLETAI.LECT(NGCF) ELSE NLFTI = 0 ENDIF C IF(IQIMP .GT. 0)THEN NLFQI = MLEQIM.LECT(NGCF) ELSE NLFQI = 0 ENDIF C IF(NGCEG .NE. NGCED)THEN C C********** Parametres geometriques C ICOORX = ((IDIM + 1) * (NGCF - 1))+1 XF = MCOORD.XCOOR(ICOORX) YF = MCOORD.XCOOR(ICOORX+1) ZF = MCOORD.XCOOR(ICOORX+2) C ICOORX = ((IDIM + 1) * (NGCEG - 1))+1 XG = MCOORD.XCOOR(ICOORX) YG = MCOORD.XCOOR(ICOORX+1) ZG = MCOORD.XCOOR(ICOORX+2) XFMXG = XF - XG YFMYG = YF - YG ZFMZG = ZF - ZG DRG=SQRT((XFMXG*XFMXG)+(YFMYG*YFMYG)+(ZFMZG*ZFMZG)) C ICOORX = ((IDIM + 1) * (NGCED - 1))+1 XD = MCOORD.XCOOR(ICOORX) YD = MCOORD.XCOOR(ICOORX+1) ZD = MCOORD.XCOOR(ICOORX+2) XFMXD = XF - XD YFMYD = YF - YD ZFMZD = ZF - ZD DRD=SQRT((XFMXD*XFMXD)+(YFMYD*YFMYD)+(ZFMZD*ZFMZD)) C C********** F=G -> DRG = 0 -> ALPHA = 0 C C C********** Les valeurs à l'interface C C DRG=0 -> F=G C C C********** Tenseur de contraintes visqueux C DUXXF = MPGRVF.VPOCHA(NLCF,1) DUXYF = MPGRVF.VPOCHA(NLCF,2) DUXZF = MPGRVF.VPOCHA(NLCF,3) DUYXF = MPGRVF.VPOCHA(NLCF,4) DUYYF = MPGRVF.VPOCHA(NLCF,5) DUYZF = MPGRVF.VPOCHA(NLCF,6) DUZXF = MPGRVF.VPOCHA(NLCF,7) DUZYF = MPGRVF.VPOCHA(NLCF,8) DUZZF = MPGRVF.VPOCHA(NLCF,9) C IF (NLFTI .GT. 0) THEN TAUXX = MPTAUI.VPOCHA(NLFTI,1) TAUYY = MPTAUI.VPOCHA(NLFTI,2) TAUZZ = MPTAUI.VPOCHA(NLFTI,3) TAUXY = MPTAUI.VPOCHA(NLFTI,4) TAUXZ = MPTAUI.VPOCHA(NLFTI,5) TAUYZ = MPTAUI.VPOCHA(NLFTI,6) ELSE DSTDU = 2.0D0/3.0D0 * (DUXXF + DUYYF + DUZZF) TAUXX = MU * (2.0D0 * DUXXF - DSTDU) TAUYY = MU * (2.0D0 * DUYYF - DSTDU) TAUZZ = MU * (2.0D0 * DUZZF - DSTDU) TAUXY = MU * (DUXYF + DUYXF) TAUXZ = MU * (DUXZF + DUZXF) TAUYZ = MU * (DUZYF + DUYZF) ENDIF C C********** Vitesse C IF( NLFVI .GT. 0) THEN UXF = MPVIMP.VPOCHA(NLFVI,1) UYF = MPVIMP.VPOCHA(NLFVI,2) UZF = MPVIMP.VPOCHA(NLFVI,3) ELSE C************* Gauche UXG = MPVITC.VPOCHA(NLCEG,1) UYG = MPVITC.VPOCHA(NLCEG,2) UZG = MPVITC.VPOCHA(NLCEG,3) C************* Droite UXD = MPVITC.VPOCHA(NLCED,1) UYD = MPVITC.VPOCHA(NLCED,2) UZD = MPVITC.VPOCHA(NLCED,3) C************* Face C************* Correction de la vitesse lineaire exacte UXF = UXF + UYF = UYF + UZF = UZF + ENDIF C C********** Flux de chaleur C IF(NLFQI .GT. 0)THEN QX = MPQIMP.VPOCHA(NLFQI,1) QY = MPQIMP.VPOCHA(NLFQI,2) QZ = MPQIMP.VPOCHA(NLFQI,3) ELSE C************* Gauche DTXF = MPGRTF.VPOCHA(NLCF,1) DTYF = MPGRTF.VPOCHA(NLCF,2) DTZF = MPGRTF.VPOCHA(NLCF,3) C QX = -1.0D0 * KAPPA * DTXF QY = -1.0D0 * KAPPA * DTYF QZ = -1.0D0 * KAPPA * DTZF C ENDIF ELSE C C********** MURS C C Etat a gauche = Etat droite C ALPHA=0.0D0 UMALPH=1.0D0 C C********** Parametres geometriques C ICOORX = ((IDIM + 1) * (NGCF - 1))+1 XF = MCOORD.XCOOR(ICOORX) YF = MCOORD.XCOOR(ICOORX+1) ZF = MCOORD.XCOOR(ICOORX+2) C ICOORX = ((IDIM + 1) * (NGCEG - 1))+1 XG = MCOORD.XCOOR(ICOORX) YG = MCOORD.XCOOR(ICOORX+1) ZG = MCOORD.XCOOR(ICOORX+2) XFMXG = XF - XG YFMYG = YF - YG ZFMZG = ZF - ZG C C********** Tenseur de contraintes visqueux C DUXXF = MPGRVF.VPOCHA(NLCF,1) DUXYF = MPGRVF.VPOCHA(NLCF,2) DUXZF = MPGRVF.VPOCHA(NLCF,3) DUYXF = MPGRVF.VPOCHA(NLCF,4) DUYYF = MPGRVF.VPOCHA(NLCF,5) DUYZF = MPGRVF.VPOCHA(NLCF,6) DUZXF = MPGRVF.VPOCHA(NLCF,7) DUZYF = MPGRVF.VPOCHA(NLCF,8) DUZZF = MPGRVF.VPOCHA(NLCF,9) C IF (NLFTI .GT. 0) THEN TAUXX = MPTAUI.VPOCHA(NLFTI,1) TAUYY = MPTAUI.VPOCHA(NLFTI,2) TAUZZ = MPTAUI.VPOCHA(NLFTI,3) TAUXY = MPTAUI.VPOCHA(NLFTI,4) TAUXZ = MPTAUI.VPOCHA(NLFTI,5) TAUYZ = MPTAUI.VPOCHA(NLFTI,6) ELSE DSTDU = 2.0D0/3.0D0 * (DUXXF + DUYYF + DUZZF) TAUXX = MU * (2.0D0 * DUXXF - DSTDU) TAUYY = MU * (2.0D0 * DUYYF - DSTDU) TAUZZ = MU * (2.0D0 * DUZZF - DSTDU) TAUXY = MU * (DUXYF + DUYXF) TAUXZ = MU * (DUXZF + DUZXF) TAUYZ = MU * (DUZYF + DUYZF) ENDIF C C********** Vitesse C IF( NLFVI .GT. 0) THEN UXF = MPVIMP.VPOCHA(NLFVI,1) UYF = MPVIMP.VPOCHA(NLFVI,2) UZF = MPVIMP.VPOCHA(NLFVI,3) ELSE UXF = MPVITC.VPOCHA(NLCEG,1) UYF = MPVITC.VPOCHA(NLCEG,2) UZF = MPVITC.VPOCHA(NLCEG,3) C************* Correction de la vitesse lineaire exacte UXF = UXF + & (DUXXF * XFMXG ) + & (DUXYF * YFMYG ) + & (DUXZF * ZFMZG ) UYF = UYF + & (DUYXF * XFMXG ) + & (DUYYF * YFMYG ) + & (DUYZF * ZFMZG ) UZF = UZF + & (DUZXF * XFMXG ) + & (DUZYF * YFMYG ) + & (DUZZF * ZFMZG ) ENDIF C C********** Flux de chaleur C IF(NLFQI .GT. 0)THEN QX = MPQIMP.VPOCHA(NLFQI,1) QY = MPQIMP.VPOCHA(NLFQI,2) QZ = MPQIMP.VPOCHA(NLFQI,3) ELSE C************* Gauche DTXF = MPGRTF.VPOCHA(NLCF,1) DTYF = MPGRTF.VPOCHA(NLCF,2) DTZF = MPGRTF.VPOCHA(NLCF,3) C QX = -1.0D0 * KAPPA * DTXF QY = -1.0D0 * KAPPA * DTYF QZ = -1.0D0 * KAPPA * DTZF C ENDIF ENDIF C C******* On calcule le sign du pruduit scalare C (Normales de Castem) * (vecteur "gauche" -> "centre") C CNX = MPNORM.VPOCHA(NLCF,1) CNY = MPNORM.VPOCHA(NLCF,2) CNZ = MPNORM.VPOCHA(NLCF,3) MOTERR(1:40)= & 'LAPN , subroutine ylap13.eso. ' WRITE(IOIMP,*) MOTERR(1:40) MOTERR(1:40)= & 'Orientation normales. ' WRITE(IOIMP,*) MOTERR(1:40) GOTO 9999 ENDIF C C******* Le flux aux interfaces C SURF = MPSURF.VPOCHA(NLCF,1) MPFLUX.VPOCHA(NLCF,1) = ((TAUXX * CNX) + (TAUXY * CNY) + & (TAUXZ * CNZ)) & * SURF * (-1.0D0) MPFLUX.VPOCHA(NLCF,2) = ((TAUXY * CNX) + (TAUYY * CNY) + & (TAUYZ * CNZ)) & * SURF * (-1.0D0) MPFLUX.VPOCHA(NLCF,3) = ((TAUXZ * CNX) + (TAUYZ * CNY) + & (TAUZZ * CNZ)) & * SURF * (-1.0D0) MPFLUX.VPOCHA(NLCF,4) = ( & ((TAUXX * UXF + TAUXY * UYF + TAUXZ * UZF - QX) * CNX) + & ((TAUXY * UXF + TAUYY * UYF + TAUYZ * UZF - QY) * CNY) + & ((TAUXZ * UXF + TAUYZ * UYF + TAUZZ * UZF - QZ) * CNZ)) & * SURF * (-1.0D0) C C****** Le pas de temps C RO=UMALPH*MPROC.VPOCHA(NLCEG,1) + DIAM = UMALPH*MPDIAM.VPOCHA(NLCEG,1) + DIAM2=DIAM*DIAM CELL = 6.0D0*MU / (DIAM2*RO) CELL = MAX(CELL, (6.0D0*LAMBRO/(DIAM2*RO))) C IF(CELL .GT. UNSDT)THEN UNSDT = CELL ENDIF C ENDDO C C DT = 1.0D0 / (UNSDT + XPETIT) C SEGDES MELEFL SEGDES MELEMF SEGDES MELEMC SEGDES MPSURF SEGDES MPNORM SEGDES MPDIAM SEGSUP MLCENT C SEGDES MPROC SEGDES MPVITC SEGDES MPGRVF SEGDES MPGRTF SEGDES MPFLUX C IF(IVIMP .GT. 0) THEN SEGDES MPVIMP SEGSUP MLEVIM ENDIF IF(ITAUIM .GT. 0)THEN SEGDES MPTAUI SEGSUP MLETAI ENDIF IF(IQIMP .GT. 0)THEN SEGDES MPQIMP SEGDES MLEQIM ENDIF C 9999 CONTINUE RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales