Télécharger fap22f.eso

Retour à la liste

Numérotation des lignes :

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

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