bin_ns_bh_anashift.C

00001 /*
00002  *  Method of class Bin_ns_bh to set some analytical form
00003  *   to the shift vector of the neutron star
00004  *
00005  *    (see file bin_ns_bh.h for documentation).
00006  *
00007  */
00008 
00009 /*
00010  *   Copyright (c) 2004 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 bin_ns_bh_anashift_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_anashift.C,v 1.2 2005/11/30 11:09:06 p_grandclement Exp $" ;
00030 
00031 /*
00032  * $Id: bin_ns_bh_anashift.C,v 1.2 2005/11/30 11:09:06 p_grandclement Exp $
00033  * $Log: bin_ns_bh_anashift.C,v $
00034  * Revision 1.2  2005/11/30 11:09:06  p_grandclement
00035  * Changes for the Bin_ns_bh project
00036  *
00037  * Revision 1.1  2004/06/09 06:28:21  k_taniguchi
00038  * First revision.
00039  *
00040  *
00041  * $Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_anashift.C,v 1.2 2005/11/30 11:09:06 p_grandclement Exp $
00042  *
00043  */
00044 
00045 // C headers
00046 #include <math.h>
00047 
00048 // Lorene headers
00049 #include "bin_ns_bh.h"
00050 #include "unites.h"
00051 
00052 void Bin_ns_bh::analytical_shift() {
00053 
00054     // NS-BH binary systems should be relativistic
00055     // -------------------------------------------
00056     if ( !star.is_relativistic() ) {
00057         abort() ;
00058     }
00059 
00060     using namespace Unites ;
00061 
00062     // Radius of the neutron star
00063     double a0 = star.ray_eq() ;
00064 
00065     // Mass ratio
00066     double p_mass = star.mass_g() / (hole.masse_adm_seul()/ggrav) ;
00067 
00068     // G M Omega R / (1+p)
00069     double www = ggrav * star.mass_g() * omega
00070       * separation() / (1. + p_mass) ;
00071 
00072     const Map& mp = star.get_mp() ;
00073     Cmp tmp(mp) ;
00074     Cmp tmp_ext(mp) ;
00075     int nzet = star.get_nzet() ;
00076     int nzm1 = mp.get_mg()->get_nzone() - 1 ;
00077 
00078     //-------------------
00079     // Irrotational case
00080     //-------------------
00081     // Since this formula is only an initial guess, we use it
00082     //  also for the corotating case.
00083 
00084     // Computation of w_shift
00085     // ----------------------
00086     star.set_w_shift().set_etat_qcq() ;
00087 
00088     // X component
00089     // -----------
00090     star.set_w_shift().set(0) = 0. ;
00091 
00092     // Y component
00093     // -----------
00094 
00095     // For the incompressible case :
00096     tmp = -6. * www / a0 * ( 1. - (mp.r)*(mp.r) / (3.*a0*a0) ) ;
00097 
00098     tmp.annule(nzet, nzm1) ;
00099     tmp_ext = -4. * www / mp.r ;
00100     tmp_ext.annule(0, nzet-1) ;
00101 
00102     star.set_w_shift().set(1) = - tmp - tmp_ext ;
00103 
00104     // Z component
00105     // -----------
00106     star.set_w_shift().set(2) = 0. ;
00107 
00108     // Sets the standard spectral bases for Cartesian components
00109     star.set_w_shift().set_std_base() ;
00110 
00111     // Computation of khi_shift
00112     //-------------------------
00113 
00114     tmp = 2. * www / a0 * (mp.y) * ( 1. - 3.*(mp.r)*(mp.r) / (5.*a0*a0) ) ;
00115     tmp.annule(nzet, nzm1) ;
00116     tmp_ext = 0.8 * www * a0 * a0 * (mp.sint) * (mp.sinp) / ((mp.r)*(mp.r)) ;
00117     tmp_ext.annule(0, nzet-1) ;
00118 
00119     star.set_khi_shift() = - tmp - tmp_ext ;
00120 
00121     // Sets the standard spectral bases for a scalar field
00122     star.set_khi_shift().set_std_base() ;
00123 
00124 }

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