Code construction - PowerPoint PPT Presentation

About This Presentation
Title:

Code construction

Description:

It is recommended to use an interpolating formula higher than the 2nd order. ... Trigonometric funcitons. sinthf(it), it = 0, ntf : sinqi. ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 7
Provided by: URYU
Category:

less

Transcript and Presenter's Notes

Title: Code construction


1
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.

rgi-1 rgi
r0
rfj-1 rfj
end interpolation_grav_to_fluid
2
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.
thf(it), it 0, ntf q grid points qi .
hthf(it) Mid-point of q grids qi1/2 . dthf
q grid spacing Dq.
q 2 0, p, the grid spacing is equidistant.
ntf Total number of q grid points (-1).
Functions associated with q coordinate.
Trigonometric funcitons. sinthf(it), it 0, ntf
sinqi. hsinthf(it) sinqi1/2 sin at
mid-point of q grids. costhf(it), it 0, ntf
cosqi. hcosthf(it) cosqi1/2 cosin at mid-point
of q grids.
3
f coordinate input parameter npf.
phif(ip), ip 0, npf f grid points fi .
hphif(ip) Mid-point of f grids fi1/2 . dphif
f grid spacing Df.
f 2 0, 2p, the grid spacing is equidistant.
npf Total number of f grid points (-1).
Functions associated with f coordinate.
Trigonometric funcitons. sinphif(ip), ip 0, npf
sinfi. hsinphif(ip) sinfi1/2 sin at
mid-point of f grids. cosphif(ip), ip 0, npf
cosfi. hcosphif(ip) cosfi1/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
4
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
Same as the gravitational field (a different
value for l might make a convergence faster.)
end subroutine rotating_compact_star
5
Recall polytropic (adiabatic) EOS.
6
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 hhc at the center, h1 at Req
and Rp, are applied to
and solved for the parameters .
end subroutine update_parameter
Write a Comment
User Comments (0)
About PowerShow.com