bin_bhns_extr_anashift.C

00001 /*
00002  *  Method of class Bin_bhns_extr to set some analytical form
00003  *
00004  *    (see file bin_bhns_extr.h for documentation).
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2004 Keisuke Taniguchi
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License version 2
00015  *   as published by the Free Software Foundation.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 char bin_bhns_extr_anashift_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bin_bhns_extr/bin_bhns_extr_anashift.C,v 1.1 2004/11/30 20:45:29 k_taniguchi Exp $" ;
00029 
00030 /*
00031  * $Id: bin_bhns_extr_anashift.C,v 1.1 2004/11/30 20:45:29 k_taniguchi Exp $
00032  * $Log: bin_bhns_extr_anashift.C,v $
00033  * Revision 1.1  2004/11/30 20:45:29  k_taniguchi
00034  * *** empty log message ***
00035  *
00036  *
00037  * $Header: /cvsroot/Lorene/C++/Source/Bin_bhns_extr/bin_bhns_extr_anashift.C,v 1.1 2004/11/30 20:45:29 k_taniguchi Exp $
00038  *
00039  */
00040 
00041 // C headers
00042 #include <math.h>
00043 
00044 // Lorene headers
00045 #include "bin_bhns_extr.h"
00046 #include "unites.h"
00047 
00048 void Bin_bhns_extr::analytical_shift() {
00049 
00050   using namespace Unites ;
00051 
00052     // BH-NS binary systems should be relativistic
00053     // -------------------------------------------
00054 
00055     if ( !star.is_relativistic() ) {
00056 
00057         cout << "BH-NS binary systems should be relativistic !!!" << endl ;
00058         abort() ;
00059     }
00060 
00061     // Radius of the neutron star
00062     double a0 = star.ray_eq() ;
00063 
00064     // G M Omega R
00065     double www = ggrav * star.mass_g() * omega * separ ;
00066     // Approximates the mass ratio -> 0
00067 
00068     const Map& mp = star.get_mp() ;
00069     Tenseur tmp(mp) ;
00070     Tenseur tmp_ext(mp) ;
00071     int nzet = star.get_nzet() ;
00072     int nzm1 = mp.get_mg()->get_nzone() - 1 ;
00073 
00074     //-------------------
00075     // Irrotational case
00076     //-------------------
00077     // Since this formula is only an initial guess, we use it
00078     //  also for the corotating case.
00079 
00080     // Computation of w_shift
00081     // ----------------------
00082     star.set_w_shift().set_etat_qcq() ;
00083 
00084     // X component
00085     // -----------
00086     star.set_w_shift().set(0) = 0. ;
00087 
00088     // Y component
00089     // -----------
00090 
00091     // For the incompressible case :
00092     tmp.set_etat_qcq() ;
00093     tmp.set() = 6. * www / a0 * ( 1. - (mp.r)*(mp.r) / (3.*a0*a0) ) ;
00094     tmp.set().annule(nzet, nzm1) ;
00095     tmp.set_std_base() ;
00096 
00097     tmp_ext.set_etat_qcq() ;
00098     tmp_ext.set() = 4. * www / mp.r ;
00099     tmp_ext.set().annule(0, nzet-1) ;
00100     tmp_ext.set_std_base() ;
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.set() = 2. * www / a0 * (mp.y)
00115       * ( 1. - 3.*(mp.r)*(mp.r) / (5.*a0*a0) ) ;
00116     tmp.set().annule(nzet, nzm1) ;
00117     tmp.set_std_base() ;
00118 
00119     tmp_ext.set() = 0.8 * www * a0 * a0 * (mp.sint) * (mp.sinp)
00120       / ((mp.r)*(mp.r)) ;
00121     tmp_ext.set().annule(0, nzet-1) ;
00122     tmp_ext.set_std_base() ;
00123 
00124     star.set_khi_shift() = tmp + tmp_ext ;
00125 
00126     // Sets the standard spectral bases for a scalar field
00127     star.set_khi_shift().set_std_base() ;
00128 
00129 }

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