00001 subroutine printout_physq_WL_MHD(iseq,flag_restmass)
00002 use grid_parameter, only : ntfeq, npfxzp, npfyzp, ntfpolp, sw_mass_iter
00003 use def_matter, only : emd, rs
00004 use def_matter_parameter, only : ome, radi, pinx
00005 use def_quantities
00006 implicit none
00007 real(8) :: fixeddlm, fixedvir, fixedvir_asymp
00008 integer, intent(in) :: iseq, flag_restmass
00009
00010 if (iseq.eq.1) then
00011 open(100,file='rnsphyseq.dat',status='unknown')
00012 else
00013 open(100,file='rnsphyseq.dat',status='old',position='append')
00014 end if
00015
00016 if (flag_restmass.le.1) write(100,*) '#### Solution did not converge #### '
00017 write(100,*) '== Sequence number == ', iseq
00018 write(100,*) '## Coordinate and Proper Radii in G = c = Msol = 1 unit ##'
00019 write(100,'(a22,1p,2e23.15)') ' NS radius along x = ', &
00020 & coord_radius_x, proper_radius_x
00021 write(100,'(a22,1p,2e23.15)') ' NS radius along y = ', &
00022 & coord_radius_y, proper_radius_y
00023 write(100,'(a22,1p,2e23.15)') ' NS radius along z = ', &
00024 & coord_radius_z, proper_radius_z
00025 write(100,'(a22,1p,2e23.15)') ' Axis ratio y/x = ', &
00026 & coord_radius_y/coord_radius_x, proper_radius_y/proper_radius_x
00027 write(100,'(a22,1p,2e23.15)') ' Axis ratio z/x = ', &
00028 & coord_radius_z/coord_radius_x, proper_radius_z/proper_radius_x
00029 write(100,*) '## Coordinate and Proper Radii in [km] ##'
00030 write(100,'(a22,1p,2e23.15)') ' NS radius along x = ', &
00031 & coord_radius_x_km, proper_radius_x_km
00032 write(100,'(a22,1p,2e23.15)') ' NS radius along y = ', &
00033 & coord_radius_y_km, proper_radius_y_km
00034 write(100,'(a22,1p,2e23.15)') ' NS radius along z = ', &
00035 & coord_radius_z_km, proper_radius_z_km
00036
00037 write(100,*) '## Radii in Req = 1 unit ##'
00038 write(100,'(a22,1p,2e23.15)') ' NS radius along x = ', rs(ntfeq,npfxzp)
00039 write(100,'(a22,1p,2e23.15)') ' NS radius along y = ', rs(ntfeq,npfyzp)
00040 write(100,'(a22,1p,2e23.15)') ' NS radius along z = ', rs(ntfpolp,npfxzp)
00041 write(100,*) '## Eccentricity in coordinate and Proper Radii ##'
00042 write(100,'(a22,1p,2e23.15)') ' sqrt(1-(Rz/Rx)^2) = ', &
00043 & sqrt(1.0d0-(coord_radius_z/coord_radius_x)**2), &
00044 & sqrt(1.0d0-(proper_radius_z/proper_radius_x)**2)
00045
00046 write(100,*) '## M = spherical gravitational mass (G = c = Msol = 1 unit) ##'
00047 write(100,'(a22,1p,2e23.15)') ' Omega M and Omega = ', &
00048 & ome/radi*gravmass_sph, ome/radi
00049 write(100,'(a22,1p,2e23.15)') ' M_ADM = ', admmass,admmass_asymp
00050 write(100,'(a22,1p,2e23.15)') ' M_K Komar mass = ', komarmass, &
00051 & komarmass_asymp
00052 write(100,'(a22,1p,2e23.15)') ' Rest mass M_0 1star= ', restmass
00053 write(100,'(a22,1p,2e23.15)') ' Proper mass M_p = ', propermass
00054 write(100,'(a22,1p,2e23.15)') ' Angular momentum J = ', angmom, angmom_asymp
00055 write(100,'(a22,1p,2e23.15)') ' Electric charge Q = ', charge, charge_asymp
00056
00057 write(100,'(a22,1p,2e23.15)') ' Spherical rest mass= ', restmass_sph
00058 write(100,'(a22,1p,2e23.15)') ' Spherical grav mass= ', gravmass_sph
00059 write(100,'(a22,1p,2e23.15)') ' Spherical M/R = ', MoverR_sph
00060 write(100,'(a22,1p,2e23.15)') ' Schwarzschildradius= ', schwarz_radi_sph
00061 write(100,'(a22,1p,2e23.15)') ' Schwarz radi in[km]= ', schwarz_radi_sph_km
00062
00063 write(100,'(a22,1p,2e23.15)') ' E/M = (M_ADM-M)/M = ', &
00064 & admmass/gravmass_sph - 1.0d0
00065 write(100,'(a22,1p,2e23.15)') ' J/M^2 and J/M_ADM^2= ', &
00066 & angmom/gravmass_sph**2.0d0, angmom/admmass**2.0d0
00067
00068 write(100,'(a22,1p,2e23.15)') ' T kinetic energy = ', T_kinene, &
00069 & T_kinene_omeJ
00070 write(100,'(a22,1p,2e23.15)') ' P internal energy = ', P_intene
00071 write(100,'(a22,1p,2e23.15)') ' M em field energy = ', M_emfene
00072 write(100,'(a22,1p,2e23.15)') ' W grav energy = ', W_gravene, &
00073 & W_gravene_omeJ
00074 write(100,'(a22,1p,2e23.15)') ' T/|W| = ', ToverW, &
00075 & ToverW_omeJ
00076 write(100,'(a22,1p,2e23.15)') ' P/|W| = ', PoverW
00077 write(100,'(a22,1p,2e23.15)') ' M/|W| = ', MoverW
00078 write(100,'(a22,1p,2e23.15)') ' Virial relation = ', Virial
00079 write(100,'(a22,1p,2e23.15)') ' MtorB field energy = ', M_torBene
00080 write(100,'(a22,1p,2e23.15)') ' MpolB field energy = ', M_polBene
00081 write(100,'(a22,1p,2e23.15)') ' MeleE field energy = ', M_eleEene
00082 write(100,'(a22,1p,2e23.15)') ' MtorB/|W| = ', MtorBoverW
00083 write(100,'(a22,1p,2e23.15)') ' MpolB/|W| = ', MpolBoverW
00084 write(100,'(a22,1p,2e23.15)') ' MeleE/|W| = ', MeleEoverW
00085 write(100,'(a22,1p,2e23.15)') ' Moment of inertia = ', I_inertia
00086
00087 write(100,*) '## Virial and Rest mass accuracy ##'
00088 fixedvir = (admmass - komarmass)/admmass
00089 fixedvir_asymp = (admmass_asymp - komarmass_asymp)/admmass_asymp
00090 fixeddlm = (restmass - restmass_sph)/restmass_sph
00091 write(100,'(a22,1p,2e23.15)') ' 1 - M_K/M_ADM = ', fixedvir, &
00092 & fixedvir_asymp
00093 write(100,'(a22,1p,2e23.15)') ' M_0/M_0sph - 1 = ', fixeddlm
00094
00095 write(100,*) '## The density, pressure and p/rho at the NS center ##'
00096 write(100,*) '## in G = c = M = 1 unit and cgs unit ##'
00097 write(100,'(a22,1p,2e23.15)') ' rho_c = ', rho_c, rho_c_cgs
00098 write(100,'(a22,1p,2e23.15)') ' pre_c = ', pre_c, pre_c_cgs
00099 write(100,'(a22,1p,2e23.15)') ' epsilon_c = ', epsi_c, epsi_c_cgs
00100 write(100,'(a22,1p,2e23.15)') ' (p/rho)_c = ', q_c, q_c_cgs
00101
00102 write(100,*) '## Red and blue shift ##'
00103 write(100,'(a22,1p,2e23.15)') ' surface on x axis = ', &
00104 & zrb_xp_plus, zrb_xp_minus
00105 write(100,'(a22,1p,2e23.15)') ' surface on y axis = ', &
00106 & zrb_yp_plus, zrb_yp_minus
00107 write(100,'(a22,1p,2e23.15)') ' surface on z axis = ', &
00108 & zrb_zp_plus, zrb_zp_minus
00109
00110 write(100,*) '## Ratio of enthalpy gradient at x/z and y/z ##'
00111 write(100,'(a22,1p,2e23.15)') ' dhdx/dhdz,dhdy/dhdz= ', &
00112 & dhdr_x/dhdr_z, dhdr_y/dhdr_z
00113
00114 close(100)
00115
00116 end subroutine printout_physq_WL_MHD