Télécharger cli221.eso

Retour à la liste

Numérotation des lignes :

cli221
  1. C CLI221 SOURCE OF166741 24/12/13 21:15:30 12097
  2. SUBROUTINE CLI221(NSP,MELEMF,MELEMC,MELECB,MELEFC,INORM,ICHPVO,
  3. & ICHPSU,LRECP,LRECV,IROC,IVITC,IPC,IYN,ICHLIM,ICHRES,ICHRLI)
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : CLI221
  9. C
  10. C DESCRIPTION : Subroutine appellée par CLIM22
  11. C calcul de RESIDU et CLIM at the board
  12. C OPTION: 'INRI' 2D
  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
  20. C APPELES (Calcul) :
  21. C
  22. C************************************************************************
  23. C
  24. C HISTORIQUE (Anomalies et modifications éventuelles)
  25. C
  26. C HISTORIQUE :
  27. C
  28. C************************************************************************
  29. C
  30. IMPLICIT INTEGER(I-N)
  31.  
  32. -INC PPARAM
  33. -INC CCOPTIO
  34. -INC SMLMOTS
  35. -INC SMELEME
  36. POINTEUR MELEFC.MELEME
  37. -INC SMLENTI
  38. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  39. -INC SMCHPOI
  40. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  41. & MPVC.MPOVAL, MPPC.MPOVAL, MPYN.MPOVAL, MPLIM.MPOVAL,
  42. & MPRES.MPOVAL, MPRLI.MPOVAL
  43. C----------------------------------------
  44. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  45. & ,IYN,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC
  46. & ,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,I,NSP
  47. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ,CTX,CTY,CTZ
  48. & ,CT2X,CT2Y,CT2Z,RF,PF,UXF,UYF,UZF,TOP,BOT
  49. & ,UNC,UNF,UTF,UT2F,SF,ASONC,ASONF,GAMF
  50. & ,G1,G3,ASON2,S,UT,UT2,UN,RHO,P,UX,UY,UZ
  51. CHARACTER*(8) TYPE
  52. C------------------------------------------------------------
  53. -INC SMLREEL
  54. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  55. C-------------------------------------------------------
  56. C********** Les CP's and CV's ***********************
  57. C-------------------------------------------------------
  58. SEGMENT GCONST
  59. REAL*8 GC(NSP)
  60. ENDSEGMENT
  61. POINTEUR CP.GCONST, CV.GCONST
  62. C-------------------------------------------------------------
  63. C******* Les fractionines massiques **************************
  64. C-------------------------------------------------------------
  65. SEGMENT FRAMAS
  66. REAL*8 YET(NSP)
  67. ENDSEGMENT
  68. POINTEUR YC.FRAMAS, YF.FRAMAS
  69. C------------------------------------------------------
  70. C**** KRIPAD pour la correspondance global/local
  71. C------------------------------------------------------
  72. CALL KRIPAD(MELEMC,MLEMC)
  73. CALL KRIPAD(MELECB,MLEMCB)
  74. CALL KRIPAD(MELEMF,MLEMF)
  75. C------------------------------------------------------
  76. C**** CHPOINTs de la table DOMAINE
  77. C------------------------------------------------------
  78. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  79. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  80. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  81. C------------------------------------------------------
  82. C**** CHPOINTs des variables
  83. C------------------------------------------------------
  84. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  85. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  86. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  87. CALL LICHT(IYN,MPYN,TYPE,ICEL)
  88. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  89. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  90. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  91. C---------------------------------------------------------
  92. C**** Boucle sur le face pour le calcul des invariants de
  93. C Riemann et du flux
  94. C---------------------------------------------------------
  95. SEGACT MELEFC
  96. NFAC=MELEFC.NUM(/2)
  97. UZC=0.0D0
  98. UZF=0.0D0
  99. CNZ=0.0D0
  100. CTZ=0.0D0
  101. CT2X=0.0D0
  102. CT2Y=0.0D0
  103. CT2Z=0.0D0
  104. DO 1 IFAC=1,NFAC,1
  105. NGF=MELEFC.NUM(1,IFAC)
  106. NGC=MELEFC.NUM(2,IFAC)
  107. NLF=MLEMF.LECT(NGF)
  108. NLC=MLEMC.LECT(NGC)
  109. NLCB=MLEMCB.LECT(NGF)
  110. VOLU=MPVOL.VPOCHA(NLC,1)
  111. SURF=MPSURF.VPOCHA(NLF,1)
  112. C----------------------------------------------
  113. C In CASTEM les normales sont sortantes
  114. C----------------------------------------------
  115. CNX=-1*MPNORM.VPOCHA(NLF,1)
  116. CNY=-1*MPNORM.VPOCHA(NLF,2)
  117. IF(IDIM.EQ.2)THEN
  118. CTX=-1.0D0*CNY
  119. CTY=CNX
  120. ELSE
  121. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  122. CTX=-1*MPNORM.VPOCHA(NLF,4)
  123. CTY=-1*MPNORM.VPOCHA(NLF,5)
  124. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  125. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  126. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  127. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  128. ENDIF
  129. C----------------------------------------
  130. SEGINI CP, CV
  131. MLRECP = LRECP
  132. MLRECV = LRECV
  133. SEGACT MLRECP, MLRECV
  134. DO 10 I=1,(NSP-1)
  135. CP.GC(I)=MLRECP.PROG(I)
  136. CV.GC(I)=MLRECV.PROG(I)
  137. 10 CONTINUE
  138. CP.GC(NSP)=MLRECP.PROG(NSP)
  139. CV.GC(NSP)=MLRECV.PROG(NSP)
  140. C----------------------------
  141. C Variables au centre
  142. C----------------------------
  143. RC=MPRC.VPOCHA(NLC,1)
  144. PC=MPPC.VPOCHA(NLC,1)
  145. UXC=MPVC.VPOCHA(NLC,1)
  146. UYC=MPVC.VPOCHA(NLC,2)
  147. IF(IDIM.EQ.3)UZC=MPVC.VPOCHA(NLC,3)
  148. SEGINI YC
  149. SEGACT MPYN
  150. DO 100 I=1,(NSP-1)
  151. YC.YET(I)=MPYN.VPOCHA(NLC,I)
  152. 100 CONTINUE
  153. C----------------------------
  154. C Variables à la face
  155. C----------------------------
  156. RF=MPLIM.VPOCHA(NLCB,1)
  157. UXF=MPLIM.VPOCHA(NLCB,2)
  158. UYF=MPLIM.VPOCHA(NLCB,3)
  159. IF(IDIM.EQ.3)UZF=MPLIM.VPOCHA(NLCB,4)
  160. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  161. SEGINI YF
  162. DO 101 I=1,(NSP-1)
  163. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  164. 101 CONTINUE
  165. c-------------------------------------------------------------
  166. c Computing GAMMA at the cell-center
  167. c-------------------------------------------------------------
  168. top=0.0D0
  169. bot=0.0D0
  170. do 102 i=1,(nsp-1)
  171. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  172. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  173. 102 continue
  174. top=cp.gc(nsp)+top
  175. bot=cv.gc(nsp)+bot
  176. GAMC=top/bot
  177. c-------------------------------------------------------------
  178. c Computing GAMMA at the face-center
  179. c-------------------------------------------------------------
  180. top=0.0D0
  181. bot=0.0D0
  182. do 103 i=1,(nsp-1)
  183. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  184. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  185. 103 continue
  186. top=cp.gc(nsp)+top
  187. bot=cv.gc(nsp)+bot
  188. GAMF=top/bot
  189. C---------------------------------------
  190. C******* On calcule UN, UT, UT2, ASON, S
  191. C---------------------------------------
  192. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  193. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  194. UTF=(UXF*CTX)+(UYF*CTY)+(UZF*CTZ)
  195. UT2F=(UXF*CT2X)+(UYF*CT2Y)+(UZF*CT2Z)
  196. C----------------------------------
  197. ASONC=(GAMC*PC/RC)**0.5D0
  198. ASONF=(GAMF*PF/RF)**0.5D0
  199. C
  200. SF=PF/(RF**GAMF)
  201. C-----------------------------------------------
  202. C******* Densite, vitesse, pression sur le bord
  203. C-----------------------------------------------
  204. G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  205. G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  206. UN=0.5D0*(G1+G3)
  207. ASON2=(0.5D0*(G3-G1))
  208. ASON2=ASON2*(GAMF-1.0D0)/2.0D0
  209. ASON2=ASON2*ASON2
  210. S=SF
  211. UT=UTF
  212. UT2=UT2F
  213. RHO=ASON2/(GAMF*S)
  214. RHO=RHO**(1.0D0/(GAMF-1.0D0))
  215. P=RHO*ASON2/GAMF
  216. UX=(UN*CNX)+(UT*CTX)+(UT2*CT2X)
  217. UY=(UN*CNY)+(UT*CTY)+(UT2*CT2Y)
  218. UZ=(UN*CNZ)+(UT*CTZ)+(UT2*CT2Z)
  219. C----------------------------------------
  220. MPRLI.VPOCHA(NLCB,1)=RHO
  221. MPRLI.VPOCHA(NLCB,2)=UX
  222. MPRLI.VPOCHA(NLCB,3)=UY
  223. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZ
  224. MPRLI.VPOCHA(NLCB,IDIM+2)=P
  225. do 104 i=1,(nsp-1)
  226. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  227. 104 continue
  228. C-------------------------------------------------------
  229. C******* Residuum (son SPG a le meme ordre que MELEFC)
  230. C-------------------------------------------------------
  231. MPRES.VPOCHA(IFAC,1)=RHO*UN*SURF/VOLU
  232. MPRES.VPOCHA(IFAC,2)=(RHO*UN*UX+(P*CNX))*SURF/VOLU
  233. MPRES.VPOCHA(IFAC,3)=(RHO*UN*UY+(P*CNY))*SURF/VOLU
  234. IF(IDIM.EQ.3)
  235. & MPRES.VPOCHA(IFAC,4)=(RHO*UN*UZ+(P*CNZ))*SURF/VOLU
  236. MPRES.VPOCHA(IFAC,IDIM+2)=((UN*GAMF*P/(GAMF-1.0D0)) +
  237. & (0.5D0*RHO*UN*(UN*UN+UT*UT+UT2*UT2)))*SURF/VOLU
  238. do 105 i=1,(nsp-1)
  239. MPRES.VPOCHA(IFAC,IDIM+2+I)=RHO*YF.YET(I)*UN*SURF/VOLU
  240. 105 continue
  241. 1 CONTINUE
  242. C
  243. SEGDES MELEFC
  244. C
  245. SEGSUP MLEMC
  246. SEGSUP MLEMCB
  247. SEGSUP MLEMF
  248. C
  249. SEGDES MPNORM
  250. SEGDES MPVOL
  251. SEGDES MPSURF
  252. SEGDES MPRC
  253. SEGDES MPPC
  254. SEGDES MPVC
  255. SEGDES MPYN
  256. SEGDES MPLIM
  257. SEGDES MPRES
  258. SEGDES MPRLI
  259. SEGDES MLRECP
  260. SEGDES MLRECV
  261. SEGDES YC
  262. SEGDES YF
  263. C
  264. 9999 CONTINUE
  265. RETURN
  266. END
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  

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