00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, Andrew W. Steiner 00005 00006 This file is part of O2scl. 00007 00008 O2scl is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 O2scl is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with O2scl. If not, see <http://www.gnu.org/licenses/>. 00020 00021 ------------------------------------------------------------------- 00022 */ 00023 #ifndef O2SCL_BAG_EOS_H 00024 #define O2SCL_BAG_EOS_H 00025 00026 #include <o2scl/constants.h> 00027 #include <o2scl/part.h> 00028 #include <o2scl/quark.h> 00029 #include <o2scl/quark_eos.h> 00030 00031 #ifndef DOXYGENP 00032 namespace o2scl { 00033 #endif 00034 00035 /** 00036 \brief Naive bag model EOS 00037 00038 An equation of state with \f$ P=-B+P_{u,FG}+P_{d,FG}+P_{s,FG} 00039 \f$ where \f$ P_{i,FG} \f$ is the Fermi gas contribution from 00040 particle \f$ i \f$ and \f$ B \f$ is a density- and 00041 temperature-independent bag constant. 00042 00043 The finite temperature functions run the zero temperature code 00044 if the temperature is less than or equal to 0. 00045 */ 00046 00047 class bag_eos : public quark_eos { 00048 public: 00049 bag_eos(); 00050 00051 virtual ~bag_eos() {}; 00052 00053 virtual int calc_p(quark &u, quark &d, quark &s, thermo &th); 00054 00055 virtual int calc_e(quark &u, quark &d, quark &s, thermo &th); 00056 00057 /** \brief Calculate equation of state as a function of 00058 the chemical potentials 00059 00060 This function returns zero (success) unless the 00061 call to quark::pair_mu() fails. 00062 */ 00063 virtual int calc_temp_p(quark& u, quark& d, quark& s, 00064 const double temper, thermo &th); 00065 00066 /** \brief Calculate equation of state as a function of 00067 the densities 00068 00069 This function returns zero (success) unless the 00070 call to quark::pair_density() fails. 00071 */ 00072 virtual int calc_temp_e(quark& u, quark& d, quark& s, 00073 const double temper, thermo &th); 00074 00075 /// The bag constant in \f$ fm^{-4}\f$ (default \f$200/(\hbar c) \f$). 00076 double bag_constant; 00077 00078 /// Return string denoting type ("bag_eos") 00079 virtual const char *type() { return "bag_eos"; } 00080 }; 00081 00082 template<> int io_tlate<bag_eos>::input 00083 (cinput *co, in_file_format *ins, bag_eos *ap); 00084 template<> int io_tlate<bag_eos>::output 00085 (coutput *co, out_file_format *outs, bag_eos *ap); 00086 template<> const char *io_tlate<bag_eos>::type(); 00087 00088 typedef io_tlate<bag_eos> bag_eos_io_type; 00089 00090 #ifndef DOXYGENP 00091 } 00092 #endif 00093 00094 #endif