LORENE
Lorene::Hot_star Class Referenceabstract

Base class for hot stars. More...

#include <hot_star.h>

Inheritance diagram for Lorene::Hot_star:
Lorene::Hot_star_rot_CFC Lorene::Star_bin Lorene::Hot_star_rot_diff_CFC

Public Member Functions

 Hot_star (Map &mp_i, int nzet_i, const Hot_eos &heos_i)
 Standard constructor. More...
 
 Hot_star (const Hot_star &)
 Copy constructor. More...
 
 Hot_star (Map &mp_i, const Hot_eos &heos_i, FILE *fich)
 Constructor from a file (see sauve(FILE* )). More...
 
virtual ~Hot_star ()
 Destructor. More...
 
void operator= (const Hot_star &)
 Assignment to another Hot_star. More...
 
Mapset_mp ()
 Read/write of the mapping. More...
 
void set_enthalpy (const Scalar &)
 Assignment of the enthalpy field. More...
 
void equation_of_state ()
 Computes the proper baryon and energy density, as well as pressure from the enthalpy. More...
 
virtual void hydro_euler ()
 Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid frame (nbar, ener and press). More...
 
virtual void equilibrium_spher (double ent_c, double precis=1.e-14, const Tbl *pent_limit=0x0)
 Computes a spherical static configuration. More...
 
const Mapget_mp () const
 Returns the mapping. More...
 
int get_nzet () const
 Returns the number of domains occupied by the star. More...
 
const Hot_eosget_eos () const
 Returns the equation of state. More...
 
const Scalarget_ent () const
 Returns the enthalpy field. More...
 
const Scalarget_entropy () const
 Returns the entropy field. More...
 
const Scalarget_nbar () const
 Returns the proper baryon density. More...
 
const Scalarget_ener () const
 Returns the proper total energy density. More...
 
const Scalarget_press () const
 Returns the fluid pressure. More...
 
const Scalarget_temp () const
 Returns the fluid temperature. More...
 
const Scalarget_ener_euler () const
 Returns the total energy density with respect to the Eulerian observer. More...
 
const Scalarget_s_euler () const
 Returns the trace of the stress tensor in the Eulerian frame. More...
 
const Scalarget_gam_euler () const
 Returns the Lorentz factor between the fluid and Eulerian observers. More...
 
const Vectorget_u_euler () const
 Returns the fluid 3-velocity with respect to the Eulerian observer. More...
 
const Tensorget_stress_euler () const
 Returns the spatial part of the stress-energy tensor with respect to the Eulerian observer. More...
 
const Scalarget_logn () const
 Returns the logarithm of the lapse N. More...
 
const Scalarget_nn () const
 Returns the lapse function N. More...
 
const Vectorget_beta () const
 Returns the shift vector $\beta^i$. More...
 
const Scalarget_lnq () const
 
const Metricget_gamma () const
 Returns the 3-metric $\gamma$. More...
 
virtual void sauve (FILE *) const
 Save in a file. More...
 
double ray_eq () const
 Coordinate radius at $\phi=0$, $\theta=\pi/2$ [r_unit]. More...
 
double ray_eq_pis2 () const
 Coordinate radius at $\phi=\pi/2$, $\theta=\pi/2$ [r_unit]. More...
 
double ray_eq_pi () const
 Coordinate radius at $\phi=\pi$, $\theta=\pi/2$ [r_unit]. More...
 
double ray_eq_3pis2 () const
 Coordinate radius at $\phi=3\pi/2$, $\theta=\pi/2$ [r_unit]. More...
 
double ray_pole () const
 Coordinate radius at $\theta=0$ [r_unit]. More...
 
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')$. More...
 
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')$. More...
 
virtual double mass_b () const =0
 Baryon mass. More...
 
virtual double mass_g () const =0
 Gravitational mass. More...
 

Protected Member Functions

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

Protected Attributes

Mapmp
 Mapping associated with the star. More...
 
int nzet
 Number of domains of *mp occupied by the star. More...
 
const Hot_eosheos
 Equation of state of the stellar matter. More...
 
Scalar ent
 Log-enthalpy. More...
 
Scalar nbar
 Baryon density in the fluid frame. More...
 
Scalar ener
 Total energy density in the fluid frame. More...
 
Scalar press
 Fluid pressure. More...
 
Scalar temp
 Temperature field (in MeV) More...
 
Scalar entropy
 Entropy per baryon field (in $k_B$) More...
 
Scalar ener_euler
 Total energy density in the Eulerian frame. More...
 
Scalar s_euler
 Trace of the stress scalar in the Eulerian frame. More...
 
Scalar gam_euler
 Lorentz factor between the fluid and Eulerian observers. More...
 
Vector u_euler
 Fluid 3-velocity with respect to the Eulerian observer. More...
 
