Télécharger estiff.eso

Retour à la liste

Numérotation des lignes :

estiff
  1. C ESTIFF SOURCE BECC 11/05/26 21:15:24 6981
  2. SUBROUTINE ESTIFF(
  3. & RHO, P, GAMMA, PC, E,
  4. & LOGDEB, LOGAN)
  5. *
  6. *************************************************************************
  7. *
  8. * project : CAST3M, EUROPLEXUS...
  9. *
  10. * name : e_stiff
  11. *
  12. * description : euler equations for a mixture of stiffened gases
  13. * flux in the non-reactive case.
  14. *
  15. * computation of the internal energy.
  16. *
  17. * language : fortran 77
  18. *
  19. * author : a. beccantini den/dm2s/sfme/ltmf
  20. *
  21. *************************************************************************
  22. *
  23. * called by :
  24. *
  25. *
  26. *************************************************************************
  27. *
  28. ***** input
  29. *
  30. * pc, gam = properties of the stiffened gas
  31. *
  32. * rho, p, = density, pressure
  33. *
  34. * logdeb = debugging ?
  35. *
  36. ***** output
  37. *
  38. * e = energy
  39. *
  40. * logan = anomaly ?
  41. *
  42. *************************************************************************
  43. *
  44. * 26/11/2009 created
  45. * 25/05/2011 evolution in CAST3M
  46. *
  47. *************************************************************************
  48. *
  49. * n.b.: all variables are declared
  50. *
  51. C IMPLICIT NONE
  52. IMPLICIT INTEGER(I-N)
  53. REAL*8
  54. & RHO, P, PC, GAMMA, E
  55. *
  56. * debugging ?
  57. *
  58. LOGICAL LOGDEB, LOGAN
  59. *
  60. IF (LOGDEB ) THEN
  61. IF (GAMMA .LE. 1.0D0) THEN
  62. WRITE(*,*) 'SUBROUTINE E_STIFF.F'
  63. WRITE(*,*) 'ANOMALY DETECTED'
  64. WRITE(*,*) 'GAMMA =', GAMMA
  65. LOGAN = .TRUE.
  66. GOTO 9999
  67. ENDIF
  68. IF ((P .LT. 0.0D0) .OR. (PC .LT. 0.0D0)) THEN
  69. WRITE(*,*) 'SUBROUTINE E_STIFF.F'
  70. WRITE(*,*) 'ANOMALY DETECTED'
  71. WRITE(*,*) 'P = ', P, ' PC = ', PC
  72. LOGAN = .TRUE.
  73. GOTO 9999
  74. ENDIF
  75. IF ((RHO .LT. 0.0D0)) THEN
  76. WRITE(*,*) 'SUBROUTINE E_STIFF.F'
  77. WRITE(*,*) 'ANOMALY DETECTED'
  78. WRITE(*,*) 'RHO = ', RHO
  79. LOGAN = .TRUE.
  80. GOTO 9999
  81. ENDIF
  82. ENDIF
  83. E = (GAMMA - 1.0D0) * RHO
  84. E = (P + (GAMMA * PC)) / E
  85. 9999 RETURN
  86. END
  87.  
  88.  

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