00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 2008, 2009, 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_NONREL_FERMION_H 00024 #define O2SCL_NONREL_FERMION_H 00025 00026 #include <string> 00027 #include <iostream> 00028 #include <fstream> 00029 #include <cmath> 00030 #include <o2scl/constants.h> 00031 #include <o2scl/mroot.h> 00032 #include <o2scl/inte.h> 00033 #include <o2scl/fermion.h> 00034 #include <o2scl/cern_mroot_root.h> 00035 #include <o2scl/gsl_inte_qagiu.h> 00036 00037 #ifndef DOXYGENP 00038 namespace o2scl { 00039 #endif 00040 00041 /** 00042 \brief Nonrelativistic fermion class 00043 00044 The rest mass energy density is given by n*m not n*ms. Note that 00045 the effective mass here is the Landau mass, not the Dirac mass. 00046 00047 Pressure is computed with 00048 \f[ 00049 P = 2 \varepsilon/3 00050 \f] 00051 and entropy density with 00052 \f[ 00053 s = \frac{5 \varepsilon}{3 T} - \frac{n \mu}{T} 00054 \f] 00055 These relations can be verified with an integration by 00056 parts. See, e.g. \ref Callen pg. 403 or \ref Landau pg. 164. 00057 00058 \comment 00059 This was in an earlier version and is probably unnecessary. 00060 00061 Note that the energy density integral can be rescaled: 00062 \f[ 00063 \varepsilon = 00064 \frac{T^{5/2}(2 m^{*})^{3/2}}{\pi^2} 00065 \int_0^{\infty} d u \frac{u^{3/2}}{1 + \exp(u-y)} 00066 \f] 00067 where \f$ u = k^2/2/m^{*}/T \f$ and \f$ y=\mu/T \f$. 00068 \endcomment 00069 00070 The functions fermion::pair_density() and pair_mu() have not 00071 been implemented. 00072 00073 \todo Check behaviour of calc_density() at zero density, and 00074 compare with that from eff_fermion, rel_fermion, and \ref 00075 classical. 00076 00077 \todo Make sure to test with non-interacting equal to 00078 true or false, and document whether or not it works 00079 with both inc_rest_mass equal to true or false 00080 00081 \future This could be improved by performing a Chebyshev 00082 approximation (for example) to invert the density integral so 00083 that we don't need to use a solver. 00084 */ 00085 class nonrel_fermion : public fermion_T { 00086 00087 public: 00088 00089 /// Create a nonrelativistic fermion with mass 'm' and degeneracy 'g' 00090 nonrel_fermion(double m=0.0, double g=0.0); 00091 00092 virtual ~nonrel_fermion(); 00093 00094 /** 00095 \brief Zero temperature fermions 00096 */ 00097 virtual int calc_mu_zerot(); 00098 00099 /** 00100 \brief Zero temperature fermions 00101 */ 00102 virtual int calc_density_zerot(); 00103 00104 /** 00105 \brief Calculate properties as function of chemical potential 00106 */ 00107 virtual int calc_mu(const double temper); 00108 00109 /** \brief Calculate properties as function of density 00110 00111 If the density is zero, this function just sets part::mu, 00112 part::nu, part::ed, part::pr, and part::en to zero and returns 00113 without calling the error handler (even though at 00114 zero density and finite temperature, the chemical potentials 00115 formally are equal to \f$ -\infty \f$). 00116 */ 00117 virtual int calc_density(const double temper); 00118 00119 virtual int pair_mu(const double temper) { 00120 return gsl_eunimpl; 00121 } 00122 00123 virtual int pair_density(const double temper) { 00124 return gsl_eunimpl; 00125 } 00126 00127 /// Calculate effective chemical potential from density 00128 virtual int nu_from_n(const double temper); 00129 00130 /** \brief Set the solver for use in calculating the chemical 00131 potential from the density 00132 */ 00133 int set_density_root(root<double,funct<double> > &rp) { 00134 density_root=&rp; 00135 return 0; 00136 } 00137 00138 /// The default solver for calc_density(). 00139 cern_mroot_root<double,funct<double> > def_density_root; 00140 00141 /// Return string denoting type ("nonrel_fermion") 00142 virtual const char *type() { return "nonrel_fermion"; } 00143 00144 protected: 00145 00146 #ifndef DOXYGENP 00147 00148 /// Solver to compute chemical potential from density 00149 root<double,funct<double> > *density_root; 00150 00151 /// Function to compute chemical potential from density 00152 int solve_fun(double x, double &yy, double &T); 00153 00154 private: 00155 00156 nonrel_fermion(const nonrel_fermion &); 00157 nonrel_fermion& operator=(const nonrel_fermion&); 00158 00159 #endif 00160 00161 }; 00162 00163 /// A zero temperature non-relativistic fermion 00164 class nonrel_fermion_zerot : public fermion { 00165 00166 public: 00167 00168 /// Create a nonrelativistic fermion with mass 'm' and degeneracy 'g' 00169 nonrel_fermion_zerot(double m=0.0, double g=0.0); 00170 00171 virtual ~nonrel_fermion_zerot(); 00172 00173 /** 00174 \brief Zero temperature fermions 00175 */ 00176 virtual int calc_mu_zerot(); 00177 00178 /** 00179 \brief Zero temperature fermions 00180 */ 00181 virtual int calc_density_zerot(); 00182 00183 /// Return string denoting type ("nonrel_fermion_zerot") 00184 virtual const char *type() { return "nonrel_fermion_zerot"; } 00185 00186 #ifndef DOXYGENP 00187 00188 private: 00189 00190 nonrel_fermion_zerot(const nonrel_fermion_zerot &); 00191 nonrel_fermion_zerot& operator=(const nonrel_fermion_zerot&); 00192 00193 #endif 00194 00195 }; 00196 00197 #ifndef DOXYGENP 00198 } 00199 #endif 00200 00201 #endif
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page