Télécharger cl281t.eso

Retour à la liste

Numérotation des lignes :

  1. C CL281T SOURCE CHAT 05/01/12 22:04:15 5004
  2. SUBROUTINE CL281T(NSP,MELEMF,MELEMC,MELECB,MELEFC,INORM,ICHPVO,
  3. & ICHPSU,LRECP,LRECV,ICHLIM,ICHRES,ICHRLI)
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : CL281T
  9. C
  10. C DESCRIPTION : Subroutine appellée par CLIM22
  11. C calcul de RESIDU et CLIM at the board
  12. C OPTION: 'INSS' 2D with turbulence (k-\eps)
  13. C "supersonic inlet"
  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 ICHLIM (type MCHPOI) : boundary conditions at the centers
  36. C of the boundary
  37. C-----------------------------------------------------
  38. C SORTIES: ICHRES (type MCHPOI) : the contribution to the residuum
  39. C due to the boundary conditions
  40. C given at the centres of the cells
  41. C next to the boundary
  42. C ICHRLI (type MCHPOI) : the values at the boundary faces
  43. C found by the procedure.
  44. C
  45. C APPELES (Calcul) :
  46. C
  47. C************************************************************************
  48. C
  49. C HISTORIQUE (Anomalies et modifications éventuelles)
  50. C
  51. C HISTORIQUE :
  52. C
  53. C************************************************************************
  54. C
  55. IMPLICIT INTEGER(I-N)
  56. -INC CCOPTIO
  57. -INC SMLMOTS
  58. -INC SMELEME
  59. POINTEUR MELEFC.MELEME, MELEMF.MELEME,MELEMC.MELEME,MELECB.MELEME
  60. -INC SMLENTI
  61. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  62. -INC SMCHPOI
  63. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL,
  64. & MPLIM.MPOVAL, MPRES.MPOVAL, MPRLI.MPOVAL
  65. C----------------------------------------
  66. C**** Variables de COOPTIO
  67. C----------------------------------------
  68. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  69. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  70. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  71. C & ,IECHO, IIMPI, IOSPI
  72. C & ,IDIM, IFICLE, IPREFI
  73. C & ,MCOORD
  74. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  75. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  76. C & ,NORINC,NORVAL,NORIND,NORVAD
  77. C & ,NUCROU, IPSAUV
  78. C
  79. INTEGER INORM,ICHPVO,ICHPSU
  80. & ,ICHLIM,ICHRES,ICHRLI,ICEL,NFAC,IFAC
  81. & ,NGF,NGC,NLF,NLC,NLCB,LRECP,LRECV,I,NSP
  82. REAL*8 VOLU,SURF,CNX,CNY,CNZ,CTX,CTY,CTZ
  83. & ,CT2X,CT2Y,CT2Z,RF,PF,UXF,UYF,UZF,TOP,BOT
  84. & ,UNF,UTF,UT2F,GAMF
  85. & ,UT,UT2,UN,RHO,P,UX,UY,UZ
  86. & ,KAF,EPSF
  87. CHARACTER*(8) TYPE
  88. C------------------------------------------------------------
  89. -INC SMLREEL
  90. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  91. C-------------------------------------------------------
  92. C********** Les CP's and CV's ***********************
  93. C-------------------------------------------------------
  94. SEGMENT GCONST
  95. REAL*8 GC(NSP)
  96. ENDSEGMENT
  97. POINTEUR CP.GCONST, CV.GCONST
  98. C-------------------------------------------------------------
  99. C******* Les fractionines massiques **************************
  100. C-------------------------------------------------------------
  101. SEGMENT FRAMAS
  102. REAL*8 YET(NSP)
  103. ENDSEGMENT
  104. POINTEUR YF.FRAMAS
  105. C------------------------------------------------------
  106. C**** KRIPAD pour la correspondance global/local
  107. C------------------------------------------------------
  108. CALL KRIPAD(MELEMC,MLEMC)
  109. CALL KRIPAD(MELECB,MLEMCB)
  110. CALL KRIPAD(MELEMF,MLEMF)
  111. C------------------------------------------------------
  112. C**** CHPOINTs de la table DOMAINE
  113. C------------------------------------------------------
  114. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  115. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  116. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  117. C------------------------------------------------------
  118. C**** CHPOINTs des variables
  119. C------------------------------------------------------
  120. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  121. CALL LICHT(ICHRES,MPRES,TYPE,ICEL)
  122. CALL LICHT(ICHRLI,MPRLI,TYPE,ICEL)
  123. C---------------------------------------------------------
  124. C**** Boucle sur le face pour le calcul des invariants de
  125. C Riemann et du flux
  126. C---------------------------------------------------------
  127. SEGACT MELEFC
  128. NFAC=MELEFC.NUM(/2)
  129. UZF=0.0D0
  130. CNZ=0.0D0
  131. CTZ=0.0D0
  132. CT2X=0.0D0
  133. CT2Y=0.0D0
  134. CT2Z=0.0D0
  135. DO 1 IFAC=1,NFAC,1
  136. NGF=MELEFC.NUM(1,IFAC)
  137. NGC=MELEFC.NUM(2,IFAC)
  138. NLF=MLEMF.LECT(NGF)
  139. NLC=MLEMC.LECT(NGC)
  140. NLCB=MLEMCB.LECT(NGF)
  141. VOLU=MPVOL.VPOCHA(NLC,1)
  142. SURF=MPSURF.VPOCHA(NLF,1)
  143. C----------------------------------------------
  144. C In CASTEM les normales sont sortantes
  145. C----------------------------------------------
  146. CNX=-1*MPNORM.VPOCHA(NLF,1)
  147. CNY=-1*MPNORM.VPOCHA(NLF,2)
  148. IF(IDIM.EQ.2)THEN
  149. CTX=-1.0D0*CNY
  150. CTY=CNX
  151. ELSE
  152. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  153. CTX=-1*MPNORM.VPOCHA(NLF,4)
  154. CTY=-1*MPNORM.VPOCHA(NLF,5)
  155. CTZ=-1*MPNORM.VPOCHA(NLF,6)
  156. CT2X=-1*MPNORM.VPOCHA(NLF,7)
  157. CT2Y=-1*MPNORM.VPOCHA(NLF,8)
  158. CT2Z=-1*MPNORM.VPOCHA(NLF,9)
  159. ENDIF
  160. C----------------------------------------
  161. SEGINI CP, CV
  162. MLRECP = LRECP
  163. MLRECV = LRECV
  164. SEGACT MLRECP, MLRECV
  165. DO 10 I=1,(NSP-1)
  166. CP.GC(I)=MLRECP.PROG(I)
  167. CV.GC(I)=MLRECV.PROG(I)
  168. 10 CONTINUE
  169. CP.GC(NSP)=MLRECP.PROG(NSP)
  170. CV.GC(NSP)=MLRECV.PROG(NSP)
  171. C----------------------------
  172. C Variables à la face
  173. C----------------------------
  174. RF=MPLIM.VPOCHA(NLCB,1)
  175. UXF=MPLIM.VPOCHA(NLCB,2)
  176. UYF=MPLIM.VPOCHA(NLCB,3)
  177. IF(IDIM.EQ.3)UZF=MPLIM.VPOCHA(NLCB,4)
  178. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  179. SEGINI YF
  180. DO 101 I=1,(NSP-1)
  181. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  182. 101 CONTINUE
  183. KAF=MPLIM.VPOCHA(NLCB,IDIM+NSP+2)
  184. EPSF=MPLIM.VPOCHA(NLCB,IDIM+NSP+3)
  185. c-------------------------------------------------------------
  186. c Computing GAMMA at the face-center
  187. c-------------------------------------------------------------
  188. top=0.0D0
  189. bot=0.0D0
  190. do 103 i=1,(nsp-1)
  191. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  192. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  193. 103 continue
  194. top=cp.gc(nsp)+top
  195. bot=cv.gc(nsp)+bot
  196. GAMF=top/bot
  197. C---------------------------------------
  198. C******* On calcule UN, UT, UT2, ASON, S
  199. C---------------------------------------
  200. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  201. UTF=(UXF*CTX)+(UYF*CTY)+(UZF*CTZ)
  202. UT2F=(UXF*CT2X)+(UYF*CT2Y)+(UZF*CT2Z)
  203. C-----------------------------------------------
  204. C******* Densite, vitesse, pression sur le bord
  205. C-----------------------------------------------
  206. UN = UNF
  207. UT=UTF
  208. UT2=UT2F
  209. RHO = RF
  210. P = PF
  211. UX=(UN*CNX)+(UT*CTX)+(UT2*CT2X)
  212. UY=(UN*CNY)+(UT*CTY)+(UT2*CT2Y)
  213. UZ=(UN*CNZ)+(UT*CTZ)+(UT2*CT2Z)
  214. C----------------------------------------
  215. MPRLI.VPOCHA(NLCB,1)=RHO
  216. MPRLI.VPOCHA(NLCB,2)=UX
  217. MPRLI.VPOCHA(NLCB,3)=UY
  218. IF(IDIM.EQ.3) MPRLI.VPOCHA(NLCB,4)=UZ
  219. MPRLI.VPOCHA(NLCB,IDIM+2)=P
  220. do 104 i=1,(nsp-1)
  221. MPRLI.VPOCHA(NLCB,IDIM+2+I)=YF.YET(I)
  222. 104 continue
  223. MPRLI.VPOCHA(NLCB,IDIM+NSP+2)=KAF
  224. MPRLI.VPOCHA(NLCB,IDIM+NSP+3)=EPSF
  225. C-------------------------------------------------------
  226. C******* Residuum (son SPG a le meme ordre que MELEFC)
  227. C-------------------------------------------------------
  228. MPRES.VPOCHA(IFAC,1)=RHO*UN*SURF/VOLU
  229. MPRES.VPOCHA(IFAC,2)=(RHO*UN*UX+(P*CNX))*SURF/VOLU
  230. MPRES.VPOCHA(IFAC,3)=(RHO*UN*UY+(P*CNY))*SURF/VOLU
  231. IF(IDIM.EQ.3)
  232. & MPRES.VPOCHA(IFAC,4)=(RHO*UN*UZ+(P*CNZ))*SURF/VOLU
  233. MPRES.VPOCHA(IFAC,IDIM+2)=((UN*GAMF*P/(GAMF-1.0D0)) +
  234. & (0.5D0*RHO*UN*(UN*UN+UT*UT+UT2*UT2)))*SURF/VOLU
  235. do 105 i=1,(nsp-1)
  236. MPRES.VPOCHA(IFAC,IDIM+2+I)=RHO*YF.YET(I)*UN*SURF/VOLU
  237. 105 continue
  238. MPRES.VPOCHA(IFAC,IDIM+NSP+2)=RHO*KAF*UN*SURF/VOLU
  239. MPRES.VPOCHA(IFAC,IDIM+NSP+3)=RHO*EPSF*UN*SURF/VOLU
  240. 1 CONTINUE
  241. C
  242. SEGDES MELEFC
  243. C
  244. SEGDES MLEMC
  245. SEGDES MLEMCB
  246. SEGDES MLEMF
  247. C
  248. SEGDES MPNORM
  249. SEGDES MPVOL
  250. SEGDES MPSURF
  251. SEGDES MPLIM
  252. SEGDES MPRES
  253. SEGDES MPRLI
  254. SEGDES MLRECP
  255. SEGDES MLRECV
  256. SEGDES YF
  257. C
  258. 9999 CONTINUE
  259. RETURN
  260. END
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  

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