Télécharger cli221.eso

Retour à la liste

Numérotation des lignes :

cli221
  1. C CLI221 SOURCE CB215821 20/11/25 13:20:29 10792
  2. SUBROUTINE CLI221(NSP,MELEMF,MELEMC,MELECB,MELEFC,INORM,ICHPVO,
  3. & ICHPSU,LRECP,LRECV,IROC,IVITC,IPC,IYN,ICHLIM,ICHRES,ICHRLI)
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : CLI221
  9. C
  10. C DESCRIPTION : Subroutine appellée par CLIM22
  11. C calcul de RESIDU et CLIM at the board
  12. C OPTION: 'INRI' 2D
  13. C
  14. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  15. C
  16. C AUTEUR : S.Kudriakov, DEN/DM2S/SFME/LTMF
  17. C
  18. C************************************************************************
  19. C
  20. C APPELES (Calcul) :
  21. C
  22. C************************************************************************
  23. C
  24. C HISTORIQUE (Anomalies et modifications éventuelles)
  25. C
  26. C HISTORIQUE :
  27. C
  28. C************************************************************************
  29. C
  30. IMPLICIT INTEGER(I-N)
  31.  
  32. -INC PPARAM
  33. -INC CCOPTIO
  34. -INC SMLMOTS
  35. -INC SMELEME
  36. POINTEUR MELEFC.MELEME
  37. -INC SMLENTI
  38. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  39. -INC SMCHPOI
  40. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  41. & MPVC.MPOVAL, MPPC.MPOVAL, MPYN.MPOVAL, MPLIM.MPOVAL,
  42. & MPRES.MPOVAL, MPRLI.MPOVAL
  43. C----------------------------------------
  44. C**** Variables de COOPTIO
  45. C----------------------------------------
  46. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  47. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  48. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  49. C & ,IECHO, IIMPI, IOSPI
  50. C & ,IDIM, IFICLE, IPREFI
  51. C & ,MCOORD
  52. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  53. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  54. C & ,NORINC,NORVAL,NORIND,NORVAD
  55. C & ,NUCROU, IPSAUV
  56. C
  57. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  58. & ,IYN,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC
  59. & ,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,I,NSP
  60. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ,CTX,CTY,CTZ
  61. & ,CT2X,CT2Y,CT2Z,RF,PF,UXF,UYF,UZF,TOP,BOT
  62. & ,UNC,UNF,UTF,UT2F,SF,ASONC,ASONF,GAMF
  63. & ,G1,G3,ASON2,S,UT,UT2,UN,RHO,P,UX,UY,UZ
  64. CHARACTER*(8) TYPE
  65. C------------------------------------------------------------
  66. -INC SMLREEL
  67. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  68. C-------------------------------------------------------
  69. C********** Les CP's and CV's ***********************
  70. C-------------------------------------------------------
  71. SEGMENT GCONST
  72. REAL*8 GC(NSP)
  73. ENDSEGMENT
  74. POINTEUR CP.GCONST, CV.GCONST
  75. C-------------------------------------------------------------
  76. C******* Les fractionines massiques **************************
  77. C-------------------------------------------------------------
  78. SEGMENT FRAMAS
  79. REAL*8 YET(NSP)
  80. ENDSEGMENT
  81. POINTEUR YC.FRAMAS, YF.FRAMAS
  82. C------------------------------------------------------
  83. C**** KRIPAD pour la correspondance global/local
  84. C------------------------------------------------------
  85. CALL KRIPAD(MELEMC,MLEMC)
  86. CALL KRIPAD(MELECB,MLEMCB)
  87. CALL KRIPAD(MELEMF,MLEMF)
  88. C------------------------------------------------------
  89. C**** CHPOINTs de la table DOMAINE
  90. C------------------------------------------------------
  91. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  92. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  93. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  94. C------------------------------------------------------
  95. C**** CHPOINTs des variables
  96. C------------------------------------------------------
  97. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  98. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  99. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  100. CALL LICHT(IYN,MPYN,TYPE,ICEL)
  101. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  102. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  103. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  104. C---------------------------------------------------------
  105. C**** Boucle sur le face pour le calcul des invariants de
  106. C Riemann et du flux
  107. C---------------------------------------------------------
  108. SEGACT MELEFC
  109. NFAC=MELEFC.NUM(/2)
  110. UZC=0.0D0
  111. UZF=0.0D0
  112. CNZ=0.0D0
  113. CTZ=0.0D0
  114. CT2X=0.0D0
  115. CT2Y=0.0D0
  116. CT2Z=0.0D0
  117. DO 1 IFAC=1,NFAC,1
  118. NGF=MELEFC.NUM(1,IFAC)
  119. NGC=MELEFC.NUM(2,IFAC)
  120. NLF=MLEMF.LECT(NGF)
  121. NLC=MLEMC.LECT(NGC)
  122. NLCB=MLEMCB.LECT(NGF)
  123. VOLU=MPVOL.VPOCHA(NLC,1)
  124. SURF=MPSURF.VPOCHA(NLF,1)
  125. C----------------------------------------------
  126. C In CASTEM les normales sont sortantes
  127. C----------------------------------------------
  128. CNX=-1*MPNORM.VPOCHA(NLF,1)
  129. CNY=-1*MPNORM.VPOCHA(NLF,2)
  130. IF(IDIM.EQ.2)THEN
  131. CTX=-1.0D0*CNY
  132. CTY=CNX
  133. ELSE
  134. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  135. CTX=-1*MPNORM.VPOCHA(NLF,4)
  136. CTY=-1*MPNORM.VPOCHA(NLF,5)
  137. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  138. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  139. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  140. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  141. ENDIF
  142. C----------------------------------------
  143. SEGINI CP, CV
  144. MLRECP = LRECP
  145. MLRECV = LRECV
  146. SEGACT MLRECP, MLRECV
  147. DO 10 I=1,(NSP-1)
  148. CP.GC(I)=MLRECP.PROG(I)
  149. CV.GC(I)=MLRECV.PROG(I)
  150. 10 CONTINUE
  151. CP.GC(NSP)=MLRECP.PROG(NSP)
  152. CV.GC(NSP)=MLRECV.PROG(NSP)
  153. C----------------------------
  154. C Variables au centre
  155. C----------------------------
  156. RC=MPRC.VPOCHA(NLC,1)
  157. PC=MPPC.VPOCHA(NLC,1)
  158. UXC=MPVC.VPOCHA(NLC,1)
  159. UYC=MPVC.VPOCHA(NLC,2)
  160. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  161. SEGINI YC
  162. SEGACT MPYN
  163. DO 100 I=1,(NSP-1)
  164. YC.YET(I)=MPYN.VPOCHA(NLC,I)
  165. 100 CONTINUE
  166. C----------------------------
  167. C Variables à la face
  168. C----------------------------
  169. RF=MPLIM.VPOCHA(NLCB,1)
  170. UXF=MPLIM.VPOCHA(NLCB,2)
  171. UYF=MPLIM.VPOCHA(NLCB,3)
  172. IF(IDIM.EQ.3)UZF=MPLIM.VPOCHA(NLCB,4)
  173. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  174. SEGINI YF
  175. DO 101 I=1,(NSP-1)
  176. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  177. 101 CONTINUE
  178. c-------------------------------------------------------------
  179. c Computing GAMMA at the cell-center
  180. c-------------------------------------------------------------
  181. top=0.0D0
  182. bot=0.0D0
  183. do 102 i=1,(nsp-1)
  184. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  185. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  186. 102 continue
  187. top=cp.gc(nsp)+top
  188. bot=cv.gc(nsp)+bot
  189. GAMC=top/bot
  190. c-------------------------------------------------------------
  191. c Computing GAMMA at the face-center
  192. c-------------------------------------------------------------
  193. top=0.0D0
  194. bot=0.0D0
  195. do 103 i=1,(nsp-1)
  196. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  197. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  198. 103 continue
  199. top=cp.gc(nsp)+top
  200. bot=cv.gc(nsp)+bot
  201. GAMF=top/bot
  202. C---------------------------------------
  203. C******* On calcule UN, UT, UT2, ASON, S
  204. C---------------------------------------
  205. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  206. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  207. UTF=(UXF*CTX)+(UYF*CTY)+(UZF*CTZ)
  208. UT2F=(UXF*CT2X)+(UYF*CT2Y)+(UZF*CT2Z)
  209. C----------------------------------
  210. ASONC=(GAMC*PC/RC)**0.5D0
  211. ASONF=(GAMF*PF/RF)**0.5D0
  212. C
  213. SF=PF/(RF**GAMF)
  214. C-----------------------------------------------
  215. C******* Densite, vitesse, pression sur le bord
  216. C-----------------------------------------------
  217. G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  218. G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  219. UN=0.5D0*(G1+G3)
  220. ASON2=(0.5D0*(G3-G1))
  221. ASON2=ASON2*(GAMF-1.0D0)/2.0D0
  222. ASON2=ASON2*ASON2
  223. S=SF
  224. UT=UTF
  225. UT2=UT2F
  226. RHO=ASON2/(GAMF*S)
  227. RHO=RHO**(1.0D0/(GAMF-1.0D0))
  228. P=RHO*ASON2/GAMF
  229. UX=(UN*CNX)+(UT*CTX)+(UT2*CT2X)
  230. UY=(UN*CNY)+(UT*CTY)+(UT2*CT2Y)
  231. UZ=(UN*CNZ)+(UT*CTZ)+(UT2*CT2Z)
  232. C----------------------------------------
  233. MPRLI.VPOCHA(NLCB,1)=RHO
  234. MPRLI.VPOCHA(NLCB,2)=UX
  235. MPRLI.VPOCHA(NLCB,3)=UY
  236. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZ
  237. MPRLI.VPOCHA(NLCB,IDIM+2)=P
  238. do 104 i=1,(nsp-1)
  239. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  240. 104 continue
  241. C-------------------------------------------------------
  242. C******* Residuum (son SPG a le meme ordre que MELEFC)
  243. C-------------------------------------------------------
  244. MPRES.VPOCHA(IFAC,1)=RHO*UN*SURF/VOLU
  245. MPRES.VPOCHA(IFAC,2)=(RHO*UN*UX+(P*CNX))*SURF/VOLU
  246. MPRES.VPOCHA(IFAC,3)=(RHO*UN*UY+(P*CNY))*SURF/VOLU
  247. IF(IDIM.EQ.3)
  248. & MPRES.VPOCHA(IFAC,4)=(RHO*UN*UZ+(P*CNZ))*SURF/VOLU
  249. MPRES.VPOCHA(IFAC,IDIM+2)=((UN*GAMF*P/(GAMF-1.0D0)) +
  250. & (0.5D0*RHO*UN*(UN*UN+UT*UT+UT2*UT2)))*SURF/VOLU
  251. do 105 i=1,(nsp-1)
  252. MPRES.VPOCHA(IFAC,IDIM+2+I)=RHO*YF.YET(I)*UN*SURF/VOLU
  253. 105 continue
  254. 1 CONTINUE
  255. C
  256. SEGDES MELEFC
  257. C
  258. SEGSUP MLEMC
  259. SEGSUP MLEMCB
  260. SEGSUP MLEMF
  261. C
  262. SEGDES MPNORM
  263. SEGDES MPVOL
  264. SEGDES MPSURF
  265. SEGDES MPRC
  266. SEGDES MPPC
  267. SEGDES MPVC
  268. SEGDES MPYN
  269. SEGDES MPLIM
  270. SEGDES MPRES
  271. SEGDES MPRLI
  272. SEGDES MLRECP
  273. SEGDES MLRECV
  274. SEGDES YC
  275. SEGDES YF
  276. C
  277. 9999 CONTINUE
  278. RETURN
  279. END
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales