et_bin_bhns_extr_upmetr.C

00001 /*
00002  *  Methods Et_bin_bhns_extr::update_metric_extr_ks
00003  *  and Et_bin_bhns_extr::update_metric_extr_cf
00004  *
00005  *    (see file et_bin_bhns_extr.h for documentation).
00006  *
00007  */
00008 
00009 /*
00010  *   Copyright (c) 2004-2005 Keisuke Taniguchi
00011  *
00012  *   This file is part of LORENE.
00013  *
00014  *   LORENE is free software; you can redistribute it and/or modify
00015  *   it under the terms of the GNU General Public License version 2
00016  *   as published by the Free Software Foundation.
00017  *
00018  *   LORENE is distributed in the hope that it will be useful,
00019  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *   GNU General Public License for more details.
00022  *
00023  *   You should have received a copy of the GNU General Public License
00024  *   along with LORENE; if not, write to the Free Software
00025  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  *
00027  */
00028 
00029 char et_bin_bhns_extr_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_upmetr.C,v 1.2 2005/02/28 23:16:37 k_taniguchi Exp $" ;
00030 
00031 /*
00032  * $Id: et_bin_bhns_extr_upmetr.C,v 1.2 2005/02/28 23:16:37 k_taniguchi Exp $
00033  * $Log: et_bin_bhns_extr_upmetr.C,v $
00034  * Revision 1.2  2005/02/28 23:16:37  k_taniguchi
00035  * Modification to include the case of the conformally flat background metric
00036  *
00037  * Revision 1.1  2004/11/30 20:51:32  k_taniguchi
00038  * *** empty log message ***
00039  *
00040  *
00041  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_upmetr.C,v 1.2 2005/02/28 23:16:37 k_taniguchi Exp $
00042  *
00043  */
00044 
00045 // C headers
00046 #include<math.h>
00047 
00048 // Lorene headers
00049 #include "et_bin_bhns_extr.h"
00050 #include "etoile.h"
00051 #include "coord.h"
00052 #include "unites.h"
00053 
00054           //-----------------------------------------------------------//
00055           //          No relaxation for a fixed BH background          //
00056           //-----------------------------------------------------------//
00057 
00058 void Et_bin_bhns_extr::update_metric_extr(const double& mass,
00059                       const double& sepa)
00060 {
00061 
00062   using namespace Unites ;
00063 
00064     if (kerrschild) {
00065 
00066         // Computation of quantities coming from the companion (K-S BH)
00067         // ------------------------------------------------------------
00068 
00069         const Coord& xx = mp.x ;
00070     const Coord& yy = mp.y ;
00071     const Coord& zz = mp.z ;
00072 
00073     Tenseur r_bh(mp) ;
00074     r_bh.set_etat_qcq() ;
00075     r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
00076     r_bh.set_std_base() ;
00077 
00078     Tenseur xx_con(mp, 1, CON, ref_triad) ;
00079     xx_con.set_etat_qcq() ;
00080     xx_con.set(0) = xx + sepa ;
00081     xx_con.set(1) = yy ;
00082     xx_con.set(2) = zz ;
00083     xx_con.set_std_base() ;
00084 
00085     Tenseur xsr_con(mp, 1, CON, ref_triad) ;
00086     xsr_con = xx_con / r_bh ;
00087     xsr_con.set_std_base() ;
00088 
00089     Tenseur msr(mp) ;
00090     msr = ggrav * mass / r_bh ;
00091     msr.set_std_base() ;
00092 
00093     Tenseur lapse_bh(mp) ;
00094     lapse_bh = 1. / sqrt( 1.+2.*msr ) ;
00095     lapse_bh.set_std_base() ;
00096 
00097     logn_comp.set_etat_qcq() ;
00098     logn_comp.set() = log( lapse_bh() ) ;
00099     logn_comp.set_std_base() ;
00100 
00101     beta_comp.set_etat_qcq() ;
00102     beta_comp.set() = log( lapse_bh() ) ; 
00103                                  // conformal factor of KS-BH is unity
00104     beta_comp.set_std_base() ;
00105 
00106     shift_comp.set_etat_qcq() ;
00107 
00108     shift_comp.set(0) = -2.*lapse_bh()*lapse_bh()*msr()*xsr_con(0) ;
00109     shift_comp.set(1) = -2.*lapse_bh()*lapse_bh()*msr()*xsr_con(1) ;
00110     shift_comp.set(2) = -2.*lapse_bh()*lapse_bh()*msr()*xsr_con(2) ;
00111 
00112     shift_comp.set_std_base() ;
00113     shift_comp.set_triad( ref_triad ) ;
00114 
00115     // Lapse function N
00116     // ----------------
00117 
00118     nnn = exp( unsurc2 * logn_auto ) * lapse_bh ;
00119 
00120     nnn.set_std_base() ;
00121 
00122     // Conformal factor A^2
00123     // --------------------
00124 
00125     a_car = exp ( 2.*unsurc2*(beta_auto - logn_auto) ) ;
00126 
00127     a_car.set_std_base() ;
00128 
00129     // Shift vector N^i
00130     // ----------------
00131 
00132     shift = shift_auto + shift_comp ;
00133 
00134     // Derivative of metric coefficients
00135     // ----------------------------------
00136 
00137     // ... (d/dX,d/dY,d/dZ)(logn_auto) :
00138     d_logn_auto_regu = logn_auto_regu.gradient() ;    // (d/dx, d/dy, d/dz)
00139     d_logn_auto_regu.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)
00140 
00141     if ( *(d_logn_auto_div.get_triad()) != ref_triad ) {
00142 
00143         // Change the basis from spherical coordinate to Cartesian one
00144         d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ;
00145 
00146         // Change the basis from mapping coordinate to absolute one
00147         d_logn_auto_div.change_triad( ref_triad ) ;
00148 
00149     }
00150 
00151     d_logn_auto = d_logn_auto_regu + d_logn_auto_div ;
00152 
00153     // ... (d/dX,d/dY,d/dZ)(beta_auto) :
00154     d_beta_auto = beta_auto.gradient() ;    // (d/dx, d/dy, d/dz)
00155     d_beta_auto.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)
00156 
00157     if (relativistic) {
00158         // ... extrinsic curvature (tkij_auto and akcar_auto)
00159         extrinsic_curv_extr(mass, sepa) ;
00160     }
00161 
00162     // The derived quantities are obsolete
00163     // -----------------------------------
00164 
00165     Etoile_bin::del_deriv() ;
00166 
00167     }
00168     else {
00169 
00170         // Computation of quantities coming from the companion (CF Sch. BH)
00171         // ----------------------------------------------------------------
00172 
00173         const Coord& xx = mp.x ;
00174     const Coord& yy = mp.y ;
00175     const Coord& zz = mp.z ;
00176 
00177     Tenseur r_bh(mp) ;
00178     r_bh.set_etat_qcq() ;
00179     r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
00180     r_bh.set_std_base() ;
00181 
00182     Tenseur msr(mp) ;
00183     msr = ggrav * mass / r_bh ;
00184     msr.set_std_base() ;
00185 
00186     Tenseur lapse_bh(mp) ;
00187     lapse_bh = (1.-0.5*msr) / (1.+0.5*msr) ;
00188     lapse_bh.set_std_base() ;
00189 
00190     logn_comp.set_etat_qcq() ;
00191     logn_comp.set() = log( lapse_bh() ) ;
00192     logn_comp.set_std_base() ;
00193 
00194     Tenseur lappsi(mp) ;
00195     lappsi = 1. - 0.25*msr*msr ;
00196     lappsi.set_std_base() ;
00197 
00198     beta_comp.set_etat_qcq() ;
00199     beta_comp.set() = log( lappsi() ) ;
00200     beta_comp.set_std_base() ;
00201 
00202     shift_comp.set_etat_qcq() ;
00203 
00204     shift_comp.set(0) = 0. ;
00205     shift_comp.set(1) = 0. ;
00206     shift_comp.set(2) = 0. ;
00207 
00208     shift_comp.set_std_base() ;
00209     shift_comp.set_triad( ref_triad ) ;
00210 
00211     // Lapse function N
00212     // ----------------
00213 
00214     nnn = exp( unsurc2 * logn_auto ) * lapse_bh ;
00215 
00216     nnn.set_std_base() ;
00217 
00218     // Conformal factor A^2
00219     // --------------------
00220 
00221     a_car = exp ( 2.*unsurc2*(beta_auto + beta_comp
00222                   - logn_auto - logn_comp) ) ;
00223 
00224     a_car.set_std_base() ;
00225 
00226     // Shift vector N^i
00227     // ----------------
00228 
00229     shift = shift_auto + shift_comp ;
00230 
00231     // Derivative of metric coefficients
00232     // ----------------------------------
00233 
00234     // ... (d/dX,d/dY,d/dZ)(logn_auto) :
00235     d_logn_auto_regu = logn_auto_regu.gradient() ;  // (d/dx, d/dy, d/dz)
00236     d_logn_auto_regu.change_triad(ref_triad) ; // -->  (d/dX, d/dY, d/dZ)
00237 
00238     if ( *(d_logn_auto_div.get_triad()) != ref_triad ) {
00239 
00240         // Change the basis from spherical coordinate to Cartesian one
00241         d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ;
00242 
00243         // Change the basis from mapping coordinate to absolute one
00244         d_logn_auto_div.change_triad( ref_triad ) ;
00245 
00246     }
00247 
00248     d_logn_auto = d_logn_auto_regu + d_logn_auto_div ;
00249 
00250     // ... (d/dX,d/dY,d/dZ)(beta_auto) :
00251     d_beta_auto = beta_auto.gradient() ;    // (d/dx, d/dy, d/dz)
00252     d_beta_auto.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)
00253 
00254     if (relativistic) {
00255         // ... extrinsic curvature (tkij_auto and akcar_auto)
00256         extrinsic_curv_extr(mass, sepa) ;
00257     }
00258 
00259     // The derived quantities are obsolete
00260     // -----------------------------------
00261 
00262     Etoile_bin::del_deriv() ;
00263 
00264     }
00265 
00266 }

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