LORENE
single_param.C
1 /*
2  * Method of class Isol_hor to compute physical parameters of the horizon
3  *
4  * (see file isol_hor.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2004 Jose Luis Jaramillo
10  *
11  * This file is part of LORENE.
12  *
13  * LORENE is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License version 2
15  * as published by the Free Software Foundation.
16  *
17  * LORENE is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with LORENE; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  */
27 
28 
29 
30 /*
31  * $Id: single_param.C,v 1.4 2016/12/05 16:17:56 j_novak Exp $
32  * $Log: single_param.C,v $
33  * Revision 1.4 2016/12/05 16:17:56 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.3 2014/10/13 08:53:01 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.2 2014/10/06 15:13:11 j_novak
40  * Modified #include directives to use c++ syntax.
41  *
42  * Revision 1.1 2007/04/13 15:28:35 f_limousin
43  * Lots of improvements, generalisation to an arbitrary state of
44  * rotation, implementation of the spatial metric given by Samaya.
45  *
46  *
47  * $Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_param.C,v 1.4 2016/12/05 16:17:56 j_novak Exp $
48  *
49  */
50 
51 // C++ headers
52 #include "headcpp.h"
53 
54 // C headers
55 #include <cstdlib>
56 #include <cassert>
57 
58 // Lorene headers
59 #include "isol_hor.h"
60 #include "metric.h"
61 #include "evolution.h"
62 #include "unites.h"
63 #include "scalar.h"
64 #include "vector.h"
65 #include "graphique.h"
66 #include "utilitaires.h"
67 
68 
69 
70 namespace Lorene {
72 
73  Scalar tmp = contract( beta, 0, tgam.radial_vect()
74  .down(0, tgam), 0) ;
75 
76  return tmp ;
77 
78 }
79 
81 
82  Scalar tmp = sqrt( get_gam().cov()(2,2) * get_gam().cov()(3,3) -
83  get_gam().cov()(2,3) * get_gam().cov()(2,3)) ;
84 
85  tmp.std_spectral_base() ;
86 
87  return tmp ;
88 
89 }
90 
91 double Single_hor::area_hor() const {
92 
93  Scalar integrand (darea_hor()) ;
94  integrand.raccord(1) ;
95 
96  return mp.integrale_surface(integrand, radius + 1e-15) ;
97 
98 }
99 
100 double Single_hor::radius_hor() const {
101 
102  double resu = area_hor() / (4. * M_PI);
103 
104  resu = pow(resu, 1./2.) ;
105 
106  return resu ;
107 
108 }
109 
110 double Single_hor::ang_mom_hor()const {
111 
112  // Vector \partial_phi
113  Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ;
114 
115  Scalar tmp (ff.get_mp() ) ;
116  tmp = 1 ;
117  tmp.std_spectral_base() ;
118  tmp.mult_rsint() ;
119 
120  phi.set(1) = 0. ;
121  phi.set(2) = 0. ;
122  phi.set(3) = tmp ;
123 
124  Scalar k_rphi = contract(contract( get_gam().radial_vect(), 0,
125  get_k_dd(), 0), 0,
126  phi, 0) / (8. * M_PI) ;
127 
128  Scalar integrand = k_rphi * darea_hor() ; // we correct with the curved
129  // element of area
130 
131  double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ;
132 
133  return ang_mom ;
134 
135 }
136 
137 // Mass (fundamental constants made 1)
138 double Single_hor::mass_hor()const {
139 
140  double rr = radius_hor() ;
141 
142  double tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ;
143 
144  return tmp ;
145 
146 }
147 
148 // Surface gravity
149 double Single_hor::kappa_hor() const{
150 
151  double rr = radius_hor() ;
152 
153  double jj = ang_mom_hor() ;
154 
155  double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3)
156  * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
157 
158  return tmp ;
159 
160 }
161 
162 // Orbital velocity
163 double Single_hor::omega_hor()const {
164 
165  double rr = radius_hor() ;
166 
167  double jj = ang_mom_hor() ;
168 
169  double tmp = 2 * jj / ( rr * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
170 
171  return tmp ;
172 
173 }
174 
175 // ADM angular momentum
176 
177 double Single_hor::ang_mom_adm()const {
178 
179  Scalar integrand = (get_k_dd()(1,3) - get_gam().cov()(1,3) * trK) /
180  (8. * M_PI) ;
181 
182  integrand.mult_rsint() ; // in order to pass from the triad
183  // component to the coordinate basis
184 
185  double tmp = mp.integrale_surface_infini(integrand) ;
186 
187  return tmp ;
188 
189 }
190 
191 // Expansion
192 
194 
195  Scalar expa = contract(get_gam().radial_vect().derive_cov(get_gam()), 0,1)
196  + contract(contract(get_k_dd(), 0, get_gam().radial_vect(), 0),
197  0, get_gam().radial_vect(), 0) - trK ;
198 
199  return expa ;
200 }
201 }
double mass_hor() const
Mass computed at the horizon.
Definition: single_param.C:138
const Metric & get_gam() const
metric
Definition: single_hor.C:342
double omega_hor() const
Orbital velocity.
Definition: single_param.C:163
double integrale_surface(const Cmp &ci, double rayon) const
Performs the surface integration of ci on the sphere of radius rayon .
Metric tgam
3 metric tilde
Definition: isol_hor.h:977
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:223
double kappa_hor() const
Surface gravity.
Definition: single_param.C:149
double area_hor() const
Area of the horizon.
Definition: single_param.C:91
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
const Sym_tensor & get_k_dd() const
k_dd
Definition: single_hor.C:351
Lorene prototypes.
Definition: app_hor.h:67
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the metric is defined.
Definition: metric.h:309
virtual const Vector & radial_vect() const
Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity...
Definition: metric.C:365
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Definition: scalar.C:790
Tensor field of valence 1.
Definition: vector.h:188
const Map & get_mp() const
Returns the mapping.
Definition: metric.h:202
double ang_mom_adm() const
ADM angular Momentum.
Definition: single_param.C:177
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Scalar expansion() const
Expansion of the outgoing null normal ( )
Definition: single_param.C:193
Scalar trK
Trace of the extrinsic curvature.
Definition: isol_hor.h:989
double radius_hor() const
Radius of the horizon.
Definition: single_param.C:100
Vector beta
Shift function .
Definition: isol_hor.h:950
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
Cmp pow(const Cmp &, int)
Power .
Definition: cmp_math.C:351
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Scalar darea_hor() const
Element of area of the horizon.
Definition: single_param.C:80
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition: metric.C:283
Map_af & mp
Affine mapping.
Definition: isol_hor.h:900
Scalar & set(int)
Read/write access to a component.
Definition: vector.C:302
double ang_mom_hor() const
Angular momentum (modulo)
Definition: single_param.C:110
double radius
Radius of the horizon in LORENE&#39;s units.
Definition: isol_hor.h:906
Metric_flat ff
3 metric flat
Definition: isol_hor.h:980
const Scalar b_tilde() const
Radial component of the shift with respect to the conformal metric.
Definition: single_param.C:71
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.