Télécharger cli222.eso

Retour à la liste

Numérotation des lignes :

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

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