star_rot.h
/*
* Definition of Lorene class Star_rot
*
*/
/*
* Copyright (c) 2010 Eric Gourgoulhon
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __STAR_ROT_H_
#define __STAR_ROT_H_
/*
* $Id: star_rot.h,v 1.6 2015/05/19 09:30:55 j_novak Exp $
* $Log: star_rot.h,v $
* Revision 1.6 2015/05/19 09:30:55 j_novak
* New methods for computing the area of the star and its mean radius.
*
* Revision 1.5 2014/10/13 08:52:36 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.4 2010/02/08 10:56:30 j_novak
* Added a few things missing for the reading from resulting file.
*
* Revision 1.3 2010/02/02 13:35:00 e_gourgoulhon
* Remove the "under construction" mark.
*
* Revision 1.2 2010/01/25 18:14:05 e_gourgoulhon
* Added member unsurc2
* Added method is_relativistic()
* Suppressed method f_eccentric
*
* Revision 1.1 2010/01/24 16:07:45 e_gourgoulhon
* New class Star_rot.
*
*
* $Header: /cvsroot/Lorene/C++/Include/star_rot.h,v 1.6 2015/05/19 09:30:55 j_novak Exp $
*
*/
// Headers Lorene
#include "star.h"
namespace Lorene {
class Eos ;
//--------------------------//
// class Star_rot //
//--------------------------//
class Star_rot : public Star {
// Data :
// -----
protected:
bool relativistic ;
double unsurc2 ;
double omega ;
Scalar a_car ;
Scalar bbb ;
Scalar b_car ;
Scalar nphi ;
Scalar tnphi ;
Scalar uuu ;
Scalar nuf ;
Scalar nuq ;
Scalar dzeta ;
Scalar tggg ;
Vector w_shift ;
Scalar khi_shift ;
Sym_tensor tkij ;
Scalar ak_car ;
Scalar ssjm1_nuf ;
Scalar ssjm1_nuq ;
Scalar ssjm1_dzeta ;
Scalar ssjm1_tggg ;
Scalar ssjm1_khi ;
Vector ssjm1_wshift ;
// Derived data :
// ------------
protected:
mutable double* p_angu_mom ;
mutable double* p_tsw ;
mutable double* p_grv2 ;
mutable double* p_grv3 ;
mutable double* p_r_circ ;
mutable double* p_aplat ;
mutable double* p_area ;
mutable double* p_z_eqf ;
mutable double* p_z_eqb ;
mutable double* p_z_pole ;
mutable double* p_mom_quad ;
mutable double* p_r_isco ;
mutable double* p_f_isco ;
mutable double* p_espec_isco ;
mutable double* p_lspec_isco ;
mutable double* p_f_eq ;
// Constructors - Destructor
// -------------------------
public:
Star_rot(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i) ;
Star_rot(const Star_rot& ) ;
Star_rot(Map& mp_i, const Eos& eos_i, FILE* fich) ;
virtual ~Star_rot() ;
// Memory management
// -----------------
protected:
virtual void del_deriv() const ;
virtual void set_der_0x0() const ;
virtual void del_hydro_euler() ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Star_rot& ) ;
// Accessors
// ---------
public:
bool is_relativistic() const {return relativistic; } ;
virtual double get_omega_c() const ;
const Scalar& get_bbb() const {return bbb;} ;
const Scalar& get_a_car() const {return a_car;} ;
const Scalar& get_b_car() const {return b_car;} ;
const Scalar& get_nphi() const {return nphi;} ;
const Scalar& get_tnphi() const {return tnphi;} ;
const Scalar& get_uuu() const {return uuu;} ;
const Scalar& get_nuf() const {return nuf;} ;
const Scalar& get_nuq() const {return nuq;} ;
const Scalar& get_dzeta() const {return dzeta;} ;
const Scalar& get_tggg() const {return tggg;} ;
const Vector& get_w_shift() const {return w_shift;} ;
const Scalar& get_khi_shift() const {return khi_shift;} ;
const Sym_tensor& get_tkij() const {return tkij;} ;
const Scalar& get_ak_car() const {return ak_car;} ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ;
virtual void display_poly(ostream& ) const ;
protected:
virtual ostream& operator>>(ostream& ) const ;
virtual void partial_display(ostream& ) const ;
// Global quantities
// -----------------
public:
virtual const Itbl& l_surf() const ;
virtual double mass_b() const ;
virtual double mass_g() const ;
virtual double angu_mom() const ;
virtual double tsw() const ;
virtual double grv2() const ;
virtual double grv3(ostream* ost = 0x0) const ;
virtual double r_circ() const ;
virtual double aplat() const ;
virtual double area() const ;
virtual double mean_radius() const ;
virtual double z_eqf() const ;
virtual double z_eqb() const ;
virtual double z_pole() const ;
virtual double mom_quad() const ;
virtual double r_isco(ostream* ost = 0x0) const ;
virtual double f_isco() const ;
virtual double espec_isco() const ;
virtual double lspec_isco() const ;
virtual double f_eq() const ;
// Computational routines
// ----------------------
public:
virtual void hydro_euler() ;
void update_metric() ;
void fait_shift() ;
void fait_nphi() ;
void extrinsic_curvature() ;
static double lambda_grv2(const Scalar& sou_m, const Scalar& sou_q) ;
virtual void equilibrium(double ent_c, double omega0, double fact_omega,
int nzadapt, const Tbl& ent_limit,
const Itbl& icontrol, const Tbl& control,
double mbar_wanted, double aexp_mass,
Tbl& diff, Param* = 0x0) ;
};
}
#endif
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Itbl
Basic integer array class.
Definition itbl.h:122
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Star_rot::p_angu_mom
double * p_angu_mom
Angular momentum.
Definition star_rot.h:232
Lorene::Star_rot::display_poly
virtual void display_poly(ostream &) const
Display in polytropic units.
Definition star_rot.C:649
Lorene::Star_rot::lspec_isco
virtual double lspec_isco() const
Angular momentum of a particle on the ISCO.
Definition star_rot_isco.C:272
Lorene::Star_rot::mean_radius
virtual double mean_radius() const
Mean star radius from the area .
Definition star_rot_global.C:416
Lorene::Star_rot::p_r_isco
double * p_r_isco
Circumferential radius of the ISCO.
Definition star_rot.h:243
Lorene::Star_rot::p_aplat
double * p_aplat
Flatening r_pole/r_eq.
Definition star_rot.h:237
Lorene::Star_rot::Star_rot
Star_rot(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i)
Standard constructor.
Definition star_rot.C:86
Lorene::Star_rot::p_mom_quad
double * p_mom_quad
Quadrupole moment.
Definition star_rot.h:242
Lorene::Star_rot::ssjm1_tggg
Scalar ssjm1_tggg
Effective source at the previous step for the resolution of the Poisson equation for tggg .
Definition star_rot.h:208
Lorene::Star_rot::tkij
Sym_tensor tkij
Tensor related to the extrinsic curvature tensor by .
Definition star_rot.h:167
Lorene::Star_rot::espec_isco
virtual double espec_isco() const
Energy of a particle on the ISCO.
Definition star_rot_isco.C:289
Lorene::Star_rot::mom_quad
virtual double mom_quad() const
Quadrupole moment.
Definition star_rot_global.C:521
Lorene::Star_rot::p_z_eqf
double * p_z_eqf
Forward redshift factor at equator.
Definition star_rot.h:239
Lorene::Star_rot::tggg
Scalar tggg
Metric potential .
Definition star_rot.h:137
Lorene::Star_rot::tnphi
Scalar tnphi
Component of the shift vector.
Definition star_rot.h:118
Lorene::Star_rot::fait_shift
void fait_shift()
Computes shift from w_shift and khi_shift according to Shibata's prescription [Prog.
Definition star_rot.C:703
Lorene::Star_rot::~Star_rot
virtual ~Star_rot()
Destructor.
Definition star_rot.C:287
Lorene::Star_rot::z_pole
virtual double z_pole() const
Redshift factor at North pole.
Definition star_rot_global.C:502
Lorene::Star_rot::get_tkij
const Sym_tensor & get_tkij() const
Returns the tensor related to the extrinsic curvature tensor by .
Definition star_rot.h:384
Lorene::Star_rot::r_isco
virtual double r_isco(ostream *ost=0x0) const
Circumferential radius of the innermost stable circular orbit (ISCO).
Definition star_rot_isco.C:71
Lorene::Star_rot::z_eqb
virtual double z_eqb() const
Backward redshift factor at equator.
Definition star_rot_global.C:471
Lorene::Star_rot::unsurc2
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Definition star_rot.h:99
Lorene::Star_rot::get_dzeta
const Scalar & get_dzeta() const
Returns the Metric potential .
Definition star_rot.h:346
Lorene::Star_rot::get_tggg
const Scalar & get_tggg() const
Returns the Metric potential .
Definition star_rot.h:349
Lorene::Star_rot::extrinsic_curvature
void extrinsic_curvature()
Computes tkij and ak_car from shift , nnn and b_car .
Definition star_rot_upmetr.C:110
Lorene::Star_rot::w_shift
Vector w_shift
Vector used in the decomposition of shift , following Shibata's prescription [Prog.
Definition star_rot.h:150
Lorene::Star_rot::get_w_shift
const Vector & get_w_shift() const
Returns the vector used in the decomposition of shift , following Shibata's prescription [Prog.
Definition star_rot.h:363
Lorene::Star_rot::b_car
Scalar b_car
Square of the metric factor B.
Definition star_rot.h:110
Lorene::Star_rot::operator=
void operator=(const Star_rot &)
Assignment to another Star_rot.
Definition star_rot.C:359
Lorene::Star_rot::p_lspec_isco
double * p_lspec_isco
Specific angular momentum of a particle on the ISCO.
Definition star_rot.h:248
Lorene::Star_rot::bbb
Scalar bbb
Metric factor B.
Definition star_rot.h:107
Lorene::Star_rot::mass_b
virtual double mass_b() const
Baryon mass.
Definition star_rot_global.C:98
Lorene::Star_rot::hydro_euler
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Definition star_rot_hydro.C:57
Lorene::Star_rot::get_omega_c
virtual double get_omega_c() const
Returns the central value of the rotation angular velocity ([f_unit] ).
Definition star_rot.C:640
Lorene::Star_rot::get_khi_shift
const Scalar & get_khi_shift() const
Returns the scalar used in the decomposition of shift following Shibata's prescription [Prog.
Definition star_rot.h:377
Lorene::Star_rot::omega
double omega
Rotation angular velocity ([f_unit] ).
Definition star_rot.h:101
Lorene::Star_rot::get_nuq
const Scalar & get_nuq() const
Returns the Part of the Metric potential = logn generated by the quadratic terms.
Definition star_rot.h:343
Lorene::Star_rot::ak_car
Scalar ak_car
Scalar .
Definition star_rot.h:186
Lorene::Star_rot::r_circ
virtual double r_circ() const
Circumferential radius.
Definition star_rot_global.C:342
Lorene::Star_rot::uuu
Scalar uuu
Norm of u_euler.
Definition star_rot.h:121
Lorene::Star_rot::z_eqf
virtual double z_eqf() const
Forward redshift factor at equator.
Definition star_rot_global.C:443
Lorene::Star_rot::get_ak_car
const Scalar & get_ak_car() const
Returns the scalar .
Definition star_rot.h:403
Lorene::Star_rot::nphi
Scalar nphi
Metric coefficient .
Definition star_rot.h:113
Lorene::Star_rot::get_nphi
const Scalar & get_nphi() const
Returns the metric coefficient .
Definition star_rot.h:325
Lorene::Star_rot::set_der_0x0
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition star_rot.C:322
Lorene::Star_rot::p_f_isco
double * p_f_isco
Orbital frequency of the ISCO.
Definition star_rot.h:244
Lorene::Star_rot::update_metric
void update_metric()
Computes metric coefficients from known potentials.
Definition star_rot_upmetr.C:51
Lorene::Star_rot::f_isco
virtual double f_isco() const
Orbital frequency at the innermost stable circular orbit (ISCO).
Definition star_rot_isco.C:255
Lorene::Star_rot::mass_g
virtual double mass_g() const
Gravitational mass.
Definition star_rot_global.C:124
Lorene::Star_rot::operator>>
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Definition star_rot.C:428
Lorene::Star_rot::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition star_rot.C:401
Lorene::Star_rot::p_area
double * p_area
Integrated surface area.
Definition star_rot.h:238
Lorene::Star_rot::aplat
virtual double aplat() const
Flatening r_pole/r_eq.
Definition star_rot_global.C:426
Lorene::Star_rot::p_grv3
double * p_grv3
Error on the virial identity GRV3.
Definition star_rot.h:235
Lorene::Star_rot::ssjm1_nuq
Scalar ssjm1_nuq
Effective source at the previous step for the resolution of the Poisson equation for nuq by means of ...
Definition star_rot.h:198
Lorene::Star_rot::get_a_car
const Scalar & get_a_car() const
Returns the square of the metric factor A.
Definition star_rot.h:319
Lorene::Star_rot::l_surf
virtual const Itbl & l_surf() const
Description of the stellar surface: returns a 2-D Itbl containing the values of the domain index l on...
Definition star_rot_global.C:68
Lorene::Star_rot::p_espec_isco
double * p_espec_isco
Specific energy of a particle on the ISCO.
Definition star_rot.h:246
Lorene::Star_rot::p_tsw
double * p_tsw
Ratio T/W.
Definition star_rot.h:233
Lorene::Star_rot::get_b_car
const Scalar & get_b_car() const
Returns the square of the metric factor B.
Definition star_rot.h:322
Lorene::Star_rot::nuf
Scalar nuf
Part of the Metric potential = logn generated by the matter terms.
Definition star_rot.h:126
Lorene::Star_rot::is_relativistic
bool is_relativistic() const
Returns true for a relativistic star, false for a Newtonian one.
Definition star_rot.h:308
Lorene::Star_rot::relativistic
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Definition star_rot.h:94
Lorene::Star_rot::p_f_eq
double * p_f_eq
Orbital frequency at the equator.
Definition star_rot.h:249
Lorene::Star_rot::ssjm1_dzeta
Scalar ssjm1_dzeta
Effective source at the previous step for the resolution of the Poisson equation for dzeta .
Definition star_rot.h:203
Lorene::Star_rot::tsw
virtual double tsw() const
Ratio T/W.
Definition star_rot_global.C:176
Lorene::Star_rot::del_hydro_euler
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Definition star_rot.C:345
Lorene::Star_rot::grv3
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
Definition star_rot_global.C:235
Lorene::Star_rot::ssjm1_khi
Scalar ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Definition star_rot.h:216
Lorene::Star_rot::dzeta
Scalar dzeta
Metric potential .
Definition star_rot.h:134
Lorene::Star_rot::area
virtual double area() const
Integrated surface area in .
Definition star_rot_global.C:366
Lorene::Star_rot::a_car
Scalar a_car
Square of the metric factor A.
Definition star_rot.h:104
Lorene::Star_rot::ssjm1_nuf
Scalar ssjm1_nuf
Effective source at the previous step for the resolution of the Poisson equation for nuf by means of ...
Definition star_rot.h:192
Lorene::Star_rot::nuq
Scalar nuq
Part of the Metric potential = logn generated by the quadratic terms.
Definition star_rot.h:131
Lorene::Star_rot::get_uuu
const Scalar & get_uuu() const
Returns the norm of u_euler.
Definition star_rot.h:333
Lorene::Star_rot::p_grv2
double * p_grv2
Error on the virial identity GRV2.
Definition star_rot.h:234
Lorene::Star_rot::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition star_rot.C:297
Lorene::Star_rot::ssjm1_wshift
Vector ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for .
Definition star_rot.h:225
Lorene::Star_rot::equilibrium
virtual void equilibrium(double ent_c, double omega0, double fact_omega, int nzadapt, const Tbl &ent_limit, const Itbl &icontrol, const Tbl &control, double mbar_wanted, double aexp_mass, Tbl &diff, Param *=0x0)
Computes an equilibrium configuration.
Definition star_rot_equil.C:71
Lorene::Star_rot::get_nuf
const Scalar & get_nuf() const
Returns the part of the Metric potential = logn generated by the matter terms.
Definition star_rot.h:338
Lorene::Star_rot::get_bbb
const Scalar & get_bbb() const
Returns the metric factor B.
Definition star_rot.h:316
Lorene::Star_rot::p_r_circ
double * p_r_circ
Circumferential radius.
Definition star_rot.h:236
Lorene::Star_rot::f_eq
virtual double f_eq() const
Orbital frequency at the equator.
Definition star_rot_isco.C:307
Lorene::Star_rot::grv2
virtual double grv2() const
Error on the virial identity GRV2.
Definition star_rot_global.C:204
Lorene::Star_rot::angu_mom
virtual double angu_mom() const
Angular momentum.
Definition star_rot_global.C:150
Lorene::Star_rot::get_tnphi
const Scalar & get_tnphi() const
Returns the component of the shift vector.
Definition star_rot.h:330
Lorene::Star_rot::p_z_eqb
double * p_z_eqb
Backward redshift factor at equator.
Definition star_rot.h:240
Lorene::Star_rot::partial_display
virtual void partial_display(ostream &) const
Printing of some informations, excluding all global quantities.
Definition star_rot.C:590
Lorene::Star_rot::p_z_pole
double * p_z_pole
Redshift factor at North pole.
Definition star_rot.h:241
Lorene::Star_rot::khi_shift
Scalar khi_shift
Scalar used in the decomposition of shift , following Shibata's prescription [Prog.
Definition star_rot.h:160
Lorene::Star_rot::lambda_grv2
static double lambda_grv2(const Scalar &sou_m, const Scalar &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
Definition star_rot_lambda_grv2.C:62
Lorene::Star_rot::fait_nphi
void fait_nphi()
Computes tnphi and nphi from the Cartesian components of the shift, stored in shift .
Definition star_rot.C:748
Lorene::Star::Star
Star(Map &mp_i, int nzet_i, const Eos &eos_i)
Standard constructor.
Definition star.C:124
Lorene::Sym_tensor
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139