Sym_tensor stress_euler
 Spatial part of the stress-energy tensor with respect to the Eulerian observer. More...
 
Scalar logn
 Logarithm of the lapse N . More...
 
Scalar nn
 Lapse function N . More...
 
Vector beta
 Shift vector. More...
 
Scalar lnq
 
Metric gamma
 3-metric More...
 
double * p_ray_eq
 Coordinate radius at $\phi=0$, $\theta=\pi/2$. More...
 
double * p_ray_eq_pis2
 Coordinate radius at $\phi=\pi/2$, $\theta=\pi/2$. More...
 
double * p_ray_eq_pi
 Coordinate radius at $\phi=\pi$, $\theta=\pi/2$. More...
 
double * p_ray_eq_3pis2
 Coordinate radius at $\phi=3\pi/2$, $\theta=\pi/2$. More...
 
double * p_ray_pole
 Coordinate radius at $\theta=0$. More...
 
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')$. More...
 
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')$. More...
 
double * p_mass_b
 Baryon mass. More...
 
double * p_mass_g
 Gravitational mass. More...
 

Friends

ostream & operator<< (ostream &, const Hot_star &)
 Display. More...
 

Detailed Description

Base class for hot 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
hot_star.h,v 1.1 2026/03/23 17:33:04 s_jaraba Exp

Definition at line 76 of file hot_star.h.

Constructor & Destructor Documentation

◆ Hot_star() [1/3]

Lorene::Hot_star::Hot_star ( Map mp_i,
int  nzet_i,
const Hot_eos heos_i 
)

Standard constructor.

Parameters
mp_iMapping on which the star will be defined
nzet_iNumber of domains occupied by the star
eos_iEquation of state of the stellar matter

Definition at line 130 of file hot_star.C.

References beta, Lorene::Metric::cov(), ener, ener_euler, ent, entropy, 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, temp, and u_euler.

◆ Hot_star() [2/3]

Lorene::Hot_star::Hot_star ( const Hot_star et)

Copy constructor.

Definition at line 208 of file hot_star.C.

References set_der_0x0().

◆ Hot_star() [3/3]

Lorene::Hot_star::Hot_star ( Map mp_i,
const Hot_eos heos_i,
FILE *  fich 
)

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

Parameters
mp_iMapping on which the star will be defined
eos_iEquation of state of the stellar matter
fichinput file (must have been created by the function sauve)

Definition at line 235 of file hot_star.C.

References beta, ent, entropy, Lorene::fread_be(), Lorene::Map::get_mg(), heos, Lorene::Hot_eos::hoteos_from_file(), mp, nn, nzet, set_der_0x0(), Lorene::Tensor::set_etat_zero(), stress_euler, and u_euler.

◆ ~Hot_star()

Lorene::Hot_star::~Hot_star ( )
virtual

Destructor.

Definition at line 303 of file hot_star.C.

References del_deriv().

Member Function Documentation

◆ del_deriv()

void Lorene::Hot_star::del_deriv ( ) const
protectedvirtual

Deletes all the derived quantities.

Reimplemented in Lorene::Star_bin, and Lorene::Hot_star_rot_CFC.

Definition at line 314 of file hot_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().

◆ del_hydro_euler()

void Lorene::Hot_star::del_hydro_euler ( )
protectedvirtual

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

Reimplemented in Lorene::Star_bin, and Lorene::Hot_star_rot_CFC.

Definition at line 346 of file hot_star.C.

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

◆ equation_of_state()

◆ equilibrium_spher()

void Lorene::Hot_star::equilibrium_spher ( double  ent_c,
double  precis = 1.e-14,
const Tbl pent_limit = 0x0 
)
virtual

◆ get_beta()

const Vector& Lorene::Hot_star::get_beta ( ) const
inline

Returns the shift vector $\beta^i$.

Definition at line 313 of file hot_star.h.

References beta.

◆ get_ener()

const Scalar& Lorene::Hot_star::get_ener ( ) const
inline

Returns the proper total energy density.

Definition at line 278 of file hot_star.h.

References ener.

◆ get_ener_euler()

const Scalar& Lorene::Hot_star::get_ener_euler ( ) const
inline

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

Definition at line 287 of file hot_star.h.

References ener_euler.

◆ get_ent()

const Scalar& Lorene::Hot_star::get_ent ( ) const
inline

Returns the enthalpy field.

Definition at line 269 of file hot_star.h.

References ent.

◆ get_entropy()

const Scalar& Lorene::Hot_star::get_entropy ( ) const
inline

Returns the entropy field.

Definition at line 272 of file hot_star.h.

References ent.

◆ get_eos()

const Hot_eos& Lorene::Hot_star::get_eos ( ) const
inline

