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 blackhole_global_C[] = "$Header: /cvsroot/Lorene/C++/Source/Black_hole/blackhole_global.C,v 1.3 2008/07/02 20:45:58 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 "blackhole.h"
00055 #include "unites.h"
00056 #include "utilitaires.h"
00057
00058
00059
00060
00061
00062 double Black_hole::mass_irr() const {
00063
00064
00065
00066 using namespace Unites ;
00067
00068 if (p_mass_irr == 0x0) {
00069
00070 Scalar psi4(mp) ;
00071 psi4 = pow(confo, 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(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 = new double( mirr ) ;
00084
00085 }
00086
00087 return *p_mass_irr ;
00088
00089 }
00090
00091
00092
00093
00094
00095
00096 double Black_hole::mass_adm() const {
00097
00098
00099
00100 using namespace Unites ;
00101
00102 if (p_mass_adm == 0x0) {
00103
00104 double madm ;
00105 double integ_s ;
00106 double integ_v ;
00107
00108 double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00109 Map_af mp_aff(mp) ;
00110
00111 Scalar source_surf(mp) ;
00112 source_surf.set_etat_qcq() ;
00113 Scalar source_volm(mp) ;
00114 source_volm.set_etat_qcq() ;
00115
00116 Scalar rr(mp) ;
00117 rr = mp.r ;
00118 rr.std_spectral_base() ;
00119 Scalar st(mp) ;
00120 st = mp.sint ;
00121 st.std_spectral_base() ;
00122 Scalar ct(mp) ;
00123 ct = mp.cost ;
00124 ct.std_spectral_base() ;
00125 Scalar sp(mp) ;
00126 sp = mp.sinp ;
00127 sp.std_spectral_base() ;
00128 Scalar cp(mp) ;
00129 cp = mp.cosp ;
00130 cp.std_spectral_base() ;
00131
00132 Vector ll(mp, CON, mp.get_bvect_cart()) ;
00133 ll.set_etat_qcq() ;
00134 ll.set(1) = st * cp ;
00135 ll.set(2) = st * sp ;
00136 ll.set(3) = ct ;
00137 ll.std_spectral_base() ;
00138
00139 Scalar lldconf = confo.dsdr() ;
00140 lldconf.std_spectral_base() ;
00141
00142 if (kerrschild) {
00143
00144 cout << "!!!!! WARNING: Not yet available !!!!!" << endl ;
00145 abort() ;
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221 }
00222 else {
00223
00224 Scalar divshf(mp) ;
00225 divshf = shift(1).deriv(1) + shift(2).deriv(2)
00226 + shift(3).deriv(3) ;
00227 divshf.std_spectral_base() ;
00228 divshf.dec_dzpuis(2) ;
00229
00230 Scalar llshift(mp) ;
00231 llshift = ll(1)%shift(1) + ll(2)%shift(2) + ll(3)%shift(3) ;
00232 llshift.std_spectral_base() ;
00233
00234 Scalar lldllsh = llshift.dsdr() ;
00235 lldllsh.std_spectral_base() ;
00236 lldllsh.dec_dzpuis(2) ;
00237
00238
00239
00240 source_surf = confo/rr
00241 - pow(confo,4.) * (divshf - 3.*lldllsh) / lapconf / 6. ;
00242
00243 source_surf.std_spectral_base() ;
00244 source_surf.annule_domain(0) ;
00245 source_surf.raccord(1) ;
00246
00247 integ_s = mp_aff.integrale_surface(source_surf, radius_ah) ;
00248
00249
00250
00251 source_volm = 0.25 * taij_quad / pow(confo,7.) ;
00252
00253 source_volm.std_spectral_base() ;
00254 source_volm.annule_domain(0) ;
00255
00256 integ_v = source_volm.integrale() ;
00257
00258
00259
00260 madm = integ_s / qpig + integ_v / qpig ;
00261
00262
00263
00264 double mmm = - 2.*(mp_aff.integrale_surface_infini(lldconf))/qpig ;
00265
00266 cout << "Another ADM mass : " << mmm / msol << endl ;
00267
00268 }
00269
00270 p_mass_adm = new double( madm ) ;
00271
00272 }
00273
00274 return *p_mass_adm ;
00275
00276 }
00277
00278
00279
00280
00281
00282 double Black_hole::mass_kom() const {
00283
00284
00285
00286 using namespace Unites ;
00287
00288 if (p_mass_kom == 0x0) {
00289
00290 double mkom ;
00291 double integ_s ;
00292 double integ_v ;
00293
00294 double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00295 Map_af mp_aff(mp) ;
00296
00297 Scalar source_surf(mp) ;
00298 source_surf.set_etat_qcq() ;
00299 Scalar source_volm(mp) ;
00300 source_volm.set_etat_qcq() ;
00301
00302 Scalar rr(mp) ;
00303 rr = mp.r ;
00304 rr.std_spectral_base() ;
00305 Scalar st(mp) ;
00306 st = mp.sint ;
00307 st.std_spectral_base() ;
00308 Scalar ct(mp) ;
00309 ct = mp.cost ;
00310 ct.std_spectral_base() ;
00311 Scalar sp(mp) ;
00312 sp = mp.sinp ;
00313 sp.std_spectral_base() ;
00314 Scalar cp(mp) ;
00315 cp = mp.cosp ;
00316 cp.std_spectral_base() ;
00317
00318 Vector ll(mp, CON, mp.get_bvect_cart()) ;
00319 ll.set_etat_qcq() ;
00320 ll.set(1) = st * cp ;
00321 ll.set(2) = st * sp ;
00322 ll.set(3) = ct ;
00323 ll.std_spectral_base() ;
00324
00325 Vector dlcnf(mp, CON, mp.get_bvect_cart()) ;
00326 dlcnf.set_etat_qcq() ;
00327 for (int i=1; i<=3; i++)
00328 dlcnf.set(i) = confo.deriv(i) / confo ;
00329
00330 dlcnf.std_spectral_base() ;
00331
00332 if (kerrschild) {
00333
00334 cout << "!!!!! WARNING: Not yet available !!!!!" << endl ;
00335 abort() ;
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437 }
00438 else {
00439
00440
00441
00442 Scalar lldlap = lapconf.dsdr() / confo
00443 - lapconf * confo.dsdr() / confo / confo ;
00444 lldlap.std_spectral_base() ;
00445
00446 source_surf = lldlap ;
00447
00448 source_surf.std_spectral_base() ;
00449 source_surf.dec_dzpuis(2) ;
00450 source_surf.annule_domain(0) ;
00451 source_surf.raccord(1) ;
00452
00453 integ_s = mp_aff.integrale_surface(source_surf, radius_ah) ;
00454
00455
00456
00457 Vector dlap(mp, CON, mp.get_bvect_cart()) ;
00458 dlap.set_etat_qcq() ;
00459
00460 for (int i=1; i<=3; i++)
00461 dlap.set(i) = lapconf.deriv(i) / confo
00462 - lapconf * confo.deriv(i) / confo / confo ;
00463
00464 dlap.std_spectral_base() ;
00465
00466 source_volm = lapconf % taij_quad / pow(confo,9.)
00467 - 2.*(dlap(1)%dlcnf(1) + dlap(2)%dlcnf(2) + dlap(3)%dlcnf(3)) ;
00468
00469 source_volm.std_spectral_base() ;
00470 source_volm.annule_domain(0) ;
00471
00472 integ_v = source_volm.integrale() ;
00473
00474
00475
00476 mkom = integ_s / qpig + integ_v / qpig ;
00477
00478
00479 double mmm = (mp_aff.integrale_surface_infini(lldlap)) / qpig ;
00480
00481 cout << "Another Komar mass : " << mmm / msol << endl ;
00482
00483 }
00484
00485 p_mass_kom = new double( mkom ) ;
00486
00487 }
00488
00489 return *p_mass_kom ;
00490
00491 }
00492
00493
00494
00495
00496
00497
00498 double Black_hole::rad_ah() const {
00499
00500 if (p_rad_ah == 0x0) {
00501
00502 Scalar rr(mp) ;
00503 rr = mp.r ;
00504 rr.std_spectral_base() ;
00505
00506 double rad = rr.val_grid_point(1,0,0,0) ;
00507
00508 p_rad_ah = new double( rad ) ;
00509
00510 }
00511
00512 return *p_rad_ah ;
00513
00514 }
00515
00516
00517
00518
00519
00520
00521 double Black_hole::spin_am_bh(bool bclapconf_nd, bool bclapconf_fs,
00522 const Tbl& xi_i, const double& phi_i,
00523 const double& theta_i, const int& nrk_phi,
00524 const int& nrk_theta) const {
00525
00526
00527
00528 using namespace Unites ;
00529
00530 if (p_spin_am_bh == 0x0) {
00531
00532 Scalar st(mp) ;
00533 st = mp.sint ;
00534 st.std_spectral_base() ;
00535 Scalar ct(mp) ;
00536 ct = mp.cost ;
00537 ct.std_spectral_base() ;
00538 Scalar sp(mp) ;
00539 sp = mp.sinp ;
00540 sp.std_spectral_base() ;
00541 Scalar cp(mp) ;
00542 cp = mp.cosp ;
00543 cp.std_spectral_base() ;
00544
00545 Vector ll(mp, CON, mp.get_bvect_cart()) ;
00546 ll.set_etat_qcq() ;
00547 ll.set(1) = st % cp ;
00548 ll.set(2) = st % sp ;
00549 ll.set(3) = ct ;
00550 ll.std_spectral_base() ;
00551
00552 double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00553
00554 if (kerrschild) {
00555
00556 cout << "Not yet prepared!!!" << endl ;
00557 abort() ;
00558
00559 }
00560 else {
00561
00562
00563 Vector killing_spher(mp, COV, mp.get_bvect_spher()) ;
00564 killing_spher.set_etat_qcq() ;
00565 killing_spher = killing_vect_bh(xi_i, phi_i, theta_i,
00566 nrk_phi, nrk_theta) ;
00567 killing_spher.std_spectral_base() ;
00568
00569 killing_spher.set(2) = confo * confo * radius_ah * killing_spher(2) ;
00570 killing_spher.set(3) = confo * confo * radius_ah * killing_spher(3) ;
00571
00572 killing_spher.std_spectral_base() ;
00573
00574
00575 Vector killing(mp, COV, mp.get_bvect_cart()) ;
00576 killing.set_etat_qcq() ;
00577
00578 killing.set(1) = (killing_spher(2) * ct * cp - killing_spher(3) * sp)
00579 / radius_ah ;
00580 killing.set(2) = (killing_spher(2) * ct * sp + killing_spher(3) * cp)
00581 / radius_ah ;
00582 killing.set(3) = - killing_spher(2) * st / radius_ah ;
00583 killing.std_spectral_base() ;
00584
00585
00586
00587
00588 Scalar source_1(mp) ;
00589 source_1 = (ll(1) * (taij(1,1) * killing(1)
00590 + taij(1,2) * killing(2)
00591 + taij(1,3) * killing(3))
00592 + ll(2) * (taij(2,1) * killing(1)
00593 + taij(2,2) * killing(2)
00594 + taij(2,3) * killing(3))
00595 + ll(3) * (taij(3,1) * killing(1)
00596 + taij(3,2) * killing(2)
00597 + taij(3,3) * killing(3)))
00598 / pow(confo, 4.) ;
00599 source_1.std_spectral_base() ;
00600 source_1.dec_dzpuis(2) ;
00601
00602 Scalar source_surf(mp) ;
00603 source_surf = source_1 ;
00604 source_surf.std_spectral_base() ;
00605 source_surf.annule_domain(0) ;
00606 source_surf.raccord(1) ;
00607
00608 Map_af mp_aff(mp) ;
00609
00610 double spin = mp_aff.integrale_surface(source_surf, radius_ah) ;
00611 double spin_angmom = 0.5 * spin / qpig ;
00612
00613 p_spin_am_bh = new double( spin_angmom ) ;
00614
00615 }
00616
00617 }
00618
00619 return *p_spin_am_bh ;
00620
00621 }
00622
00623
00624
00625
00626
00627 const Tbl& Black_hole::angu_mom_bh() const {
00628
00629
00630
00631 using namespace Unites ;
00632
00633 if (p_angu_mom_bh == 0x0) {
00634
00635 p_angu_mom_bh = new Tbl(3) ;
00636 p_angu_mom_bh->annule_hard() ;
00637
00638 double integ_bh_s_x ;
00639 double integ_bh_s_y ;
00640 double integ_bh_s_z ;
00641
00642 double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00643 Map_af mp_aff(mp) ;
00644
00645 Scalar xx(mp) ;
00646 xx = mp.x ;
00647 xx.std_spectral_base() ;
00648 Scalar yy(mp) ;
00649 yy = mp.y ;
00650 yy.std_spectral_base() ;
00651 Scalar zz(mp) ;
00652 zz = mp.z ;
00653 zz.std_spectral_base() ;
00654
00655 Scalar st(mp) ;
00656 st = mp.sint ;
00657 st.std_spectral_base() ;
00658 Scalar ct(mp) ;
00659 ct = mp.cost ;
00660 ct.std_spectral_base() ;
00661 Scalar sp(mp) ;
00662 sp = mp.sinp ;
00663 sp.std_spectral_base() ;
00664 Scalar cp(mp) ;
00665 cp = mp.cosp ;
00666 cp.std_spectral_base() ;
00667
00668 Vector ll(mp, CON, mp.get_bvect_cart()) ;
00669 ll.set_etat_qcq() ;
00670 ll.set(1) = st % cp ;
00671 ll.set(2) = st % sp ;
00672 ll.set(3) = ct ;
00673 ll.std_spectral_base() ;
00674
00675 Vector jbh_x(mp, CON, mp.get_bvect_cart()) ;
00676 jbh_x.set_etat_qcq() ;
00677 for (int i=1; i<=3; i++)
00678 jbh_x.set(i) = yy * taij(3,i) - zz * taij(2,i) ;
00679
00680 jbh_x.std_spectral_base() ;
00681
00682 Vector jbh_y(mp, CON, mp.get_bvect_cart()) ;
00683 jbh_y.set_etat_qcq() ;
00684 for (int i=1; i<=3; i++)
00685 jbh_y.set(i) = zz * taij(1,i) - xx * taij(3,i) ;
00686
00687 jbh_y.std_spectral_base() ;
00688
00689 Vector jbh_z(mp, CON, mp.get_bvect_cart()) ;
00690 jbh_z.set_etat_qcq() ;
00691 for (int i=1; i<=3; i++)
00692 jbh_z.set(i) = xx * taij(2,i) - yy * taij(1,i) ;
00693
00694 jbh_z.std_spectral_base() ;
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753 Scalar sou_bh_sx(mp) ;
00754 sou_bh_sx = jbh_x(1)%ll(1) + jbh_x(2)%ll(2) + jbh_x(3)%ll(3) ;
00755 sou_bh_sx.std_spectral_base() ;
00756 sou_bh_sx.dec_dzpuis(2) ;
00757 sou_bh_sx.annule_domain(0) ;
00758 sou_bh_sx.raccord(1) ;
00759
00760 integ_bh_s_x = mp_aff.integrale_surface(sou_bh_sx, radius_ah) ;
00761
00762 p_angu_mom_bh->set(0) = 0.5 * integ_bh_s_x / qpig ;
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774 Scalar sou_bh_sy(mp) ;
00775 sou_bh_sy = jbh_y(1)%ll(1) + jbh_y(2)%ll(2) + jbh_y(3)%ll(3) ;
00776 sou_bh_sy.std_spectral_base() ;
00777 sou_bh_sy.dec_dzpuis(2) ;
00778 sou_bh_sy.annule_domain(0) ;
00779 sou_bh_sy.raccord(1) ;
00780
00781 integ_bh_s_y = mp_aff.integrale_surface(sou_bh_sy, radius_ah) ;
00782
00783 p_angu_mom_bh->set(1) = 0.5 * integ_bh_s_y / qpig ;
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795 Scalar sou_bh_sz(mp) ;
00796 sou_bh_sz = jbh_z(1)%ll(1) + jbh_z(2)%ll(2) + jbh_z(3)%ll(3) ;
00797 sou_bh_sz.std_spectral_base() ;
00798 sou_bh_sz.dec_dzpuis(2) ;
00799 sou_bh_sz.annule_domain(0) ;
00800 sou_bh_sz.raccord(1) ;
00801
00802 integ_bh_s_z = mp_aff.integrale_surface(sou_bh_sz, radius_ah) ;
00803
00804 p_angu_mom_bh->set(2) = 0.5 * integ_bh_s_z / qpig ;
00805
00806 }
00807
00808 return *p_angu_mom_bh ;
00809
00810 }