00001 /* 00002 * Methods of class Star_bhns to compute global quantities 00003 * 00004 * (see file star_bhns.h for documentation). 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2005,2007 Keisuke Taniguchi 00010 * 00011 * This file is part of LORENE. 00012 * 00013 * LORENE is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License version 2 00015 * as published by the Free Software Foundation. 00016 * 00017 * LORENE is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with LORENE; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 char star_bhns_global_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_global.C,v 1.2 2008/05/15 19:15:20 k_taniguchi Exp $" ; 00029 00030 /* 00031 * $Id: star_bhns_global.C,v 1.2 2008/05/15 19:15:20 k_taniguchi Exp $ 00032 * $Log: star_bhns_global.C,v $ 00033 * Revision 1.2 2008/05/15 19:15:20 k_taniguchi 00034 * Change of a parameter. 00035 * 00036 * Revision 1.1 2007/06/22 01:31:24 k_taniguchi 00037 * *** empty log message *** 00038 * 00039 * 00040 * $Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_global.C,v 1.2 2008/05/15 19:15:20 k_taniguchi Exp $ 00041 * 00042 */ 00043 00044 // C++ headers 00045 //#include <> 00046 00047 // C headers 00048 //#include <> 00049 00050 // Lorene headers 00051 #include "star_bhns.h" 00052 #include "unites.h" 00053 #include "utilitaires.h" 00054 00055 //-------------------------------// 00056 // Baryon mass // 00057 //-------------------------------// 00058 00059 double Star_bhns::mass_b() const { 00060 00061 using namespace Unites ; 00062 00063 if (p_mass_b == 0x0) { // a new computation is required 00064 00065 Scalar dens = pow(confo_tot, 6.) * nbar * gam_euler ; 00066 dens.std_spectral_base() ; 00067 00068 p_mass_b = new double( dens.integrale() ) ; 00069 } 00070 00071 return *p_mass_b ; 00072 00073 /* 00074 cout << "Star_bhns::mass_b() is not available !!!" << endl 00075 << " --> Use Star_bhns::mass_b_bhns(kerrschild, mass_bh, sepa)" 00076 << endl ; 00077 abort() ; 00078 */ 00079 00080 } 00081 00082 double Star_bhns::mass_b_bhns(bool kerrschild, const double& mass_bh, 00083 const double& sepa) const { 00084 00085 using namespace Unites ; 00086 00087 if (p_mass_b_bhns == 0x0) { // a new computation is required 00088 00089 Scalar tmp(mp) ; 00090 00091 if (kerrschild) { 00092 00093 Scalar xx(mp) ; 00094 xx = mp.x ; 00095 xx.std_spectral_base() ; 00096 Scalar yy(mp) ; 00097 yy = mp.y ; 00098 yy.std_spectral_base() ; 00099 Scalar zz(mp) ; 00100 zz = mp.z ; 00101 zz.std_spectral_base() ; 00102 00103 double yns = mp.get_ori_y() ; 00104 00105 Scalar rr(mp) ; 00106 rr = sqrt( (xx+sepa)*(xx+sepa) + (yy+yns)*(yy+yns) + zz*zz ) ; 00107 rr.std_spectral_base() ; 00108 00109 tmp = sqrt(1. + 2.*ggrav*mass_bh/rr) ; 00110 00111 } 00112 else { // Isotropic coordinates with the maximal slicing 00113 00114 tmp = 1. ; 00115 00116 } 00117 tmp.std_spectral_base() ; 00118 00119 Scalar dens = pow(confo_tot, 6.) * nbar * gam_euler * tmp ; 00120 dens.std_spectral_base() ; 00121 00122 p_mass_b_bhns = new double( dens.integrale() ) ; 00123 } 00124 00125 return *p_mass_b_bhns ; 00126 00127 } 00128 00129 00130 //--------------------------------------// 00131 // Gravitational mass // 00132 //--------------------------------------// 00133 00134 double Star_bhns::mass_g() const { 00135 00136 cout << "Star_bhns::mass_g() is not available !!!" << endl 00137 << " --> Use Star_bhns::mass_g_bhns()" 00138 << endl ; 00139 abort() ; 00140 00141 } 00142 00143 double Star_bhns::mass_g_bhns() const { 00144 00145 // This mass is valid only for an isolated spherical star 00146 00147 if (p_mass_g_bhns == 0x0) { // a new computation is required 00148 00149 Scalar dens = lapconf_tot * pow(confo_tot, 5.) 00150 * (ener_euler + s_euler) ; 00151 00152 dens.std_spectral_base() ; 00153 00154 p_mass_g_bhns = new double( dens.integrale() ) ; 00155 00156 } 00157 00158 return *p_mass_g_bhns ; 00159 00160 }
1.4.6