Returns the equation of state.

Definition at line 266 of file hot_star.h.

References heos.

◆ get_gam_euler()

const Scalar& Lorene::Hot_star::get_gam_euler ( ) const
inline

Returns the Lorentz factor between the fluid and Eulerian observers.

Definition at line 293 of file hot_star.h.

References gam_euler.

◆ get_gamma()

const Metric& Lorene::Hot_star::get_gamma ( ) const
inline

Returns the 3-metric $\gamma$.

Definition at line 320 of file hot_star.h.

References gamma.

◆ get_logn()

const Scalar& Lorene::Hot_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 307 of file hot_star.h.

References logn.

◆ get_mp()

const Map& Lorene::Hot_star::get_mp ( ) const
inline

Returns the mapping.

Definition at line 260 of file hot_star.h.

References mp.

◆ get_nbar()

const Scalar& Lorene::Hot_star::get_nbar ( ) const
inline

Returns the proper baryon density.

Definition at line 275 of file hot_star.h.

References nbar.

◆ get_nn()

const Scalar& Lorene::Hot_star::get_nn ( ) const
inline

Returns the lapse function N.

Definition at line 310 of file hot_star.h.

References nn.

◆ get_nzet()

int Lorene::Hot_star::get_nzet ( ) const
inline

Returns the number of domains occupied by the star.

Definition at line 263 of file hot_star.h.

References nzet.

◆ get_press()

const Scalar& Lorene::Hot_star::get_press ( ) const
inline

Returns the fluid pressure.

Definition at line 281 of file hot_star.h.

References press.

◆ get_s_euler()

const Scalar& Lorene::Hot_star::get_s_euler ( ) const
inline

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

Definition at line 290 of file hot_star.h.

References s_euler.

◆ get_stress_euler()

const Tensor& Lorene::Hot_star::get_stress_euler ( ) const
inline

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

Definition at line 301 of file hot_star.h.

References stress_euler.

◆ get_temp()

const Scalar& Lorene::Hot_star::get_temp ( ) const
inline

Returns the fluid temperature.

Definition at line 284 of file hot_star.h.

References temp.

◆ get_u_euler()

const Vector& Lorene::Hot_star::get_u_euler ( ) const
inline

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

Definition at line 296 of file hot_star.h.

References u_euler.

◆ hydro_euler()

void Lorene::Hot_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::Hot_star_rot_CFC, and Lorene::Hot_star_rot_diff_CFC.

Definition at line 570 of file hot_star.C.

◆ l_surf()

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

Definition at line 69 of file hot_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.

◆ mass_b()

double Lorene::Hot_star::mass_b ( ) const
pure virtual

Baryon mass.

Implemented in Lorene::Star_bin, and Lorene::Hot_star_rot_CFC.

Definition at line 313 of file hot_star_global.C.

References p_mass_b.

◆ mass_g()

double Lorene::Hot_star::mass_g ( ) const
pure virtual

Gravitational mass.

Implemented in Lorene::Star_bin, and Lorene::Hot_star_rot_CFC.

Definition at line 333 of file hot_star_global.C.

References p_mass_g.

◆ operator=()

void Lorene::Hot_star::operator= ( const Hot_star et)

Assignment to another Hot_star.

Definition at line 367 of file hot_star.C.

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

◆ operator>>()

ostream & Lorene::Hot_star::operator>> ( ostream &  ost) const
protectedvirtual

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

Reimplemented in Lorene::Star_bin, Lorene::Hot_star_rot_CFC, and Lorene::Hot_star_rot_diff_CFC.

Definition at line 436 of file hot_star.C.

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

◆ ray_eq()

double Lorene::Hot_star::ray_eq ( ) const

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

Definition at line 114 of file hot_star_global.C.

References Lorene::Map::get_mg(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_type_p(), Lorene::Mg3d::get_type_t(), mp, and p_ray_eq.

◆ ray_eq_3pis2()

double Lorene::Hot_star::ray_eq_3pis2 ( ) const

◆ ray_eq_pi()

double Lorene::Hot_star::ray_eq_pi ( ) const

◆ ray_eq_pis2()

double Lorene::Hot_star::ray_eq_pis2 ( ) const

◆ ray_pole()

double Lorene::Hot_star::ray_pole ( ) const

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

Definition at line 284 of file hot_star_global.C.

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

◆ sauve()

void Lorene::Hot_star::sauve ( FILE *  fich) const
virtual

◆ set_der_0x0()

void Lorene::Hot_star::set_der_0x0 ( ) const
protectedvirtual

Sets to 0x0 all the pointers on derived quantities.

Reimplemented in Lorene::Star_bin, and Lorene::Hot_star_rot_CFC.

Definition at line 332 of file hot_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.

◆ set_enthalpy()

void Lorene::Hot_star::set_enthalpy ( const Scalar ent_i)

Assignment of the enthalpy field.

Definition at line 397 of file hot_star.C.

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

◆ set_mp()

Map& Lorene::Hot_star::set_mp ( )
inline

Read/write of the mapping.

Definition at line 227 of file hot_star.h.

References mp.

◆ xi_surf()

const Tbl & Lorene::Hot_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 95 of file hot_star_global.C.

References l_surf(), p_l_surf, and p_xi_surf.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  ost,
const Hot_star et 
)
friend

