00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 2008, 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. Callen's "Thermodynamics and an introduction to 00057 thermostatistics", 2nd edition, pg. 403 or Landau and Lifshitz, 00058 Stat. Phys. 3rd edition, part 1, pg. 164. 00059 00060 Note that the energy density integral can be rescaled: 00061 \f[ 00062 \varepsilon = 00063 \frac{T^{5/2}(2 m^{*})^{3/2}}{\pi^2} 00064 \int_0^{\infty} d u \frac{u^{3/2}}{1 + \exp(u-y)} 00065 \f] 00066 where \f$ u = k^2/2/m^{*}/T \f$ and \f$ y=\mu/T \f$. 00067 00068 The functions fermion::pair_density() and pair_mu() have not 00069 been implemented. 00070 00071 \todo I think calc_mu_zerot() and calc_density_zerot() are 00072 missing the proper dependence on the degeneracy, \c g. (8/20/07) 00073 (I think this is fixed now, but should be tested, 8/22/07) 00074 00075 \todo Make sure to test with non-interacting equal to 00076 true or false, and document whether or not it works 00077 with both inc_rest_mass equal to true or false 00078 00079 \future This could be improved by performing a Chebyshev 00080 approximation to invert the density integral so that 00081 we don't need to use a solver. 00082 */ 00083 class nonrel_fermion : public fermion { 00084 00085 public: 00086 00087 /// Create a nonrelativistic fermion with mass 'm' and degeneracy 'g' 00088 nonrel_fermion(double m=0.0, double g=0.0); 00089 00090 virtual ~nonrel_fermion(); 00091 00092 /** 00093 \brief Zero temperature fermions 00094 */ 00095 virtual int calc_mu_zerot(); 00096 00097 /** 00098 \brief Zero temperature fermions 00099 */ 00100 virtual int calc_density_zerot(); 00101 00102 /** 00103 \brief Calculate properties as function of chemical potential 00104 */ 00105 virtual int calc_mu(const double temper); 00106 00107 /** \brief Calculate properties as function of density 00108 */ 00109 virtual int calc_density(const double temper); 00110 00111 /// Calculate effective chemical potential from density 00112 virtual int nu_from_n(const double temper); 00113 00114 /** \brief Set the solver for use in calculating the chemical 00115 potential from the density 00116 */ 00117 int set_density_root(root<double,funct<double> > &rp) { 00118 density_root=&rp; 00119 return 0; 00120 } 00121 00122 /// The default solver for calc_density(). 00123 cern_mroot_root<double,funct<double> > def_density_root; 00124 00125 /// Return string denoting type ("nonrel_fermion") 00126 virtual const char *type() { return "nonrel_fermion"; } 00127 00128 protected: 00129 00130 #ifndef DOXYGENP 00131 00132 friend class io_tlate<nonrel_fermion>; 00133 00134 /// Solver to compute chemical potential from density 00135 root<double,funct<double> > *density_root; 00136 00137 /// Function to compute chemical potential from density 00138 int solve_fun(double x, double &yy, double &T); 00139 00140 private: 00141 00142 nonrel_fermion(const nonrel_fermion &); 00143 nonrel_fermion& operator=(const nonrel_fermion&); 00144 00145 #endif 00146 00147 }; 00148 00149 template<> int io_tlate<nonrel_fermion>::input 00150 (cinput *co, in_file_format *ins, nonrel_fermion *f); 00151 template<> int io_tlate<nonrel_fermion>::output 00152 (coutput *co, out_file_format *outs, nonrel_fermion *f); 00153 template<> const char *io_tlate<nonrel_fermion>::type(); 00154 00155 typedef io_tlate<nonrel_fermion> nonrel_fermion_io_type; 00156 00157 #ifndef DOXYGENP 00158 } 00159 #endif 00160 00161 #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