| 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 phys_param_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $" ; |
| 29 |
|
| 30 |
/* |
| 31 |
* $Id: phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $ |
| 32 |
* $Log: phys_param.C,v $ |
| 33 |
* Revision 1.13 2014/10/13 08:53:01 j_novak |
| 34 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 35 |
* |
| 36 |
* Revision 1.12 2014/10/06 15:13:11 j_novak |
| 37 |
* Modified #include directives to use c++ syntax. |
| 38 |
* |
| 39 |
* Revision 1.11 2005/11/02 16:09:44 jl_jaramillo |
| 40 |
* changes in boundary_nn_Dir_lapl |
| 41 |
* |
| 42 |
* Revision 1.10 2005/04/15 11:54:21 jl_jaramillo |
| 43 |
* function to compute the expansion of spherical surfaces |
| 44 |
* |
| 45 |
* Revision 1.9 2005/03/22 13:25:36 f_limousin |
| 46 |
* Small changes. The angular velocity and A^{ij} are computed |
| 47 |
* with a differnet sign. |
| 48 |
* |
| 49 |
* Revision 1.8 2005/03/03 10:10:14 f_limousin |
| 50 |
* Add the function area_hor(). |
| 51 |
* |
| 52 |
* Revision 1.7 2005/02/07 10:35:42 f_limousin |
| 53 |
* Minor changes. |
| 54 |
* |
| 55 |
* Revision 1.6 2004/12/22 18:16:16 f_limousin |
| 56 |
* Mny different changes. |
| 57 |
* |
| 58 |
* Revision 1.5 2004/11/18 12:30:01 jl_jaramillo |
| 59 |
* Definition of b_tilde |
| 60 |
* |
| 61 |
* Revision 1.4 2004/10/29 15:44:13 jl_jaramillo |
| 62 |
* ADM angular momentum added. |
| 63 |
* |
| 64 |
* Revision 1.3 2004/09/17 13:37:21 f_limousin |
| 65 |
* Correction of an error in calculation of the radius |
| 66 |
* |
| 67 |
* Revision 1.2 2004/09/09 16:54:53 f_limousin |
| 68 |
* Add the 2 lines $Id: phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $Log: for CVS |
| 69 |
* |
| 70 |
* |
| 71 |
* |
| 72 |
* $Header: /cvsroot/Lorene/C++/Source/Isol_hor/phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $ |
| 73 |
* |
| 74 |
*/ |
| 75 |
|
| 76 |
// C++ headers |
| 77 |
#include "headcpp.h" |
| 78 |
|
| 79 |
// C headers |
| 80 |
#include <cstdlib> |
| 81 |
#include <cassert> |
| 82 |
|
| 83 |
// Lorene headers |
| 84 |
#include "isol_hor.h" |
| 85 |
#include "metric.h" |
| 86 |
#include "evolution.h" |
| 87 |
#include "unites.h" |
| 88 |
#include "scalar.h" |
| 89 |
#include "vector.h" |
| 90 |
#include "graphique.h" |
| 91 |
#include "utilitaires.h" |
| 92 |
|
| 93 |
|
| 94 |
namespace Lorene { |
| 95 |
const Vector Isol_hor::radial_vect_hor() const { |
| 96 |
|
| 97 |
Vector get_radial_vect (ff.get_mp(), CON, *(ff.get_triad()) ) ; |
| 98 |
|
| 99 |
get_radial_vect.set(1) = gam_uu()(1,1) ; |
| 100 |
|
| 101 |
get_radial_vect.set(2) = gam_uu()(1,2) ; |
| 102 |
|
| 103 |
get_radial_vect.set(3) = gam_uu()(1,3) ; |
| 104 |
|
| 105 |
get_radial_vect = get_radial_vect / sqrt(gam_uu()(1,1)) ; |
| 106 |
|
| 107 |
get_radial_vect.std_spectral_base() ; |
| 108 |
|
| 109 |
|
| 110 |
return get_radial_vect ; |
| 111 |
|
| 112 |
} |
| 113 |
|
| 114 |
|
| 115 |
// Think of defining this as a pointer |
| 116 |
const Vector Isol_hor::tradial_vect_hor() const { |
| 117 |
|
| 118 |
Vector get_radial_vect (ff.get_mp(), CON, *(ff.get_triad()) ) ; |
| 119 |
|
| 120 |
get_radial_vect.set(1) = (met_gamt.con())(1,1) ; |
| 121 |
|
| 122 |
get_radial_vect.set(2) = (met_gamt.con())(1,2) ; |
| 123 |
|
| 124 |
get_radial_vect.set(3) = (met_gamt.con())(1,3) ; |
| 125 |
|
| 126 |
get_radial_vect = get_radial_vect / sqrt((met_gamt.con())(1,1)) ; |
| 127 |
|
| 128 |
get_radial_vect.std_spectral_base() ; |
| 129 |
|
| 130 |
|
| 131 |
return get_radial_vect ; |
| 132 |
|
| 133 |
} |
| 134 |
|
| 135 |
|
| 136 |
const Scalar Isol_hor::b_tilde()const { |
| 137 |
|
| 138 |
Scalar tmp = contract( beta(), 0, met_gamt.radial_vect() |
| 139 |
.down(0, met_gamt), 0) ; |
| 140 |
|
| 141 |
return tmp ; |
| 142 |
|
| 143 |
} |
| 144 |
|
| 145 |
|
| 146 |
const Scalar Isol_hor::darea_hor() const { |
| 147 |
|
| 148 |
Scalar tmp = sqrt( gam_dd()(2,2) * gam_dd()(3,3) - gam_dd()(2,3) |
| 149 |
* gam_dd()(2,3)) ; |
| 150 |
|
| 151 |
tmp.std_spectral_base() ; |
| 152 |
|
| 153 |
return tmp ; |
| 154 |
|
| 155 |
} |
| 156 |
|
| 157 |
double Isol_hor::area_hor() const { |
| 158 |
|
| 159 |
Scalar integrand (darea_hor()) ; |
| 160 |
integrand.raccord(1) ; |
| 161 |
|
| 162 |
return mp.integrale_surface(integrand, radius + 1e-15) ; |
| 163 |
|
| 164 |
} |
| 165 |
|
| 166 |
|
| 167 |
double Isol_hor::radius_hor() const { |
| 168 |
|
| 169 |
double resu = area_hor() / (4. * M_PI); |
| 170 |
|
| 171 |
resu = pow(resu, 1./2.) ; |
| 172 |
|
| 173 |
return resu ; |
| 174 |
|
| 175 |
} |
| 176 |
|
| 177 |
|
| 178 |
double Isol_hor::ang_mom_hor()const { |
| 179 |
|
| 180 |
// Vector \partial_phi |
| 181 |
Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ; |
| 182 |
|
| 183 |
Scalar tmp (ff.get_mp() ) ; |
| 184 |
tmp = 1 ; |
| 185 |
tmp.std_spectral_base() ; |
| 186 |
tmp.mult_rsint() ; |
| 187 |
|
| 188 |
phi.set(1) = 0. ; |
| 189 |
phi.set(2) = 0. ; |
| 190 |
phi.set(3) = tmp ; |
| 191 |
|
| 192 |
Scalar k_rphi = contract(contract( radial_vect_hor(), 0, k_dd(), 0), 0, |
| 193 |
phi, 0) / (8. * M_PI) ; |
| 194 |
|
| 195 |
Scalar integrand = k_rphi * darea_hor() ; // we correct with the curved |
| 196 |
// element of area |
| 197 |
|
| 198 |
double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ; |
| 199 |
|
| 200 |
return ang_mom ; |
| 201 |
|
| 202 |
} |
| 203 |
|
| 204 |
|
| 205 |
// Mass (fundamental constants made 1) |
| 206 |
double Isol_hor::mass_hor()const { |
| 207 |
|
| 208 |
double rr = radius_hor() ; |
| 209 |
|
| 210 |
double tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ; |
| 211 |
|
| 212 |
return tmp ; |
| 213 |
|
| 214 |
} |
| 215 |
|
| 216 |
|
| 217 |
// Surface gravity |
| 218 |
double Isol_hor::kappa_hor() const{ |
| 219 |
|
| 220 |
double rr = radius_hor() ; |
| 221 |
|
| 222 |
double jj = ang_mom_hor() ; |
| 223 |
|
| 224 |
double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3) |
| 225 |
* sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ; |
| 226 |
|
| 227 |
return tmp ; |
| 228 |
|
| 229 |
} |
| 230 |
|
| 231 |
|
| 232 |
// Orbital velocity |
| 233 |
double Isol_hor::omega_hor()const { |
| 234 |
|
| 235 |
double rr = radius_hor() ; |
| 236 |
|
| 237 |
double jj = ang_mom_hor() ; |
| 238 |
|
| 239 |
double tmp = 2 * jj / ( rr * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ; |
| 240 |
|
| 241 |
return tmp ; |
| 242 |
|
| 243 |
} |
| 244 |
|
| 245 |
|
| 246 |
// ADM angular momentum |
| 247 |
|
| 248 |
double Isol_hor::ang_mom_adm()const { |
| 249 |
|
| 250 |
Scalar integrand = (k_dd()(1,3) - gam_dd()(1,3) * trk()) / (8. * M_PI) ; |
| 251 |
|
| 252 |
integrand.mult_rsint() ; // in order to pass from the triad |
| 253 |
// component to the coordinate basis |
| 254 |
|
| 255 |
double tmp = mp.integrale_surface_infini(integrand) ; |
| 256 |
|
| 257 |
return tmp ; |
| 258 |
|
| 259 |
} |
| 260 |
|
| 261 |
// Expansion |
| 262 |
|
| 263 |
Scalar Isol_hor::expansion() const { |
| 264 |
|
| 265 |
Scalar expa = contract(gam().radial_vect().derive_cov(gam()), 0,1) |
| 266 |
+ contract(contract(k_dd(), 0, gam().radial_vect(), 0), |
| 267 |
0, gam().radial_vect(), 0) - trk() ; |
| 268 |
|
| 269 |
return expa ; |
| 270 |
} |
| 271 |
} |