Télécharger cl221t.eso

Retour à la liste

Numérotation des lignes :

  1. C CL221T SOURCE CHAT 05/01/12 22:04:07 5004
  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. -INC CCOPTIO
  66. -INC SMLMOTS
  67. -INC SMELEME
  68. POINTEUR MELEFC.MELEME, MELEMF.MELEME,MELEMC.MELEME,MELECB.MELEME
  69. -INC SMLENTI
  70. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  71. -INC SMCHPOI
  72. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  73. & MPVC.MPOVAL, MPPC.MPOVAL, MPYN.MPOVAL, MPLIM.MPOVAL,
  74. & MPRES.MPOVAL, MPRLI.MPOVAL, MPKAC.MPOVAL,MPEPSC.MPOVAL
  75. C----------------------------------------
  76. C**** Variables de COOPTIO
  77. C----------------------------------------
  78. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  79. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  80. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  81. C & ,IECHO, IIMPI, IOSPI
  82. C & ,IDIM, IFICLE, IPREFI
  83. C & ,MCOORD
  84. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  85. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  86. C & ,NORINC,NORVAL,NORIND,NORVAD
  87. C & ,NUCROU, IPSAUV
  88. C
  89. INTEGER INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  90. & ,IYN,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC,IKAN,IEPSN
  91. & ,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,I,NSP
  92. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ,CTX,CTY,CTZ
  93. & ,CT2X,CT2Y,CT2Z,RF,PF,UXF,UYF,UZF,TOP,BOT
  94. & ,UNC,UNF,UTF,UT2F,SF,ASONC,ASONF,GAMF
  95. & ,G1,G3,ASON2,S,UT,UT2,UN,RHO,P,UX,UY,UZ
  96. & ,KAC,EPSC,KAF,EPSF
  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, YF.FRAMAS
  115. C------------------------------------------------------
  116. C**** KRIPAD pour la correspondance global/local
  117. C------------------------------------------------------
  118. CALL KRIPAD(MELEMC,MLEMC)
  119. CALL KRIPAD(MELECB,MLEMCB)
  120. CALL KRIPAD(MELEMF,MLEMF)
  121. C------------------------------------------------------
  122. C**** CHPOINTs de la table DOMAINE
  123. C------------------------------------------------------
  124. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  125. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  126. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  127. C------------------------------------------------------
  128. C**** CHPOINTs des variables
  129. C------------------------------------------------------
  130. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  131. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  132. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  133. CALL LICHT(IYN,MPYN,TYPE,ICEL)
  134. CALL LICHT(IKAN,MPKAC,TYPE,ICEL)
  135. CALL LICHT(IEPSN,MPEPSC,TYPE,ICEL)
  136. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  137. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  138. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  139. C---------------------------------------------------------
  140. C**** Boucle sur le face pour le calcul des invariants de
  141. C Riemann et du flux
  142. C---------------------------------------------------------
  143. SEGACT MELEFC
  144. NFAC=MELEFC.NUM(/2)
  145. UZC=0.0D0
  146. UZF=0.0D0
  147. CNZ=0.0D0
  148. CTZ=0.0D0
  149. CT2X=0.0D0
  150. CT2Y=0.0D0
  151. CT2Z=0.0D0
  152. DO 1 IFAC=1,NFAC,1
  153. NGF=MELEFC.NUM(1,IFAC)
  154. NGC=MELEFC.NUM(2,IFAC)
  155. NLF=MLEMF.LECT(NGF)
  156. NLC=MLEMC.LECT(NGC)
  157. NLCB=MLEMCB.LECT(NGF)
  158. VOLU=MPVOL.VPOCHA(NLC,1)
  159. SURF=MPSURF.VPOCHA(NLF,1)
  160. C----------------------------------------------
  161. C In CASTEM les normales sont sortantes
  162. C----------------------------------------------
  163. CNX=-1*MPNORM.VPOCHA(NLF,1)
  164. CNY=-1*MPNORM.VPOCHA(NLF,2)
  165. IF(IDIM.EQ.2)THEN
  166. CTX=-1.0D0*CNY
  167. CTY=CNX
  168. ELSE
  169. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  170. CTX=-1*MPNORM.VPOCHA(NLF,4)
  171. CTY=-1*MPNORM.VPOCHA(NLF,5)
  172. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  173. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  174. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  175. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  176. ENDIF
  177. C----------------------------------------
  178. SEGINI CP, CV
  179. MLRECP = LRECP
  180. MLRECV = LRECV
  181. SEGACT MLRECP, MLRECV
  182. DO 10 I=1,(NSP-1)
  183. CP.GC(I)=MLRECP.PROG(I)
  184. CV.GC(I)=MLRECV.PROG(I)
  185. 10 CONTINUE
  186. CP.GC(NSP)=MLRECP.PROG(NSP)
  187. CV.GC(NSP)=MLRECV.PROG(NSP)
  188. C----------------------------
  189. C Variables au centre
  190. C----------------------------
  191. RC=MPRC.VPOCHA(NLC,1)
  192. PC=MPPC.VPOCHA(NLC,1)
  193. UXC=MPVC.VPOCHA(NLC,1)
  194. UYC=MPVC.VPOCHA(NLC,2)
  195. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  196. SEGINI YC
  197. SEGACT MPYN
  198. DO 100 I=1,(NSP-1)
  199. YC.YET(I)=MPYN.VPOCHA(NLC,I)
  200. 100 CONTINUE
  201. KAC=MPKAC.VPOCHA(NLC,1)
  202. EPSC=MPEPSC.VPOCHA(NLC,1)
  203. C----------------------------
  204. C Variables à la face
  205. C----------------------------
  206. RF=MPLIM.VPOCHA(NLCB,1)
  207. UXF=MPLIM.VPOCHA(NLCB,2)
  208. UYF=MPLIM.VPOCHA(NLCB,3)
  209. IF(IDIM.EQ.3)UZF=MPLIM.VPOCHA(NLCB,4)
  210. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  211. SEGINI YF
  212. DO 101 I=1,(NSP-1)
  213. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  214. 101 CONTINUE
  215. KAF=MPLIM.VPOCHA(NLCB,IDIM+NSP+2)
  216. EPSF=MPLIM.VPOCHA(NLCB,IDIM+NSP+3)
  217. c-------------------------------------------------------------
  218. c Computing GAMMA at the cell-center
  219. c-------------------------------------------------------------
  220. top=0.0D0
  221. bot=0.0D0
  222. do 102 i=1,(nsp-1)
  223. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  224. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  225. 102 continue
  226. top=cp.gc(nsp)+top
  227. bot=cv.gc(nsp)+bot
  228. GAMC=top/bot
  229. c-------------------------------------------------------------
  230. c Computing GAMMA at the face-center
  231. c-------------------------------------------------------------
  232. top=0.0D0
  233. bot=0.0D0
  234. do 103 i=1,(nsp-1)
  235. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  236. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  237. 103 continue
  238. top=cp.gc(nsp)+top
  239. bot=cv.gc(nsp)+bot
  240. GAMF=top/bot
  241. C---------------------------------------
  242. C******* On calcule UN, UT, UT2, ASON, S
  243. C---------------------------------------
  244. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  245. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  246. UTF=(UXF*CTX)+(UYF*CTY)+(UZF*CTZ)
  247. UT2F=(UXF*CT2X)+(UYF*CT2Y)+(UZF*CT2Z)
  248. C----------------------------------
  249. ASONC=(GAMC*PC/RC)**0.5D0
  250. ASONF=(GAMF*PF/RF)**0.5D0
  251. C
  252. SF=PF/(RF**GAMF)
  253. C-----------------------------------------------
  254. C******* Densite, vitesse, pression sur le bord
  255. C-----------------------------------------------
  256. G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  257. G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  258. UN=0.5D0*(G1+G3)
  259. ASON2=(0.5D0*(G3-G1))
  260. ASON2=ASON2*(GAMF-1.0D0)/2.0D0
  261. ASON2=ASON2*ASON2
  262. S=SF
  263. UT=UTF
  264. UT2=UT2F
  265. RHO=ASON2/(GAMF*S)
  266. RHO=RHO**(1.0D0/(GAMF-1.0D0))
  267. P=RHO*ASON2/GAMF
  268. UX=(UN*CNX)+(UT*CTX)+(UT2*CT2X)
  269. UY=(UN*CNY)+(UT*CTY)+(UT2*CT2Y)
  270. UZ=(UN*CNZ)+(UT*CTZ)+(UT2*CT2Z)
  271. C----------------------------------------
  272. MPRLI.VPOCHA(NLCB,1)=RHO
  273. MPRLI.VPOCHA(NLCB,2)=UX
  274. MPRLI.VPOCHA(NLCB,3)=UY
  275. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZ
  276. MPRLI.VPOCHA(NLCB,IDIM+2)=P
  277. do 104 i=1,(nsp-1)
  278. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  279. 104 continue
  280. MPRLI.VPOCHA(NLCB,IDIM+NSP+2)=KAF
  281. MPRLI.VPOCHA(NLCB,IDIM+NSP+3)=EPSF
  282. C-------------------------------------------------------
  283. C******* Residuum (son SPG a le meme ordre que MELEFC)
  284. C-------------------------------------------------------
  285. MPRES.VPOCHA(IFAC,1)=RHO*UN*SURF/VOLU
  286. MPRES.VPOCHA(IFAC,2)=(RHO*UN*UX+(P*CNX))*SURF/VOLU
  287. MPRES.VPOCHA(IFAC,3)=(RHO*UN*UY+(P*CNY))*SURF/VOLU
  288. IF(IDIM.EQ.3)
  289. & MPRES.VPOCHA(IFAC,4)=(RHO*UN*UZ+(P*CNZ))*SURF/VOLU
  290. MPRES.VPOCHA(IFAC,IDIM+2)=((UN*GAMF*P/(GAMF-1.0D0)) +
  291. & (0.5D0*RHO*UN*(UN*UN+UT*UT+UT2*UT2)))*SURF/VOLU
  292. do 105 i=1,(nsp-1)
  293. MPRES.VPOCHA(IFAC,IDIM+2+I)=RHO*YF.YET(I)*UN*SURF/VOLU
  294. 105 continue
  295. MPRES.VPOCHA(IFAC,IDIM+NSP+2)=RHO*KAF*UN*SURF/VOLU
  296. MPRES.VPOCHA(IFAC,IDIM+NSP+3)=RHO*EPSF*UN*SURF/VOLU
  297. 1 CONTINUE
  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 MPYN
  312. SEGDES MPKAC
  313. SEGDES MPEPSC
  314. SEGDES MPLIM
  315. SEGDES MPRES
  316. SEGDES MPRLI
  317. SEGDES MLRECP
  318. SEGDES MLRECV
  319. SEGDES YC
  320. SEGDES YF
  321. C
  322. 9999 CONTINUE
  323. RETURN
  324. END
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  

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