Télécharger cl291t.eso

Retour à la liste

Numérotation des lignes :

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

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