Télécharger cli261.eso

Retour à la liste

Numérotation des lignes :

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

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