00001 ! = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 00002 ! 00003 ! G = c = Msol = 1 unit is used in TOV integration. 00004 ! Use pre_c dyn/cm^2 at rho_c gr/cm^3 to specify K. 00005 ! pre_0 and rho_0 are input parameter, 00006 ! typically pre_0 = 1.0d+37 dyn/cm^2 00007 ! and rho_0 = 1.0d+16 gr/cm^3. 00008 ! 00009 ! --- Desctiption for input parameters. 00010 ! 00011 ! -- Input in 'ovpar_parameos.dat' 00012 ! 00013 ! hini : not used. 00014 ! nstep : see Runge Kutta subroutine. 00015 ! ndiv : see Runge Kutta subroutine. 00016 ! radini: initial radius for the surface of a neutron star. 00017 ! (Iteration is made until "radi" to become a surface exactly.) 00018 ! itype : itype = 0 iteration for compactness 00019 ! itype = 1 single structure 00020 ! chope : compactness to find (for itype = 0) 00021 ! 00022 ! 00023 ! -- Input in "oveosparm.dat" 00024 ! 00025 ! nphase : total number of piecewise regions. 00026 ! rhoini : central value of the density [g/cm^3]. 00027 ! (initial for the integration.) 00028 ! rhocgs : value of the density in a piecewise region. 00029 ! abi : value of the adiabatic index (Gamma) in a piecewise region. 00030 ! 00031 ! -- Ouput in "oveos_phase.dat" : data at the interface of each piecewise 00032 ! region, rescaled in G=c=Msol=1 unit. 00033 ! 00034 ! write(30,*)'#', nphase, qini 00035 ! write(30,40) ii, abc(ii), abi(ii), rhoi(ii), qi(ii), hi(ii), 00036 ! & rhocgs(ii), abccgs(ii) 00037 ! 00038 ! qini : p/rho at the center rescaled in G=c=Msol=1 unit. 00039 ! abc : adiabatic constant K_i rescaled in G=c=Msol=1 unit. 00040 ! abi : adiabatic index Gamma_i. 00041 ! rhoi : rest mass density rescaled in G=c=Msol=1 unit. 00042 ! qi : p/rho rescaled in G=c=Msol=1 unit. 00043 ! hi : the relativistic enthalpy rescaled in G=c=Msol=1 unit. 00044 ! rhocgs : rest mass density in [g/cm^3]. 00045 ! abccgs : adiabatic constant K_i rescaled in [g/cm^3]. 00046 ! ______________________________________________________________________ 00047 ! ______________________________________________________________________ 00048 ! 00049 include './Module/phys_constant.f90' 00050 include './Module/def_peos_parameter.f90' 00051 include './Subroutine/peos_initialize.f90' 00052 include './Subroutine/peos_lookup.f90' 00053 include './Subroutine/peos_q2hprho.f90' 00054 include './Subroutine/peos_h2qprho.f90' 00055 ! 00056 PROGRAM main 00057 implicit none 00058 real(8) :: q, h, pre, rho, ened 00059 ! 00060 call peos_initialize 00061 ! 00062 q = 2.25576d-01 00063 call peos_q2hprho(q,h,pre,rho) 00064 open(870,file='peos_par.dat',status='unknown') 00065 write(870,'(4es13.5, a28)') q, h, pre, rho, ' : q, h, pre, rho' 00066 ! 00067 call peos_h2qprho(h,q,pre,rho,ened) 00068 write(870,'(5es13.5, a34)') h, q, pre, rho, ened, ' : h, q, pre, rho, ened' 00069 close(870) 00070 ! 00071 end PROGRAM main