Equation of State Sub-Library: Version 0.910
bag_eos.h
00001 /*
00002   -------------------------------------------------------------------
00003   
00004   Copyright (C) 2006-2012, 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_eos.h>
00029 
00030 #ifndef DOXYGENP
00031 namespace o2scl {
00032 #endif
00033 
00034   /** \brief Simple bag model
00035 
00036       An equation of state with \f$ P=-B+P_{u,FG}+P_{d,FG}+P_{s,FG}
00037       \f$ where \f$ P_{i,FG} \f$ is the Fermi gas contribution from
00038       particle \f$ i \f$ and \f$ B \f$ is a density- and
00039       temperature-independent bag constant.
00040 
00041       The finite temperature functions run the zero temperature code 
00042       if the temperature is less than or equal to 0.
00043   */
00044 
00045   class bag_eos : public quark_eos {
00046 
00047   public:
00048 
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                             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                             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 #ifndef DOXYGENP
00083 }
00084 #endif
00085 
00086 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Friends

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.