et_bin_bhns_extr_um_der.C

00001 /*
00002  *  Methods Et_bin_bhns_extr::update_metric_der_comp_extr_ks
00003  *  and Et_bin_bhns_extr::update_metric_der_comp_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_um_der_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_um_der.C,v 1.2 2005/02/28 23:15:52 k_taniguchi Exp $" ;
00030 
00031 /*
00032  * $Id: et_bin_bhns_extr_um_der.C,v 1.2 2005/02/28 23:15:52 k_taniguchi Exp $
00033  * $Log: et_bin_bhns_extr_um_der.C,v $
00034  * Revision 1.2  2005/02/28 23:15:52  k_taniguchi
00035  * Modification to include the case of the conformally flat background metric
00036  *
00037  * Revision 1.1  2004/11/30 20:51:09  k_taniguchi
00038  * *** empty log message ***
00039  *
00040  *
00041  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_um_der.C,v 1.2 2005/02/28 23:15:52 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 void Et_bin_bhns_extr::update_metric_der_comp_extr(const double& mass,
00055                            const double& sepa) {
00056 
00057   using namespace Unites ;
00058 
00059     if (kerrschild) {
00060 
00061         // Computation of quantities coming from the companion (K-S BH)
00062         // ------------------------------------------------------------
00063 
00064         const Coord& xx = mp.x ;
00065     const Coord& yy = mp.y ;
00066     const Coord& zz = mp.z ;
00067 
00068     Tenseur r_bh(mp) ;
00069     r_bh.set_etat_qcq() ;
00070     r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
00071     r_bh.set_std_base() ;
00072 
00073     Tenseur xx_cov(mp, 1, COV, ref_triad) ;
00074     xx_cov.set_etat_qcq() ;
00075     xx_cov.set(0) = xx + sepa ;
00076     xx_cov.set(1) = yy ;
00077     xx_cov.set(2) = zz ;
00078     xx_cov.set_std_base() ;
00079 
00080     Tenseur xsr_cov(mp, 1, COV, ref_triad) ;
00081     xsr_cov = xx_cov / r_bh ;
00082     xsr_cov.set_std_base() ;
00083 
00084     Tenseur xx_con(mp, 1, CON, ref_triad) ;
00085     xx_con.set_etat_qcq() ;
00086     xx_con.set(0) = xx + sepa ;
00087     xx_con.set(1) = yy ;
00088     xx_con.set(2) = zz ;
00089     xx_con.set_std_base() ;
00090 
00091     Tenseur xsr_con(mp, 1, CON, ref_triad) ;
00092     xsr_con = xx_con / r_bh ;
00093     xsr_con.set_std_base() ;
00094 
00095     Tenseur msr(mp) ;
00096     msr = ggrav * mass / r_bh ;
00097     msr.set_std_base() ;
00098 
00099     // Computation of d_logn_comp
00100     // --------------------------
00101 
00102     Tenseur lapse_bh2(mp) ;  // lapse_bh * lapse_bh
00103     lapse_bh2 = 1. / (1.+2.*msr) ;
00104     lapse_bh2.set_std_base() ;
00105 
00106     d_logn_comp.set_etat_qcq() ;
00107 
00108     d_logn_comp.set(0) = lapse_bh2()%msr()%xsr_cov(0)/r_bh() ;
00109     d_logn_comp.set(1) = lapse_bh2()%msr()%xsr_cov(1)/r_bh() ;
00110     d_logn_comp.set(2) = lapse_bh2()%msr()%xsr_cov(2)/r_bh() ;
00111 
00112     d_logn_comp.set_std_base() ;
00113     d_logn_comp.change_triad(ref_triad) ;
00114 
00115     // Computation of d_beta_comp (Just the same that d_logn_comp)
00116     // --------------------------
00117 
00118     d_beta_comp = d_logn_comp ;
00119     d_beta_comp.change_triad(ref_triad) ;
00120 
00121     // Computation of tkij_comp
00122     // ------------------------
00127     // Components of shift_comp with respect to the Cartesian triad
00128     //  (d/dx, d/dy, d/dz) of the mapping :
00129 
00130     // Computation of A^2 A^{ij}
00131     // -------------------------
00132     tkij_comp.set_etat_qcq() ;
00133 
00134     for (int i=0; i<3; i++) {
00135         for (int j=i; j<3; j++) {
00136             tkij_comp.set(i, j) = - 3.*xsr_con(i) % xsr_con(j)
00137           - 2*msr() % xsr_con(i) % xsr_con(j) ;
00138         }
00139         tkij_comp.set(i, i) += 1. + 2.*msr() ;
00140     }
00141 
00142     tkij_comp = (double(2)/double(3)) * pow(lapse_bh2, 3.) % msr
00143       % (2.*tkij_comp +3.*msr % tkij_comp) / nnn / r_bh ;
00144 
00145     tkij_comp.set_triad(ref_triad) ;
00146     tkij_comp.set_std_base() ;
00147 
00148     if (relativistic) {
00149         // Computation of akcar_comp
00150         // -------------------------
00151 
00152         Tenseur lapse_bh8(mp) ;
00153         lapse_bh8 = 1. / pow(1.+2.*msr, 4.) ;
00154         lapse_bh8.set_std_base() ;
00155 
00156         akcar_comp.set_etat_qcq() ;
00157         akcar_comp.set() = 0 ;
00158 
00159         akcar_comp.set() = 8.*lapse_bh8()
00160           * pow(2.*msr()+3.*msr()*msr(), 2.) / 3.
00161           / nnn() / nnn() / r_bh() / r_bh() ;
00162 
00163         akcar_comp.set_std_base() ;
00164         akcar_comp = a_car % akcar_comp ;
00165 
00166     }
00167 
00168     // The derived quantities are obsolete
00169     // -----------------------------------
00170 
00171     Etoile_bin::del_deriv() ;
00172 
00173     }
00174     else {
00175 
00176         // Computation of quantities coming from the companion (CF Sch. BH)
00177         // ----------------------------------------------------------------
00178 
00179         const Coord& xx = mp.x ;
00180     const Coord& yy = mp.y ;
00181     const Coord& zz = mp.z ;
00182 
00183     Tenseur r_bh(mp) ;
00184     r_bh.set_etat_qcq() ;
00185     r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
00186     r_bh.set_std_base() ;
00187 
00188     Tenseur xx_cov(mp, 1, COV, ref_triad) ;
00189     xx_cov.set_etat_qcq() ;
00190     xx_cov.set(0) = xx + sepa ;
00191     xx_cov.set(1) = yy ;
00192     xx_cov.set(2) = zz ;
00193     xx_cov.set_std_base() ;
00194 
00195     Tenseur msr(mp) ;
00196     msr = ggrav * mass / r_bh ;
00197     msr.set_std_base() ;
00198 
00199     // Computation of d_logn_comp
00200     // --------------------------
00201 
00202     Tenseur tmp(mp) ;
00203     tmp = 1. / (1. - 0.25*msr*msr) ;
00204     tmp.set_std_base() ;
00205 
00206     d_logn_comp.set_etat_qcq() ;
00207 
00208     d_logn_comp.set(0) = tmp()%msr()%xx_cov(0)/r_bh()/r_bh() ;
00209     d_logn_comp.set(1) = tmp()%msr()%xx_cov(1)/r_bh()/r_bh() ;
00210     d_logn_comp.set(2) = tmp()%msr()%xx_cov(2)/r_bh()/r_bh() ;
00211 
00212     d_logn_comp.set_std_base() ;
00213     d_logn_comp.change_triad(ref_triad) ;
00214 
00215     // Computation of d_beta_comp
00216     // --------------------------
00217 
00218     d_beta_comp.set_etat_qcq() ;
00219 
00220     d_beta_comp.set(0) = 0.5*tmp()%msr()%msr()%xx_cov(0)/r_bh()/r_bh() ;
00221     d_beta_comp.set(1) = 0.5*tmp()%msr()%msr()%xx_cov(1)/r_bh()/r_bh() ;
00222     d_beta_comp.set(2) = 0.5*tmp()%msr()%msr()%xx_cov(2)/r_bh()/r_bh() ;
00223 
00224     d_beta_comp.set_std_base() ;
00225     d_beta_comp.change_triad(ref_triad) ;
00226 
00227     // Computation of tkij_comp
00228     // ------------------------
00229 
00230     // Computation of A^2 A^{ij}
00231     // -------------------------
00232     tkij_comp.set_etat_qcq() ;
00233 
00234     for (int i=0; i<3; i++) {
00235         for (int j=i; j<3; j++) {
00236             tkij_comp.set(i, j) = 0. ;
00237         }
00238     }
00239 
00240     tkij_comp.set_triad(ref_triad) ;
00241     tkij_comp.set_std_base() ;
00242 
00243     if (relativistic) {
00244         // Computation of akcar_comp
00245         // -------------------------
00246 
00247         akcar_comp.set_etat_qcq() ;
00248         akcar_comp.set() = 0 ;
00249         akcar_comp.set_std_base() ;
00250 
00251     }
00252 
00253     // The derived quantities are obsolete
00254     // -----------------------------------
00255 
00256     Etoile_bin::del_deriv() ;
00257 
00258     }
00259 
00260 }

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