Star Class Reference
[Stars and black holes]

Base class for stars. More...

#include <star.h>

Inheritance diagram for Star:
Star_bhns Star_bin Star_bin_xcts Star_rot Star_rot_Dirac Gravastar Star_rot_Dirac_diff

List of all members.

Public Member Functions

 Star (Map &mp_i, int nzet_i, const Eos &eos_i)
 Standard constructor.
 Star (const Star &)
 Copy constructor.
 Star (Map &mp_i, const Eos &eos_i, FILE *fich)
 Constructor from a file (see sauve(FILE* )).
virtual ~Star ()
 Destructor.
void operator= (const Star &)
 Assignment to another Star.
Mapset_mp ()
 Read/write of the mapping.
void set_enthalpy (const Scalar &)
 Assignment of the enthalpy field.
void equation_of_state ()
 Computes the proper baryon and energy density, as well as pressure from the enthalpy.
virtual void hydro_euler ()
 Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid frame (nbar, ener and press).
virtual void equilibrium_spher (double ent_c, double precis=1.e-14, const Tbl *pent_limit=0x0)
 Computes a spherical static configuration.
const Mapget_mp () const
 Returns the mapping.
int get_nzet () const
 Returns the number of domains occupied by the star.
const Eosget_eos () const
 Returns the equation of state.
const Scalarget_ent () const
 Returns the enthalpy field.
const Scalarget_nbar () const
 Returns the proper baryon density.
const Scalarget_ener () const
 Returns the proper total energy density.
const Scalarget_press () const
 Returns the fluid pressure.
const Scalarget_ener_euler () const
 Returns the total energy density with respect to the Eulerian observer.
const Scalarget_s_euler () const
 Returns the trace of the stress tensor in the Eulerian frame.
const Scalarget_gam_euler () const
 Returns the Lorentz factor between the fluid and Eulerian observers.
const Vectorget_u_euler () const
 Returns the fluid 3-velocity with respect to the Eulerian observer.
const Tensorget_stress_euler () const
 Returns the spatial part of the stress-energy tensor with respect to the Eulerian observer.
const Scalarget_logn () const
 Returns the logarithm of the lapse N.
const Scalarget_nn () const
 Returns the lapse function N.
const Vectorget_beta () const
 Returns the shift vector $\beta^i$.
const Scalarget_lnq () const
const Metricget_gamma () const
 Returns the 3-metric $\gamma$.
virtual void sauve (FILE *) const
 Save in a file.
double ray_eq () const
 Coordinate radius at $\phi=0$, $\theta=\pi/2$ [r_unit].
double ray_eq_pis2 () const
 Coordinate radius at $\phi=\pi/2$, $\theta=\pi/2$ [r_unit].
double ray_eq_pi () const
 Coordinate radius at $\phi=\pi$, $\theta=\pi/2$ [r_unit].
double ray_eq_3pis2 () const
 Coordinate radius at $\phi=3\pi/2$, $\theta=\pi/2$ [r_unit].
double ray_pole () const
 Coordinate radius at $\theta=0$ [r_unit].
virtual const Itbll_surf () const
 Description of the stellar surface: returns a 2-D Itbl containing the values of the domain index l on the surface at the collocation points in $(\theta', \phi')$.
const Tblxi_surf () const
 Description of the stellar surface: returns a 2-D Tbl containing the values of the radial coordinate $\xi$ on the surface at the collocation points in $(\theta', \phi')$.
virtual double mass_b () const =0
 Baryon mass.
virtual double mass_g () const =0
 Gravitational mass.

Protected Member Functions

virtual void del_deriv () const
 Deletes all the derived quantities.
virtual void set_der_0x0 () const
 Sets to 0x0 all the pointers on derived quantities.
virtual void del_hydro_euler ()
 Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
virtual ostream & operator>> (ostream &) const
 Operator >> (virtual function called by the operator <<).

Protected Attributes

Mapmp
 Mapping associated with the star.
int nzet
 Number of domains of *mp occupied by the star.
const Eoseos
 Equation of state of the stellar matter.
Scalar ent
 Log-enthalpy.
Scalar nbar
 Baryon density in the fluid frame.
Scalar ener
 Total energy density in the fluid frame.
Scalar press
 Fluid pressure.
Scalar ener_euler
 Total energy density in the Eulerian frame.
Scalar s_euler
 Trace of the stress scalar in the Eulerian frame.
Scalar gam_euler
 Lorentz factor between the fluid and Eulerian observers.
Vector u_euler
 Fluid 3-velocity with respect to the Eulerian observer.
