Download presentation
Presentation is loading. Please wait.
Published byRosaline Lang Modified over 8 years ago
1
Code construction – 4: Surface fitted coordinate for the fluid and hydrostatic eq. On top of the spherical coordinates for the field (r, , ), we introduce surface fitted coordinates for the fluid as follows. where R( , ) is the surface of a star. The surface R( , ) is normalized by the value at = /2, and = 0. R 0 := R( /2, ). subroutine interpolation_grav_to_fluid , and 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 2 nd order. end interpolation_grav_to_fluid rg i-1 rg i r0r0 rf j-1 rf j
2
subroutine coordinate_patch_kit_fluid We use the same grid spacing for the fluid coordinate (r f, f, f ) as the coordinate grids for the gravitational field. nrf : Total number of radial grid points (-1). R( , ) : r f 2 [0, 1], the grid spacing rule is the same as r g. rf(ir), ir = 0, nrf : Radial coordinate grid points r i. hrf(ir) : Mid-point of radial grids. drf(ir) : Radial grid spacing r i := r i – r i-1. Radial coordinate input parameters: nrf. (r f = r g up to r f = 1) thf(it), it = 0, ntf : grid points i. hthf(it) : Mid-point of grids i+1/2. dthf : grid spacing coordinate input parameter: ntf. ntf : Total number of grid points (-1). 2 [0, ], the grid spacing is equidistant. Functions associated with coordinate. Trigonometric funcitons. sinthf(it), it = 0, ntf : sin i. hsinthf(it) : sin i+1/2 sin at mid-point of grids. costhf(it), it = 0, ntf : cos i. hcosthf(it) : cos i+1/2 cosin at mid-point of grids.
3
phif(ip), ip = 0, npf : grid points i. hphif(ip) : Mid-point of grids i+1/2. dphif : grid spacing coordinate input parameter: npf. npf : Total number of grid points (-1). 2 [0, 2 ], the grid spacing is equidistant. Functions associated with coordinate. Trigonometric funcitons. sinphif(ip), ip = 0, npf : sin i. hsinphif(ip) : sin i+1/2 sin at mid-point of grids. cosphif(ip), ip = 0, npf : cos i. hcosphif(ip): cos i+1/2 cos at mid-point of grids. Weight for the integration: assigned at the mid-points. wrf(irr) = hrf(irr) 2 drf(irr) : weight for the radial integratoin r i 2 r i wtf(itt) = hsinthef(itt) dthf : weight for the integratoin sin i i wpf(ipp) = dphif : weight for the integratoin i wrtpf(irr,itt,ipp) = hR(itt,ipp) 3 £ wrf(irr) £ wtf(itt) £ wpf(ipp) end subroutine coordinate_patch_kit_fluid hR(itt,ipp) is the radius of the stellar surface at the mid-points of ( , ) grids. That is, at hth(itt), and hphi(ipp).
4
subroutine rotating_compact_star call interpolation_grav_to_fluid Interpolate which are used to compute u t. call hydrostatic_equation call update_matter call update_surface Same as the gravitational field (a different value for might make a convergence faster.) call update_parameter 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 R i to R 0, the lapse and the conformal factor changes as, end subroutine update_parameter (When an iteration is made, the physical size of a star may change. While in numerical computation, we normalize the size (to set R( /2,0)=1) and update the length scale R 0.) Three conditions h=h c at the center, h=1 at R eq and R p, are applied to and solved for the parameters.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.