Télécharger fimtr2.eso

Retour à la liste

Numérotation des lignes :

  1. C FIMTR2 SOURCE CHAT 05/01/13 00:00:58 5004
  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. -INC CCOPTIO
  82. -INC SMELEME
  83. -INC SMCHPOI
  84. POINTEUR MPRO.MPOVAL, MPROV.MPOVAL, MPGRAV.MPOVAL,
  85. & MPSOUR.MPOVAL, MPTTT.MPOVAL, MPGRDR.MPOVAL
  86. c--------------------------------------------------
  87. SEGMENT SORGAS
  88. REAL*8 H0K(NESP+1)
  89. POINTEUR SOUR(NESP+1).MCHPOI
  90. ENDSEGMENT
  91. SEGMENT LIPOV2
  92. POINTEUR MPSS(0).MPOVAL
  93. ENDSEGMENT
  94. c--------------------------------------------------
  95. INTEGER ILIINC,ICEN,IRKA,IREPS,IRES,N1,NLCE,NSPEC
  96. & ,IGEOM,NESP,IGRADR,IGRADV,IMUT,IESP
  97. CHARACTER*8 TYPE
  98. REAL*8 REPS, RKA, CE1, CE2, VISTUR
  99. REAL*8 DUDX,DUDY,DUDZ,DVDX,DVDY,DVDZ,DWDX,DWDY,DWDZ
  100. REAL*8 TDIV,S11,S12,S13,S22,S23,S33,STOT,PRTOT
  101. REAL*8 RO,RVX,RVY,RVZ,GX,GY,GZ,SSPEC
  102. REAL*8 ROX,ROY,ROZ,SIGT,GRT,GREPS
  103. REAL*8 TSIGT,TCEPS1,TCEPS2
  104. REAL*8 SUMREA, STST, VTEM
  105. C--------------------------------------------------
  106. CE1 = TCEPS1
  107. CE2 = TCEPS2
  108. SIGT = TSIGT
  109. C--------------------
  110. IPT1 = ICEN
  111. SEGACT IPT1
  112. N1 = IPT1.NUM(/2)
  113. SEGDES IPT1
  114. C
  115. C**** Creation de CHPOINT IRES
  116. C
  117. TYPE=' '
  118. CALL KRCHP1(TYPE,ICEN,IRES,ILIINC)
  119. C
  120. C
  121. C**** Lecture de MPOVALs
  122. C
  123. CALL LICHT(IRO,MPRO,TYPE,IGEOM)
  124. CALL LICHT(IROVIT,MPROV,TYPE,IGEOM)
  125. CALL LICHT(IGRAV,MPGRAV,TYPE,IGEOM)
  126. C--------------------------------------
  127. CALL LICHT(IRKA,MPOVA1,TYPE,IGEOM)
  128. CALL LICHT(IREPS,MPOVA2,TYPE,IGEOM)
  129. CALL LICHT(IGRADR,MPGRDR,TYPE,IGEOM)
  130. CALL LICHT(IGRADV,MPOVA3,TYPE,IGEOM)
  131. CALL LICHT(IMUT,MPOVA5,TYPE,IGEOM)
  132. CALL LICHT(IRES,MPOVA4,TYPE,IGEOM)
  133. C
  134. C**** LICHT active les MPOVALs en *MOD
  135. C
  136. C i.e.
  137. C
  138. C SEGACT MPOVA1*MOD
  139. C SEGACT MPOVA2*MOD
  140. C SEGACT MPOVA3*MOD
  141. C SEGACT MPOVA4*MOD
  142. C
  143. C
  144. C---------------------------------------------
  145. SEGINI LIPOV2
  146. SEGACT SORGAS
  147. NESP=SORGAS.SOUR(/1)-1
  148. DO IESP=1,NESP
  149. ICSOUR=SORGAS.SOUR(IESP)
  150. CALL LICHT(ICSOUR,MPSOUR,TYPE,IGEOM)
  151. LIPOV2.MPSS(**)=MPSOUR
  152. ENDDO
  153. C---------------------------------------------
  154. DO NLCE = 1, N1, 1
  155. C
  156. C******* Les differents variables a chaque centre
  157. C
  158. c-----------------------------------
  159. DUDZ = 0.0D0
  160. DVDZ = 0.0D0
  161. DWDX = 0.0D0
  162. DWDY = 0.0D0
  163. DWDZ = 0.0D0
  164. S13 = 0.0D0
  165. S23 = 0.0D0
  166. S33 = 0.0D0
  167. RVZ = 0.0D0
  168. GZ = 0.0D0
  169. ROZ = 0.0D0
  170. IF(IDIM .EQ. 2) THEN
  171. DUDX = MPOVA3.VPOCHA(NLCE,1)
  172. DUDY = MPOVA3.VPOCHA(NLCE,2)
  173. DVDX = MPOVA3.VPOCHA(NLCE,3)
  174. DVDY = MPOVA3.VPOCHA(NLCE,4)
  175. TDIV=2.0D0*(DUDX+DVDY)/3.0D0
  176. S11 = 2.0D0*DUDX-TDIV
  177. S12 = DUDY+DVDX
  178. S22 = 2.0D0*DVDY-TDIV
  179. STOT=(S11*DUDX)+(S12*S12)+(S22*DVDY)
  180. ELSE
  181. DUDX = MPOVA3.VPOCHA(NLCE,1)
  182. DUDY = MPOVA3.VPOCHA(NLCE,2)
  183. DUDZ = MPOVA3.VPOCHA(NLCE,3)
  184. DVDX = MPOVA3.VPOCHA(NLCE,4)
  185. DVDY = MPOVA3.VPOCHA(NLCE,5)
  186. DVDZ = MPOVA3.VPOCHA(NLCE,6)
  187. DWDX = MPOVA3.VPOCHA(NLCE,7)
  188. DWDY = MPOVA3.VPOCHA(NLCE,8)
  189. DWDZ = MPOVA3.VPOCHA(NLCE,9)
  190. TDIV=2.0D0*(DUDX+DVDY+DWDZ)/3.0D0
  191. S11 = 2.0D0*DUDX-TDIV
  192. S12 = DUDY+DVDX
  193. S13 = DUDZ+DWDX
  194. S22 = 2.0D0*DVDY-TDIV
  195. S23 = DVDZ+DWDY
  196. S33 = 2.0D0*DWDZ-TDIV
  197. STOT=(S11*DUDX)+(S12*S12)+(S13*S13)+
  198. & (S22*DVDY)+(S23*S23)+(S33*DWDZ)
  199. ENDIF
  200. VISTUR = MPOVA5.VPOCHA(NLCE,1)
  201. *------ Creating the production term
  202. RO = MPRO.VPOCHA(NLCE,1)
  203. RVX = MPROV.VPOCHA(NLCE,1)
  204. RVY = MPROV.VPOCHA(NLCE,2)
  205. GX = MPGRAV.VPOCHA(NLCE,1)
  206. GY = MPGRAV.VPOCHA(NLCE,2)
  207. IF(IDIM .EQ. 3)THEN
  208. RVZ = MPROV.VPOCHA(NLCE,3)
  209. GZ = MPGRAV.VPOCHA(NLCE,3)
  210. ENDIF
  211. c-----------------------------------
  212. RKA = MPOVA1.VPOCHA(NLCE,1)
  213. REPS = MPOVA2.VPOCHA(NLCE,1)
  214. PRTOT=VISTUR*STOT-(TDIV*RKA)
  215. *---- turbulent gravity term ----------
  216. ROX = MPGRDR.VPOCHA(NLCE,1)
  217. ROY = MPGRDR.VPOCHA(NLCE,2)
  218. IF(IDIM .EQ. 3)THEN
  219. ROZ = MPGRDR.VPOCHA(NLCE,3)
  220. ENDIF
  221. GRT=(-1.0D0)*VISTUR*(ROX*GX+ROY*GY+ROZ*GZ)/(SIGT*RO)
  222. IF(GRT .LE. 0.0D0) THEN
  223. GREPS = 0.0D0
  224. ELSE
  225. GREPS = CE1*GRT*REPS/RKA
  226. ENDIF
  227. *------------------------------------
  228. MPOVA4.VPOCHA(NLCE,1) = 0.0D0
  229. MPOVA4.VPOCHA(NLCE,2) = RO*GX
  230. MPOVA4.VPOCHA(NLCE,3) = RO*GY
  231. IF(IDIM .EQ. 3)THEN
  232. MPOVA4.VPOCHA(NLCE,4) = RO*GZ
  233. ENDIF
  234. c-----------------------------------
  235. SUMREA = 0.0D0
  236. STST = 0.0D0
  237. DO NSPEC = 1,NESP
  238. MPTTT = LIPOV2.MPSS(NSPEC)
  239. SSPEC = MPTTT.VPOCHA(NLCE,1)
  240. VTEM = SORGAS.H0K(NSPEC)
  241. STST = STST + SSPEC*VTEM
  242. SUMREA = SUMREA + SSPEC
  243. MPOVA4.VPOCHA(NLCE,IDIM+2+NSPEC)=SSPEC
  244. ENDDO
  245. VTEM = SORGAS.H0K(NESP+1)
  246. STST = STST - (VTEM*SUMREA)
  247. MPOVA4.VPOCHA(NLCE,IDIM+2) = (RVX*GX)+(RVY*GY)+(RVZ*GZ)-STST
  248. MPOVA4.VPOCHA(NLCE,IDIM+NESP+3)=(-1.0D0)*REPS+PRTOT+GRT
  249. MPOVA4.VPOCHA(NLCE,IDIM+NESP+4)=((-1.0D0)*CE2*REPS*REPS/RKA)
  250. & +(CE1*(REPS/RKA)*PRTOT)+GREPS
  251. ENDDO
  252. C
  253. SEGDES MPOVA1
  254. SEGDES MPOVA2
  255. SEGDES MPOVA3
  256. SEGDES MPOVA4
  257. SEGDES MPOVA5
  258. SEGDES MPGRDR
  259. SEGDES MPRO
  260. SEGDES MPROV
  261. SEGDES MPGRAV
  262. SEGDES MPSOUR
  263. SEGDES MPTTT
  264. SEGDES LIPOV2.MPSS(*)
  265. SEGDES SORGAS
  266. SEGSUP LIPOV2
  267. C
  268. RETURN
  269. END
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  

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