| 1 |
/* |
| 2 |
* Method of class Isol_hor to compute physical parameters of the horizon |
| 3 |
* |
| 4 |
* (see file isol_hor.h for documentation). |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Copyright (c) 2004 Jose Luis Jaramillo |
| 10 |
* |
| 11 |
* This file is part of LORENE. |
| 12 |
* |
| 13 |
* LORENE is free software; you can redistribute it and/or modify |
| 14 |
* it under the terms of the GNU General Public License version 2 |
| 15 |
* as published by the Free Software Foundation. |
| 16 |
* |
| 17 |
* LORENE is distributed in the hope that it will be useful, |
| 18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
* GNU General Public License for more details. |
| 21 |
* |
| 22 |
* You should have received a copy of the GNU General Public License |
| 23 |
* along with LORENE; if not, write to the Free Software |
| 24 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 25 |
* |
| 26 |
*/ |
| 27 |
|
| 28 |
char single_param_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $" ; |
| 29 |
|
| 30 |
/* |
| 31 |
* $Id: single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $ |
| 32 |
* $Log: single_param.C,v $ |
| 33 |
* Revision 1.3 2014/10/13 08:53:01 j_novak |
| 34 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 35 |
* |
| 36 |
* Revision 1.2 2014/10/06 15:13:11 j_novak |
| 37 |
* Modified #include directives to use c++ syntax. |
| 38 |
* |
| 39 |
* Revision 1.1 2007/04/13 15:28:35 f_limousin |
| 40 |
* Lots of improvements, generalisation to an arbitrary state of |
| 41 |
* rotation, implementation of the spatial metric given by Samaya. |
| 42 |
* |
| 43 |
* |
| 44 |
* $Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $ |
| 45 |
* |
| 46 |
*/ |
| 47 |
|
| 48 |
// C++ headers |
| 49 |
#include "headcpp.h" |
| 50 |
|
| 51 |
// C headers |
| 52 |
#include <cstdlib> |
| 53 |
#include <cassert> |
| 54 |
|
| 55 |
// Lorene headers |
| 56 |
#include "isol_hor.h" |
| 57 |
#include "metric.h" |
| 58 |
#include "evolution.h" |
| 59 |
#include "unites.h" |
| 60 |
#include "scalar.h" |
| 61 |
#include "vector.h" |
| 62 |
#include "graphique.h" |
| 63 |
#include "utilitaires.h" |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
namespace Lorene { |
| 68 |
const Scalar Single_hor::b_tilde()const { |
| 69 |
|
| 70 |
Scalar tmp = contract( beta, 0, tgam.radial_vect() |
| 71 |
.down(0, tgam), 0) ; |
| 72 |
|
| 73 |
return tmp ; |
| 74 |
|
| 75 |
} |
| 76 |
|
| 77 |
const Scalar Single_hor::darea_hor() const { |
| 78 |
|
| 79 |
Scalar tmp = sqrt( get_gam().cov()(2,2) * get_gam().cov()(3,3) - |
| 80 |
get_gam().cov()(2,3) * get_gam().cov()(2,3)) ; |
| 81 |
|
| 82 |
tmp.std_spectral_base() ; |
| 83 |
|
| 84 |
return tmp ; |
| 85 |
|
| 86 |
} |
| 87 |
|
| 88 |
double Single_hor::area_hor() const { |
| 89 |
|
| 90 |
Scalar integrand (darea_hor()) ; |
| 91 |
integrand.raccord(1) ; |
| 92 |
|
| 93 |
return mp.integrale_surface(integrand, radius + 1e-15) ; |
| 94 |
|
| 95 |
} |
| 96 |
|
| 97 |
double Single_hor::radius_hor() const { |
| 98 |
|
| 99 |
double resu = area_hor() / (4. * M_PI); |
| 100 |
|
| 101 |
resu = pow(resu, 1./2.) ; |
| 102 |
|
| 103 |
return resu ; |
| 104 |
|
| 105 |
} |
| 106 |
|
| 107 |
double Single_hor::ang_mom_hor()const { |
| 108 |
|
| 109 |
// Vector \partial_phi |
| 110 |
Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ; |
| 111 |
|
| 112 |
Scalar tmp (ff.get_mp() ) ; |
| 113 |
tmp = 1 ; |
| 114 |
tmp.std_spectral_base() ; |
| 115 |
tmp.mult_rsint() ; |
| 116 |
|
| 117 |
phi.set(1) = 0. ; |
| 118 |
phi.set(2) = 0. ; |
| 119 |
phi.set(3) = tmp ; |
| 120 |
|
| 121 |
Scalar k_rphi = contract(contract( get_gam().radial_vect(), 0, |
| 122 |
get_k_dd(), 0), 0, |
| 123 |
phi, 0) / (8. * M_PI) ; |
| 124 |
|
| 125 |
Scalar integrand = k_rphi * darea_hor() ; // we correct with the curved |
| 126 |
// element of area |
| 127 |
|
| 128 |
double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ; |
| 129 |
|
| 130 |
return ang_mom ; |
| 131 |
|
| 132 |
} |
| 133 |
|
| 134 |
// Mass (fundamental constants made 1) |
| 135 |
double Single_hor::mass_hor()const { |
| 136 |
|
| 137 |
double rr = radius_hor() ; |
| 138 |
|
| 139 |
double tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ; |
| 140 |
|
| 141 |
return tmp ; |
| 142 |
|
| 143 |
} |
| 144 |
|
| 145 |
// Surface gravity |
| 146 |
double Single_hor::kappa_hor() const{ |
| 147 |
|
| 148 |
double rr = radius_hor() ; |
| 149 |
|
| 150 |
double jj = ang_mom_hor() ; |
| 151 |
|
| 152 |
double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3) |
| 153 |
* sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ; |
| 154 |
|
| 155 |
return tmp ; |
| 156 |
|
| 157 |
} |
| 158 |
|
| 159 |
// Orbital velocity |
| 160 |
double Single_hor::omega_hor()const { |
| 161 |
|
| 162 |
double rr = radius_hor() ; |
| 163 |
|
| 164 |
double jj = ang_mom_hor() ; |
| 165 |
|
| 166 |
double tmp = 2 * jj / ( rr * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ; |
| 167 |
|
| 168 |
return tmp ; |
| 169 |
|
| 170 |
} |
| 171 |
|
| 172 |
// ADM angular momentum |
| 173 |
|
| 174 |
double Single_hor::ang_mom_adm()const { |
| 175 |
|
| 176 |
Scalar integrand = (get_k_dd()(1,3) - get_gam().cov()(1,3) * trK) / |
| 177 |
(8. * M_PI) ; |
| 178 |
|
| 179 |
integrand.mult_rsint() ; // in order to pass from the triad |
| 180 |
// component to the coordinate basis |
| 181 |
|
| 182 |
double tmp = mp.integrale_surface_infini(integrand) ; |
| 183 |
|
| 184 |
return tmp ; |
| 185 |
|
| 186 |
} |
| 187 |
|
| 188 |
// Expansion |
| 189 |
|
| 190 |
Scalar Single_hor::expansion() const { |
| 191 |
|
| 192 |
Scalar expa = contract(get_gam().radial_vect().derive_cov(get_gam()), 0,1) |
| 193 |
+ contract(contract(get_k_dd(), 0, get_gam().radial_vect(), 0), |
| 194 |
0, get_gam().radial_vect(), 0) - trK ; |
| 195 |
|
| 196 |
return expa ; |
| 197 |
} |
| 198 |
} |