00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 char hole_bhns_global_C[] = "$Header: /cvsroot/Lorene/C++/Source/Hole_bhns/hole_bhns_global.C,v 1.3 2008/07/02 21:10:15 k_taniguchi Exp $" ;
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #include <math.h>
00052
00053
00054 #include "hole_bhns.h"
00055 #include "unites.h"
00056 #include "utilitaires.h"
00057
00058
00059
00060
00061
00062 double Hole_bhns::mass_irr_bhns() const {
00063
00064
00065
00066 using namespace Unites ;
00067
00068 if (p_mass_irr_bhns == 0x0) {
00069
00070 Scalar psi4(mp) ;
00071 psi4 = pow(confo_tot, 4.) ;
00072 psi4.std_spectral_base() ;
00073 psi4.annule_domain(0) ;
00074 psi4.raccord(1) ;
00075
00076 double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00077
00078 Map_af& mp_aff= dynamic_cast<Map_af&>(mp) ;
00079
00080 double a_ah = mp_aff.integrale_surface(psi4, radius_ah) ;
00081 double mirr = sqrt(a_ah/16./M_PI) / ggrav ;
00082
00083 p_mass_irr_bhns = new double( mirr ) ;
00084
00085 }
00086
00087 return *p_mass_irr_bhns ;
00088
00089 }
00090
00091
00092
00093
00094
00095 double Hole_bhns::spin_am_bhns(const Tbl& xi_i, const double& phi_i,
00096 const double& theta_i, const int& nrk_phi,
00097 const int& nrk_theta) const {
00098
00099
00100
00101 using namespace Unites ;
00102
00103 if (p_spin_am_bhns == 0x0) {
00104
00105 double mass = ggrav * mass_bh ;
00106
00107 Scalar rr(mp) ;
00108 rr = mp.r ;
00109 rr.std_spectral_base() ;
00110
00111 Scalar st(mp) ;
00112 st = mp.sint ;
00113 st.std_spectral_base() ;
00114 Scalar ct(mp) ;
00115 ct = mp.cost ;
00116 ct.std_spectral_base() ;
00117 Scalar sp(mp) ;
00118 sp = mp.sinp ;
00119 sp.std_spectral_base() ;
00120 Scalar cp(mp) ;
00121 cp = mp.cosp ;
00122 cp.std_spectral_base() ;
00123
00124 Vector ll(mp, CON, mp.get_bvect_cart()) ;
00125 ll.set_etat_qcq() ;
00126 ll.set(1) = st % cp ;
00127 ll.set(2) = st % sp ;
00128 ll.set(3) = ct ;
00129 ll.std_spectral_base() ;
00130
00131 double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00132
00133 if (kerrschild) {
00134
00135 cout << "Not yet prepared!!!" << endl ;
00136 abort() ;
00137
00138 }
00139 else {
00140
00141
00142
00143 double cc ;
00144
00145 if (bc_lapconf_nd) {
00146 if (bc_lapconf_fs) {
00147
00148
00149 cc = 2. * (sqrt(13.) - 1.) / 3. ;
00150 }
00151 else {
00152
00153
00154 cc = 4. / 3. ;
00155 }
00156 }
00157 else {
00158 if (bc_lapconf_fs) {
00159
00160
00161 cout << "!!!!! WARNING: Not yet prepared !!!!!" << endl ;
00162 abort() ;
00163 }
00164 else {
00165
00166
00167 cout << "!!!!! WARNING: Not yet prepared !!!!!" << endl ;
00168 abort() ;
00169
00170 }
00171 }
00172
00173 Scalar r_are(mp) ;
00174 r_are = r_coord(bc_lapconf_nd, bc_lapconf_fs) ;
00175 r_are.std_spectral_base() ;
00176
00177
00178 Vector killing_spher(mp, COV, mp.get_bvect_spher()) ;
00179 killing_spher.set_etat_qcq() ;
00180 killing_spher = killing_vect(xi_i, phi_i, theta_i,
00181 nrk_phi, nrk_theta) ;
00182 killing_spher.std_spectral_base() ;
00183
00184 killing_spher.set(2) = confo_tot * confo_tot * radius_ah
00185 * killing_spher(2) ;
00186 killing_spher.set(3) = confo_tot * confo_tot * radius_ah
00187 * killing_spher(3) ;
00188
00189 killing_spher.std_spectral_base() ;
00190
00191
00192 Vector killing(mp, COV, mp.get_bvect_cart()) ;
00193 killing.set_etat_qcq() ;
00194 killing.set(1) = (killing_spher(2) * ct * cp - killing_spher(3) * sp)
00195 / radius_ah ;
00196 killing.set(2) = (killing_spher(2) * ct * sp + killing_spher(3) * cp)
00197 / radius_ah ;
00198 killing.set(3) = - killing_spher(2) * st / radius_ah ;
00199 killing.std_spectral_base() ;
00200
00201
00202
00203
00204 Scalar source_1(mp) ;
00205 source_1 = (ll(1) * (taij_tot_rs(1,1) * killing(1)
00206 + taij_tot_rs(1,2) * killing(2)
00207 + taij_tot_rs(1,3) * killing(3))
00208 + ll(2) * (taij_tot_rs(2,1) * killing(1)
00209 + taij_tot_rs(2,2) * killing(2)
00210 + taij_tot_rs(2,3) * killing(3))
00211 + ll(3) * (taij_tot_rs(3,1) * killing(1)
00212 + taij_tot_rs(3,2) * killing(2)
00213 + taij_tot_rs(3,3) * killing(3)))
00214 / pow(confo_tot, 4.) ;
00215 source_1.std_spectral_base() ;
00216 source_1.dec_dzpuis(2) ;
00217
00218 Scalar source_2(mp) ;
00219 source_2 = -2. * pow(confo_tot, 3.) * mass * mass * cc
00220 * sqrt(1. - 2.*mass/r_are/rr + cc*cc*pow(mass/r_are/rr,4.))
00221 * (ll(1)*killing(1) + ll(2)*killing(2) + ll(3)*killing(3))
00222 / lapconf_tot / pow(r_are*rr, 3.) ;
00223 source_2.std_spectral_base() ;
00224
00225 Scalar source_surf(mp) ;
00226 source_surf = source_1 + source_2 ;
00227 source_surf.std_spectral_base() ;
00228 source_surf.annule_domain(0) ;
00229 source_surf.raccord(1) ;
00230
00231 Map_af& mp_aff= dynamic_cast<Map_af&>(mp) ;
00232
00233 double spin = mp_aff.integrale_surface(source_surf, radius_ah) ;
00234 double spin_angmom = 0.5 * spin / qpig ;
00235
00236 p_spin_am_bhns = new double( spin_angmom ) ;
00237
00238 }
00239
00240 }
00241
00242 return *p_spin_am_bhns ;
00243
00244 }