31char etoile_eqsph_falloff_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/etoile_eqsph_falloff.C,v 1.2 2014/10/13 08:52:58 j_novak Exp $" ;
71 int i_b = mg->
get_nr(l_b) - 1 ;
72 int j_b = mg->
get_nt(l_b) - 1 ;
113 double diff_ent = 1 ;
123 for(
int mer=0 ; (diff_ent > precis) && (mer<mermax) ; mer++ ) {
125 cout <<
"-----------------------------------------------" << endl ;
126 cout <<
"step: " << mer << endl ;
127 cout <<
"alpha_r: " << alpha_r << endl ;
128 cout <<
"diff_ent = " << diff_ent << endl ;
143 (source.
set()).set_dzpuis(4) ;
149 mpaff.poisson_falloff(source(), par_nul,
logn_auto.
set(), k_falloff) ;
158 mpaff.
dsdr(logn(), dlogn) ;
161 source = - dlogn * dbeta ;
165 mpaff.poisson_falloff(source(), par_nul, logn_quad.
set(),
177 double nu_mat0_b =
logn_auto()(l_b, k_b, j_b, i_b) ;
178 double nu_mat0_c =
logn_auto()(0, 0, 0, 0) ;
180 double nu_quad0_b = logn_quad()(l_b, k_b, j_b, i_b) ;
181 double nu_quad0_c = logn_quad()(0, 0, 0, 0) ;
183 double alpha_r2 = ( ent_c - ent_b - nu_quad0_b + nu_quad0_c )
184 / ( qpig*(nu_mat0_b - nu_mat0_c) ) ;
186 alpha_r =
sqrt(alpha_r2) ;
200 double logn_c = logn()(0, 0, 0, 0) ;
201 ent = ent_c - logn() + logn_c ;
215 mpaff.
dsdr(logn(), dlogn) ;
221 - 0.5 * ( dlogn * dlogn + dbeta * dbeta ) ;
227 mpaff.poisson_falloff(source(), par_nul,
beta_auto.
set(),
281 <<
"Characteristics of the star obtained by Etoile::equil_spher_falloff : "
283 <<
"-------------------------------------------------------------------"
286 double ray =
mp.
val_r(l_b, 1., M_PI/2., 0) ;
287 cout <<
"Coordinate radius : " << ray / km <<
" km" << endl ;
289 double rcirc = ray *
sqrt(
a_car()(l_b, k_b, j_b, i_b) ) ;
291 double compact = qpig/(4.*M_PI) *
mass_g() / rcirc ;
293 cout <<
"Circumferential radius R : " << rcirc/km <<
" km" << endl ;
294 cout <<
"Baryon mass : " <<
mass_b()/msol <<
" Mo" << endl ;
295 cout <<
"Gravitational mass M : " <<
mass_g()/msol <<
" Mo" << endl ;
296 cout <<
"Compacity parameter GM/(c^2 R) : " << compact << endl ;
307 double vir_mat = source().integrale() ;
313 source = - ( logn().dsdr() * logn().dsdr()
319 double vir_grav = source().integrale() ;
323 double grv3 = ( vir_mat + vir_grav ) / vir_mat ;
325 cout <<
"Virial theorem GRV3 : " << endl ;
326 cout <<
" 3P term : " << vir_mat << endl ;
327 cout <<
" grav. term : " << vir_grav << endl ;
328 cout <<
" relative error : " << grv3 << endl ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const Cmp & dsdr() const
Returns of *this .
int nzet
Number of domains of *mp occupied by the star.
Tenseur nnn
Total lapse function.
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
Tenseur nbar
Baryon density in the fluid frame.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
virtual void equil_spher_falloff(double ent_c, double precis=1.e-14)
Computes a spherical static configuration with the outer boundary condition at a finite radius.
virtual double mass_b() const
Baryon mass.
Tenseur ener
Total energy density in the fluid frame.
Tenseur press
Fluid pressure.
virtual double mass_g() const
Gravitational mass.
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Tenseur ener_euler
Total energy density in the Eulerian frame.
Tenseur shift
Total shift vector.
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
Tenseur a_car
Total conformal factor .
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
virtual void homothetie(double lambda)
Sets a new radial scale.
virtual void dsdr(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void annule(int l)
Sets the Tenseur to zero in a given domain.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Cmp sqrt(const Cmp &)
Square root.
Cmp exp(const Cmp &)
Exponential.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Standard units of space, time and mass.