00001 /* 00002 * Lorene's units 00003 * 00004 */ 00005 00006 /* 00007 * Copyright (c) 1999-2001 Eric Gourgoulhon 00008 * 00009 * This file is part of LORENE. 00010 * 00011 * LORENE is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * LORENE is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with LORENE; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 * 00025 */ 00026 00027 00028 /* 00029 * $Id: unites.h,v 1.4 2004/12/01 12:28:32 p_grandclement Exp $ 00030 * $Log: unites.h,v $ 00031 * Revision 1.4 2004/12/01 12:28:32 p_grandclement 00032 * Include math.h in unite.h 00033 * 00034 * Revision 1.3 2004/03/25 10:28:56 j_novak 00035 * All LORENE's units are now defined in the namespace Unites (in file unites.h). 00036 * 00037 * Revision 1.2 2004/03/22 13:12:43 j_novak 00038 * Modification of comments to use doxygen instead of doc++ 00039 * 00040 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon 00041 * LORENE 00042 * 00043 * Revision 1.2 2000/03/17 15:28:29 eric 00044 * Ajout de ggrav (G). 00045 * 00046 * Revision 1.1 1999/12/06 13:35:10 eric 00047 * Initial revision 00048 * 00049 * 00050 * $Header: /cvsroot/Lorene/C++/Include/unites.h,v 1.4 2004/12/01 12:28:32 p_grandclement Exp $ 00051 * 00052 */ 00053 00054 #include <math.h> 00055 00056 //--------------------------// 00057 // Standard LORENE units // 00058 //--------------------------// 00059 00067 namespace Unites { 00068 const double g_si = 6.6726E-11 ; 00069 const double c_si = 2.99792458E+8 ; 00070 const double rhonuc_si = 1.66E+17 ; 00071 const double km_si = 1.E+3 ; 00072 const double msol_si = 1.989E+30 ; 00073 const double mev_si = 1.6021892E-13 ; 00074 00075 const double r_unit = 1.e4 ; 00076 const double v_unit = c_si ; 00077 const double rho_unit = rhonuc_si ; 00078 const double t_unit = r_unit/v_unit ; 00079 const double m_unit = rho_unit * pow(r_unit, 3.) ; 00080 const double g_unit = 1./(rho_unit*t_unit*t_unit) ; 00081 const double f_unit = 1./t_unit ; 00082 00083 const double ggrav = g_si / g_unit ; 00084 const double qpig = 4 * M_PI * ggrav ; 00085 const double msol = msol_si/m_unit ; 00086 const double km = km_si/r_unit ; 00087 00088 const double mevpfm3 = mev_si/( 1.66E-27 * v_unit *v_unit) *10 ; 00089 00090 } 00091 //-----------------------------// 00092 // Electro-mag LORENE units // 00093 //-----------------------------// 00094 00095 00096 00102 namespace Unites_mag { 00103 using namespace Unites ; 00104 const double mu_si = 1.2566370614359173e-6 ; 00105 00106 const double j_unit = 1e11 ; 00107 00108 const double mag_unit = mu_si * r_unit * j_unit / 1e9 ; 00110 const double elec_unit = mag_unit * c_si / 1e3 ; 00112 const double mu0 = mu_si * pow(j_unit ,2) * pow(r_unit,2) 00113 / (rho_unit*pow(c_si,2)) ; 00114 } 00115
1.4.6