Display.

Definition at line 431 of file hot_star.C.

Member Data Documentation

◆ beta

Vector Lorene::Hot_star::beta
protected

Shift vector.

Definition at line 133 of file hot_star.h.

◆ ener

Scalar Lorene::Hot_star::ener
protected

Total energy density in the fluid frame.

Definition at line 94 of file hot_star.h.

◆ ener_euler

Scalar Lorene::Hot_star::ener_euler
protected

Total energy density in the Eulerian frame.

Definition at line 103 of file hot_star.h.

◆ ent

Scalar Lorene::Hot_star::ent
protected

Log-enthalpy.

Definition at line 91 of file hot_star.h.

◆ entropy

Scalar Lorene::Hot_star::entropy
protected

Entropy per baryon field (in $k_B$)

Definition at line 99 of file hot_star.h.

◆ gam_euler

Scalar Lorene::Hot_star::gam_euler
protected

Lorentz factor between the fluid and Eulerian observers.

Definition at line 109 of file hot_star.h.

◆ gamma

Metric Lorene::Hot_star::gamma
protected

3-metric

Definition at line 140 of file hot_star.h.

◆ heos

const Hot_eos& Lorene::Hot_star::heos
protected

Equation of state of the stellar matter.

Definition at line 86 of file hot_star.h.

◆ logn

Scalar Lorene::Hot_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 127 of file hot_star.h.

◆ mp

Map& Lorene::Hot_star::mp
protected

Mapping associated with the star.

Definition at line 81 of file hot_star.h.

◆ nbar

Scalar Lorene::Hot_star::nbar
protected

Baryon density in the fluid frame.

Definition at line 93 of file hot_star.h.

◆ nn

Scalar Lorene::Hot_star::nn
protected

Lapse function N .

Definition at line 130 of file hot_star.h.

◆ nzet

int Lorene::Hot_star::nzet
protected

Number of domains of *mp occupied by the star.

Definition at line 84 of file hot_star.h.

◆ p_l_surf

Itbl* Lorene::Hot_star::p_l_surf
mutableprotected

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 165 of file hot_star.h.

◆ p_mass_b

double* Lorene::Hot_star::p_mass_b
mutableprotected

Baryon mass.

Definition at line 173 of file hot_star.h.

◆ p_mass_g

double* Lorene::Hot_star::p_mass_g
mutableprotected

Gravitational mass.

Definition at line 174 of file hot_star.h.

◆ p_ray_eq

double* Lorene::Hot_star::p_ray_eq
mutableprotected

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

Definition at line 147 of file hot_star.h.

◆ p_ray_eq_3pis2

double* Lorene::Hot_star::p_ray_eq_3pis2
mutableprotected

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

Definition at line 156 of file hot_star.h.

◆ p_ray_eq_pi

double* Lorene::Hot_star::p_ray_eq_pi
mutableprotected

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

Definition at line 153 of file hot_star.h.

◆ p_ray_eq_pis2

double* Lorene::Hot_star::p_ray_eq_pis2
mutableprotected

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

Definition at line 150 of file hot_star.h.

◆ p_ray_pole

double* Lorene::Hot_star::p_ray_pole
mutableprotected

Coordinate radius at $\theta=0$.

Definition at line 159 of file hot_star.h.

◆ p_xi_surf

Tbl* Lorene::Hot_star::p_xi_surf
mutableprotected

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 171 of file hot_star.h.

◆ press

Scalar Lorene::Hot_star::press
protected

Fluid pressure.

Definition at line 95 of file hot_star.h.

◆ s_euler

Scalar Lorene::Hot_star::s_euler
protected

Trace of the stress scalar in the Eulerian frame.

Definition at line 106 of file hot_star.h.

◆ stress_euler

Sym_tensor Lorene::Hot_star::stress_euler
protected

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

Definition at line 117 of file hot_star.h.

◆ temp

Scalar Lorene::Hot_star::temp
protected

Temperature field (in MeV)

Definition at line 98 of file hot_star.h.

◆ u_euler

Vector Lorene::Hot_star::u_euler
protected

Fluid 3-velocity with respect to the Eulerian observer.

Definition at line 112 of file hot_star.h.


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