00001 subroutine qeos_initialize
00002
00003 use phys_constant
00004 use def_qeos_parameter
00005 implicit none
00006
00007 real(8) :: rho_0, pre_0, facrho, facpre, fac2, gg, cc, ss
00008 integer :: ii, iphase
00009
00010 abc = 0.0d0
00011 abi = 0.0d0
00012 abccgs = 0.0d0
00013 abcene = 0.0d0
00014 abiene = 0.0d0
00015 abch = 0.0d0
00016 abih = 0.0d0
00017 rhosurf_cgs = 2.0d0*2.67d14
00018
00019 open(850,file='qeos_parameter.dat',status='old')
00020 read(850,'(2es22.15)') rhosurf_cgs, eneconst_cgs
00021 read(850,'(17x,1i5,es22.15)') nphase, rhoini_cgs
00022 do ii = 1, nphase
00023 read(850,'(2es22.15)') abccgs(ii), abi(ii)
00024 end do
00025
00026 close(850)
00027
00028
00029
00030
00031
00032
00033
00034 facrho = (g/c**2)**3*solmas**2
00035 facpre = g**3*solmas**2/c**8
00036 rhosurf_cgs = rhosurf_cgs*2.67d14
00037
00038
00039
00040 do ii=1, nphase
00041 abc(ii) = facpre/facrho**abi(ii)*abccgs(ii)
00042 end do
00043
00044 do ii=1, nphase
00045 abcene(ii) = abc(ii)/(abi(ii)-1.0d0)
00046 abiene(ii) = abi(ii)
00047 abch(ii) = abc(ii)
00048 abih(ii) = abi(ii)-1.0d0
00049 abchdot(ii)= abih(ii)*abch(ii)
00050 abihdot(ii)= abih(ii) - 1.0d0
00051
00052 end do
00053 do ii=nphase+1, 2*nphase
00054 abch(ii) = abcene(ii-nphase)
00055 abih(ii) = abiene(ii-nphase)-1.0d0
00056 abchdot(ii)= abih(ii)*abch(ii)
00057 abihdot(ii)= abih(ii) - 1.0d0
00058 end do
00059
00060
00061 open(860,file='peos_parameter_output.dat',status='unknown')
00062 write(860,'(a1,8x,i5)')'#', nphase
00063 do ii = 1, nphase
00064 write(860,'(i5,10es13.5)') ii, abc(ii), abi(ii), abccgs(ii)
00065 end do
00066 close(860)
00067
00068 rhoini_gcm1 = facrho*rhoini_cgs
00069 rhosurf_gcm1 = facrho*rhosurf_cgs
00070 eneconst_gcm1 = eneconst_cgs/c**2
00071
00072
00073
00074
00075
00076
00077 end subroutine qeos_initialize