Télécharger fimtr2.eso

Retour à la liste

Numérotation des lignes :

fimtr2
  1. C FIMTR2 SOURCE CB215821 20/11/25 13:28:53 10792
  2. SUBROUTINE FIMTR2(SORGAS,ILIINC,ICEN,IRO,IROVIT,IGRAV,IRKA,
  3. & IREPS,IGRADR,IGRADV,IMUT,TSIGT,TCEPS1,TCEPS2,IRES)
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : FIMTR2
  9. C
  10. C DESCRIPTION : VOIR FIMTR1
  11. C
  12. C Discretisation of the source term
  13. C related to the gravity and k-\eps model
  14. C and the source terms of the equations
  15. C for species mass conservation
  16. C
  17. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec extensions CISI)
  18. C
  19. C AUTEUR : S. Kudriakov, DEN/DM2S/SFME/LTMF
  20. C
  21. C************************************************************************
  22. C
  23. C ENTREES :
  24. C SORGAS : pointer to the source terms
  25. C and the form. enthalpies of the species
  26. C
  27. C ILIINC : LISTMOTS, noms des inconnues
  28. C
  29. C ICEN : SPG geometrique
  30. C
  31. C IRO : CHPOINT, densité
  32. C
  33. C IROVIT : CHPOINT qdm
  34. C
  35. C IGRAV : CHPOINT gravité
  36. C
  37. C IRKA : CHPOINT density '*' k
  38. C
  39. C IREPS : CHPOINT density '*' \eps
  40. C
  41. C IGRADR : CHPOINT gradient of the density
  42. C
  43. C IGRADV : CHPOINT gradient of the velocity
  44. C
  45. C IMUT : CHPOINT turbulent viscosity
  46. C
  47. C TSIGT : REEL turbulent constant \sigma_t
  48. C
  49. C TCEPS1 : REEL turbulent constant C_{\eps 1}
  50. C
  51. C TCEPS2 : REEL turbulent constant C_{\eps 2}
  52. C
  53. C SORTIES : IRES : CHPOINT residu
  54. C
  55. C
  56. C************************************************************************
  57. C
  58. C HISTORIQUE (Anomalies et modifications éventuelles)
  59. C
  60. C HISTORIQUE : Créée le 3.12.03
  61. C
  62. C************************************************************************
  63. C
  64. C
  65. C**** Variables de COOPTIO
  66. C
  67. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  68. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  69. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  70. C & ,IECHO, IIMPI, IOSPI
  71. C & ,IDIM
  72. C & ,MCOORD
  73. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  74. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR, LTEXLU
  75. C & ,NORINC, NORVAL, NORIND, NORVAD
  76. C & ,NUCROU, IPSAUV, IFICLE, IPREFI
  77. C
  78. C**** Les variables
  79. C
  80. IMPLICIT INTEGER(I-N)
  81.  
  82. -INC PPARAM
  83. -INC CCOPTIO
  84. -INC SMELEME
  85. -INC SMCHPOI
  86. POINTEUR MPRO.MPOVAL, MPROV.MPOVAL, MPGRAV.MPOVAL,
  87. & MPSOUR.MPOVAL, MPTTT.MPOVAL, MPGRDR.MPOVAL
  88. c--------------------------------------------------
  89. SEGMENT SORGAS
  90. REAL*8 H0K(NESP+1)
  91. POINTEUR SOUR(NESP+1).MCHPOI
  92. ENDSEGMENT
  93. SEGMENT LIPOV2
  94. POINTEUR MPSS(0).MPOVAL
  95. ENDSEGMENT
  96. c--------------------------------------------------
  97. INTEGER ILIINC,ICEN,IRKA,IREPS,IRES,N1,NLCE,NSPEC
  98. & ,IGEOM,NESP,IGRADR,IGRADV,IMUT,IESP
  99. CHARACTER*8 TYPE
  100. REAL*8 REPS, RKA, CE1, CE2, VISTUR
  101. REAL*8 DUDX,DUDY,DUDZ,DVDX,DVDY,DVDZ,DWDX,DWDY,DWDZ
  102. REAL*8 TDIV,S11,S12,S13,S22,S23,S33,STOT,PRTOT
  103. REAL*8 RO,RVX,RVY,RVZ,GX,GY,GZ,SSPEC
  104. REAL*8 ROX,ROY,ROZ,SIGT,GRT,GREPS
  105. REAL*8 TSIGT,TCEPS1,TCEPS2
  106. REAL*8 SUMREA, STST, VTEM
  107. C--------------------------------------------------
  108. CE1 = TCEPS1
  109. CE2 = TCEPS2
  110. SIGT = TSIGT
  111. C--------------------
  112. IPT1 = ICEN
  113. SEGACT IPT1
  114. N1 = IPT1.NUM(/2)
  115. SEGDES IPT1
  116. C
  117. C**** Creation de CHPOINT IRES
  118. C
  119. TYPE=' '
  120. CALL KRCHP1(TYPE,ICEN,IRES,ILIINC)
  121. C
  122. C
  123. C**** Lecture de MPOVALs
  124. C
  125. CALL LICHT(IRO,MPRO,TYPE,IGEOM)
  126. CALL LICHT(IROVIT,MPROV,TYPE,IGEOM)
  127. CALL LICHT(IGRAV,MPGRAV,TYPE,IGEOM)
  128. C--------------------------------------
  129. CALL LICHT(IRKA,MPOVA1,TYPE,IGEOM)
  130. CALL LICHT(IREPS,MPOVA2,TYPE,IGEOM)
  131. CALL LICHT(IGRADR,MPGRDR,TYPE,IGEOM)
  132. CALL LICHT(IGRADV,MPOVA3,TYPE,IGEOM)
  133. CALL LICHT(IMUT,MPOVA5,TYPE,IGEOM)
  134. CALL LICHT(IRES,MPOVA4,TYPE,IGEOM)
  135. C
  136. C**** LICHT active les MPOVALs en *MOD
  137. C
  138. C i.e.
  139. C
  140. C SEGACT MPOVA1*MOD
  141. C SEGACT MPOVA2*MOD
  142. C SEGACT MPOVA3*MOD
  143. C SEGACT MPOVA4*MOD
  144. C
  145. C
  146. C---------------------------------------------
  147. SEGINI LIPOV2
  148. SEGACT SORGAS
  149. NESP=SORGAS.SOUR(/1)-1
  150. DO IESP=1,NESP
  151. ICSOUR=SORGAS.SOUR(IESP)
  152. CALL LICHT(ICSOUR,MPSOUR,TYPE,IGEOM)
  153. LIPOV2.MPSS(**)=MPSOUR
  154. ENDDO
  155. C---------------------------------------------
  156. DO NLCE = 1, N1, 1
  157. C
  158. C******* Les differents variables a chaque centre
  159. C
  160. c-----------------------------------
  161. DUDZ = 0.0D0
  162. DVDZ = 0.0D0
  163. DWDX = 0.0D0
  164. DWDY = 0.0D0
  165. DWDZ = 0.0D0
  166. S13 = 0.0D0
  167. S23 = 0.0D0
  168. S33 = 0.0D0
  169. RVZ = 0.0D0
  170. GZ = 0.0D0
  171. ROZ = 0.0D0
  172. IF(IDIM .EQ. 2) THEN
  173. DUDX = MPOVA3.VPOCHA(NLCE,1)
  174. DUDY = MPOVA3.VPOCHA(NLCE,2)
  175. DVDX = MPOVA3.VPOCHA(NLCE,3)
  176. DVDY = MPOVA3.VPOCHA(NLCE,4)
  177. TDIV=2.0D0*(DUDX+DVDY)/3.0D0
  178. S11 = 2.0D0*DUDX-TDIV
  179. S12 = DUDY+DVDX
  180. S22 = 2.0D0*DVDY-TDIV
  181. STOT=(S11*DUDX)+(S12*S12)+(S22*DVDY)
  182. ELSE
  183. DUDX = MPOVA3.VPOCHA(NLCE,1)
  184. DUDY = MPOVA3.VPOCHA(NLCE,2)
  185. DUDZ = MPOVA3.VPOCHA(NLCE,3)
  186. DVDX = MPOVA3.VPOCHA(NLCE,4)
  187. DVDY = MPOVA3.VPOCHA(NLCE,5)
  188. DVDZ = MPOVA3.VPOCHA(NLCE,6)
  189. DWDX = MPOVA3.VPOCHA(NLCE,7)
  190. DWDY = MPOVA3.VPOCHA(NLCE,8)
  191. DWDZ = MPOVA3.VPOCHA(NLCE,9)
  192. TDIV=2.0D0*(DUDX+DVDY+DWDZ)/3.0D0
  193. S11 = 2.0D0*DUDX-TDIV
  194. S12 = DUDY+DVDX
  195. S13 = DUDZ+DWDX
  196. S22 = 2.0D0*DVDY-TDIV
  197. S23 = DVDZ+DWDY
  198. S33 = 2.0D0*DWDZ-TDIV
  199. STOT=(S11*DUDX)+(S12*S12)+(S13*S13)+
  200. & (S22*DVDY)+(S23*S23)+(S33*DWDZ)
  201. ENDIF
  202. VISTUR = MPOVA5.VPOCHA(NLCE,1)
  203. *------ Creating the production term
  204. RO = MPRO.VPOCHA(NLCE,1)
  205. RVX = MPROV.VPOCHA(NLCE,1)
  206. RVY = MPROV.VPOCHA(NLCE,2)
  207. GX = MPGRAV.VPOCHA(NLCE,1)
  208. GY = MPGRAV.VPOCHA(NLCE,2)
  209. IF(IDIM .EQ. 3)THEN
  210. RVZ = MPROV.VPOCHA(NLCE,3)
  211. GZ = MPGRAV.VPOCHA(NLCE,3)
  212. ENDIF
  213. c-----------------------------------
  214. RKA = MPOVA1.VPOCHA(NLCE,1)
  215. REPS = MPOVA2.VPOCHA(NLCE,1)
  216. PRTOT=VISTUR*STOT-(TDIV*RKA)
  217. *---- turbulent gravity term ----------
  218. ROX = MPGRDR.VPOCHA(NLCE,1)
  219. ROY = MPGRDR.VPOCHA(NLCE,2)
  220. IF(IDIM .EQ. 3)THEN
  221. ROZ = MPGRDR.VPOCHA(NLCE,3)
  222. ENDIF
  223. GRT=(-1.0D0)*VISTUR*(ROX*GX+ROY*GY+ROZ*GZ)/(SIGT*RO)
  224. IF(GRT .LE. 0.0D0) THEN
  225. GREPS = 0.0D0
  226. ELSE
  227. GREPS = CE1*GRT*REPS/RKA
  228. ENDIF
  229. *------------------------------------
  230. MPOVA4.VPOCHA(NLCE,1) = 0.0D0
  231. MPOVA4.VPOCHA(NLCE,2) = RO*GX
  232. MPOVA4.VPOCHA(NLCE,3) = RO*GY
  233. IF(IDIM .EQ. 3)THEN
  234. MPOVA4.VPOCHA(NLCE,4) = RO*GZ
  235. ENDIF
  236. c-----------------------------------
  237. SUMREA = 0.0D0
  238. STST = 0.0D0
  239. DO NSPEC = 1,NESP
  240. MPTTT = LIPOV2.MPSS(NSPEC)
  241. SSPEC = MPTTT.VPOCHA(NLCE,1)
  242. VTEM = SORGAS.H0K(NSPEC)
  243. STST = STST + SSPEC*VTEM
  244. SUMREA = SUMREA + SSPEC
  245. MPOVA4.VPOCHA(NLCE,IDIM+2+NSPEC)=SSPEC
  246. ENDDO
  247. VTEM = SORGAS.H0K(NESP+1)
  248. STST = STST - (VTEM*SUMREA)
  249. MPOVA4.VPOCHA(NLCE,IDIM+2) = (RVX*GX)+(RVY*GY)+(RVZ*GZ)-STST
  250. MPOVA4.VPOCHA(NLCE,IDIM+NESP+3)=(-1.0D0)*REPS+PRTOT+GRT
  251. MPOVA4.VPOCHA(NLCE,IDIM+NESP+4)=((-1.0D0)*CE2*REPS*REPS/RKA)
  252. & +(CE1*(REPS/RKA)*PRTOT)+GREPS
  253. ENDDO
  254. C
  255. SEGDES MPOVA1
  256. SEGDES MPOVA2
  257. SEGDES MPOVA3
  258. SEGDES MPOVA4
  259. SEGDES MPOVA5
  260. SEGDES MPGRDR
  261. SEGDES MPRO
  262. SEGDES MPROV
  263. SEGDES MPGRAV
  264. SEGDES MPSOUR
  265. SEGDES MPTTT
  266. SEGDES LIPOV2.MPSS(*)
  267. SEGDES SORGAS
  268. SEGSUP LIPOV2
  269. C
  270. RETURN
  271. END
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  

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