LORENE
bin_ns_bh_anashift.C
1/*
2 * Method of class Bin_ns_bh to set some analytical form
3 * to the shift vector of the neutron star
4 *
5 * (see file bin_ns_bh.h for documentation).
6 *
7 */
8
9/*
10 * Copyright (c) 2004 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
30
31/*
32 * $Id: bin_ns_bh_anashift.C,v 1.5 2016/12/05 16:17:46 j_novak Exp $
33 * $Log: bin_ns_bh_anashift.C,v $
34 * Revision 1.5 2016/12/05 16:17:46 j_novak
35 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
36 *
37 * Revision 1.4 2014/10/13 08:52:43 j_novak
38 * Lorene classes and functions now belong to the namespace Lorene.
39 *
40 * Revision 1.3 2014/10/06 15:13:01 j_novak
41 * Modified #include directives to use c++ syntax.
42 *
43 * Revision 1.2 2005/11/30 11:09:06 p_grandclement
44 * Changes for the Bin_ns_bh project
45 *
46 * Revision 1.1 2004/06/09 06:28:21 k_taniguchi
47 * First revision.
48 *
49 *
50 * $Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_anashift.C,v 1.5 2016/12/05 16:17:46 j_novak Exp $
51 *
52 */
53
54// C headers
55#include <cmath>
56
57// Lorene headers
58#include "bin_ns_bh.h"
59#include "unites.h"
60
61namespace Lorene {
63
64 // NS-BH binary systems should be relativistic
65 // -------------------------------------------
66 if ( !star.is_relativistic() ) {
67 abort() ;
68 }
69
70 using namespace Unites ;
71
72 // Radius of the neutron star
73 double a0 = star.ray_eq() ;
74
75 // Mass ratio
76 double p_mass = star.mass_g() / (hole.masse_adm_seul()/ggrav) ;
77
78 // G M Omega R / (1+p)
79 double www = ggrav * star.mass_g() * omega
80 * separation() / (1. + p_mass) ;
81
82 const Map& mp = star.get_mp() ;
83 Cmp tmp(mp) ;
84 Cmp tmp_ext(mp) ;
85 int nzet = star.get_nzet() ;
86 int nzm1 = mp.get_mg()->get_nzone() - 1 ;
87
88 //-------------------
89 // Irrotational case
90 //-------------------
91 // Since this formula is only an initial guess, we use it
92 // also for the corotating case.
93
94 // Computation of w_shift
95 // ----------------------
96 star.set_w_shift().set_etat_qcq() ;
97
98 // X component
99 // -----------
100 star.set_w_shift().set(0) = 0. ;
101
102 // Y component
103 // -----------
104
105 // For the incompressible case :
106 tmp = -6. * www / a0 * ( 1. - (mp.r)*(mp.r) / (3.*a0*a0) ) ;
107
108 tmp.annule(nzet, nzm1) ;
109 tmp_ext = -4. * www / mp.r ;
110 tmp_ext.annule(0, nzet-1) ;
111
112 star.set_w_shift().set(1) = - tmp - tmp_ext ;
113
114 // Z component
115 // -----------
116 star.set_w_shift().set(2) = 0. ;
117
118 // Sets the standard spectral bases for Cartesian components
119 star.set_w_shift().set_std_base() ;
120
121 // Computation of khi_shift
122 //-------------------------
123
124 tmp = 2. * www / a0 * (mp.y) * ( 1. - 3.*(mp.r)*(mp.r) / (5.*a0*a0) ) ;
125 tmp.annule(nzet, nzm1) ;
126 tmp_ext = 0.8 * www * a0 * a0 * (mp.sint) * (mp.sinp) / ((mp.r)*(mp.r)) ;
127 tmp_ext.annule(0, nzet-1) ;
128
129 star.set_khi_shift() = - tmp - tmp_ext ;
130
131 // Sets the standard spectral bases for a scalar field
132 star.set_khi_shift().set_std_base() ;
133
134}
135}
Et_bin_nsbh star
The neutron star.
Definition bin_ns_bh.h:131
Bhole hole
The black hole.
Definition bin_ns_bh.h:134
double separation() const
Return the separation.
Definition bin_ns_bh.C:238
void analytical_shift()
Sets some analytical template for the shift vector (via the members {\tt w_shift} and {\tt khi_shift}...
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition bin_ns_bh.h:139
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
void annule(int l)
Sets the Cmp to zero in a given domain.
Definition cmp.C:351
Lorene prototypes.
Definition app_hor.h:67
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:142
Standard units of space, time and mass.