Lorene::Star Class Reference
[Stars and black holes]

Base class for stars. More...

#include <star.h>

Inheritance diagram for Lorene::Star:
Lorene::Star_bhns Lorene::Star_bin Lorene::Star_bin_xcts Lorene::Star_rot Lorene::Star_rot_Dirac Lorene::Gravastar Lorene::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.32 2014/10/13 08:52:36 j_novak Exp

Definition at line 175 of file star.h.


Constructor & Destructor Documentation

Lorene::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 127 of file star.C.

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

Lorene::Star::Star ( const Star et  ) 

Copy constructor.

Definition at line 201 of file star.C.

References set_der_0x0().

Lorene::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 226 of file star.C.

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

Lorene::Star::~Star (  )  [virtual]

Destructor.

Definition at line 290 of file star.C.

References del_deriv().


Member Function Documentation

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

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

Reimplemented in Lorene::Star_bin, Lorene::Star_bin_xcts, Lorene::Star_rot, and Lorene::Star_rot_Dirac.

Definition at line 333 of file star.C.

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

void Lorene::Star::equation_of_state (  ) 
void Lorene::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 101 of file star_equil_spher.C.

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

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

Returns the shift vector $\beta^i$.

Definition at line 402 of file star.h.

References beta.

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

Returns the proper total energy density.

Definition at line 370 of file star.h.

References ener.

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

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

Definition at line 376 of file star.h.

References ener_euler.

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

Returns the enthalpy field.

Definition at line 364 of file star.h.

References ent.

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

Returns the equation of state.

Definition at line 361 of file star.h.

References eos.

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

Returns the Lorentz factor between the fluid and Eulerian observers.

Definition at line 382 of file star.h.

References gam_euler.

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

Returns the 3-metric $\gamma$.

Definition at line 409 of file star.h.

References gamma.

const Scalar& Lorene::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 396 of file star.h.

References logn.

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

Returns the mapping.

Definition at line 355 of file star.h.

References mp.

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

Returns the proper baryon density.

Definition at line 367 of file star.h.

References nbar.

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

Returns the lapse function N.

Definition at line 399 of file star.h.

References nn.

int Lorene::Star::get_nzet (  )  const [inline]

Returns the number of domains occupied by the star.

Definition at line 358 of file star.h.

References nzet.

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

Returns the fluid pressure.

Definition at line 373 of file star.h.

References press.

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

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

Definition at line 379 of file star.h.

References s_euler.

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

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

Definition at line 390 of file star.h.

References stress_euler.

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

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

Definition at line 385 of file star.h.

References u_euler.

void Lorene::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 Lorene::Star_bin, Lorene::Star_bin_xcts, Lorene::Star_rot, Lorene::Star_rot_Dirac, and Lorene::Star_rot_Dirac_diff.

Definition at line 580 of file star.C.

const Itbl & Lorene::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 Lorene::Star_rot.

Definition at line 66 of file star_global.C.

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

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

Baryon mass.

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

Definition at line 310 of file star_global.C.

References p_mass_b.

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

Gravitational mass.

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

Definition at line 330 of file star_global.C.

References p_mass_g.

void Lorene::Star::operator= ( const Star et  ) 
ostream & Lorene::Star::operator>> ( ostream &  ost  )  const [protected, virtual]
double Lorene::Star::ray_eq (  )  const
double Lorene::Star::ray_eq_3pis2 (  )  const
double Lorene::Star::ray_eq_pi (  )  const
double Lorene::Star::ray_eq_pis2 (  )  const
double Lorene::Star::ray_pole (  )  const

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

Definition at line 281 of file star_global.C.

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

void Lorene::Star::sauve ( FILE *  fich  )  const [virtual]
void Lorene::Star::set_der_0x0 (  )  const [protected, virtual]

Sets to 0x0 all the pointers on derived quantities.

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

Definition at line 319 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 Lorene::Star::set_enthalpy ( const Scalar ent_i  ) 

Assignment of the enthalpy field.

Definition at line 382 of file star.C.

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

Map& Lorene::Star::set_mp (  )  [inline]

Read/write of the mapping.

Definition at line 322 of file star.h.

References mp.

const Tbl & Lorene::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 92 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

Shift vector.

Definition at line 228 of file star.h.

Total energy density in the fluid frame.

Definition at line 193 of file star.h.

Total energy density in the Eulerian frame.

Definition at line 198 of file star.h.

Log-enthalpy.

Definition at line 190 of file star.h.

const Eos& Lorene::Star::eos [protected]

Equation of state of the stellar matter.

Definition at line 185 of file star.h.

Lorentz factor between the fluid and Eulerian observers.

Definition at line 204 of file star.h.

3-metric

Definition at line 235 of file star.h.

Logarithm of the lapse N .

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

Definition at line 222 of file star.h.

Map& Lorene::Star::mp [protected]

Mapping associated with the star.

Definition at line 180 of file star.h.

Baryon density in the fluid frame.

Definition at line 192 of file star.h.

Scalar Lorene::Star::nn [protected]

Lapse function N .

Definition at line 225 of file star.h.

int Lorene::Star::nzet [protected]

Number of domains of *mp occupied by the star.

Definition at line 183 of file star.h.

Itbl* Lorene::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 260 of file star.h.

double* Lorene::Star::p_mass_b [mutable, protected]

Baryon mass.

Definition at line 268 of file star.h.

double* Lorene::Star::p_mass_g [mutable, protected]

Gravitational mass.

Definition at line 269 of file star.h.

double* Lorene::Star::p_ray_eq [mutable, protected]

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

Definition at line 242 of file star.h.

double* Lorene::Star::p_ray_eq_3pis2 [mutable, protected]

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

Definition at line 251 of file star.h.

double* Lorene::Star::p_ray_eq_pi [mutable, protected]

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

Definition at line 248 of file star.h.

double* Lorene::Star::p_ray_eq_pis2 [mutable, protected]

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

Definition at line 245 of file star.h.

double* Lorene::Star::p_ray_pole [mutable, protected]

Coordinate radius at $\theta=0$.

Definition at line 254 of file star.h.

Tbl* Lorene::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 266 of file star.h.

Fluid pressure.

Definition at line 194 of file star.h.

Trace of the stress scalar in the Eulerian frame.

Definition at line 201 of file star.h.

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

Definition at line 212 of file star.h.

Fluid 3-velocity with respect to the Eulerian observer.

Definition at line 207 of file star.h.


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

Generated on 7 Dec 2019 for LORENE by  doxygen 1.6.1