Télécharger cli261.eso

Retour à la liste

Numérotation des lignes :

cli261
  1. C CLI261 SOURCE CB215821 20/11/25 13:20:45 10792
  2. SUBROUTINE CLI261(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 : CLI261
  9. C
  10. C DESCRIPTION : Subroutine appellée par CLIM22
  11. C calcul de RESIDU et CLIM at the board
  12. C OPTION: 'INSU' 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,NESP
  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,GAMF,ECIN,PSRF,HTF,GM1
  63. & ,CELLT,UT2C,UTC
  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********** Segments for the flux-vector *******************
  84. C-------------------------------------------------------------
  85. SEGMENT FUNEL
  86. REAL*8 FU(4+NSP)
  87. ENDSEGMENT
  88. POINTEUR flux2D.funel, flux3D.funel
  89. SEGINI FLUX2D
  90. SEGINI FLUX3D
  91. C------------------------------------------------------
  92. C**** KRIPAD pour la correspondance global/local
  93. C------------------------------------------------------
  94. CALL KRIPAD(MELEMC,MLEMC)
  95. CALL KRIPAD(MELECB,MLEMCB)
  96. CALL KRIPAD(MELEMF,MLEMF)
  97. C------------------------------------------------------
  98. C**** CHPOINTs de la table DOMAINE
  99. C------------------------------------------------------
  100. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  101. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  102. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  103. C------------------------------------------------------
  104. C**** CHPOINTs des variables
  105. C------------------------------------------------------
  106. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  107. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  108. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  109. CALL LICHT(IYN,MPYN,TYPE,ICEL)
  110. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  111. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  112. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  113. C---------------------------------------------------------
  114. C**** Boucle sur le face pour le calcul des invariants de
  115. C Riemann et du flux
  116. C---------------------------------------------------------
  117. SEGACT MELEFC
  118. NFAC=MELEFC.NUM(/2)
  119. UZC=0.0D0
  120. UZF=0.0D0
  121. UT2F=0.0D0
  122. CNZ=0.0D0
  123. CTZ=0.0D0
  124. CT2X=0.0D0
  125. CT2Y=0.0D0
  126. CT2Z=0.0D0
  127. DO 1 IFAC=1,NFAC,1
  128. NGF=MELEFC.NUM(1,IFAC)
  129. NGC=MELEFC.NUM(2,IFAC)
  130. NLF=MLEMF.LECT(NGF)
  131. NLC=MLEMC.LECT(NGC)
  132. NLCB=MLEMCB.LECT(NGF)
  133. VOLU=MPVOL.VPOCHA(NLC,1)
  134. SURF=MPSURF.VPOCHA(NLF,1)
  135. C----------------------------------------------
  136. C In CASTEM les normales sont sortantes
  137. C----------------------------------------------
  138. CNX=-1*MPNORM.VPOCHA(NLF,1)
  139. CNY=-1*MPNORM.VPOCHA(NLF,2)
  140. IF(IDIM.EQ.2)THEN
  141. CTX=-1.0D0*CNY
  142. CTY=CNX
  143. ELSE
  144. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  145. CTX=-1*MPNORM.VPOCHA(NLF,4)
  146. CTY=-1*MPNORM.VPOCHA(NLF,5)
  147. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  148. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  149. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  150. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  151. ENDIF
  152. C----------------------------------------
  153. SEGINI CP, CV
  154. MLRECP = LRECP
  155. MLRECV = LRECV
  156. SEGACT MLRECP, MLRECV
  157. DO 10 I=1,(NSP-1)
  158. CP.GC(I)=MLRECP.PROG(I)
  159. CV.GC(I)=MLRECV.PROG(I)
  160. 10 CONTINUE
  161. CP.GC(NSP)=MLRECP.PROG(NSP)
  162. CV.GC(NSP)=MLRECV.PROG(NSP)
  163. C----------------------------
  164. C Variables au centre
  165. C----------------------------
  166. RC=MPRC.VPOCHA(NLC,1)
  167. PC=MPPC.VPOCHA(NLC,1)
  168. UXC=MPVC.VPOCHA(NLC,1)
  169. UYC=MPVC.VPOCHA(NLC,2)
  170. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  171. SEGINI YC
  172. SEGACT MPYN
  173. DO 100 I=1,(NSP-1)
  174. YC.YET(I)=MPYN.VPOCHA(NLC,I)
  175. 100 CONTINUE
  176. C----------------------------
  177. C Variables à la face
  178. C----------------------------
  179. HTF=MPLIM.VPOCHA(NLCB,1)
  180. SF=MPLIM.VPOCHA(NLCB,2)
  181. SEGINI YF
  182. DO 101 I=1,(NSP-1)
  183. YF.YET(I)=MPLIM.VPOCHA(NLCB,2+I)
  184. 101 CONTINUE
  185. UTF=0.0D0
  186. c-------------------------------------------------------------
  187. c Computing GAMMA at the cell-center
  188. c-------------------------------------------------------------
  189. top=0.0D0
  190. bot=0.0D0
  191. do 102 i=1,(nsp-1)
  192. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  193. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  194. 102 continue
  195. top=cp.gc(nsp)+top
  196. bot=cv.gc(nsp)+bot
  197. GAMC=top/bot
  198. c-------------------------------------------------------------
  199. c Computing GAMMA at the face-center
  200. c-------------------------------------------------------------
  201. top=0.0D0
  202. bot=0.0D0
  203. do 103 i=1,(nsp-1)
  204. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  205. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  206. 103 continue
  207. top=cp.gc(nsp)+top
  208. bot=cv.gc(nsp)+bot
  209. GAMF=top/bot
  210. GM1=GAMF-1.0D0
  211. C---------------------------------------
  212. C******* On calcule UN, UT, UT2, ASON, S
  213. C---------------------------------------
  214. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  215. UNF=UNC
  216. UTC=(UXC*CTX)+(UYC*CTY)+(UZC*CTZ)
  217. C----------------------------------
  218. UXF=UNF*CNX+UTF*CTX+UT2F*CT2X
  219. UYF=UNF*CNY+UTF*CTY+UT2F*CT2Y
  220. UZF=UNF*CNZ+UTF*CTZ+UT2F*CT2Z
  221. C----------------------------------
  222. ECIN=0.5D0*((UXF*UXF)+(UYF*UYF)+(UZF*UZF))
  223. PSRF=(GM1/GAMF)*(HTF-ECIN)
  224. RF=PSRF/SF
  225. RF=RF**(1.0D0/GM1)
  226. PF=SF*(RF**GAMF)
  227. C-----------------------------------------------
  228. C******* Densite, vitesse, pression sur le bord
  229. C-----------------------------------------------
  230. MPRLI.VPOCHA(NLCB,1)=RF
  231. MPRLI.VPOCHA(NLCB,2)=UXF
  232. MPRLI.VPOCHA(NLCB,3)=UYF
  233. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZF
  234. MPRLI.VPOCHA(NLCB,IDIM+2)=PF
  235. do 104 i=1,(nsp-1)
  236. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  237. 104 continue
  238. C---------------------------------------------------
  239. C******* Probleme de Riemann entre l'etat gauche
  240. C RF,UNC,UTF,UT2F,PF et l'etat droite
  241. C RC,UNC,UTC,UT2C,PC
  242. C On utilise AUSM+
  243. C Flux dans le repaire normale
  244. C---------------------------------------------------
  245. NESP=NSP-1
  246. IF(IDIM.EQ.2)THEN
  247. CALL FAUSMP(NESP,
  248. & GAMF,RF,PF,UNC,UTF,
  249. & GAMC,RC,PC,UNC,UTC,
  250. & YF.YET,YC.YET,
  251. & FLUX2D.FU,
  252. & CELLT)
  253. C-------------------------------------------------------
  254. C******* Residuum (son SPG a le meme ordre que MELEFC)
  255. C-------------------------------------------------------
  256. MPRES.VPOCHA(IFAC,1)=FLUX2D.FU(1)*SURF/VOLU
  257. MPRES.VPOCHA(IFAC,2)=((FLUX2D.FU(2)*CNX)+(FLUX2D.FU(3)*CTX))
  258. & *SURF/VOLU
  259. MPRES.VPOCHA(IFAC,3)=((FLUX2D.FU(2)*CNY)+(FLUX2D.FU(3)*CTY))
  260. & *SURF/VOLU
  261. MPRES.VPOCHA(IFAC,4)=FLUX2D.FU(4)*SURF/VOLU
  262. do 105 i=1,(nsp-1)
  263. MPRES.VPOCHA(IFAC,4+I)=FLUX2D.FU(4+I)*SURF/VOLU
  264. 105 continue
  265. ELSE
  266. CALL FAUSM3(NESP,
  267. & GAMF,RF,PF,UNC,UTF,UT2F,
  268. & GAMC,RC,PC,UNC,UTC,UT2C,
  269. & YF.YET,YC.YET,
  270. & FLUX3D.FU,
  271. & CELLT)
  272. C------------------------------------------------------
  273. C******* Residuum (son SPG a le meme ordre que MELEFC)
  274. C------------------------------------------------------
  275. MPRES.VPOCHA(IFAC,1)=FLUX3D.FU(1)*SURF/VOLU
  276. MPRES.VPOCHA(IFAC,2)=((FLUX3D.FU(2)*CNX)+(FLUX3D.FU(3)*CTX)+
  277. & (FLUX3D.FU(4)*CT2X))*SURF/VOLU
  278. MPRES.VPOCHA(IFAC,3)=((FLUX3D.FU(2)*CNY)+(FLUX3D.FU(3)*CTY)+
  279. & (FLUX3D.FU(4)*CT2Z))*SURF/VOLU
  280. MPRES.VPOCHA(IFAC,4)=((FLUX3D.FU(2)*CNZ)+(FLUX3D.FU(3)*CTZ)+
  281. & (FLUX3D.FU(4)*CT2Z))*SURF/VOLU
  282. MPRES.VPOCHA(IFAC,5)=FLUX3D.FU(5)*SURF/VOLU
  283. do 106 i=1,(nsp-1)
  284. MPRES.VPOCHA(IFAC,5+I)=FLUX3D.FU(5+I)*SURF/VOLU
  285. 106 continue
  286. ENDIF
  287. 1 CONTINUE
  288. C
  289. SEGDES MELEFC
  290. C
  291. c SEGSUP MLEMC
  292. c SEGSUP MLEMCB
  293. c SEGSUP MLEMF
  294. c-------------------------
  295. SEGDES MLEMC
  296. SEGDES MLEMCB
  297. SEGDES MLEMF
  298. C
  299. SEGDES MPNORM
  300. SEGDES MPVOL
  301. SEGDES MPSURF
  302. SEGDES MPRC
  303. SEGDES MPPC
  304. SEGDES MPVC
  305. SEGDES MPYN
  306. SEGDES MPLIM
  307. SEGDES MPRES
  308. SEGDES MPRLI
  309. SEGDES MLRECP
  310. SEGDES MLRECV
  311. SEGDES YC
  312. SEGDES YF
  313. SEGDES FLUX2D
  314. SEGDES FLUX3D
  315. C
  316. 9999 CONTINUE
  317. RETURN
  318. END
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  

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