32 #include "hot_star_rot_cfc.h" 34 #include "utilitaires.h" 45 int e_type_i,
double const_value_i,
int filter)
49 const_value(const_value_i),
50 spectral_filter(filter),
52 j_euler(mpi, CON, mpi.get_bvect_spher()),
56 flat(mpi.flat_met_spher()),
57 hatA(mpi, CON, mpi.get_bvect_spher()),
67 cerr <<
"Hot_rns: the constant temperature profile" 68 <<
"is not implemented yet!" << endl ;
72 cerr <<
"Hot_rns: the entropy type = " <<
e_type 73 <<
"is not known!" << endl ;
103 relat_type(star.relat_type),
105 const_value(star.const_value),
106 spectral_filter(star.spectral_filter),
108 j_euler(star.j_euler),
114 hatA_quad(star.hatA_quad)
121 cerr <<
"Hot_rns: the constant temperature profile" 122 <<
"is not implemented yet!" << endl ;
126 cerr <<
"Hot_rns: the entropy type = " <<
e_type 127 <<
"is not known!" << endl ;
144 psi(mpi, *(mpi.get_mg()), fich),
145 j_euler(mpi, CON, mpi.get_bvect_spher()),
149 flat(mpi.flat_met_spher()),
150 hatA(mpi, CON, mpi.get_bvect_spher()),
177 double lambda = 1./3. ;
274 cerr <<
"Hot_rns: the constant temperature profile" 275 <<
"is not implemented yet!" << endl ;
279 cerr <<
"Hot_rns: the entropy type = " <<
e_type 280 <<
"is not known!" << endl ;
299 cerr <<
"Hot_rns: the constant temperature profile" 300 <<
"is not implemented yet!" << endl ;
304 cerr <<
"Hot_rns: the entropy type = " <<
e_type 305 <<
"is not known!" << endl ;
347 ost <<
"Rotating star " ;
350 ost <<
"in Newtonian theory" << endl ;
354 ost <<
"in Dirac gauge" << endl ;
358 ost <<
"in Conformal Flatness Condition (CFC)" << endl ;
362 ost <<
"in Conformal Flatness Condition (CFC), with hat{A}^{ij}_{TT} = 0\n" 363 <<
"(see Cordero-Carrion et al. (2009) for details" << endl ;
367 cerr <<
"Hot_star_rot_CFC::operator>> : unknown value for 'relat_type'" << endl ;
368 cerr <<
"relat_type = " <<
relat_type << endl ;
375 ost <<
"Uniformly rotating star" << endl ;
376 ost <<
"-----------------------" << endl ;
378 ost <<
"hydro sources of equations are filtered\n" 381 double freq =
omega/ (2.*M_PI) ;
382 ost <<
"Omega : " <<
omega * f_unit
383 <<
" rad/s f : " << freq * f_unit <<
" Hz" << endl ;
384 ost <<
"Rotation period : " << 1000. / (freq * f_unit) <<
" ms" 387 ost <<
"Error on the virial identity GRV2 : " << endl ;
388 ost <<
"GRV2 = " <<
grv2() << endl ;
389 ost <<
"Error on the virial identity GRV3 : " << endl ;
390 ost <<
"GRV3 = " <<
grv3() << endl ;
392 ost <<
"Angular momentum J : " 393 <<
angu_mom()/( qpig / (4*M_PI) *msol*msol) <<
" G M_sol^2 / c" 395 ost <<
"c J / (G M^2) : " 400 double mom_iner_38si = mom_iner * rho_unit * (
pow(r_unit,
double(5.))
402 ost <<
"Moment of inertia: " << mom_iner_38si <<
" 10^38 kg m^2" 406 ost <<
"Ratio T/W : " <<
tsw() << endl ;
407 ost <<
"Circumferential equatorial radius R_circ : " 408 <<
r_circ()/km <<
" km" << endl ;
410 ost <<
"Circumferential polar radius Rp_circ : " 411 <<
rp_circ()/km <<
" km" << endl ;
412 ost <<
"Coordinate equatorial radius r_eq : " <<
ray_eq()/km <<
" km" 414 ost <<
"Flattening r_pole/r_eq : " <<
aplat() << endl ;
416 ost <<
"Ellipticity sqrt(1-(Rp_circ/R_circ)^2) : " <<
ellipt() << endl ;
419 ost <<
"Compaction parameter M_g / R_circ : " << compact << endl ;
int relat_type
Relativistic flag.
const Metric_flat & flat
flat metric (spherical components)
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar psi
Conformal factor .
double * p_r_circ
Circumferential equatorial radius.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Standard units of space, time and mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Base class for hot stars.
virtual double aplat() const
Flattening r_pole/r_eq.
virtual double grv2() const
Error on the virial identity GRV2.
virtual void set_etat_nondef()
Sets the logical state of all components to ETATNONDEF (undefined state).
Base class for coordinate mappings.
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Scalar entropy
Entropy per baryon field (in $k_B$)
virtual void sauve(FILE *) const
Save in a binary file.
virtual ~Hot_star_rot_CFC()
Destructor.
int spectral_filter
Spectral exponential filtering order.
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
virtual double rp_circ() const
Circumferential polar radius.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tensor field of valence 1.
Sym_tensor ope_killing_conf(const Metric &gam) const
Computes the conformal Killing operator associated with a given metric.
int e_type
Integer defining the type of entropy profile.
double ray_eq() const
Coordinate radius at , [r_unit].
virtual void sauve(FILE *) const
Save in a file.
int nzet
Number of domains of *mp occupied by the star.
virtual void sauve(FILE *) const
Save in a file.
double * p_rp_circ
Circumferential polar radius.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Hot_star_rot_CFC(Map &mp_i, int nzet_i, const Hot_eos &heos_i, int relat_i, int e_type, double const_value_i, int filter=0)
Standard constructor.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double omega
Rotation angular velocity ([f_unit] )
double * p_angu_mom
Angular momentum.
void operator=(const Hot_star_rot_CFC &)
Assignment to another Hot_star_rot_CFC.
Vector poisson(double lambda, int method=6) const
Solves the vector Poisson equation with *this as a source.
virtual double r_circ() const
Circumferential equatorial radius.
int get_nzone() const
Returns the number of domains.
virtual double mass_g() const
Gravitational mass.
Map & mp
Mapping associated with the star.
double const_value
Constant value of entropy or temperature.
virtual double tsw() const
Ratio T/W.
Scalar psi4
Conformal factor .
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Cmp pow(const Cmp &, int)
Power .
virtual double angu_mom() const
Angular momentum.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
virtual double grv3() const
Error on the virial identity GRV3.
void operator=(const Hot_star &)
Assignment to another Hot_star.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
Class for relativistic rotating stars in Conformal Flatness Condition and maximal slicing...
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Base class for 2-parameters equations of state (abstract class).
double * p_grv2
Error on the virial identity GRV2.
virtual void sauve(FILE *) const
Save in a file.
void update_metric()
Computes metric quantities from known potentials.
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
void update_entropy()
Updates the part of the entropy from entropy_param.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual double ellipt() const
Ellipticity e.
double * p_grv3
Error on the virial identity GRV3.