hole_bhns_global.C

00001 /*
00002  *  Methods of class Hole_bhns to compute global quantities
00003  *
00004  *    (see file hole_bhns.h for documentation).
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2005,2007 Keisuke Taniguchi
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License version 2
00015  *   as published by the Free Software Foundation.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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  * $Id: hole_bhns_global.C,v 1.3 2008/07/02 21:10:15 k_taniguchi Exp $
00032  * $Log: hole_bhns_global.C,v $
00033  * Revision 1.3  2008/07/02 21:10:15  k_taniguchi
00034  * A bug removed.
00035  *
00036  * Revision 1.2  2008/05/15 19:07:26  k_taniguchi
00037  * Introduction of the quasilocal spin angular momentum.
00038  *
00039  * Revision 1.1  2007/06/22 01:25:15  k_taniguchi
00040  * *** empty log message ***
00041  *
00042  *
00043  * $Header: /cvsroot/Lorene/C++/Source/Hole_bhns/hole_bhns_global.C,v 1.3 2008/07/02 21:10:15 k_taniguchi Exp $
00044  *
00045  */
00046 
00047 // C++ headers
00048 //#include <>
00049 
00050 // C headers
00051 #include <math.h>
00052 
00053 // Lorene headers
00054 #include "hole_bhns.h"
00055 #include "unites.h"
00056 #include "utilitaires.h"
00057 
00058                     //-----------------------------------------//
00059                     //          Irreducible mass of BH         //
00060                     //-----------------------------------------//
00061 
00062 double Hole_bhns::mass_irr_bhns() const {
00063 
00064     // Fundamental constants and units
00065     // -------------------------------
00066     using namespace Unites ;
00067 
00068     if (p_mass_irr_bhns == 0x0) {   // a new computation is required
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           //          Quasilocal spin angular momentum of BH          //
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     // Fundamental constants and units
00100     // -------------------------------
00101     using namespace Unites ;
00102 
00103     if (p_spin_am_bhns == 0x0) {   // a new computation is required
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 {  // Isotropic coordinates
00140 
00141       // Sets C/M^2 for each case of the lapse boundary condition
00142       // --------------------------------------------------------
00143       double cc ;
00144 
00145       if (bc_lapconf_nd) {  // Neumann boundary condition
00146         if (bc_lapconf_fs) {  // First condition
00147           // d(\alpha \psi)/dr = 0
00148           // ---------------------
00149           cc = 2. * (sqrt(13.) - 1.) / 3. ;
00150         }
00151         else {  // Second condition
00152           // d(\alpha \psi)/dr = (\alpha \psi)/(2 rah)
00153           // -----------------------------------------
00154           cc = 4. / 3. ;
00155         }
00156       }
00157       else {  // Dirichlet boundary condition
00158         if (bc_lapconf_fs) {  // First condition
00159           // (\alpha \psi) = 1/2
00160           // -------------------
00161           cout << "!!!!! WARNING: Not yet prepared !!!!!" << endl ;
00162           abort() ;
00163         }
00164         else {  // Second condition
00165           // (\alpha \psi) = 1/sqrt(2.) \psi_KS
00166           // ----------------------------------
00167           cout << "!!!!! WARNING: Not yet prepared !!!!!" << endl ;
00168           abort() ;
00169           //          cc = 2. * sqrt(2.) ;
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       // Killing vector of the spherical components
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       // killing_spher(3) is already divided by sin(theta)
00189       killing_spher.std_spectral_base() ;
00190 
00191       // Killing vector of the Cartesian components
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       // Surface integral <- dzpuis should be 0
00202       // --------------------------------------
00203       // Source terms in the surface integral
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) ;  // dzpuis : 2 -> 0
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 }

Generated on Tue Feb 7 01:35:17 2012 for LORENE by  doxygen 1.4.6