| 1 |
/* |
| 2 |
* Methods Et_bin_bhns_extr::update_metric_extr_ks |
| 3 |
* and Et_bin_bhns_extr::update_metric_extr_cf |
| 4 |
* |
| 5 |
* (see file et_bin_bhns_extr.h for documentation). |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Copyright (c) 2004-2005 Keisuke Taniguchi |
| 11 |
* |
| 12 |
* This file is part of LORENE. |
| 13 |
* |
| 14 |
* LORENE is free software; you can redistribute it and/or modify |
| 15 |
* it under the terms of the GNU General Public License version 2 |
| 16 |
* as published by the Free Software Foundation. |
| 17 |
* |
| 18 |
* LORENE is distributed in the hope that it will be useful, |
| 19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
* GNU General Public License for more details. |
| 22 |
* |
| 23 |
* You should have received a copy of the GNU General Public License |
| 24 |
* along with LORENE; if not, write to the Free Software |
| 25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 |
* |
| 27 |
*/ |
| 28 |
|
| 29 |
char et_bin_bhns_extr_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_upmetr.C,v 1.4 2014/10/13 08:52:55 j_novak Exp $" ; |
| 30 |
|
| 31 |
/* |
| 32 |
* $Id: et_bin_bhns_extr_upmetr.C,v 1.4 2014/10/13 08:52:55 j_novak Exp $ |
| 33 |
* $Log: et_bin_bhns_extr_upmetr.C,v $ |
| 34 |
* Revision 1.4 2014/10/13 08:52:55 j_novak |
| 35 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 36 |
* |
| 37 |
* Revision 1.3 2014/10/06 15:13:08 j_novak |
| 38 |
* Modified #include directives to use c++ syntax. |
| 39 |
* |
| 40 |
* Revision 1.2 2005/02/28 23:16:37 k_taniguchi |
| 41 |
* Modification to include the case of the conformally flat background metric |
| 42 |
* |
| 43 |
* Revision 1.1 2004/11/30 20:51:32 k_taniguchi |
| 44 |
* *** empty log message *** |
| 45 |
* |
| 46 |
* |
| 47 |
* $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_upmetr.C,v 1.4 2014/10/13 08:52:55 j_novak Exp $ |
| 48 |
* |
| 49 |
*/ |
| 50 |
|
| 51 |
// C headers |
| 52 |
#include <cmath> |
| 53 |
|
| 54 |
// Lorene headers |
| 55 |
#include "et_bin_bhns_extr.h" |
| 56 |
#include "etoile.h" |
| 57 |
#include "coord.h" |
| 58 |
#include "unites.h" |
| 59 |
|
| 60 |
//-----------------------------------------------------------// |
| 61 |
// No relaxation for a fixed BH background // |
| 62 |
//-----------------------------------------------------------// |
| 63 |
|
| 64 |
namespace Lorene { |
| 65 |
void Et_bin_bhns_extr::update_metric_extr(const double& mass, |
| 66 |
const double& sepa) |
| 67 |
{ |
| 68 |
|
| 69 |
using namespace Unites ; |
| 70 |
|
| 71 |
if (kerrschild) { |
| 72 |
|
| 73 |
// Computation of quantities coming from the companion (K-S BH) |
| 74 |
// ------------------------------------------------------------ |
| 75 |
|
| 76 |
const Coord& xx = mp.x ; |
| 77 |
const Coord& yy = mp.y ; |
| 78 |
const Coord& zz = mp.z ; |
| 79 |
|
| 80 |
Tenseur r_bh(mp) ; |
| 81 |
r_bh.set_etat_qcq() ; |
| 82 |
r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ; |
| 83 |
r_bh.set_std_base() ; |
| 84 |
|
| 85 |
Tenseur xx_con(mp, 1, CON, ref_triad) ; |
| 86 |
xx_con.set_etat_qcq() ; |
| 87 |
xx_con.set(0) = xx + sepa ; |
| 88 |
xx_con.set(1) = yy ; |
| 89 |
xx_con.set(2) = zz ; |
| 90 |
xx_con.set_std_base() ; |
| 91 |
|
| 92 |
Tenseur xsr_con(mp, 1, CON, ref_triad) ; |
| 93 |
xsr_con = xx_con / r_bh ; |
| 94 |
xsr_con.set_std_base() ; |
| 95 |
|
| 96 |
Tenseur msr(mp) ; |
| 97 |
msr = ggrav * mass / r_bh ; |
| 98 |
msr.set_std_base() ; |
| 99 |
|
| 100 |
Tenseur lapse_bh(mp) ; |
| 101 |
lapse_bh = 1. / sqrt( 1.+2.*msr ) ; |
| 102 |
lapse_bh.set_std_base() ; |
| 103 |
|
| 104 |
logn_comp.set_etat_qcq() ; |
| 105 |
logn_comp.set() = log( lapse_bh() ) ; |
| 106 |
logn_comp.set_std_base() ; |
| 107 |
|
| 108 |
beta_comp.set_etat_qcq() ; |
| 109 |
beta_comp.set() = log( lapse_bh() ) ; |
| 110 |
// conformal factor of KS-BH is unity |
| 111 |
beta_comp.set_std_base() ; |
| 112 |
|
| 113 |
shift_comp.set_etat_qcq() ; |
| 114 |
|
| 115 |
shift_comp.set(0) = -2.*lapse_bh()*lapse_bh()*msr()*xsr_con(0) ; |
| 116 |
shift_comp.set(1) = -2.*lapse_bh()*lapse_bh()*msr()*xsr_con(1) ; |
| 117 |
shift_comp.set(2) = -2.*lapse_bh()*lapse_bh()*msr()*xsr_con(2) ; |
| 118 |
|
| 119 |
shift_comp.set_std_base() ; |
| 120 |
shift_comp.set_triad( ref_triad ) ; |
| 121 |
|
| 122 |
// Lapse function N |
| 123 |
// ---------------- |
| 124 |
|
| 125 |
nnn = exp( unsurc2 * logn_auto ) * lapse_bh ; |
| 126 |
|
| 127 |
nnn.set_std_base() ; |
| 128 |
|
| 129 |
// Conformal factor A^2 |
| 130 |
// -------------------- |
| 131 |
|
| 132 |
a_car = exp ( 2.*unsurc2*(beta_auto - logn_auto) ) ; |
| 133 |
|
| 134 |
a_car.set_std_base() ; |
| 135 |
|
| 136 |
// Shift vector N^i |
| 137 |
// ---------------- |
| 138 |
|
| 139 |
shift = shift_auto + shift_comp ; |
| 140 |
|
| 141 |
// Derivative of metric coefficients |
| 142 |
// ---------------------------------- |
| 143 |
|
| 144 |
// ... (d/dX,d/dY,d/dZ)(logn_auto) : |
| 145 |
d_logn_auto_regu = logn_auto_regu.gradient() ; // (d/dx, d/dy, d/dz) |
| 146 |
d_logn_auto_regu.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 147 |
|
| 148 |
if ( *(d_logn_auto_div.get_triad()) != ref_triad ) { |
| 149 |
|
| 150 |
// Change the basis from spherical coordinate to Cartesian one |
| 151 |
d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ; |
| 152 |
|
| 153 |
// Change the basis from mapping coordinate to absolute one |
| 154 |
d_logn_auto_div.change_triad( ref_triad ) ; |
| 155 |
|
| 156 |
} |
| 157 |
|
| 158 |
d_logn_auto = d_logn_auto_regu + d_logn_auto_div ; |
| 159 |
|
| 160 |
// ... (d/dX,d/dY,d/dZ)(beta_auto) : |
| 161 |
d_beta_auto = beta_auto.gradient() ; // (d/dx, d/dy, d/dz) |
| 162 |
d_beta_auto.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 163 |
|
| 164 |
if (relativistic) { |
| 165 |
// ... extrinsic curvature (tkij_auto and akcar_auto) |
| 166 |
extrinsic_curv_extr(mass, sepa) ; |
| 167 |
} |
| 168 |
|
| 169 |
// The derived quantities are obsolete |
| 170 |
// ----------------------------------- |
| 171 |
|
| 172 |
Etoile_bin::del_deriv() ; |
| 173 |
|
| 174 |
} |
| 175 |
else { |
| 176 |
|
| 177 |
// Computation of quantities coming from the companion (CF Sch. BH) |
| 178 |
// ---------------------------------------------------------------- |
| 179 |
|
| 180 |
const Coord& xx = mp.x ; |
| 181 |
const Coord& yy = mp.y ; |
| 182 |
const Coord& zz = mp.z ; |
| 183 |
|
| 184 |
Tenseur r_bh(mp) ; |
| 185 |
r_bh.set_etat_qcq() ; |
| 186 |
r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ; |
| 187 |
r_bh.set_std_base() ; |
| 188 |
|
| 189 |
Tenseur msr(mp) ; |
| 190 |
msr = ggrav * mass / r_bh ; |
| 191 |
msr.set_std_base() ; |
| 192 |
|
| 193 |
Tenseur lapse_bh(mp) ; |
| 194 |
lapse_bh = (1.-0.5*msr) / (1.+0.5*msr) ; |
| 195 |
lapse_bh.set_std_base() ; |
| 196 |
|
| 197 |
logn_comp.set_etat_qcq() ; |
| 198 |
logn_comp.set() = log( lapse_bh() ) ; |
| 199 |
logn_comp.set_std_base() ; |
| 200 |
|
| 201 |
Tenseur lappsi(mp) ; |
| 202 |
lappsi = 1. - 0.25*msr*msr ; |
| 203 |
lappsi.set_std_base() ; |
| 204 |
|
| 205 |
beta_comp.set_etat_qcq() ; |
| 206 |
beta_comp.set() = log( lappsi() ) ; |
| 207 |
beta_comp.set_std_base() ; |
| 208 |
|
| 209 |
shift_comp.set_etat_qcq() ; |
| 210 |
|
| 211 |
shift_comp.set(0) = 0. ; |
| 212 |
shift_comp.set(1) = 0. ; |
| 213 |
shift_comp.set(2) = 0. ; |
| 214 |
|
| 215 |
shift_comp.set_std_base() ; |
| 216 |
shift_comp.set_triad( ref_triad ) ; |
| 217 |
|
| 218 |
// Lapse function N |
| 219 |
// ---------------- |
| 220 |
|
| 221 |
nnn = exp( unsurc2 * logn_auto ) * lapse_bh ; |
| 222 |
|
| 223 |
nnn.set_std_base() ; |
| 224 |
|
| 225 |
// Conformal factor A^2 |
| 226 |
// -------------------- |
| 227 |
|
| 228 |
a_car = exp ( 2.*unsurc2*(beta_auto + beta_comp |
| 229 |
- logn_auto - logn_comp) ) ; |
| 230 |
|
| 231 |
a_car.set_std_base() ; |
| 232 |
|
| 233 |
// Shift vector N^i |
| 234 |
// ---------------- |
| 235 |
|
| 236 |
shift = shift_auto + shift_comp ; |
| 237 |
|
| 238 |
// Derivative of metric coefficients |
| 239 |
// ---------------------------------- |
| 240 |
|
| 241 |
// ... (d/dX,d/dY,d/dZ)(logn_auto) : |
| 242 |
d_logn_auto_regu = logn_auto_regu.gradient() ; // (d/dx, d/dy, d/dz) |
| 243 |
d_logn_auto_regu.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 244 |
|
| 245 |
if ( *(d_logn_auto_div.get_triad()) != ref_triad ) { |
| 246 |
|
| 247 |
// Change the basis from spherical coordinate to Cartesian one |
| 248 |
d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ; |
| 249 |
|
| 250 |
// Change the basis from mapping coordinate to absolute one |
| 251 |
d_logn_auto_div.change_triad( ref_triad ) ; |
| 252 |
|
| 253 |
} |
| 254 |
|
| 255 |
d_logn_auto = d_logn_auto_regu + d_logn_auto_div ; |
| 256 |
|
| 257 |
// ... (d/dX,d/dY,d/dZ)(beta_auto) : |
| 258 |
d_beta_auto = beta_auto.gradient() ; // (d/dx, d/dy, d/dz) |
| 259 |
d_beta_auto.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 260 |
|
| 261 |
if (relativistic) { |
| 262 |
// ... extrinsic curvature (tkij_auto and akcar_auto) |
| 263 |
extrinsic_curv_extr(mass, sepa) ; |
| 264 |
} |
| 265 |
|
| 266 |
// The derived quantities are obsolete |
| 267 |
// ----------------------------------- |
| 268 |
|
| 269 |
Etoile_bin::del_deriv() ; |
| 270 |
|
| 271 |
} |
| 272 |
|
| 273 |
} |
| 274 |
} |