Télécharger cl251t.eso

Retour à la liste

Numérotation des lignes :

cl251t
  1. C CL251T SOURCE OF166741 24/12/13 21:15:07 12097
  2. SUBROUTINE CL251T(NSP,MELEMF,MELEMC,MELECB,MELEFC,INORM,ICHPVO,
  3. & ICHPSU,LRECP,LRECV,IROC,IVITC,IPC,IYC,
  4. & IKAN,IEPSN,IK0N,ICHLIM,ICHRES,ICHRLI)
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : CLI251T
  10. C
  11. C DESCRIPTION : Subroutine appellée par CLIM22
  12. C Outlet B.C. (known pressure)
  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 ENTREES : NSP (type ENTIER) : full number of species
  20. C ('ESPEULE' + 1) ;
  21. C MELEMF (type MELEME) : maillage des faces des
  22. C éléments.
  23. C MELEMC (type MELEME) : maillage des centres des
  24. C éléments.
  25. C MELECB (type MELEME) : maillage des centres des éléments
  26. C de la frontière
  27. C MELEFC (type MELEME) : connectivités face-(centre
  28. C gauche, centre droit).
  29. C INORM (type MCHPOI) : normales at the faces
  30. C ICHPVO (type MCHPOI) : volumes of the cells
  31. C ICHPSU (type MCHPOI) : surfaces of the cell-interfaces
  32. C LRECP (type MLREEL) : list of CP's of the species
  33. C LRECV (type MLREEL) : list of CV's of the species
  34. C IROC (type MCHPOI) : densityes at the centres of the domain
  35. C IVITC (type MCHPOI) : velocities at the centres of the domain
  36. C IPC (type MCHPOI) : pressure at the centres of the domain
  37. C IYN (type MCHPOI) : mass fraction of the species at the
  38. C centres of the domain
  39. C IKAN (type MCHPOI) : turbulent kinetic energy, k,
  40. C at the centres of the domain
  41. C IEPSN (type MCHPOI) : rate of dissipated turb. energy
  42. C at the centres of the domain
  43. C ICHLIM (type MCHPOI) : boundary conditions at the centers
  44. C of the boundary
  45. C-----------------------------------------------------
  46. C SORTIES: ICHRES (type MCHPOI) : the contribution to the residuum
  47. C due to the boundary conditions
  48. C given at the centres of the cells
  49. C next to the boundary
  50. C ICHRLI (type MCHPOI) : the values at the boundary faces
  51. C found by the procedure.
  52. C************************************************************************
  53. C
  54. C APPELES (Calcul) :
  55. C
  56. C************************************************************************
  57. C
  58. C HISTORIQUE (Anomalies et modifications éventuelles)
  59. C
  60. C HISTORIQUE :
  61. C
  62. C************************************************************************
  63. C
  64.  
  65. -INC PPARAM
  66. -INC CCOPTIO
  67. -INC SMLMOTS
  68. -INC SMELEME
  69. POINTEUR MELEFC.MELEME,MELEMF.MELEME,MELEMC.MELEME,MELECB.MELEME
  70. -INC SMLENTI
  71. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  72. -INC SMCHPOI
  73. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  74. & MPVC.MPOVAL, MPPC.MPOVAL, MPYC.MPOVAL, MPLIM.MPOVAL,
  75. & MPRES.MPOVAL, MPRLI.MPOVAL,MPKAC.MPOVAL,MPEPSC.MPOVAL,
  76. & MPK0C.MPOVAL
  77. C
  78. INTEGER INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  79. & ,IYC,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC,IKAN, IEPSN
  80. & ,IK0N,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,NSP,NESP,I
  81. REAL*8 VOLU,SURF,GAMC,CNX,CNY,CNZ,CTX,CTY,CTZ
  82. & ,CT2X,CT2Y,CT2Z,RC,PC,UXC,UYC,UZC,PF,TOP,BOT
  83. & ,UNC,UTC,UT2C,CELLT,EPSC,KAC,K0C
  84. CHARACTER*(8) TYPE
  85. C-------------------------------------------------------
  86. -INC SMLREEL
  87. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  88. C-------------------------------------------------------
  89. C********** Les CP's and CV's ***********************
  90. C-------------------------------------------------------
  91. SEGMENT GCONST
  92. REAL*8 GC(NSP)
  93. ENDSEGMENT
  94. POINTEUR CP.GCONST, CV.GCONST
  95. C-------------------------------------------------------------
  96. C******* Les fractionines massiques **************************
  97. C-------------------------------------------------------------
  98. SEGMENT FRAMAS
  99. REAL*8 YET(NSP)
  100. ENDSEGMENT
  101. POINTEUR YC.FRAMAS
  102. C-------------------------------------------------------------
  103. C********** Segments for the flux-vector *******************
  104. C-------------------------------------------------------------
  105. SEGMENT FUNEL
  106. REAL*8 FU(IDIM+1+NSP)
  107. ENDSEGMENT
  108. POINTEUR flux2D.funel, flux3D.funel
  109. SEGINI FLUX2D
  110. SEGINI FLUX3D
  111. C------------------------------------------------------------
  112. C**** KRIPAD pour la correspondance global/local
  113. C------------------------------------------------------------
  114. CALL KRIPAD(MELEMC,MLEMC)
  115. CALL KRIPAD(MELECB,MLEMCB)
  116. CALL KRIPAD(MELEMF,MLEMF)
  117. C--------------------------------------------
  118. C**** CHPOINTs de la table DOMAINE
  119. C--------------------------------------------
  120. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  121. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  122. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  123. C----------------------------------------
  124. C**** CHPOINTs des variables
  125. C----------------------------------------
  126. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  127. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  128. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  129. CALL LICHT(IYC,MPYC,TYPE,ICEL)
  130. CALL LICHT(IKAN,MPKAC,TYPE,ICEL)
  131. CALL LICHT(IEPSN,MPEPSC,TYPE,ICEL)
  132. IF (IK0N .GT. 0) THEN
  133. CALL LICHT(IK0N,MPK0C,TYPE,ICEL)
  134. ENDIF
  135. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  136. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  137. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  138. C---------------------------------------------------------
  139. C**** Boucle sur le face pour le calcul des invariants de
  140. C Riemann et du flux
  141. C---------------------------------------------------------
  142. SEGACT MELEFC
  143. NFAC=MELEFC.NUM(/2)
  144. UZC=0.0D0
  145. CNZ=0.0D0
  146. CTZ=0.0D0
  147. CT2X=0.0D0
  148. CT2Y=0.0D0
  149. CT2Z=0.0D0
  150. DO IFAC=1,NFAC,1
  151. NGF=MELEFC.NUM(1,IFAC)
  152. NGC=MELEFC.NUM(2,IFAC)
  153. NLF=MLEMF.LECT(NGF)
  154. NLC=MLEMC.LECT(NGC)
  155. NLCB=MLEMCB.LECT(NGF)
  156. VOLU=MPVOL.VPOCHA(NLC,1)
  157. SURF=MPSURF.VPOCHA(NLF,1)
  158. C In CASTEM les normales sont sortantes
  159. CNX=MPNORM.VPOCHA(NLF,1)
  160. CNY=MPNORM.VPOCHA(NLF,2)
  161. IF(IDIM.EQ.2)THEN
  162. CTX=-1.0D0*CNY
  163. CTY=CNX
  164. ELSE
  165. CNZ=MPNORM.VPOCHA(NLF,3)
  166. CTX=MPNORM.VPOCHA(NLF,4)
  167. CTY=MPNORM.VPOCHA(NLF,5)
  168. CTZ=MPNORM.VPOCHA(NLF,6)
  169. CT2X=MPNORM.VPOCHA(NLF,7)
  170. CT2Y=MPNORM.VPOCHA(NLF,8)
  171. CT2Z=MPNORM.VPOCHA(NLF,9)
  172. ENDIF
  173. C--------------------------------------------
  174. SEGINI CP, CV
  175. MLRECP = LRECP
  176. MLRECV = LRECV
  177. SEGACT MLRECP, MLRECV
  178. DO 10 I=1,(NSP-1)
  179. CP.GC(I)=MLRECP.PROG(I)
  180. CV.GC(I)=MLRECV.PROG(I)
  181. 10 CONTINUE
  182. CP.GC(NSP)=MLRECP.PROG(NSP)
  183. CV.GC(NSP)=MLRECV.PROG(NSP)
  184. C----------------------------------------
  185. C Variables au centre
  186. C----------------------------------------
  187. RC=MPRC.VPOCHA(NLC,1)
  188. UXC=MPVC.VPOCHA(NLC,1)
  189. UYC=MPVC.VPOCHA(NLC,2)
  190. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  191. PC=MPPC.VPOCHA(NLC,1)
  192. SEGINI YC
  193. SEGACT MPYC
  194. DO 101 I=1,(NSP-1)
  195. YC.YET(I)=MPYC.VPOCHA(NLC,I)
  196. 101 CONTINUE
  197. KAC=MPKAC.VPOCHA(NLC,1)
  198. EPSC=MPEPSC.VPOCHA(NLC,1)
  199. IF (IK0N .GT. 0) THEN
  200. K0C=MPK0C.VPOCHA(NLC,1)
  201. ENDIF
  202. c-------------------------------------------------------------
  203. c Computing GAMMA at the cell-center
  204. c-------------------------------------------------------------
  205. top=0.0D0
  206. bot=0.0D0
  207. do 102 i=1,(nsp-1)
  208. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  209. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  210. 102 continue
  211. top=cp.gc(nsp)+top
  212. bot=cv.gc(nsp)+bot
  213. GAMC=top/bot
  214. C-----------------------------------------
  215. C Variables à la face
  216. C-----------------------------------------
  217. PF=MPLIM.VPOCHA(NLCB,1)
  218. C---------------------------------------
  219. C******* On calcule UN, UT, UT2
  220. C---------------------------------------
  221. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  222. UTC=(UXC*CTX)+(UYC*CTY)+(UZC*CTZ)
  223. UT2C=(UXC*CT2X)+(UYC*CT2Y)+(UZC*CT2Z)
  224. C-----------------------------------------------
  225. C******* Densite, vitesse, pression sur le bord
  226. C-----------------------------------------------
  227. MPRLI.VPOCHA(NLCB,1)=RC
  228. MPRLI.VPOCHA(NLCB,2)=UXC
  229. MPRLI.VPOCHA(NLCB,3)=UYC
  230. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZC
  231. MPRLI.VPOCHA(NLCB,IDIM+2)=PF
  232. do 104 i=1,(nsp-1)
  233. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YC.YET(I)
  234. 104 continue
  235. MPRLI.VPOCHA(NLCB,IDIM+NSP+2)=KAC
  236. MPRLI.VPOCHA(NLCB,IDIM+NSP+3)=EPSC
  237. IF (IK0N .GT. 0) THEN
  238. MPRLI.VPOCHA(NLCB,IDIM+NSP+4)=K0C
  239. ENDIF
  240. C---------------------------------------------------
  241. C******* Probleme de Riemann entre l'etat gauche
  242. C RC,UNC,UTC,UT2C,PC et l'etat droite
  243. C RC,UNC,UTC,UT2C,PF
  244. C On utilise AUSM+
  245. C Flux dans le repaire normale
  246. C---------------------------------------------------
  247. NESP=NSP-1
  248. IF(IDIM.EQ.2)THEN
  249. CALL FAUSMP(NESP,
  250. & GAMC,RC,PC,UNC,UTC,
  251. & GAMC,RC,PF,UNC,UTC,
  252. & YC.YET,YC.YET,
  253. & FLUX2D.FU,
  254. & CELLT)
  255. C-------------------------------------------------------
  256. C******* Residuum (son SPG a le meme ordre que MELEFC)
  257. C-------------------------------------------------------
  258. MPRES.VPOCHA(IFAC,1)=-1*FLUX2D.FU(1)*SURF/VOLU
  259. MPRES.VPOCHA(IFAC,2)=-1*((FLUX2D.FU(2)*CNX)+
  260. & (FLUX2D.FU(3)*CTX))*SURF/VOLU
  261. MPRES.VPOCHA(IFAC,3)=-1*((FLUX2D.FU(2)*CNY)+
  262. & (FLUX2D.FU(3)*CTY))*SURF/VOLU
  263. MPRES.VPOCHA(IFAC,4)=-1*FLUX2D.FU(4)*SURF/VOLU
  264. do 105 i=1,(nsp-1)
  265. MPRES.VPOCHA(IFAC,4+I)=-1*FLUX2D.FU(4+I)*SURF/VOLU
  266. 105 continue
  267. MPRES.VPOCHA(IFAC,4+NSP)=-1*KAC*FLUX2D.FU(1)*SURF/VOLU
  268. MPRES.VPOCHA(IFAC,5+NSP)=-1*EPSC*FLUX2D.FU(1)*SURF/VOLU
  269. IF (IK0N .GT. 0) THEN
  270. MPRES.VPOCHA(IFAC,6+NSP)=-1*K0C*FLUX2D.FU(1)*SURF/VOLU
  271. ENDIF
  272. ELSE
  273. CALL FAUSM3(NESP,
  274. & GAMC,RC,PC,UNC,UTC,UT2C,
  275. & GAMC,RC,PF,UNC,UTC,UT2C,
  276. & YC.YET,YC.YET,
  277. & FLUX3D.FU,
  278. & CELLT)
  279. C------------------------------------------------------
  280. C******* Residuum (son SPG a le meme ordre que MELEFC)
  281. C------------------------------------------------------
  282. MPRES.VPOCHA(IFAC,1)=-1*FLUX3D.FU(1)*SURF/VOLU
  283. MPRES.VPOCHA(IFAC,2)=-1*((FLUX3D.FU(2)*CNX)+
  284. & (FLUX3D.FU(3)*CTX)+(FLUX3D.FU(4)*CT2X))*SURF/VOLU
  285. MPRES.VPOCHA(IFAC,3)=-1*((FLUX3D.FU(2)*CNY)+
  286. & (FLUX3D.FU(3)*CTY)+(FLUX3D.FU(4)*CT2Y))*SURF/VOLU
  287. MPRES.VPOCHA(IFAC,4)=-1*((FLUX3D.FU(2)*CNZ)+
  288. & (FLUX3D.FU(3)*CTZ)+(FLUX3D.FU(4)*CT2Z))*SURF/VOLU
  289. MPRES.VPOCHA(IFAC,5)=-1*FLUX3D.FU(5)*SURF/VOLU
  290. do 106 i=1,(nsp-1)
  291. MPRES.VPOCHA(IFAC,5+I)=-1*FLUX3D.FU(5+I)*SURF/VOLU
  292. 106 continue
  293. MPRES.VPOCHA(IFAC,5+NSP)=-1*KAC*FLUX3D.FU(1)*SURF/VOLU
  294. MPRES.VPOCHA(IFAC,6+NSP)=-1*EPSC*FLUX3D.FU(1)*SURF/VOLU
  295. IF (IK0N .GT. 0) THEN
  296. MPRES.VPOCHA(IFAC,7+NSP)=-1*K0C*FLUX3D.FU(1)*SURF/VOLU
  297. ENDIF
  298. ENDIF
  299. ENDDO
  300. C
  301. SEGDES MELEFC
  302. C
  303. SEGDES MLEMC
  304. SEGDES MLEMCB
  305. SEGDES MLEMF
  306. C
  307. SEGDES MPNORM
  308. SEGDES MPVOL
  309. SEGDES MPSURF
  310. SEGDES MPRC
  311. SEGDES MPPC
  312. SEGDES MPVC
  313. SEGDES MPYC
  314. SEGDES MPKAC
  315. SEGDES MPEPSC
  316. IF (IK0N .GT. 0) THEN
  317. SEGDES MPK0C
  318. ENDIF
  319. SEGDES MPLIM
  320. SEGDES MPRES
  321. SEGDES MPRLI
  322. SEGDES YC
  323. SEGDES FLUX2D
  324. SEGDES FLUX3D
  325. C
  326. 9999 CONTINUE
  327. RETURN
  328. END
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  

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