90 #include "star_rot_dirac.h" 92 #include "utilitaires.h" 103 :
Star(mpi, nzet_i, eos_i),
105 spectral_filter(filter),
110 j_euler(mpi, CON, mpi.get_bvect_spher()),
112 flat(mpi.flat_met_spher()),
114 aa(mpi, CON, mpi.get_bvect_spher()),
115 taa(mpi, COV, mpi.get_bvect_spher()),
117 hh(mpi, mpi.get_bvect_spher(), flat)
123 cerr <<
"Star_rot_Dirac::Star_rot_Dirac (standard constructor)\n" 124 <<
"The Newtonian case is not implemented... aborting." << endl ;
154 relat_type(star.relat_type),
155 spectral_filter(star.spectral_filter),
160 j_euler(star.j_euler),
166 aa_quad(star.aa_quad),
181 :
Star(mpi, eos_i, fich),
184 qqq(mpi, *(mpi.get_mg()), fich),
186 j_euler(mpi, CON, mpi.get_bvect_spher()),
188 flat(mpi.flat_met_spher()),
190 aa(mpi, CON, mpi.get_bvect_spher()),
191 taa(mpi, COV, mpi.get_bvect_spher()),
193 hh(mpi, mpi.get_bvect_spher(), flat, fich)
340 ost <<
"Rotating star " ;
343 ost <<
"in Newtonian theory" << endl ;
347 ost <<
"in Dirac gauge" << endl ;
351 ost <<
"in Conformal Flatness Condition (CFC)" << endl ;
355 ost <<
"in Conformal Flatness Condition (CFC), with hat{A}^{ij}_{TT} = 0\n" 356 <<
"(see Cordero-Carrion et al. (2009) for details" << endl ;
360 cerr <<
"Star_rot_Dirac::operator>> : unknown value for 'relat_type'" << endl ;
361 cerr <<
"relat_type = " <<
relat_type << endl ;
368 ost <<
"Uniformly rotating star" << endl ;
369 ost <<
"-----------------------" << endl ;
371 ost <<
"hydro sources of equations are filtered\n" 374 double freq =
omega/ (2.*M_PI) ;
375 ost <<
"Omega : " <<
omega * f_unit
376 <<
" rad/s f : " << freq * f_unit <<
" Hz" << endl ;
377 ost <<
"Rotation period : " << 1000. / (freq * f_unit) <<
" ms" 380 ost <<
"Error on the virial identity GRV2 : " << endl ;
381 ost <<
"GRV2 = " <<
grv2() << endl ;
382 ost <<
"Error on the virial identity GRV3 : " << endl ;
383 ost <<
"GRV3 = " <<
grv3() << endl ;
385 ost <<
"Angular momentum J : " 386 <<
angu_mom()/( qpig / (4*M_PI) *msol*msol) <<
" G M_sol^2 / c" 388 ost <<
"c J / (G M^2) : " 393 double mom_iner_38si = mom_iner * rho_unit * (
pow(r_unit,
double(5.))
395 ost <<
"Moment of inertia: " << mom_iner_38si <<
" 10^38 kg m^2" 399 ost <<
"Ratio T/W : " <<
tsw() << endl ;
400 ost <<
"Circumferential equatorial radius R_circ : " 401 <<
r_circ()/km <<
" km" << endl ;
403 ost <<
"Circumferential polar radius Rp_circ : " 404 <<
rp_circ()/km <<
" km" << endl ;
405 ost <<
"Coordinate equatorial radius r_eq : " <<
ray_eq()/km <<
" km" 407 ost <<
"Flattening r_pole/r_eq : " <<
aplat() << endl ;
409 ost <<
"Ellipticity sqrt(1-(Rp_circ/R_circ)^2) : " <<
ellipt() << endl ;
412 ost <<
"Compaction parameter M_g / R_circ : " << compact << endl ;
virtual double grv3() const
Error on the virial identity GRV3.
double * p_angu_mom
Angular momentum.
virtual void sauve(FILE *) const
Save in a binary file.
double * p_rp_circ
Circumferential polar radius.
double omega
Rotation angular velocity ([f_unit] )
Map & mp
Mapping associated with the star.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
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.
Equation of state base class.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
virtual void set_etat_nondef()
Sets the logical state of all components to ETATNONDEF (undefined state).
Base class for coordinate mappings.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Sym_tensor_trans hh
is defined by .
int relat_type
Relativistic flag.
virtual double r_circ() const
Circumferential equatorial radius.
virtual void sauve(FILE *) const
Save in a binary file.
void operator=(const Star_rot_Dirac &)
Assignment to another Star_rot_Dirac.
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
virtual void del_deriv() const
Deletes all the derived quantities.
Tensor field of valence 1.
void update_metric()
Computes metric quantities from known potentials.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
virtual double angu_mom() const
Angular momentum.
void operator=(const Star &)
Assignment to another Star.
double * p_r_circ
Circumferential equatorial radius.
Scalar psi4
Conformal factor .
virtual void sauve(FILE *) const
Save in a file.
virtual double tsw() const
Ratio T/W.
virtual double mass_g() const
Gravitational mass.
virtual double ellipt() const
Ellipticity e.
virtual void sauve(FILE *) const
Save in a file.
Star_rot_Dirac(Map &mp_i, int nzet_i, const Eos &eos_i, int relat_i=1, int filter=0)
Standard constructor.
virtual double grv2() const
Error on the virial identity GRV2.
double * p_grv3
Error on the virial identity GRV3.
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.
Class for relativistic rotating stars in Dirac gauge and maximal slicing.
Cmp pow(const Cmp &, int)
Power .
double * p_grv2
Error on the virial identity GRV2.
virtual double aplat() const
Flattening r_pole/r_eq.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
virtual double rp_circ() const
Circumferential polar radius.
virtual ~Star_rot_Dirac()
Destructor.
double ray_eq() const
Coordinate radius at , [r_unit].
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual void sauve(FILE *) const
Save in a file.
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
const Metric_flat & flat
flat metric (spherical components)
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
int spectral_filter
Spectral exponential filtering order.