Sym_tensor stress_euler
 Spatial part of the stress-energy tensor with respect to the Eulerian observer.
Scalar logn
 Logarithm of the lapse N .
Scalar nn
 Lapse function N .
Vector beta
 Shift vector.
Scalar lnq
Metric gamma
 3-metric
double * p_ray_eq
 Coordinate radius at $\phi=0$, $\theta=\pi/2$.
double * p_ray_eq_pis2
 Coordinate radius at $\phi=\pi/2$, $\theta=\pi/2$.
double * p_ray_eq_pi
 Coordinate radius at $\phi=\pi$, $\theta=\pi/2$.
double * p_ray_eq_3pis2
 Coordinate radius at $\phi=3\pi/2$, $\theta=\pi/2$.
double * p_ray_pole
 Coordinate radius at $\theta=0$.
Itblp_l_surf
 Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surface at the collocation points in $(\theta', \phi')$.
Tblp_xi_surf
 Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate $\xi$ on the surface at the collocation points in $(\theta', \phi')$.
double * p_mass_b
 Baryon mass.
double * p_mass_g
 Gravitational mass.

Friends

ostream & operator<< (ostream &, const Star &)
 Display.

Detailed Description

Base class for stars.

()

A Star is constructed upon (i) a mapping (derived class of Map), the center of which defines the center of the star, and (ii) an equation of state (derived class of Eos). It contains tensor fields (class Tensor) which describe the hydrodynamical quantities as well as the gravitational field (spacetime metric).

According to the 3+1 formalism, the spacetime metric is written

\[ ds^2 = - N^2 dt^2 + \gamma_{ij} ( dx^i + \beta^i dt ) (dx^j + \beta^j dt ) \]

where $\gamma_{ij}$ is the 3-metric, described by a Lorene object of class Metric.

The 3+1 formalism introduces two kinds of privileged observers: the fluid comoving observer and the Eulerian observer, whose 4-velocity is the unit future directed normal to the t = const hypersurfaces. The hydrodynamical quantities measured by the fluid observer correspond to the members ent, nbar, ener, and press. The hydrodynamical quantities measured by the Eulerian observer correspond to the members ener_euler, s_euler, gam_euler, and u_euler.

Version:
Id
star.h,v 1.31 2010/12/09 10:36:42 m_bejger Exp

Definition at line 171 of file star.h.


Constructor & Destructor Documentation

Star::Star ( Map mp_i,
int  nzet_i,
const Eos eos_i 
)

Standard constructor.

Parameters:
mp_i Mapping on which the star will be defined
nzet_i Number of domains occupied by the star
eos_i Equation of state of the stellar matter

Definition at line 120 of file star.C.

References beta, ener, ener_euler, ent, Map::flat_met_spher(), gam_euler, gamma, logn, mp, nbar, nn, press, s_euler, set_der_0x0(), Tensor::set_etat_zero(), Scalar::std_spectral_base(), stress_euler, and u_euler.

Star::Star ( const Star et  ) 

Copy constructor.

Definition at line 194 of file star.C.

References set_der_0x0().

Star::Star ( Map mp_i,
const Eos eos_i,
FILE *  fich 
)

Constructor from a file (see sauve(FILE* )).

Parameters:
mp_i Mapping on which the star will be defined
eos_i Equation of state of the stellar matter
fich input file (must have been created by the function sauve)

Definition at line 219 of file star.C.

References beta, ent, eos, Eos::eos_from_file(), fread_be(), Map::get_mg(), mp, nn, nzet, set_der_0x0(), Tensor::set_etat_zero(), stress_euler, and u_euler.

Star::~Star (  )  [virtual]

Destructor.

Definition at line 283 of file star.C.

References del_deriv().


Member Function Documentation

void Star::del_deriv (  )  const [protected, virtual]

Deletes all the derived quantities.

Reimplemented in Star_bin, Star_bin_xcts, Star_bhns, Star_rot, and Star_rot_Dirac.

Definition at line 294 of file star.C.

References p_l_surf, p_mass_b, p_mass_g, p_ray_eq, p_ray_eq_3pis2, p_ray_eq_pi, p_ray_eq_pis2, p_ray_pole, p_xi_surf, and set_der_0x0().

void Star::del_hydro_euler (  )  [protected, virtual]

Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.

Reimplemented in Star_bin, Star_bin_xcts, Star_rot, and Star_rot_Dirac.

Definition at line 326 of file star.C.

References del_deriv(), ener_euler, gam_euler, s_euler, Tensor::set_etat_nondef(), Scalar::set_etat_nondef(), stress_euler, and u_euler.

