Télécharger cl281t.eso

Retour à la liste

Numérotation des lignes :

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

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