!=============================================================== ! SUBROUTINE ---- sub_eos_wada ---- === ! === ! Subroutine for calculating the pressure === ! and sound velocity from Wada EOS === ! === ! 2011/11/03 === !=============================================================== !=============================================================== ! Input Data : rho : Density [kg/m^3] ! e : Energy [J/kg] ! Output Data : p : Pressure [Pa] ! sv : Sound Velocity [m/s] !=============================================================== subroutine sub_eos_wada(rho,e,p,sv) use mod_parameter_wada_eos implicit none !---- Arguments in This Subroutine ----------------------------- real*8 rho ! Density [kg/m^3] real*8 e ! Internal Energy [J/kg] real*8 p ! Pressure [Pa] real*8 sv ! Sound Velocity [m/s] !--------------------------------------------------------------- p=(GAMMA-1.0d0)*(rho/RHO_0)*(e/E_0) & & +C*(N/3.0d0+1.0d0-GAMMA)*(rho/RHO_0)**(N/3.0d0+1.0d0) p=P_0*p sv=GAMMA*(GAMMA-1.0d0)*(e/E_0) & & +C*(N/3.0d0+1.0d0-GAMMA)*(N/3.0d0+GAMMA)*(rho/RHO_0)**(N/3.0d0) sv=V_0*dsqrt(sv) if(FLAG_WADA_CUTOFF == 1) then if(rho <= RHO_C .and. e <= E_C) then p=0.0d0 sv=0.0d0 endif endif return end