clim22
C CLIM22 SOURCE PV 20/09/26 21:16:10 10724 C************************************************************************ C C PROJET : CASTEM 2000 C C NOM : CLIM22 C C DESCRIPTION : Subroutine appellée par CLIM2 C C Modelisation 2D/3D des equations d'Euler C Conditions aux limites C C Calcul du flux/residu/jacobian de flux C C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI) C C AUTEUR : S. Kudriakov, DEN/DM2S/SFME/LTMF C C************************************************************************ C C C SORTIES C C RCHPLI : on donne densité, vitesse, pression C et les fractions massiques sur le bord C (SPG = $TAB2 . 'CENTRE', composantes en LMOTP) C C RCHPRE : residu (SPG = $TAB1 . 'CENTRE', composantes en LMOTC) C C************************************************************************ C C HISTORIQUE (Anomalies et modifications éventuelles) C C HISTORIQUE : 3/12/03 - for the 'INRI' and 'OUTP' there was C implemented option for k-\eps model C (k and \eps are treated as a passive scalars) C C 20/12/04 - generalisation de 'OUTP' for the C CREBCOM model (k, \eps and K0 are treated C as a passive scalars) C C 03/02/06 - implementation of boundary conditions of C 'RESE'rvoir in the explicit case without C passive scalars. C************************************************************************ IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCOPTIO -INC SMLMOTS -INC SMELEME -INC SMLENTI -INC SMMATRIK POINTEUR MLMVIT.MLMOTS C INTEGER IJAC, IJACO, I, NESP,NSP & ,IDOMA, IDBOR, IRET, MELEMC, MELEFE, MELEMF, ICHPVO, INORM & ,JGN, JGM, NBELEM, NBNN, NBSOUS, NBREF, NGF, NLC & ,I1, ICEN, N1, ILIINP & ,ILIINC, IROC, IVITC, IPC, ICHLIM, NBOPT, ILIM & ,ICHRES, ICHRLI, IYN, IKAN, IEPSN, IK0N & ,NKID,NKMT,NMATRI,NRIGE,MMODEL,INEFMD & ,JG, ICOND, IRETOU, ICP, ICV, IPGAS,IKEPS,ICREB PARAMETER (NBOPT=9) CHARACTER*8 LOPT(NBOPT) CHARACTER*4 MOT CHARACTER*(4) MOT1(3), CELLCH CHARACTER*8 TYPE REAL*8 CP, CV C---------------------------------------------------- C************ Variables en ACCTAB ****************** C---------------------------------------------------- INTEGER IVALI, IRETI, IVALR, IRETR REAL*8 XVALI,XVALR LOGICAL LOGII, LOGIR CHARACTER*(8) CHARR,MTYPI, MTYPR C----------------------------------------------------- DATA LOPT/'INRI ','OUTRI ','INJE ','OUTP ', & 'INSU ','INOU ','INSS ','OUTSS ', & 'RESE '/ C--------------------------------------------------- -INC SMLREEL POINTEUR MLRECP.MLREEL, MLRECV.MLREEL C----------------------------------------- C Initialisation des variables en ACCTAB C----------------------------------------- IVALI = 0 IVALR = 0 XVALI = 0.0D0 XVALR = 0.0D0 LOGII = .FALSE. LOGIR = .FALSE. IRETI = 0 IRETR = 0 CHARR = ' ' C------------------------------------------- C If IKEPS = 0 then there is now passive C scalars, otherwise IKEPS = 1 C ...same about ICREB C------------------------------------------- IKEPS = 0 ICREB = 0 C******************************* C**** La table domaine ********* C******************************* C IF(IERR.NE.0)GOTO 9999 C INEFMD inutilisé IF(IERR .NE. 0)GOTO 9999 C----------------------------------------- IF(IERR .NE. 0) GOTO 9999 C----------------------------------------- IF(IERR .NE. 0) GOTO 9999 C--------------------------------------------- C**** Lecture du CHPOINT contenant les volumes C--------------------------------------------- IF(IERR .NE. 0) GOTO 9999 MOT = 'SCAL' IF(IERR .NE. 0) GOTO 9999 C--------------------------------------------- IF(IERR .NE. 0) GOTO 9999 MOT = 'SCAL' IF(IERR .NE. 0) GOTO 9999 C-------------------------------------------- C**** Les normales aux faces C-------------------------------------------- IF(IDIM .EQ. 2)THEN C Que les normales IF(IERR .NE. 0) GOTO 9999 JGN = 4 JGM = 2 SEGINI MLMVIT SEGDES MLMVIT IF(IERR .NE. 0) GOTO 9999 ELSE C C**** Les normales ('MX ', ...) C Les tangentes ('RX ', ...) C TYPE = ' ' IF (TYPE .NE. 'CHPOINT ') THEN IF(IERR .NE. 0) GOTO 9999 ENDIF JGN = 4 JGM = 9 SEGINI MLMVIT SEGDES MLMVIT ENDIF c-------------------------------------------------------- C********************************** C**** La table domaine du bord **** C********************************** C IF(IERR.NE.0)GOTO 9999 C INEFMD inutilisé IF(IERR .NE. 0)GOTO 9999 C IF(IERR .NE. 0) GOTO 9999 C TYPE = ' ' IF (TYPE.NE.'MAILLAGE') THEN C IF(IERR .NE. 0) GOTO 9999 C C******* On cree la connectivité face-centre C IPT1=MELECB IPT2=MELEFE SEGACT IPT1 SEGACT IPT2 C SEGINI MLENTI NBELEM=IPT1.NUM(/2) NBNN=2 NBSOUS=0 NBREF=0 SEGINI IPT3 IPT3.ITYPEL=2 N1=IPT2.NUM(/2) ICEN=0 DO I1=1,N1,1 NGF=IPT2.NUM(2,I1) NLC=MLENTI.LECT(NGF) IF(NLC.NE.0)THEN ICEN=ICEN+1 IPT3.NUM(1,ICEN)=NGF IPT3.NUM(2,ICEN)=IPT2.NUM(1,I1) IF(IPT2.NUM(1,I1) .NE. IPT2.NUM(3,I1))THEN C Interior point C Donné incompatible WRITE(IOIMP,*) 'Internal boundary condition!!!' ENDIF ENDIF ENDDO C IF(ICEN .NE. NBELEM)THEN ENDIF SEGDES IPT1 SEGDES IPT2 SEGDES IPT3 SEGDES MLENTI C MELEFC=IPT3 ENDIF C------------------------------------------------- C**** Le SPG du residu C------------------------------------------------- IPT1=MELEFC SEGACT IPT1 NBELEM=IPT1.NUM(/2) NBNN=1 NBSOUS=0 NBREF=0 SEGINI IPT2 IPT2.ITYPEL=1 DO I1=1,NBELEM,1 IPT2.NUM(1,I1)=IPT1.NUM(2,I1) ENDDO MELRES=IPT2 SEGDES IPT1 SEGDES IPT2 C------------------------------------------------- C*** Reading the table PGAS ********************* C------------------------------------------------- ICOND = 1 IF(IERR .NE. 0)GOTO 9999 IF(MTYPR .NE. 'TABLE ')THEN C--------------------------------------- C Message d'erreur standard C 37 2 C On ne trouve pas d'objet de type %m1:8 C--------------------------------------- MOTERR(1:8) = 'TABLE ' GOTO 9999 ELSE ICOND = 1 IF(IERR .NE. 0)GOTO 9999 ENDIF C------------------------------------------- C******** Reading the CPs ***************** C------------------------------------------- MTYPR = ' ' IF(MTYPR .NE. 'TABLE ')THEN C-------------------------------- C Message d'erreur standard C -301 0 %m1:40 C-------------------------------- MOTERR(1:40) = 'TAB1 . CP = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C--------------------------------- C Message d'erreur standard C 21 2 C Données incompatibles C-------------------------------- GOTO 9999 ENDIF C------------------------------------------- C******** Reading the CVs ***************** C------------------------------------------- MTYPR = ' ' IF(MTYPR .NE. 'TABLE ')THEN C-------------------------------- C Message d'erreur standard C -301 0 %m1:40 C-------------------------------- MOTERR(1:40) = 'TAB1 . CV = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C--------------------------------- C Message d'erreur standard C 21 2 C Données incompatibles C-------------------------------- GOTO 9999 ENDIF C--------------------------------------------------------- C Reading Les especes qui sont dans les Equations d'Euler C--------------------------------------------------------- MTYPR = ' ' IF(MTYPR .NE. 'LISTMOTS')THEN C--------------------------- C Message d'erreur standard C -301 0 %m1:40 C--------------------------- MOTERR(1:40) = 'TAB1 . ESPEULE = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C--------------------------- C Message d'erreur standard C 21 2 C Données incompatibles C-------------------------- GOTO 9999 ENDIF C----------------------------------------------------------------- C Reading Nom de l'espece qui n'est pas dans les equations d'Euler C----------------------------------------------------------------- MTYPI = 'MOT ' MTYPR = ' ' & MTYPR,IVALR,XVALR ,CELLCH,LOGIR,IRETR) IF((IERR .NE. 0) .OR. (MTYPR .NE. 'MOT ')) THEN C------------------------------- C Message d'erreur standard C -301 0 %m1:40 C------------------------------- MOTERR = 'TAB1 . ESPNEULE = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C------------------------------ C Message d'erreur standard C 21 2 C Données incompatibles C------------------------------ GOTO 9999 ENDIF C------------------------------ SEGACT MLMOT1 NSP=NESP+1 C---------------------- C** List de CP et CV ** C---------------------- JG = NESP+1 SEGINI MLRECP SEGINI MLRECV DO I1 = 1, NESP C------------------------------- C N.B. MOT1 est un CHARACTER*(4) C------------------------------- MTYPI = 'MOT ' MTYPR = ' ' & MTYPR,IVALR,CP ,CHARR,LOGIR,IRETR) IF((IERR .NE. 0) .OR. (MTYPR .NE. 'FLOTTANT')) THEN C------------------------------ C Message d'erreur standard C -301 0 %m1:40 C------------------------------ MOTERR = 'TAB1 . CP , TAB1 . ESPEULE = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C------------------------------ C Message d'erreur standard C 21 2 C Données incompatibles C------------------------------ GOTO 9999 ENDIF C------------------------------------------- & MTYPR,IVALR,CV ,CHARR,LOGIR,IRETR) IF((IERR .NE. 0) .OR. (MTYPR .NE. 'FLOTTANT')) THEN C--------------------------- C Message d'erreur standard C -301 0 %m1:40 C--------------------------- MOTERR = 'TAB1 . CV , TAB1 . ESPEULE = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C--------------------------- C Message d'erreur standard C 21 2 C Données incompatibles C--------------------------- GOTO 9999 ENDIF ENDDO MTYPI = 'MOT ' MTYPR = ' ' & MTYPR,IVALR,CP ,CHARR,LOGIR,IRETR) IF((IERR .NE. 0) .OR. (MTYPR .NE. 'FLOTTANT')) THEN C--------------------------- C Message d'erreur standard C -301 0 %m1:40 C--------------------------- MOTERR = 'TAB1 . CP , TAB1 . ESPNEULE = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C--------------------------- C Message d'erreur standard C 21 2 C Données incompatibles C--------------------------- GOTO 9999 ENDIF C MTYPI = 'MOT ' MTYPR = ' ' & MTYPR,IVALR,CV ,CHARR,LOGIR,IRETR) IF((IERR .NE. 0) .OR. (MTYPR .NE. 'FLOTTANT')) THEN C---------------------------- C Message d'erreur standard C -301 0 %m1:40 C---------------------------- MOTERR = 'TAB1 . CV , TAB1 . ESPNEULE = ??? ' WRITE(IOIMP,*) MOTERR(1:40) C---------------------------- C Message d'erreur standard C 21 2 C Données incompatibles C---------------------------- GOTO 9999 ENDIF C------------------------------------------------- C**** Noms de variables conservatives C------------------------------------------------- TYPE='LISTMOTS' IF(IERR .NE. 0) GOTO 9999 MLMOTS = ILIINC SEGACT MLMOTS SEGDES MLMOTS *--------------------------------------------- *--------------------------------------------- IF((IKEPS .EQ. 0) .AND. (ICREB .EQ. 0)) THEN MOTERR(1:40) = 'LISTINCO = ???' WRITE(IOIMP,*) MOTERR C----------------------------- C** Message d'erreur standard C 21 2 C Données incompatibles C----------------------------- GOTO 9999 ENDIF ENDIF C-------------------------------------------------------- C**** Noms de variables primitives C-------------------------------------------------------- TYPE='LISTMOTS' IF(IERR .NE. 0) GOTO 9999 MLMOTS = ILIINP SEGACT MLMOTS SEGDES MLMOTS IF((IKEPS .EQ. 0) .AND. (ICREB .EQ. 0)) THEN MOTERR(1:40) = 'LISTPRIM = ???' WRITE(IOIMP,*) MOTERR C----------------------------- C** Message d'erreur standard C 21 2 C Données incompatibles C----------------------------- GOTO 9999 ENDIF ENDIF C-------------------------------------------------------- C**** Lecture du CHPOINT RN C-------------------------------------------------------- TYPE='CHPOINT ' IF (IERR.NE.0) GOTO 9999 C----------------------------- C** Control du CHPOINT: QUEPOI C C INDIC = 1 -> on impose le pointeur du support geometrique C NBCOMP > 0 -> nombre des composantes C----------------------------- MOT = 'SCAL' IF(IERR .NE. 0)GOTO 9999 C------------------------------------------------------ C**** Lecture du CHPOINT VITC C------------------------------------------------------ IF (IERR.NE.0) GOTO 9999 C----------------------- C**** Control du CHPOINT C----------------------- JGN = 4 JGM = IDIM SEGINI MLMVIT SEGDES MLMVIT IF(IERR .NE. 0)GOTO 9999 C------------------------------------------------------- C**** Lecture du CHPOINT PC C------------------------------------------------------- IF (IERR.NE.0) GOTO 9999 C----------------------- C**** Control du CHPOINT C----------------------- MOT = 'SCAL' IF(IERR .NE. 0)GOTO 9999 C----------------------------- C*** Fraction massiques C*** des especes "splittees" C----------------------------- TYPE = 'CHPOINT ' IF(IERR .NE. 0) GOTO 9999 IF(IERR .NE. 0) THEN MOTERR = 'CHPO FR.MAS. = ?????' WRITE(IOIMP,*) MOTERR(1:40) GOTO 9999 ENDIF C----------------------------------- c Turbulent kinetic energy c----------------------------------- IF((IKEPS .GT. 0) .OR. (ICREB .GT. 0)) THEN TYPE = 'CHPOINT ' MOT = 'SCAL' IF(IERR .NE. 0)GOTO 9999 C-------------------------------------- c Rate of Turbulent energy dissipation c-------------------------------------- TYPE = 'CHPOINT ' MOT = 'SCAL' IF(IERR .NE. 0)GOTO 9999 ENDIF C-------------------------------------- c K0 K0 K0 K0 c-------------------------------------- IF(ICREB .GT. 0) THEN TYPE = 'CHPOINT ' MOT = 'SCAL' IF(IERR .NE. 0)GOTO 9999 ELSE IK0N = 0 ENDIF C------------------------------------------------------ C**** CHPOINT condition limite C------------------------------------------------------ IF (IERR.NE.0) GOTO 9999 C----------------------------------------------------- C**** Resultats C----------------------------------------------------- IF(IJAC .EQ.0)THEN TYPE=' ' C TYPE=' ' ELSE ICHRES=0 ICHRLI=0 ENDIF C--------------------------------------------------------- C**** TYPE DE CONDITION LIMITE C--------------------------------------------------------- IF(IERR .NE. 0) GOTO 9999 IF(ILIM .EQ. 1)THEN C------------------------------------------------- C******** 'INRI ' ???????????????????????????? C------------------------------------------------- JGN = 4 JGM = IDIM+2+NESP IF(IKEPS .GT. 0) JGM = IDIM+4+NESP SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS 7 CONTINUE SEGDES MLMOTS SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C-------------------------------------------------------- IF(IJAC.EQ.0)THEN IF(IKEPS .GT. 0) THEN $ ,ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN,IKAN,IEPSN $ ,ICHLIM,ICHRES,ICHRLI) ELSE $ ,ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN,ICHLIM $ ,ICHRES,ICHRLI) ENDIF ELSE IF(IDIM.EQ.2)THEN & ICHPVO,ICHPSU,MLRECP,MLRECV, & IROC,IVITC,IPC,IYN,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) ENDIF IF(IERR.NE.0)GOTO 9999 ENDIF ELSEIF(ILIM .EQ. 2)THEN C------------------------------------------------- C******** 'OUTRI ' C------------------------------------------------- JGN = 4 JGM = IDIM+2+NESP SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS 77 CONTINUE SEGDES MLMOTS SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C-------------------------------------------------------- IF(IJAC.EQ.0)THEN & MELEFC,INORM,ICHPVO,ICHPSU, & MLRECP,MLRECV,IROC,IVITC,IPC,IYN,ICHLIM,ICHRES,ICHRLI) IF(IERR.NE.0)GOTO 9999 ENDIF C-------------------------------------------------------- ELSEIF(ILIM .EQ. 3)THEN C------------------------ C******** 'INJE ' C------------------------ JGN = 4 JGM = 2+NESP SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS DO 78 I=1,NESP 78 CONTINUE SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C----------------------------------------------------- C----------------------------------------------------- IF(IJAC.EQ.0)THEN & ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,ICHLIM,ICHRES $ ,ICHRLI) IF(IERR.NE.0)GOTO 9999 ELSE IF(IDIM.EQ.2)THEN & ICHPVO,ICHPSU,MLRECP,MLRECV, & IROC,IVITC,IPC,IYN,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) c ELSE c CALL CLI173(MELEMF,MELEMC,MELECB,MELEFC,MELRES,INORM c $ ,ICHPVO,ICHPSU,IROC,IVITC,IPC,IGAMC,ICHLIM,ILIINC c $ ,ILIINP,IJAC,IJACO) ENDIF ENDIF C-------------------------- C**** 'OUTP ' ********* C-------------------------- ELSEIF(ILIM .EQ. 4)THEN JGN = 4 JGM = 1 SEGINI MLMVIT SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C IF(IJAC.EQ.0)THEN IF((IKEPS .GT. 0) .OR. (ICREB .GT. 0)) THEN & ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN, & IKAN,IEPSN,IK0N,ICHLIM,ICHRES,ICHRLI) ELSE & ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN,ICHLIM $ ,ICHRES,ICHRLI) ENDIF IF(IERR.NE.0)GOTO 9999 ELSE IF(IDIM.EQ.2)THEN & ICHPVO,ICHPSU,MLRECP,MLRECV, & IROC,IVITC,IPC,IYN,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) ENDIF ENDIF ELSEIF(ILIM .EQ. 5)THEN C----------------------------- C******** 'INSU ' C----------------------------- JGN = 4 JGM = 2+NESP SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS DO 79 I=1,NESP 79 CONTINUE SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C IF(IJAC.EQ.0)THEN & ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN,ICHLIM,ICHRES $ ,ICHRLI) IF(IERR.NE.0)GOTO 9999 ELSE IF(IDIM.EQ.2)THEN & ICHPVO,ICHPSU,MLRECP,MLRECV, & IROC,IVITC,IPC,IYN,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) ENDIF ENDIF ELSEIF(ILIM .EQ. 6)THEN C------------------------------------------------- C******** 'INOU ' C------------------------------------------------- JGN = 4 JGM = NESP+3 SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS DO 770 I=1,NESP 770 CONTINUE SEGDES MLMOTS SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C-------------------------------------------------------- IF(IJAC.EQ.0)THEN $ ,ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN,ICHLIM,ICHRES $ ,ICHRLI) IF(IERR.NE.0)GOTO 9999 ELSE IF(IDIM.EQ.2)THEN & ICHPVO,ICHPSU,MLRECP,MLRECV, & IROC,IVITC,IPC,IYN,ICHLIM,ILIINC,ILIINP,IJAC,IJACO) ENDIF ENDIF C-------------------------------------------------------- ELSEIF(ILIM .EQ. 7)THEN C-------------------------------------- C****** 'INSS' ********************** C-------------------------------------- JGN = 4 JGM = IDIM+2+NESP IF(IKEPS .GT. 0) JGM = IDIM+4+NESP SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS 775 CONTINUE SEGDES MLMOTS SEGDES MLMVIT IF (IERR.NE.0) GOTO 9999 C-------------------------------------------------------- IF(IJAC.EQ.0)THEN IF(IKEPS .GT. 0) THEN $ ,ICHPSU,MLRECP,MLRECV,ICHLIM,ICHRES,ICHRLI) ENDIF ENDIF C-------------------------- C**** 'OUTSS ' ********* C-------------------------- ELSEIF(ILIM .EQ. 8)THEN IF(IJAC.EQ.0)THEN IF(IKEPS .GT. 0) THEN & ICHPSU,MLRECP,MLRECV,IROC,IVITC,IPC,IYN, & IKAN,IEPSN,ICHLIM,ICHRES,ICHRLI) ENDIF ENDIF ELSEIF(ILIM .EQ. 9)THEN C------------------------------------------------- C******** 'RESE ' **************************** C------------------------------------------------- IF((IJAC .NE. 0) .OR. (IKEPS .NE. 0) .OR. (ICREB .GT. 0)) THEN WRITE(IOIMP,*) 'RESI implemented in explicit case only!' WRITE(IOIMP,*) 'No passive scalars!' C Données incompatibles GOTO 9999 ENDIF C C JGN = 4 JGM = 2+NESP SEGINI MLMVIT MLMOTS = ILIINP SEGACT MLMOTS C DO 8 I=1,NESP 8 CONTINUE SEGDES MLMOTS C SEGSUP MLMVIT IF (IERR.NE.0) GOTO 9999 C $ ,MLRECP,MLRECV,IPC,ICHLIM,ICHRES,ICHRLI) IF(IERR.NE.0)GOTO 9999 C-------------------------------------------------------- ENDIF C-------------------------------------------------------- IF(IJAC .EQ. 0) THEN TYPE = 'CHPOINT ' ELSE ENDIF 9999 CONTINUE END
© Cast3M 2003 - Tous droits réservés.
Mentions légales