Télécharger fimtr2.eso

Retour à la liste

Numérotation des lignes :

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

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