void Star::equation_of_state (  ) 
void Star::equilibrium_spher ( double  ent_c,
double  precis = 1.e-14,
const Tbl pent_limit = 0x0 
) [virtual]

Computes a spherical static configuration.

Parameters:
ent_c [input] central value of the enthalpy
precis [input] threshold in the relative difference between the enthalpy fields of two consecutive steps to stop the iterative procedure (default value: 1.e-14)
ent_limit [input] : array of enthalpy values to be set at the boundaries between the domains; if set to 0x0 (default), the initial values will be kept.

Definition at line 91 of file star_equil_spher.C.

References Map_et::adapt(), Param::add_double(), Param::add_int(), Param::add_int_mod(), Param::add_tbl(), Scalar::annule(), diffrel(), Scalar::dsdr(), Map_af::dsdr(), ener, ener_euler, ent, equation_of_state(), exp(), gam_euler, gamma, Map_et::get_alpha(), Map_af::get_alpha(), Map_et::get_beta(), Map_af::get_beta(), Map::get_bvect_cart(), Map::get_mg(), Mg3d::get_nr(), Mg3d::get_nt(), Mg3d::get_nzone(), Map_af::homothetie(), Scalar::integrale(), logn, mass_b(), mass_g(), mp, nn, norme(), nzet, Map_af::poisson(), press, s_euler, Vector::set(), Map_af::set_alpha(), Map_af::set_beta(), Scalar::set_dzpuis(), Cmp::set_etat_qcq(), Scalar::set_etat_zero(), sqrt(), Scalar::std_spectral_base(), u_euler, Scalar::val_grid_point(), and Map::val_r().

const Vector& Star::get_beta (  )  const [inline]

Returns the shift vector $\beta^i$.

Definition at line 398 of file star.h.

References beta.

const Scalar& Star::get_ener (  )  const [inline]

Returns the proper total energy density.

Definition at line 366 of file star.h.

References ener.

const Scalar& Star::get_ener_euler (  )  const [inline]

Returns the total energy density with respect to the Eulerian observer.

Definition at line 372 of file star.h.

References ener_euler.

const Scalar& Star::get_ent (  )  const [inline]

Returns the enthalpy field.

Definition at line 360 of file star.h.

References ent.

const Eos& Star::get_eos (  )  const [inline]

Returns the equation of state.

Definition at line 357 of file star.h.

References eos.

const Scalar& Star::get_gam_euler (  )  const [inline]

Returns the Lorentz factor between the fluid and Eulerian observers.

Definition at line 378 of file star.h.

References gam_euler.

const Metric& Star::get_gamma (  )  const [inline]

Returns the 3-metric $\gamma$.

Definition at line 405 of file star.h.

References gamma.

const Scalar& Star::get_logn (  )  const [inline]

Returns the logarithm of the lapse N.

In the Newtonian case, this is the Newtonian gravitational potential (in units of $c^2$).

Definition at line 392 of file star.h.

References logn.

const Map& Star::get_mp (  )  const [inline]

Returns the mapping.

Definition at line 351 of file star.h.

References mp.

const Scalar& Star::get_nbar (  )  const [inline]

Returns the proper baryon density.

Definition at line 363 of file star.h.

References nbar.

const Scalar& Star::get_nn (  )  const [inline]

Returns the lapse function N.

Definition at line 395 of file star.h.

References nn.

int Star::get_nzet (  )  const [inline]

Returns the number of domains occupied by the star.

Definition at line 354 of file star.h.

References nzet.

const Scalar& Star::get_press (  )  const [inline]

Returns the fluid pressure.

Definition at line 369 of file star.h.

References press.

const Scalar& Star::get_s_euler (  )  const [inline]

Returns the trace of the stress tensor in the Eulerian frame.

Definition at line 375 of file star.h.

References s_euler.

const Tensor& Star::get_stress_euler (  )  const [inline]

Returns the spatial part of the stress-energy tensor with respect to the Eulerian observer.

Definition at line 386 of file star.h.

References stress_euler.

const Vector& Star::get_u_euler (  )  const [inline]

Returns the fluid 3-velocity with respect to the Eulerian observer.

Definition at line 381 of file star.h.

References u_euler.

void Star::hydro_euler (  )  [virtual]

Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid frame (nbar, ener and press).

Reimplemented in Star_bin, Star_bin_xcts, Star_rot, Star_rot_Dirac, and Star_rot_Dirac_diff.

Definition at line 573 of file star.C.

