00001 subroutine bh_boundary_alph_test_mpt(impt,char_bc,sou_surf,dsou_surf)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrg, ntg, npg, rgin
00004 use trigonometry_grav_theta, only : hsinthg
00005 use trigonometry_grav_phi, only : hcosphig
00006 use def_binary_parameter, only : sepa
00007 use grid_parameter_mpt, only : grid_param_real_
00008 implicit none
00009 character(len=1), intent(in) :: char_bc
00010 real(long), pointer :: sou_surf(:,:), dsou_surf(:,:)
00011 real(long) :: st, cp, rad1, rad2, dr2dr1, bhmass
00012 real(long) :: psi_tmp, dpsidr_tmp, alps_tmp, dalpsdr_tmp
00013 integer :: itg, ipg
00014 integer :: impt, impt_ex
00015 real(long) :: bhmass_ex, rgin_ex
00016
00017 if (impt.eq.1) impt_ex = 2
00018 if (impt.eq.2) impt_ex = 1
00019 rgin_ex = grid_param_real_(1,impt_ex)
00020 bhmass_ex = 2.0d0*rgin_ex
00021 bhmass = 2.0d0*rgin
00022
00023 do ipg = 1, npg
00024 do itg = 1, ntg
00025 st = hsinthg(itg)
00026 cp = hcosphig(ipg)
00027 rad1 = rgin
00028 rad2 = sqrt(rad1**2 - 2.0d0*rad1*sepa*st*cp + sepa**2)
00029 dr2dr1 = (rad1 - sepa*st*cp)/rad2
00030 psi_tmp = 1.0d0 + 0.5d0*bhmass/rad1 + 0.5d0*bhmass_ex/rad2
00031 alps_tmp = 1.0d0 - 0.5d0*bhmass/rad1 - 0.5d0*bhmass_ex/rad2
00032 dpsidr_tmp = - 0.5d0*bhmass/rad1**2 &
00033 & - 0.5d0*bhmass_ex/rad2**2*dr2dr1
00034 dalpsdr_tmp= + 0.5d0*bhmass/rad1**2 &
00035 & + 0.5d0*bhmass_ex/rad2**2*dr2dr1
00036 if (char_bc.eq.'d') then
00037 sou_surf(itg,ipg) = alps_tmp/psi_tmp
00038 end if
00039 if (char_bc.eq.'n') then
00040 dsou_surf(itg,ipg) = dalpsdr_tmp/psi_tmp &
00041 & - alps_tmp*dpsidr_tmp/psi_tmp**2
00042 end if
00043 end do
00044 end do
00045
00046 end subroutine bh_boundary_alph_test_mpt