Télécharger fstshl.eso

Retour à la liste

Numérotation des lignes :

fstshl
  1. C FSTSHL SOURCE BECC 11/05/26 21:15:31 6981
  2. SUBROUTINE FSTSHL(
  3. & PC, GAM,
  4. & P, RHO_L, P_L, U_L,
  5. & U, RHO, D,
  6. & LOGDEB, LOGAN)
  7. *
  8. *************************************************************************
  9. *
  10. * project : CAST3M, EUROPLEXUS...
  11. *
  12. * name : fstshl
  13. *
  14. * description : euler equations for a mixture of stiffened gases
  15. * flux in the non-reactive case.
  16. *
  17. * left shock curve as function of p
  18. *
  19. * language : fortran 77
  20. *
  21. * author : a. beccantini den/dm2s/sfme/ltmf
  22. *
  23. *************************************************************************
  24. *
  25. * called by :
  26. *
  27. *
  28. *************************************************************************
  29. *
  30. ***** input
  31. *
  32. * pc, gam = properties of the gas
  33. *
  34. * p = pressure in the right side of the left
  35. * rarefaction
  36. *
  37. * rho_l, p_l, u_l
  38. * = density, pressure, velocity on the left
  39. *
  40. * logdeb = debugging ?
  41. *
  42. ***** output
  43. *
  44. * u, rho = velocity and density in the right side of the
  45. * left rarefaction
  46. *
  47. * d = shock speed
  48. *
  49. * logan = anomaly ?
  50. *
  51. *************************************************************************
  52. *
  53. * 26/11/2009 created
  54. * 25/05/2011 evolution in CAST3M
  55. *
  56. *************************************************************************
  57. *
  58. * n.b.: all variables are declared
  59. *
  60. C IMPLICIT NONE
  61. IMPLICIT INTEGER(I-N)
  62. REAL*8
  63. & PC, GAM,
  64. & P, RHO_L, P_L, U_L,
  65. & U, D
  66. *
  67. REAL*8 BETAL, ALPHAL, QL, COEF, NUME, DENO, RHO
  68. *
  69. LOGICAL LOGDEB, LOGAN
  70. *
  71. IF (LOGDEB ) THEN
  72. IF (GAM .LE. 1.0D0) THEN
  73. WRITE(*,*) 'GAM =', GAM
  74. LOGAN = .TRUE.
  75. GOTO 9999
  76. ENDIF
  77. IF ((P .LE. 0.0D0) .OR.(P_L .LE. 0.0D0) .OR.
  78. & (PC .LE. 0.0D0)) THEN
  79. WRITE(*,*) 'P = ', P, ' P_L = ', P_L, ' PC = ', PC
  80. LOGAN = .TRUE.
  81. WRITE(*,*) 'SUBROUTINE FSTSHL.F'
  82. WRITE(*,*) 'ANOMALY DETECTED.'
  83. GOTO 9999
  84. ENDIF
  85. IF ((RHO_L .LE. 0.0D0)) THEN
  86. WRITE(*,*) 'RHO_L = ', RHO_L
  87. LOGAN = .TRUE.
  88. WRITE(*,*) 'SUBROUTINE FSTSHL.F'
  89. WRITE(*,*) 'ANOMALY DETECTED.'
  90. GOTO 9999
  91. ENDIF
  92. ENDIF
  93. *
  94. ***** computation of rho
  95. *
  96. COEF = GAM - 1.0D0
  97. COEF = COEF / (GAM + 1.0D0)
  98. NUME = ((P + PC)/ (P_L + PC)) + COEF
  99. DENO = ((((P + PC)/ (P_L + PC))) * COEF) + 1.0D0
  100. RHO = ((NUME / DENO) * RHO_L)
  101. *
  102. ***** computation of u
  103. *
  104. BETAL = (PC + P_L) * (GAM - 1.0D0) / (GAM + 1.0D0)
  105. ALPHAL = 2.0D0 / ((GAM + 1.0D0) * RHO_L)
  106. QL = (P + PC + BETAL) / ALPHAL
  107. QL = QL ** 0.5D0
  108. U = U_L - ((P - P_L) / QL)
  109. *
  110. **** computation of d
  111. *
  112. * write(*,*) 'correggimi... imprecisa'
  113. * d = (rho * u) - (rho_l * u_l)
  114. * d = d / (rho - rho_l)
  115. * write(*,*)
  116. * write(*,*) d
  117. *
  118. D = U_L - (QL / RHO_L)
  119. * write(*,*) d
  120. * write(*,*)
  121. *
  122. 9999 RETURN
  123. END
  124.  
  125.  

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