const Itbl & Star::l_surf (  )  const [virtual]

Description of the stellar surface: returns a 2-D Itbl containing the values of the domain index l on the surface at the collocation points in $(\theta', \phi')$.

The stellar surface is defined as the location where the enthalpy (member ent) vanishes.

Reimplemented in Star_rot.

Definition at line 59 of file star_global.C.

References ent, Map::get_mg(), Mg3d::get_np(), Mg3d::get_nt(), Scalar::get_spectral_va(), mp, nzet, p_l_surf, and p_xi_surf.

double Star::mass_b (  )  const [pure virtual]

Baryon mass.

Implemented in Star_bin, Star_bin_xcts, Star_bhns, Star_rot, and Star_rot_Dirac.

Definition at line 303 of file star_global.C.

References p_mass_b.

double Star::mass_g (  )  const [pure virtual]

Gravitational mass.

Implemented in Star_bin, Star_bin_xcts, Star_bhns, Star_rot, and Star_rot_Dirac.

Definition at line 323 of file star_global.C.

References p_mass_g.

void Star::operator= ( const Star et  ) 

Assignment to another Star.

Reimplemented in Gravastar, Star_bin, Star_bin_xcts, Star_bhns, Star_rot, Star_rot_Dirac, and Star_rot_Dirac_diff.

Definition at line 347 of file star.C.

References beta, del_deriv(), ener, ener_euler, ent, eos, gam_euler, gamma, logn, mp, nbar, nn, nzet, press, s_euler, stress_euler, and u_euler.

ostream & Star::operator>> ( ostream &  ost  )  const [protected, virtual]

Operator >> (virtual function called by the operator <<).

Reimplemented in Gravastar, Star_bin, Star_bin_xcts, Star_bhns, Star_rot, Star_rot_Dirac, and Star_rot_Dirac_diff.

Definition at line 413 of file star.C.

References ener, ent, eos, mass_b(), mass_g(), nbar, nn, nzet, press, ray_eq(), ray_eq_pi(), ray_eq_pis2(), ray_pole(), and Scalar::val_grid_point().

double Star::ray_eq (  )  const

Coordinate radius at $\phi=0$, $\theta=\pi/2$ [r_unit].

Definition at line 104 of file star_global.C.

References Map::get_mg(), Mg3d::get_nt(), Mg3d::get_type_p(), Mg3d::get_type_t(), l_surf(), mp, p_ray_eq, Map::val_r(), and xi_surf().

double Star::ray_eq_3pis2 (  )  const

Coordinate radius at $\phi=3\pi/2$, $\theta=\pi/2$ [r_unit].

Definition at line 229 of file star_global.C.

References Map::get_mg(), Mg3d::get_np(), Mg3d::get_nt(), Mg3d::get_type_p(), Mg3d::get_type_t(), l_surf(), mp, p_ray_eq_3pis2, ray_eq_pis2(), Map::val_r(), and xi_surf().

double Star::ray_eq_pi (  )  const

Coordinate radius at $\phi=\pi$, $\theta=\pi/2$ [r_unit].

Definition at line 182 of file star_global.C.

References Map::get_mg(), Mg3d::get_np(), Mg3d::get_nt(), Mg3d::get_type_p(), Mg3d::get_type_t(), l_surf(), mp, p_ray_eq_pi, ray_eq(), Map::val_r(), and xi_surf().

double Star::ray_eq_pis2 (  )  const

Coordinate radius at $\phi=\pi/2$, $\theta=\pi/2$ [r_unit].

Definition at line 134 of file star_global.C.

References Map::get_mg(), Mg3d::get_np(), Mg3d::get_nt(), Mg3d::get_type_p(), Mg3d::get_type_t(), l_surf(), mp, p_ray_eq_pis2, Map::val_r(), and xi_surf().

double Star::ray_pole (  )  const

Coordinate radius at $\theta=0$ [r_unit].

Definition at line 274 of file star_global.C.

References Map::get_mg(), Mg3d::get_type_t(), l_surf(), mp, p_ray_pole, Map::val_r(), and xi_surf().

void Star::sauve ( FILE *  fich  )  const [virtual]

Save in a file.

Reimplemented in Star_bin, Star_bin_xcts, Star_bhns, Star_rot, Star_rot_Dirac, and Star_rot_Dirac_diff.

Definition at line 393 of file star.C.

References ent, eos, fwrite_be(), logn, nzet, Eos::sauve(), and Scalar::sauve().

void Star::set_der_0x0 (  )  const [protected, virtual]

