Télécharger cl221t.eso

Retour à la liste

Numérotation des lignes :

cl221t
  1. C CL221T SOURCE OF166741 24/12/13 21:15:06 12097
  2. SUBROUTINE CL221T(NSP,MELEMF,MELEMC,MELECB,MELEFC,INORM,ICHPVO,
  3. & ICHPSU,LRECP,LRECV,IROC,IVITC,IPC,IYN,
  4. & IKAN,IEPSN,ICHLIM,ICHRES,ICHRLI)
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : CL221T
  10. C
  11. C DESCRIPTION : Subroutine appellée par CLIM22
  12. C calcul de RESIDU et CLIM at the board
  13. C OPTION: 'INRI' 2D with turbulence (k-\eps)
  14. C
  15. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  16. C
  17. C AUTEUR : S.Kudriakov, DEN/DM2S/SFME/LTMF
  18. C
  19. C************************************************************************
  20. C ENTREES : NSP (type ENTIER) : full number of species
  21. C ('ESPEULE' + 1) ;
  22. C MELEMF (type MELEME) : maillage des faces des
  23. C éléments.
  24. C MELEMC (type MELEME) : maillage des centres des
  25. C éléments.
  26. C MELECB (type MELEME) : maillage des centres des éléments
  27. C de la frontière
  28. C MELEFC (type MELEME) : connectivités face-(centre
  29. C gauche, centre droit).
  30. C INORM (type MCHPOI) : normales at the faces
  31. C ICHPVO (type MCHPOI) : volumes of the cells
  32. C ICHPSU (type MCHPOI) : surfaces of the cell-interfaces
  33. C LRECP (type MLREEL) : list of CP's of the species
  34. C LRECV (type MLREEL) : list of CV's of the species
  35. C IROC (type MCHPOI) : densityes at the centres of the domain
  36. C IVITC (type MCHPOI) : velocities at the centres of the domain
  37. C IPC (type MCHPOI) : pressure at the centres of the domain
  38. C IYN (type MCHPOI) : mass fraction of the species at the
  39. C centres of the domain
  40. C IKAN (type MCHPOI) : turbulent kinetic energy, k,
  41. C at the centres of the domain
  42. C IEPSN (type MCHPOI) : rate of dissipated turb. energy
  43. C at the centres of the domain
  44. C ICHLIM (type MCHPOI) : boundary conditions at the centers
  45. C of the boundary
  46. C-----------------------------------------------------
  47. C SORTIES: ICHRES (type MCHPOI) : the contribution to the residuum
  48. C due to the boundary conditions
  49. C given at the centres of the cells
  50. C next to the boundary
  51. C ICHRLI (type MCHPOI) : the values at the boundary faces
  52. C found by the procedure.
  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, MPYN.MPOVAL, MPLIM.MPOVAL,
  76. & MPRES.MPOVAL, MPRLI.MPOVAL, MPKAC.MPOVAL,MPEPSC.MPOVAL
  77. C----------------------------------------
  78. INTEGER INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  79. & ,IYN,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC,IKAN,IEPSN
  80. & ,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,I,NSP
  81. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ,CTX,CTY,CTZ
  82. & ,CT2X,CT2Y,CT2Z,RF,PF,UXF,UYF,UZF,TOP,BOT
  83. & ,UNC,UNF,UTF,UT2F,SF,ASONC,ASONF,GAMF
  84. & ,G1,G3,ASON2,S,UT,UT2,UN,RHO,P,UX,UY,UZ
  85. & ,KAC,EPSC,KAF,EPSF
  86. CHARACTER*(8) TYPE
  87. C------------------------------------------------------------
  88. -INC SMLREEL
  89. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  90. C-------------------------------------------------------
  91. C********** Les CP's and CV's ***********************
  92. C-------------------------------------------------------
  93. SEGMENT GCONST
  94. REAL*8 GC(NSP)
  95. ENDSEGMENT
  96. POINTEUR CP.GCONST, CV.GCONST
  97. C-------------------------------------------------------------
  98. C******* Les fractionines massiques **************************
  99. C-------------------------------------------------------------
  100. SEGMENT FRAMAS
  101. REAL*8 YET(NSP)
  102. ENDSEGMENT
  103. POINTEUR YC.FRAMAS, YF.FRAMAS
  104. C------------------------------------------------------
  105. C**** KRIPAD pour la correspondance global/local
  106. C------------------------------------------------------
  107. CALL KRIPAD(MELEMC,MLEMC)
  108. CALL KRIPAD(MELECB,MLEMCB)
  109. CALL KRIPAD(MELEMF,MLEMF)
  110. C------------------------------------------------------
  111. C**** CHPOINTs de la table DOMAINE
  112. C------------------------------------------------------
  113. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  114. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  115. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  116. C------------------------------------------------------
  117. C**** CHPOINTs des variables
  118. C------------------------------------------------------
  119. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  120. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  121. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  122. CALL LICHT(IYN,MPYN,TYPE,ICEL)
  123. CALL LICHT(IKAN,MPKAC,TYPE,ICEL)
  124. CALL LICHT(IEPSN,MPEPSC,TYPE,ICEL)
  125. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  126. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  127. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  128. C---------------------------------------------------------
  129. C**** Boucle sur le face pour le calcul des invariants de
  130. C Riemann et du flux
  131. C---------------------------------------------------------
  132. SEGACT MELEFC
  133. NFAC=MELEFC.NUM(/2)
  134. UZC=0.0D0
  135. UZF=0.0D0
  136. CNZ=0.0D0
  137. CTZ=0.0D0
  138. CT2X=0.0D0
  139. CT2Y=0.0D0
  140. CT2Z=0.0D0
  141. DO 1 IFAC=1,NFAC,1
  142. NGF=MELEFC.NUM(1,IFAC)
  143. NGC=MELEFC.NUM(2,IFAC)
  144. NLF=MLEMF.LECT(NGF)
  145. NLC=MLEMC.LECT(NGC)
  146. NLCB=MLEMCB.LECT(NGF)
  147. VOLU=MPVOL.VPOCHA(NLC,1)
  148. SURF=MPSURF.VPOCHA(NLF,1)
  149. C----------------------------------------------
  150. C In CASTEM les normales sont sortantes
  151. C----------------------------------------------
  152. CNX=-1*MPNORM.VPOCHA(NLF,1)
  153. CNY=-1*MPNORM.VPOCHA(NLF,2)
  154. IF(IDIM.EQ.2)THEN
  155. CTX=-1.0D0*CNY
  156. CTY=CNX
  157. ELSE
  158. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  159. CTX=-1*MPNORM.VPOCHA(NLF,4)
  160. CTY=-1*MPNORM.VPOCHA(NLF,5)
  161. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  162. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  163. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  164. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  165. ENDIF
  166. C----------------------------------------
  167. SEGINI CP, CV
  168. MLRECP = LRECP
  169. MLRECV = LRECV
  170. SEGACT MLRECP, MLRECV
  171. DO 10 I=1,(NSP-1)
  172. CP.GC(I)=MLRECP.PROG(I)
  173. CV.GC(I)=MLRECV.PROG(I)
  174. 10 CONTINUE
  175. CP.GC(NSP)=MLRECP.PROG(NSP)
  176. CV.GC(NSP)=MLRECV.PROG(NSP)
  177. C----------------------------
  178. C Variables au centre
  179. C----------------------------
  180. RC=MPRC.VPOCHA(NLC,1)
  181. PC=MPPC.VPOCHA(NLC,1)
  182. UXC=MPVC.VPOCHA(NLC,1)
  183. UYC=MPVC.VPOCHA(NLC,2)
  184. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  185. SEGINI YC
  186. SEGACT MPYN
  187. DO 100 I=1,(NSP-1)
  188. YC.YET(I)=MPYN.VPOCHA(NLC,I)
  189. 100 CONTINUE
  190. KAC=MPKAC.VPOCHA(NLC,1)
  191. EPSC=MPEPSC.VPOCHA(NLC,1)
  192. C----------------------------
  193. C Variables à la face
  194. C----------------------------
  195. RF=MPLIM.VPOCHA(NLCB,1)
  196. UXF=MPLIM.VPOCHA(NLCB,2)
  197. UYF=MPLIM.VPOCHA(NLCB,3)
  198. IF(IDIM.EQ.3)UZF=MPLIM.VPOCHA(NLCB,4)
  199. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  200. SEGINI YF
  201. DO 101 I=1,(NSP-1)
  202. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  203. 101 CONTINUE
  204. KAF=MPLIM.VPOCHA(NLCB,IDIM+NSP+2)
  205. EPSF=MPLIM.VPOCHA(NLCB,IDIM+NSP+3)
  206. c-------------------------------------------------------------
  207. c Computing GAMMA at the cell-center
  208. c-------------------------------------------------------------
  209. top=0.0D0
  210. bot=0.0D0
  211. do 102 i=1,(nsp-1)
  212. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  213. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  214. 102 continue
  215. top=cp.gc(nsp)+top
  216. bot=cv.gc(nsp)+bot
  217. GAMC=top/bot
  218. c-------------------------------------------------------------
  219. c Computing GAMMA at the face-center
  220. c-------------------------------------------------------------
  221. top=0.0D0
  222. bot=0.0D0
  223. do 103 i=1,(nsp-1)
  224. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  225. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  226. 103 continue
  227. top=cp.gc(nsp)+top
  228. bot=cv.gc(nsp)+bot
  229. GAMF=top/bot
  230. C---------------------------------------
  231. C******* On calcule UN, UT, UT2, ASON, S
  232. C---------------------------------------
  233. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  234. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  235. UTF=(UXF*CTX)+(UYF*CTY)+(UZF*CTZ)
  236. UT2F=(UXF*CT2X)+(UYF*CT2Y)+(UZF*CT2Z)
  237. C----------------------------------
  238. ASONC=(GAMC*PC/RC)**0.5D0
  239. ASONF=(GAMF*PF/RF)**0.5D0
  240. C
  241. SF=PF/(RF**GAMF)
  242. C-----------------------------------------------
  243. C******* Densite, vitesse, pression sur le bord
  244. C-----------------------------------------------
  245. G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  246. G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  247. UN=0.5D0*(G1+G3)
  248. ASON2=(0.5D0*(G3-G1))
  249. ASON2=ASON2*(GAMF-1.0D0)/2.0D0
  250. ASON2=ASON2*ASON2
  251. S=SF
  252. UT=UTF
  253. UT2=UT2F
  254. RHO=ASON2/(GAMF*S)
  255. RHO=RHO**(1.0D0/(GAMF-1.0D0))
  256. P=RHO*ASON2/GAMF
  257. UX=(UN*CNX)+(UT*CTX)+(UT2*CT2X)
  258. UY=(UN*CNY)+(UT*CTY)+(UT2*CT2Y)
  259. UZ=(UN*CNZ)+(UT*CTZ)+(UT2*CT2Z)
  260. C----------------------------------------
  261. MPRLI.VPOCHA(NLCB,1)=RHO
  262. MPRLI.VPOCHA(NLCB,2)=UX
  263. MPRLI.VPOCHA(NLCB,3)=UY
  264. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZ
  265. MPRLI.VPOCHA(NLCB,IDIM+2)=P
  266. do 104 i=1,(nsp-1)
  267. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  268. 104 continue
  269. MPRLI.VPOCHA(NLCB,IDIM+NSP+2)=KAF
  270. MPRLI.VPOCHA(NLCB,IDIM+NSP+3)=EPSF
  271. C-------------------------------------------------------
  272. C******* Residuum (son SPG a le meme ordre que MELEFC)
  273. C-------------------------------------------------------
  274. MPRES.VPOCHA(IFAC,1)=RHO*UN*SURF/VOLU
  275. MPRES.VPOCHA(IFAC,2)=(RHO*UN*UX+(P*CNX))*SURF/VOLU
  276. MPRES.VPOCHA(IFAC,3)=(RHO*UN*UY+(P*CNY))*SURF/VOLU
  277. IF(IDIM.EQ.3)
  278. & MPRES.VPOCHA(IFAC,4)=(RHO*UN*UZ+(P*CNZ))*SURF/VOLU
  279. MPRES.VPOCHA(IFAC,IDIM+2)=((UN*GAMF*P/(GAMF-1.0D0)) +
  280. & (0.5D0*RHO*UN*(UN*UN+UT*UT+UT2*UT2)))*SURF/VOLU
  281. do 105 i=1,(nsp-1)
  282. MPRES.VPOCHA(IFAC,IDIM+2+I)=RHO*YF.YET(I)*UN*SURF/VOLU
  283. 105 continue
  284. MPRES.VPOCHA(IFAC,IDIM+NSP+2)=RHO*KAF*UN*SURF/VOLU
  285. MPRES.VPOCHA(IFAC,IDIM+NSP+3)=RHO*EPSF*UN*SURF/VOLU
  286. 1 CONTINUE
  287. C
  288. SEGDES MELEFC
  289. C
  290. SEGDES MLEMC
  291. SEGDES MLEMCB
  292. SEGDES MLEMF
  293. C
  294. SEGDES MPNORM
  295. SEGDES MPVOL
  296. SEGDES MPSURF
  297. SEGDES MPRC
  298. SEGDES MPPC
  299. SEGDES MPVC
  300. SEGDES MPYN
  301. SEGDES MPKAC
  302. SEGDES MPEPSC
  303. SEGDES MPLIM
  304. SEGDES MPRES
  305. SEGDES MPRLI
  306. SEGDES MLRECP
  307. SEGDES MLRECV
  308. SEGDES YC
  309. SEGDES YF
  310. C
  311. 9999 CONTINUE
  312. RETURN
  313. END
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  

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