Télécharger cl221t.eso

Retour à la liste

Numérotation des lignes :

cl221t
  1. C CL221T SOURCE CB215821 20/11/25 13:19:51 10792
  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. 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. & ,IYN,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC,IKAN,IEPSN
  93. & ,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,I,NSP
  94. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ,CTX,CTY,CTZ
  95. & ,CT2X,CT2Y,CT2Z,RF,PF,UXF,UYF,UZF,TOP,BOT
  96. & ,UNC,UNF,UTF,UT2F,SF,ASONC,ASONF,GAMF
  97. & ,G1,G3,ASON2,S,UT,UT2,UN,RHO,P,UX,UY,UZ
  98. & ,KAC,EPSC,KAF,EPSF
  99. CHARACTER*(8) TYPE
  100. C------------------------------------------------------------
  101. -INC SMLREEL
  102. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  103. C-------------------------------------------------------
  104. C********** Les CP's and CV's ***********************
  105. C-------------------------------------------------------
  106. SEGMENT GCONST
  107. REAL*8 GC(NSP)
  108. ENDSEGMENT
  109. POINTEUR CP.GCONST, CV.GCONST
  110. C-------------------------------------------------------------
  111. C******* Les fractionines massiques **************************
  112. C-------------------------------------------------------------
  113. SEGMENT FRAMAS
  114. REAL*8 YET(NSP)
  115. ENDSEGMENT
  116. POINTEUR YC.FRAMAS, YF.FRAMAS
  117. C------------------------------------------------------
  118. C**** KRIPAD pour la correspondance global/local
  119. C------------------------------------------------------
  120. CALL KRIPAD(MELEMC,MLEMC)
  121. CALL KRIPAD(MELECB,MLEMCB)
  122. CALL KRIPAD(MELEMF,MLEMF)
  123. C------------------------------------------------------
  124. C**** CHPOINTs de la table DOMAINE
  125. C------------------------------------------------------
  126. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  127. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  128. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  129. C------------------------------------------------------
  130. C**** CHPOINTs des variables
  131. C------------------------------------------------------
  132. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  133. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  134. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  135. CALL LICHT(IYN,MPYN,TYPE,ICEL)
  136. CALL LICHT(IKAN,MPKAC,TYPE,ICEL)
  137. CALL LICHT(IEPSN,MPEPSC,TYPE,ICEL)
  138. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  139. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  140. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  141. C---------------------------------------------------------
  142. C**** Boucle sur le face pour le calcul des invariants de
  143. C Riemann et du flux
  144. C---------------------------------------------------------
  145. SEGACT MELEFC
  146. NFAC=MELEFC.NUM(/2)
  147. UZC=0.0D0
  148. UZF=0.0D0
  149. CNZ=0.0D0
  150. CTZ=0.0D0
  151. CT2X=0.0D0
  152. CT2Y=0.0D0
  153. CT2Z=0.0D0
  154. DO 1 IFAC=1,NFAC,1
  155. NGF=MELEFC.NUM(1,IFAC)
  156. NGC=MELEFC.NUM(2,IFAC)
  157. NLF=MLEMF.LECT(NGF)
  158. NLC=MLEMC.LECT(NGC)
  159. NLCB=MLEMCB.LECT(NGF)
  160. VOLU=MPVOL.VPOCHA(NLC,1)
  161. SURF=MPSURF.VPOCHA(NLF,1)
  162. C----------------------------------------------
  163. C In CASTEM les normales sont sortantes
  164. C----------------------------------------------
  165. CNX=-1*MPNORM.VPOCHA(NLF,1)
  166. CNY=-1*MPNORM.VPOCHA(NLF,2)
  167. IF(IDIM.EQ.2)THEN
  168. CTX=-1.0D0*CNY
  169. CTY=CNX
  170. ELSE
  171. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  172. CTX=-1*MPNORM.VPOCHA(NLF,4)
  173. CTY=-1*MPNORM.VPOCHA(NLF,5)
  174. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  175. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  176. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  177. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  178. ENDIF
  179. C----------------------------------------
  180. SEGINI CP, CV
  181. MLRECP = LRECP
  182. MLRECV = LRECV
  183. SEGACT MLRECP, MLRECV
  184. DO 10 I=1,(NSP-1)
  185. CP.GC(I)=MLRECP.PROG(I)
  186. CV.GC(I)=MLRECV.PROG(I)
  187. 10 CONTINUE
  188. CP.GC(NSP)=MLRECP.PROG(NSP)
  189. CV.GC(NSP)=MLRECV.PROG(NSP)
  190. C----------------------------
  191. C Variables au centre
  192. C----------------------------
  193. RC=MPRC.VPOCHA(NLC,1)
  194. PC=MPPC.VPOCHA(NLC,1)
  195. UXC=MPVC.VPOCHA(NLC,1)
  196. UYC=MPVC.VPOCHA(NLC,2)
  197. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  198. SEGINI YC
  199. SEGACT MPYN
  200. DO 100 I=1,(NSP-1)
  201. YC.YET(I)=MPYN.VPOCHA(NLC,I)
  202. 100 CONTINUE
  203. KAC=MPKAC.VPOCHA(NLC,1)
  204. EPSC=MPEPSC.VPOCHA(NLC,1)
  205. C----------------------------
  206. C Variables à la face
  207. C----------------------------
  208. RF=MPLIM.VPOCHA(NLCB,1)
  209. UXF=MPLIM.VPOCHA(NLCB,2)
  210. UYF=MPLIM.VPOCHA(NLCB,3)
  211. IF(IDIM.EQ.3)UZF=MPLIM.VPOCHA(NLCB,4)
  212. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  213. SEGINI YF
  214. DO 101 I=1,(NSP-1)
  215. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  216. 101 CONTINUE
  217. KAF=MPLIM.VPOCHA(NLCB,IDIM+NSP+2)
  218. EPSF=MPLIM.VPOCHA(NLCB,IDIM+NSP+3)
  219. c-------------------------------------------------------------
  220. c Computing GAMMA at the cell-center
  221. c-------------------------------------------------------------
  222. top=0.0D0
  223. bot=0.0D0
  224. do 102 i=1,(nsp-1)
  225. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  226. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  227. 102 continue
  228. top=cp.gc(nsp)+top
  229. bot=cv.gc(nsp)+bot
  230. GAMC=top/bot
  231. c-------------------------------------------------------------
  232. c Computing GAMMA at the face-center
  233. c-------------------------------------------------------------
  234. top=0.0D0
  235. bot=0.0D0
  236. do 103 i=1,(nsp-1)
  237. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  238. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  239. 103 continue
  240. top=cp.gc(nsp)+top
  241. bot=cv.gc(nsp)+bot
  242. GAMF=top/bot
  243. C---------------------------------------
  244. C******* On calcule UN, UT, UT2, ASON, S
  245. C---------------------------------------
  246. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  247. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  248. UTF=(UXF*CTX)+(UYF*CTY)+(UZF*CTZ)
  249. UT2F=(UXF*CT2X)+(UYF*CT2Y)+(UZF*CT2Z)
  250. C----------------------------------
  251. ASONC=(GAMC*PC/RC)**0.5D0
  252. ASONF=(GAMF*PF/RF)**0.5D0
  253. C
  254. SF=PF/(RF**GAMF)
  255. C-----------------------------------------------
  256. C******* Densite, vitesse, pression sur le bord
  257. C-----------------------------------------------
  258. G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  259. G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  260. UN=0.5D0*(G1+G3)
  261. ASON2=(0.5D0*(G3-G1))
  262. ASON2=ASON2*(GAMF-1.0D0)/2.0D0
  263. ASON2=ASON2*ASON2
  264. S=SF
  265. UT=UTF
  266. UT2=UT2F
  267. RHO=ASON2/(GAMF*S)
  268. RHO=RHO**(1.0D0/(GAMF-1.0D0))
  269. P=RHO*ASON2/GAMF
  270. UX=(UN*CNX)+(UT*CTX)+(UT2*CT2X)
  271. UY=(UN*CNY)+(UT*CTY)+(UT2*CT2Y)
  272. UZ=(UN*CNZ)+(UT*CTZ)+(UT2*CT2Z)
  273. C----------------------------------------
  274. MPRLI.VPOCHA(NLCB,1)=RHO
  275. MPRLI.VPOCHA(NLCB,2)=UX
  276. MPRLI.VPOCHA(NLCB,3)=UY
  277. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZ
  278. MPRLI.VPOCHA(NLCB,IDIM+2)=P
  279. do 104 i=1,(nsp-1)
  280. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  281. 104 continue
  282. MPRLI.VPOCHA(NLCB,IDIM+NSP+2)=KAF
  283. MPRLI.VPOCHA(NLCB,IDIM+NSP+3)=EPSF
  284. C-------------------------------------------------------
  285. C******* Residuum (son SPG a le meme ordre que MELEFC)
  286. C-------------------------------------------------------
  287. MPRES.VPOCHA(IFAC,1)=RHO*UN*SURF/VOLU
  288. MPRES.VPOCHA(IFAC,2)=(RHO*UN*UX+(P*CNX))*SURF/VOLU
  289. MPRES.VPOCHA(IFAC,3)=(RHO*UN*UY+(P*CNY))*SURF/VOLU
  290. IF(IDIM.EQ.3)
  291. & MPRES.VPOCHA(IFAC,4)=(RHO*UN*UZ+(P*CNZ))*SURF/VOLU
  292. MPRES.VPOCHA(IFAC,IDIM+2)=((UN*GAMF*P/(GAMF-1.0D0)) +
  293. & (0.5D0*RHO*UN*(UN*UN+UT*UT+UT2*UT2)))*SURF/VOLU
  294. do 105 i=1,(nsp-1)
  295. MPRES.VPOCHA(IFAC,IDIM+2+I)=RHO*YF.YET(I)*UN*SURF/VOLU
  296. 105 continue
  297. MPRES.VPOCHA(IFAC,IDIM+NSP+2)=RHO*KAF*UN*SURF/VOLU
  298. MPRES.VPOCHA(IFAC,IDIM+NSP+3)=RHO*EPSF*UN*SURF/VOLU
  299. 1 CONTINUE
  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 MPYN
  314. SEGDES MPKAC
  315. SEGDES MPEPSC
  316. SEGDES MPLIM
  317. SEGDES MPRES
  318. SEGDES MPRLI
  319. SEGDES MLRECP
  320. SEGDES MLRECV
  321. SEGDES YC
  322. SEGDES YF
  323. C
  324. 9999 CONTINUE
  325. RETURN
  326. END
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  

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