Sets to 0x0 all the pointers on derived quantities.

Reimplemented in Star_bin, Star_bin_xcts, Star_bhns, Star_rot, and Star_rot_Dirac.

Definition at line 312 of file star.C.

References p_l_surf, p_mass_b, p_mass_g, p_ray_eq, p_ray_eq_3pis2, p_ray_eq_pi, p_ray_eq_pis2, p_ray_pole, and p_xi_surf.

void Star::set_enthalpy ( const Scalar ent_i  ) 

Assignment of the enthalpy field.

Definition at line 375 of file star.C.

References del_deriv(), ent, and equation_of_state().

Map& Star::set_mp (  )  [inline]

Read/write of the mapping.

Definition at line 318 of file star.h.

References mp.

const Tbl & Star::xi_surf (  )  const

Description of the stellar surface: returns a 2-D Tbl containing the values of the radial coordinate $\xi$ on the surface at the collocation points in $(\theta', \phi')$.

The stellar surface is defined as the location where the enthalpy (member ent) vanishes.

Definition at line 85 of file star_global.C.

References l_surf(), p_l_surf, and p_xi_surf.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ,
const Star  
) [friend]

Display.


Member Data Documentation

Vector Star::beta [protected]

Shift vector.

Definition at line 224 of file star.h.

Scalar Star::ener [protected]

Total energy density in the fluid frame.

Definition at line 189 of file star.h.

Scalar Star::ener_euler [protected]

Total energy density in the Eulerian frame.

Definition at line 194 of file star.h.

Scalar Star::ent [protected]

Log-enthalpy.

Definition at line 186 of file star.h.

const Eos& Star::eos [protected]

Equation of state of the stellar matter.

Definition at line 181 of file star.h.

Scalar Star::gam_euler [protected]

Lorentz factor between the fluid and Eulerian observers.

Definition at line 200 of file star.h.

Metric Star::gamma [protected]

3-metric

Definition at line 231 of file star.h.

Scalar Star::logn [protected]

Logarithm of the lapse N .

In the Newtonian case, this is the Newtonian gravitational potential (in units of $c^2$).

Definition at line 218 of file star.h.

Map& Star::mp [protected]

Mapping associated with the star.

Definition at line 176 of file star.h.

Scalar Star::nbar [protected]

Baryon density in the fluid frame.

Definition at line 188 of file star.h.

Scalar Star::nn [protected]

Lapse function N .

Definition at line 221 of file star.h.

int Star::nzet [protected]

Number of domains of *mp occupied by the star.

Definition at line 179 of file star.h.

Itbl* Star::p_l_surf [mutable, protected]

Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surface at the collocation points in $(\theta', \phi')$.

Definition at line 256 of file star.h.

double* Star::p_mass_b [mutable, protected]

Baryon mass.

Definition at line 264 of file star.h.

double* Star::p_mass_g [mutable, protected]

Gravitational mass.

Definition at line 265 of file star.h.

double* Star::p_ray_eq [mutable, protected]

Coordinate radius at $\phi=0$, $\theta=\pi/2$.

Definition at line 238 of file star.h.

double* Star::p_ray_eq_3pis2 [mutable, protected]

Coordinate radius at $\phi=3\pi/2$, $\theta=\pi/2$.

Definition at line 247 of file star.h.

double* Star::p_ray_eq_pi [mutable, protected]

Coordinate radius at $\phi=\pi$, $\theta=\pi/2$.

Definition at line 244 of file star.h.

double* Star::p_ray_eq_pis2 [mutable, protected]

Coordinate radius at $\phi=\pi/2$, $\theta=\pi/2$.

Definition at line 241 of file star.h.

double* Star::p_ray_pole [mutable, protected]

Coordinate radius at $\theta=0$.

Definition at line 250 of file star.h.

Tbl* Star::p_xi_surf [mutable, protected]

Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate $\xi$ on the surface at the collocation points in $(\theta', \phi')$.

Definition at line 262 of file star.h.

Scalar Star::press [protected]

Fluid pressure.

Definition at line 190 of file star.h.

Scalar Star::s_euler [protected]

Trace of the stress scalar in the Eulerian frame.

Definition at line 197 of file star.h.

Spatial part of the stress-energy tensor with respect to the Eulerian observer.

Definition at line 208 of file star.h.

Vector Star::u_euler [protected]

Fluid 3-velocity with respect to the Eulerian observer.

Definition at line 203 of file star.h.


The documentation for this class was generated from the following files:

Generated on 7 Oct 2014 for LORENE by  doxygen 1.6.1