Transcript Document

Code construction – 4: Surface fitted coordinate for the fluid and hydrostatic eq.
On top of the spherical coordinates for the field (r, q, f), we introduce
surface fitted coordinates for the fluid as follows.
where R(q,f) is the surface of a star.
The surface R(q, f) is normalized by the value at q = p/2, and f = 0.
R0 := R(p/2,0).
subroutine interpolation_grav_to_fluid
q, and f coordinates are the same for the field and fluid coordinates. So, an
interpolation along the radial coordinate (1D interpolation) is required.
It is recommended to use an interpolating formula higher than the 2nd order.
r0
rfj-1
rfj
end interpolation_grav_to_fluid
rgi-1
rgi
subroutine coordinate_patch_kit_fluid
We use the same grid spacing for the fluid coordinate (rf , qf ,ff) as the
coordinate grids for the gravitational field.
Radial coordinate input parameters: nrf. (rf = rg up to rf = 1)
R(q,f) : rf 2 [0, 1], the grid spacing rule is the same as rg.
nrf : Total number of radial grid points (-1).
rf(ir), ir = 0, nrf : Radial coordinate grid points ri .
hrf(ir) : Mid-point of radial grids.
drf(ir) : Radial grid spacing Dri := ri – ri-1.
q coordinate input parameter: ntf.
q 2 [0, p], the grid spacing is equidistant. thf(it), it = 0, ntf : q grid points qi .
hthf(it) : Mid-point of q grids qi+1/2 .
ntf : Total number of q grid points (-1).
dthf : q grid spacing Dq.
Functions associated with q coordinate.
Trigonometric funcitons.
sinthf(it), it = 0, ntf : sinqi. hsinthf(it) : sinqi+1/2 sin at mid-point of q grids.
costhf(it), it = 0, ntf : cosqi. hcosthf(it) : cosqi+1/2 cosin at mid-point of q grids.
f coordinate input parameter: npf.
f 2 [0, 2p], the grid spacing is equidistant. phif(ip), ip = 0, npf : f grid points fi .
hphif(ip) : Mid-point of f grids fi+1/2 .
npf : Total number of f grid points (-1).
dphif : f grid spacing Df.
Functions associated with f coordinate.
Trigonometric funcitons.
sinphif(ip), ip = 0, npf : sinfi. hsinphif(ip) : sinfi+1/2 sin at mid-point of f grids.
cosphif(ip), ip = 0, npf : cosfi. hcosphif(ip): cosfi+1/2 cos at mid-point of f grids.
Weight for the integration: assigned at the mid-points.
wrf(irr) = hrf(irr)2 drf(irr) : weight for the radial integratoin ri2Dri
wtf(itt) = hsinthef(itt) dthf : weight for the q integratoin sinqi Dqi
wpf(ipp) = dphif
: weight for the f integratoin Dfi
wrtpf(irr,itt,ipp) = hR(itt,ipp)3 £ wrf(irr) £ wtf(itt) £ wpf(ipp)
hR(itt,ipp) is the radius of the stellar surface at the mid-points of (q, f) grids.
That is, at hth(itt), and hphi(ipp) .
end subroutine coordinate_patch_kit_fluid
subroutine rotating_compact_star
Interpolate
which
are used to compute ut.
call interpolation_grav_to_fluid
call hydrostatic_equation
call update_matter
call update_surface
call update_parameter
end subroutine rotating_compact_star
Same as the gravitational field
(a different value for l might
make a convergence faster.)
Recall: polytropic (adiabatic) EOS.
subroutine update_parameter
Same as the Newtonian calculation, we have three parameters,
Three conditions are imposed at the center, and two points at the surface.
When the length scale is updated from Ri to R0 , the lapse and the conformal
factor changes as,
(When an iteration is made, the physical size of a star may change. While
in numerical computation, we normalize the size (to set R(p/2,0)=1) and
update the length scale R0.)
Three conditions h=hc at the center, h=1 at Req and Rp, are applied to
and solved for the parameters
end subroutine update_parameter
.