Télécharger cl291t.eso

Retour à la liste

Numérotation des lignes :

cl291t
  1. C CL291T SOURCE OF166741 24/12/13 21:15:09 12097
  2. SUBROUTINE CL291T(NSP,MELEMF,MELEMC,MELECB,MELEFC,INORM,ICHPVO,
  3. & ICHPSU,LRECP,LRECV,IROC,IVITC,IPC,IYC,
  4. & IKAN,IEPSN,ICHLIM,ICHRES,ICHRLI)
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : CLI291T
  10. C
  11. C DESCRIPTION : Subroutine appellée par CLIM22
  12. C Supersonic Outlet B.C.
  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 (CHPVID here)
  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. IMPLICIT INTEGER(I-N)
  65.  
  66. -INC PPARAM
  67. -INC CCOPTIO
  68. -INC SMLMOTS
  69. -INC SMELEME
  70. POINTEUR MELEFC.MELEME,MELEMF.MELEME,MELEMC.MELEME,MELECB.MELEME
  71. -INC SMLENTI
  72. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  73. -INC SMCHPOI
  74. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  75. & MPVC.MPOVAL, MPPC.MPOVAL, MPYC.MPOVAL, MPLIM.MPOVAL,
  76. & MPRES.MPOVAL, MPRLI.MPOVAL,MPKAC.MPOVAL,MPEPSC.MPOVAL
  77. C
  78. INTEGER INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  79. & ,IYC,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC,IKAN, IEPSN
  80. & ,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
  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. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  133. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  134. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  135. C---------------------------------------------------------
  136. C**** Boucle sur le face pour le calcul des invariants de
  137. C Riemann et du flux
  138. C---------------------------------------------------------
  139. SEGACT MELEFC
  140. NFAC=MELEFC.NUM(/2)
  141. UZC=0.0D0
  142. CNZ=0.0D0
  143. CTZ=0.0D0
  144. CT2X=0.0D0
  145. CT2Y=0.0D0
  146. CT2Z=0.0D0
  147. DO IFAC=1,NFAC,1
  148. NGF=MELEFC.NUM(1,IFAC)
  149. NGC=MELEFC.NUM(2,IFAC)
  150. NLF=MLEMF.LECT(NGF)
  151. NLC=MLEMC.LECT(NGC)
  152. NLCB=MLEMCB.LECT(NGF)
  153. VOLU=MPVOL.VPOCHA(NLC,1)
  154. SURF=MPSURF.VPOCHA(NLF,1)
  155. C In CASTEM les normales sont sortantes
  156. CNX=MPNORM.VPOCHA(NLF,1)
  157. CNY=MPNORM.VPOCHA(NLF,2)
  158. IF(IDIM.EQ.2)THEN
  159. CTX=-1.0D0*CNY
  160. CTY=CNX
  161. ELSE
  162. CNZ=MPNORM.VPOCHA(NLF,3)
  163. CTX=MPNORM.VPOCHA(NLF,4)
  164. CTY=MPNORM.VPOCHA(NLF,5)
  165. CTZ=MPNORM.VPOCHA(NLF,6)
  166. CT2X=MPNORM.VPOCHA(NLF,7)
  167. CT2Y=MPNORM.VPOCHA(NLF,8)
  168. CT2Z=MPNORM.VPOCHA(NLF,9)
  169. ENDIF
  170. C--------------------------------------------
  171. SEGINI CP, CV
  172. MLRECP = LRECP
  173. MLRECV = LRECV
  174. SEGACT MLRECP, MLRECV
  175. DO 10 I=1,(NSP-1)
  176. CP.GC(I)=MLRECP.PROG(I)
  177. CV.GC(I)=MLRECV.PROG(I)
  178. 10 CONTINUE
  179. CP.GC(NSP)=MLRECP.PROG(NSP)
  180. CV.GC(NSP)=MLRECV.PROG(NSP)
  181. C----------------------------------------
  182. C Variables au centre
  183. C----------------------------------------
  184. RC=MPRC.VPOCHA(NLC,1)
  185. UXC=MPVC.VPOCHA(NLC,1)
  186. UYC=MPVC.VPOCHA(NLC,2)
  187. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  188. PC=MPPC.VPOCHA(NLC,1)
  189. SEGINI YC
  190. SEGACT MPYC
  191. DO 101 I=1,(NSP-1)
  192. YC.YET(I)=MPYC.VPOCHA(NLC,I)
  193. 101 CONTINUE
  194. KAC=MPKAC.VPOCHA(NLC,1)
  195. EPSC=MPEPSC.VPOCHA(NLC,1)
  196. c-------------------------------------------------------------
  197. c Computing GAMMA at the cell-center
  198. c-------------------------------------------------------------
  199. top=0.0D0
  200. bot=0.0D0
  201. do 102 i=1,(nsp-1)
  202. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  203. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  204. 102 continue
  205. top=cp.gc(nsp)+top
  206. bot=cv.gc(nsp)+bot
  207. GAMC=top/bot
  208. C-----------------------------------------
  209. C Variables à la face
  210. C-----------------------------------------
  211. PF = PC
  212. C---------------------------------------
  213. C******* On calcule UN, UT, UT2
  214. C---------------------------------------
  215. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  216. UTC=(UXC*CTX)+(UYC*CTY)+(UZC*CTZ)
  217. UT2C=(UXC*CT2X)+(UYC*CT2Y)+(UZC*CT2Z)
  218. C-----------------------------------------------
  219. C******* Densite, vitesse, pression sur le bord
  220. C-----------------------------------------------
  221. MPRLI.VPOCHA(NLCB,1)=RC
  222. MPRLI.VPOCHA(NLCB,2)=UXC
  223. MPRLI.VPOCHA(NLCB,3)=UYC
  224. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZC
  225. MPRLI.VPOCHA(NLCB,IDIM+2)=PF
  226. do 104 i=1,(nsp-1)
  227. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YC.YET(I)
  228. 104 continue
  229. MPRLI.VPOCHA(NLCB,IDIM+NSP+2)=KAC
  230. MPRLI.VPOCHA(NLCB,IDIM+NSP+3)=EPSC
  231. C---------------------------------------------------
  232. C******* Probleme de Riemann entre l'etat gauche
  233. C RC,UNC,UTC,UT2C,PC et l'etat droite
  234. C RC,UNC,UTC,UT2C,PF
  235. C On utilise AUSM+
  236. C Flux dans le repaire normale
  237. C---------------------------------------------------
  238. NESP=NSP-1
  239. IF(IDIM.EQ.2)THEN
  240. CALL FAUSMP(NESP,
  241. & GAMC,RC,PC,UNC,UTC,
  242. & GAMC,RC,PF,UNC,UTC,
  243. & YC.YET,YC.YET,
  244. & FLUX2D.FU,
  245. & CELLT)
  246. C-------------------------------------------------------
  247. C******* Residuum (son SPG a le meme ordre que MELEFC)
  248. C-------------------------------------------------------
  249. MPRES.VPOCHA(IFAC,1)=-1*FLUX2D.FU(1)*SURF/VOLU
  250. MPRES.VPOCHA(IFAC,2)=-1*((FLUX2D.FU(2)*CNX)+
  251. & (FLUX2D.FU(3)*CTX))*SURF/VOLU
  252. MPRES.VPOCHA(IFAC,3)=-1*((FLUX2D.FU(2)*CNY)+
  253. & (FLUX2D.FU(3)*CTY))*SURF/VOLU
  254. MPRES.VPOCHA(IFAC,4)=-1*FLUX2D.FU(4)*SURF/VOLU
  255. do 105 i=1,(nsp-1)
  256. MPRES.VPOCHA(IFAC,4+I)=-1*FLUX2D.FU(4+I)*SURF/VOLU
  257. 105 continue
  258. MPRES.VPOCHA(IFAC,4+NSP)=-1*KAC*FLUX2D.FU(1)*SURF/VOLU
  259. MPRES.VPOCHA(IFAC,5+NSP)=-1*EPSC*FLUX2D.FU(1)*SURF/VOLU
  260. ELSE
  261. CALL FAUSM3(NESP,
  262. & GAMC,RC,PC,UNC,UTC,UT2C,
  263. & GAMC,RC,PF,UNC,UTC,UT2C,
  264. & YC.YET,YC.YET,
  265. & FLUX3D.FU,
  266. & CELLT)
  267. C------------------------------------------------------
  268. C******* Residuum (son SPG a le meme ordre que MELEFC)
  269. C------------------------------------------------------
  270. MPRES.VPOCHA(IFAC,1)=-1*FLUX3D.FU(1)*SURF/VOLU
  271. MPRES.VPOCHA(IFAC,2)=-1*((FLUX3D.FU(2)*CNX)+
  272. & (FLUX3D.FU(3)*CTX)+(FLUX3D.FU(4)*CT2X))*SURF/VOLU
  273. MPRES.VPOCHA(IFAC,3)=-1*((FLUX3D.FU(2)*CNY)+
  274. & (FLUX3D.FU(3)*CTY)+(FLUX3D.FU(4)*CT2Z))*SURF/VOLU
  275. MPRES.VPOCHA(IFAC,4)=-1*((FLUX3D.FU(2)*CNZ)+
  276. & (FLUX3D.FU(3)*CTZ)+(FLUX3D.FU(4)*CT2Z))*SURF/VOLU
  277. MPRES.VPOCHA(IFAC,5)=-1*FLUX3D.FU(5)*SURF/VOLU
  278. do 106 i=1,(nsp-1)
  279. MPRES.VPOCHA(IFAC,5+I)=-1*FLUX3D.FU(5+I)*SURF/VOLU
  280. 106 continue
  281. MPRES.VPOCHA(IFAC,5+NSP)=-1*KAC*FLUX3D.FU(1)*SURF/VOLU
  282. MPRES.VPOCHA(IFAC,6+NSP)=-1*EPSC*FLUX3D.FU(1)*SURF/VOLU
  283. ENDIF
  284. ENDDO
  285. C
  286. SEGDES MELEFC
  287. C
  288. SEGDES MLEMC
  289. SEGDES MLEMCB
  290. SEGDES MLEMF
  291. C
  292. SEGDES MPNORM
  293. SEGDES MPVOL
  294. SEGDES MPSURF
  295. SEGDES MPRC
  296. SEGDES MPPC
  297. SEGDES MPVC
  298. SEGDES MPYC
  299. SEGDES MPKAC
  300. SEGDES MPEPSC
  301. c SEGDES MPLIM
  302. SEGDES MPRES
  303. SEGDES MPRLI
  304. SEGDES YC
  305. SEGDES FLUX2D
  306. SEGDES FLUX3D
  307. C
  308. 9999 CONTINUE
  309. RETURN
  310. END
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  

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