60 #include "star_bhns.h" 81 int i_b = mg->
get_nr(l_b) - 1 ;
82 int j_b = mg->
get_nt(l_b) - 1 ;
118 lapconf_auto_m1 = 0. ;
121 double diff_ent = 1. ;
124 double alpha_r = 1. ;
130 for (
int mer=0 ; (diff_ent > precis) && (mer<mermax) ; mer++ ) {
132 cout <<
"-----------------------------------------------" << endl ;
133 cout <<
"step: " << mer << endl ;
134 cout <<
"alpha_r: " << alpha_r << endl ;
135 cout <<
"diff_ent = " << diff_ent << endl ;
149 Cmp sou_lapconf(source_lapconf) ;
150 Cmp lapconf_cmp(lapconf_auto_m1) ;
153 mpaff.
poisson(sou_lapconf, par_nul, lapconf_cmp) ;
156 lapconf_auto_m1 = lapconf_cmp ;
162 double exp_ent_c =
exp(ent_c) ;
163 double exp_ent_b =
exp(ent_b) ;
166 double lap_auto_b = lapconf_auto_m1.
val_grid_point(l_b,k_b,j_b,i_b) ;
171 double alpha_r2 = (exp_ent_b*confo_c - exp_ent_c*confo_b)
172 / ( exp_ent_c*confo_b*lap_auto_c
173 - exp_ent_b*confo_c*lap_auto_b ) ;
175 alpha_r =
sqrt(alpha_r2) ;
185 lapconf_auto_m1 = alpha_r2 * lapconf_auto_m1 ;
191 ent = ent_c +
log(lapconfo_c) -
log(confo_c)
209 Cmp sou_confo(source_confo) ;
210 Cmp cnf_auto_cmp(confo_auto_m1) ;
213 mpaff.
poisson(sou_confo, par_nul, cnf_auto_cmp) ;
216 confo_auto_m1 = cnf_auto_cmp ;
249 for(
int i=1; i<=3; i++)
258 for (
int i=1; i<=3; i++)
265 <<
"Characteristics of the star obtained by Star_bhns::equil_spher_bhns : " 267 <<
"------------------------------------------------------------------- " 271 double ray =
mp.
val_r(l_b, 1., M_PI/2., 0) ;
272 cout <<
"Coordinate radius : " 273 << ray / km <<
" [km]" << endl ;
276 double compact = qpig/(4.*M_PI) * mass_g_bhns() / rcirc ;
278 cout <<
"Circumferential radius R : " 279 << rcirc/km <<
" [km]" << endl ;
280 cout <<
"Baryon mass : " 281 << mass_b_bhns(0,0.,1.)/msol <<
" [Mo]" << endl ;
282 cout <<
"Gravitational mass M : " 283 << mass_g_bhns()/msol <<
" [Mo]" << endl ;
284 cout <<
"Compaction parameter GM/(c^2 R) : " << compact << endl ;
305 source = 2. * tmp1 * tmp1 - tmp2 * tmp2 ;
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 ;
Scalar psi4
Fourth power of the total conformal factor.
Scalar lapconf_tot
Total lapconf function.
Cmp log(const Cmp &)
Neperian logarithm.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
Map & mp
Mapping associated with the star.
Cmp sqrt(const Cmp &)
Square root.
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
virtual void homothetie(double lambda)
Sets a new radial scale.
Standard units of space, time and mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tensor field of valence 0 (or component of a tensorial field).
double integrale() const
Computes the integral over all space of *this .
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Vector shift_auto
Shift vector generated by the star.
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Scalar lapse_tot
Total lapse function.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
int nzet
Number of domains of *mp occupied by the star.
Scalar confo_tot
Total conformal factor.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
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.
Scalar ener
Total energy density in the fluid frame.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Scalar press
Fluid pressure.
int get_dzpuis() const
Returns dzpuis.
int get_nzone() const
Returns the number of domains.
void equil_spher_bhns(double ent_c, double precis)
Computes a spherical configuration.
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Cmp pow(const Cmp &, int)
Power .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Scalar lapconf_auto
Lapconf function generated by the star.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Scalar confo_auto
Conformal factor generated by the star.
const Scalar & dsdr() const
Returns of *this .
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Scalar & set(int)
Read/write access to a component.
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Scalar lapse_auto
Lapse function generated by the "star".
Scalar ener_euler
Total energy density in the Eulerian frame.