Télécharger fap32f.eso

Retour à la liste

Numérotation des lignes :

fap32f
  1. C FAP32F SOURCE CB215821 16/04/21 21:16:46 8920
  2. SUBROUTINE fAP32F(INDMET,
  3. & alphaL, uvnL, uvtL, uvvL, ulnL, ultL, ulvL,
  4. & pL, TvL, TlL, rvL, rlL,
  5. & alphaR, uvnR, uvtR, uvvR, ulnR, ultR, ulvR,
  6. & pR, TvR, TlR, rvR, rlR,
  7. & F)
  8. C***********************************************************************
  9. C NOM : fAP32F
  10. C DESCRIPTION : Calculation of the Two phase AUSM+ flux
  11. C (3D two fluid model)
  12. C
  13. C LANGAGE : ESOPE
  14. C AUTEUR : José R. Garcia Cascales (CEA/DEN/DM2S/SFME/LTMF)
  15. C mél : fd1@semt2.smts.cea.fr
  16. C***********************************************************************
  17. C APPELES :
  18. C APPELES (E/S) :
  19. C inputs : primitive variable at left side
  20. C AL, UVNL, UVTL, UVVL, ULNL, ULTL, ULVL,
  21. C PL, TVL, TLL, RVG, RLG,
  22. C primitive variables at right side
  23. C AR, UVNR, UVTR, UVVR, ULNR, ULTR, ULVR,
  24. C PR, TVR, TLR, RVR, RLR
  25. C
  26. C output : F, 3D AUSM+ flux
  27. C***********************************************************************
  28. C SYNTAXE GIBIANE :
  29. C ENTREES :
  30. C ENTREES/SORTIES :
  31. C SORTIES :
  32. C CODE RETOUR (IRET) : = 0 si tout s'est bien passé
  33. C***********************************************************************
  34. C VERSION : v1, 18/02/2002, version initiale
  35. C***********************************************************************
  36. *
  37. * Executable statements
  38. *
  39. real*8 F(10)
  40. real*8 alphaL, alphaR, uvnL, uvnR, uvtL, uvtR, uvvL, uvvR,
  41. & ulnL, ulnR, ultL, ultR, ulvL, ulvR,
  42. & pL, pR, evL, evR, elL,
  43. & elR, hvL, hvR, hlL, hlR, TvL, TvR, TlL, TlR
  44. integer INDMET
  45. C variables for AUSMDV scheme
  46. real*8 rvL, rvR, rlL, rlR, avL, avR, alL, alR
  47. real*8 alm, avm, MlL, MlR, MvL, MvR, avpm, alpm,
  48. & dotmv, dotml, Mvplus, Mvmin, Mlplus, Mlmin,
  49. & Pvplus, Pvmin, Plplus, Plmin
  50.  
  51. real*8 gamv, cpv, gaml, cpl, pil
  52. PARAMETER(gamv = 1.4D0, cpv = 1008.D0,
  53. & gaml = 2.8D0, cpl = 4186.D0, pil = 8.5D8)
  54.  
  55. evL = cpv*TvL/gamv
  56. evR = cpv*TvR/gamv
  57. elL = cpl*TlL/gaml + pil/rlL
  58. elR = cpl*TlR/gaml + pil/rlR
  59.  
  60. hvL = evL + pL/rvL
  61. hvR = evR + pR/rvR
  62. hlL = elL + pL/rlL
  63. hlR = elR + pR/rlR
  64.  
  65. C Speed of sound at left and rigth sides
  66. avL = SQRT((gamv - 1.D0)*Cpv*TvL)
  67. avR = SQRT((gamv - 1.D0)*Cpv*TvR)
  68. avm = SQRT(avL*avR)
  69. alL = SQRT((gaml - 1.D0)*Cpl*TlL)
  70. alR = SQRT((gaml - 1.D0)*Cpl*TlR)
  71. alm = SQRT(alL*alR)
  72.  
  73. C Match number at both sides
  74. MlL = ulnL/alm
  75. MlR = ulnR/alm
  76. MvL = uvnL/avm
  77. MvR = uvnR/avm
  78. C AUSM+ scheme
  79.  
  80. call mpAUSM(MvL, MvR, Mvplus, Mvmin, Pvplus, Pvmin)
  81. call mpAUSM(MlL, MlR, Mlplus, Mlmin, Plplus, Plmin)
  82.  
  83. C AUSM schemes mass fluxes
  84. dotmv = avm*(alphaL*rvL*Mvplus + alphaR*rvR*Mvmin)
  85. dotml = alm*((1.D0 - alphaL)*rlL*Mlplus + (1.D0 - alphaR)*rlR
  86. $ *Mlmin)
  87. C without this term the program does not work
  88. C for the phase separation test, but on the other hand it
  89. C introduces too much diffusion in the manometer test
  90. C dotmv = dotmv + 0.01d0*(pL - pR)
  91. if(INDMET .EQ. 2)then
  92. dotml = dotml + 0.01d0*(pL - pR)
  93. end if
  94. C AUSM schemes pressure fluxes
  95. avpm = Pvplus*alphaL*pL + Pvmin*alphaR*pR
  96. alpm = Plplus*(1.D0 - alphaL)*pL + Plmin*(1.D0 - alphaR)*pR
  97.  
  98. C Definition of convective part of the flux
  99. if (dotmv .GT. 0.D0) then
  100.  
  101. F(1) = dotmv*1.D0
  102. F(3) = dotmv*uvnL
  103. F(5) = dotmv*uvtL
  104. F(7) = dotmv*uvvL
  105. F(9) = dotmv*(hvL + (uvnL**2 + uvtL**2 + uvvL**2)/2.D0)
  106. else
  107. F(1) = dotmv*1.D0
  108. F(3) = dotmv*uvnR
  109. F(5) = dotmv*uvtR
  110. F(7) = dotmv*uvvR
  111. F(9) = dotmv*(hvR + (uvnR**2 + uvtR**2 + uvvR**2)/2.D0)
  112. end if
  113.  
  114. if (dotml .GT. 0.D0) then
  115. F(2) = dotml*1.D0
  116. F(4) = dotml*ulnL
  117. F(6) = dotml*ultL
  118. F(8) = dotml*ulvL
  119. F(10) = dotml*(hlL + (ulnL**2 + ultL**2 + ulvL**2)/2.D0)
  120. else
  121. F(2) = dotml*1.D0
  122. F(4) = dotml*ulnR
  123. F(6) = dotml*ultR
  124. F(8) = dotml*ulvR
  125. F(10) = dotml*(hlR + (ulnR**2 + ultR**2 + ulvR**2)/2.D0)
  126. end if
  127.  
  128. C Addition of the pressure term
  129.  
  130. F(3) = F(3) + avpm
  131. F(4) = F(4) + alpm
  132.  
  133. END
  134.  
  135.  
  136.  
  137.  
  138.  

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