fstshl
C FSTSHL SOURCE BECC 11/05/26 21:15:31 6981 & PC, GAM, & P, RHO_L, P_L, U_L, & U, RHO, D, & LOGDEB, LOGAN) * ************************************************************************* * * project : CAST3M, EUROPLEXUS... * * name : fstshl * * description : euler equations for a mixture of stiffened gases * flux in the non-reactive case. * * left shock curve as function of p * * language : fortran 77 * * author : a. beccantini den/dm2s/sfme/ltmf * ************************************************************************* * * called by : * * ************************************************************************* * ***** input * * pc, gam = properties of the gas * * p = pressure in the right side of the left * rarefaction * * rho_l, p_l, u_l * = density, pressure, velocity on the left * * logdeb = debugging ? * ***** output * * u, rho = velocity and density in the right side of the * left rarefaction * * d = shock speed * * logan = anomaly ? * ************************************************************************* * * 26/11/2009 created * 25/05/2011 evolution in CAST3M * ************************************************************************* * * n.b.: all variables are declared * C IMPLICIT NONE IMPLICIT INTEGER(I-N) REAL*8 & PC, GAM, & P, RHO_L, P_L, U_L, & U, D * REAL*8 BETAL, ALPHAL, QL, COEF, NUME, DENO, RHO * LOGICAL LOGDEB, LOGAN * IF (LOGDEB ) THEN IF (GAM .LE. 1.0D0) THEN WRITE(*,*) 'GAM =', GAM LOGAN = .TRUE. GOTO 9999 ENDIF IF ((P .LE. 0.0D0) .OR.(P_L .LE. 0.0D0) .OR. & (PC .LE. 0.0D0)) THEN WRITE(*,*) 'P = ', P, ' P_L = ', P_L, ' PC = ', PC LOGAN = .TRUE. WRITE(*,*) 'SUBROUTINE FSTSHL.F' WRITE(*,*) 'ANOMALY DETECTED.' GOTO 9999 ENDIF IF ((RHO_L .LE. 0.0D0)) THEN WRITE(*,*) 'RHO_L = ', RHO_L LOGAN = .TRUE. WRITE(*,*) 'SUBROUTINE FSTSHL.F' WRITE(*,*) 'ANOMALY DETECTED.' GOTO 9999 ENDIF ENDIF * ***** computation of rho * COEF = GAM - 1.0D0 COEF = COEF / (GAM + 1.0D0) NUME = ((P + PC)/ (P_L + PC)) + COEF DENO = ((((P + PC)/ (P_L + PC))) * COEF) + 1.0D0 RHO = ((NUME / DENO) * RHO_L) * ***** computation of u * BETAL = (PC + P_L) * (GAM - 1.0D0) / (GAM + 1.0D0) ALPHAL = 2.0D0 / ((GAM + 1.0D0) * RHO_L) QL = (P + PC + BETAL) / ALPHAL QL = QL ** 0.5D0 U = U_L - ((P - P_L) / QL) * **** computation of d * * write(*,*) 'correggimi... imprecisa' * d = (rho * u) - (rho_l * u_l) * d = d / (rho - rho_l) * write(*,*) * write(*,*) d * D = U_L - (QL / RHO_L) * write(*,*) d * write(*,*) * 9999 RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales