!####################################################################### ! SUBROUTINE ---- sub_eos_5phase_read_table ---- ### ! ### ! Subroutine for reading table of 5-Phase EOS ### ! ### ! 5-Phase EOS: A Tabular H2O EOS for Shock Physics Codes ### ! Reference: Senft and Stewart (2008) MPS 43, 1993-2013. ### ! ### ! 2015/05/28 ### !####################################################################### subroutine sub_eos_5phase_read_table use mod_parameter_5phase_eos implicit none !---- Variables Used in This Subroutine ----------------------------- character(3) :: tmp3 integer(4) :: i,j !-------------------------------------------------------------------- open(50,file=TABLE_5PHASE_EOS) !---- Read Header ------------------------------- read(50,'(a3)') tmp3 read(50,'(i4)') nd_5ph read(50,'(a3)') tmp3 read(50,'(i4)') nt_5ph !---- Allocate ---------------------------------- allocate(d_5ph(nd_5ph)) allocate(t_5ph(0:nt_5ph)) allocate(e_5ph(0:nt_5ph,nd_5ph)) allocate(p_5ph(0:nt_5ph,nd_5ph)) allocate(s_5ph(0:nt_5ph,nd_5ph)) allocate(sv_5ph(0:nt_5ph,nd_5ph)) !------------------------------------------------ t_5ph=0.0e0_8 e_5ph=0.0e0_8 p_5ph=0.0e0_8 s_5ph=0.0e0_8 sv_5ph=0.0e0_8 read(50,'(a3)') tmp3 !---- Read Main Variables ----------------------- do j=1,nd_5ph do i=1,nt_5ph read(50,'(6e16.8)') d_5ph(j), & & t_5ph(i), & & p_5ph(i,j), & & e_5ph(i,j), & & s_5ph(i,j), & & sv_5ph(i,j) enddo enddo !------------------------------------------------ close(50) ! do i=1,nt_5ph ! write(*,*) t_5ph(i) ! enddo ! do j=1,nd_5ph ! write(*,*) d_5ph(j) ! enddo ! write(*,*) 'OK! Read Table' return end subroutine sub_eos_5phase_read_table