32 #include "star_rot_cfc.h" 34 #include "utilitaires.h" 45 :
Star(mpi, nzet_i, eos_i),
47 spectral_filter(filter),
49 j_euler(mpi, CON, mpi.get_bvect_spher()),
53 flat(mpi.flat_met_spher()),
54 hatA(mpi, CON, mpi.get_bvect_spher()),
85 relat_type(star.relat_type),
86 spectral_filter(star.spectral_filter),
88 j_euler(star.j_euler),
94 hatA_quad(star.hatA_quad)
108 :
Star(mpi, eos_i, fich),
109 psi(mpi, *(mpi.get_mg()), fich),
110 j_euler(mpi, CON, mpi.get_bvect_spher()),
114 flat(mpi.flat_met_spher()),
115 hatA(mpi, CON, mpi.get_bvect_spher()),
140 double lambda = 1./3. ;
266 ost <<
"Rotating star " ;
269 ost <<
"in Newtonian theory" << endl ;
273 ost <<
"in Dirac gauge" << endl ;
277 ost <<
"in Conformal Flatness Condition (CFC)" << endl ;
281 ost <<
"in Conformal Flatness Condition (CFC), with hat{A}^{ij}_{TT} = 0\n" 282 <<
"(see Cordero-Carrion et al. (2009) for details" << endl ;
286 cerr <<
"Star_rot_CFC::operator>> : unknown value for 'relat_type'" << endl ;
287 cerr <<
"relat_type = " <<
relat_type << endl ;
294 ost <<
"Uniformly rotating star" << endl ;
295 ost <<
"-----------------------" << endl ;
297 ost <<
"hydro sources of equations are filtered\n" 300 double freq =
omega/ (2.*M_PI) ;
301 ost <<
"Omega : " <<
omega * f_unit
302 <<
" rad/s f : " << freq * f_unit <<
" Hz" << endl ;
303 ost <<
"Rotation period : " << 1000. / (freq * f_unit) <<
" ms" 306 ost <<
"Error on the virial identity GRV2 : " << endl ;
307 ost <<
"GRV2 = " <<
grv2() << endl ;
308 ost <<
"Error on the virial identity GRV3 : " << endl ;
309 ost <<
"GRV3 = " <<
grv3() << endl ;
311 ost <<
"Angular momentum J : " 312 <<
angu_mom()/( qpig / (4*M_PI) *msol*msol) <<
" G M_sol^2 / c" 314 ost <<
"c J / (G M^2) : " 319 double mom_iner_38si = mom_iner * rho_unit * (
pow(r_unit,
double(5.))
321 ost <<
"Moment of inertia: " << mom_iner_38si <<
" 10^38 kg m^2" 325 ost <<
"Ratio T/W : " <<
tsw() << endl ;
326 ost <<
"Circumferential equatorial radius R_circ : " 327 <<
r_circ()/km <<
" km" << endl ;
329 ost <<
"Circumferential polar radius Rp_circ : " 330 <<
rp_circ()/km <<
" km" << endl ;
331 ost <<
"Coordinate equatorial radius r_eq : " <<
ray_eq()/km <<
" km" 333 ost <<
"Flattening r_pole/r_eq : " <<
aplat() << endl ;
335 ost <<
"Ellipticity sqrt(1-(Rp_circ/R_circ)^2) : " <<
ellipt() << endl ;
338 ost <<
"Compaction parameter M_g / R_circ : " << compact << endl ;
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
double * p_grv2
Error on the virial identity GRV2.
virtual double tsw() const
Ratio T/W.
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.
Scalar psi
Conformal factor .
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
virtual double grv3() const
Error on the virial identity GRV3.
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).
virtual double angu_mom() const
Angular momentum.
Base class for coordinate mappings.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual double r_circ() const
Circumferential equatorial radius.
int spectral_filter
Spectral exponential filtering order.
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
double * p_rp_circ
Circumferential polar radius.
void operator=(const Star_rot_CFC &)
Assignment to another Star_rot_CFC.
Scalar psi4
Conformal factor .
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual void sauve(FILE *) const
Save in a binary file.
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
virtual void sauve(FILE *) const
Save in a file.
Star_rot_CFC(Map &mp_i, int nzet_i, const Eos &eos_i, int relat_i=3, int filter=0)
Standard constructor.
Tensor field of valence 1.
void operator=(const Star &)
Assignment to another Star.
Sym_tensor ope_killing_conf(const Metric &gam) const
Computes the conformal Killing operator associated with a given metric.
Class for relativistic rotating stars in Conformal Flatness Condition and maximal slicing...
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
virtual void sauve(FILE *) const
Save in a file.
virtual double aplat() const
Flattening r_pole/r_eq.
double omega
Rotation angular velocity ([f_unit] )
int relat_type
Relativistic flag.
Vector poisson(double lambda, int method=6) const
Solves the vector Poisson equation with *this as a source.
virtual double rp_circ() const
Circumferential polar radius.
double * p_angu_mom
Angular momentum.
double * p_r_circ
Circumferential equatorial radius.
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 .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
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...
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double ray_eq() const
Coordinate radius at , [r_unit].
double * p_grv3
Error on the virial identity GRV3.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual ~Star_rot_CFC()
Destructor.
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.
void update_metric()
Computes metric quantities from known potentials.
virtual double grv2() const
Error on the virial identity GRV2.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
virtual double mass_g() const
Gravitational mass.
virtual double ellipt() const
Ellipticity e.
const Metric_flat & flat
flat metric (spherical components)