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_DERIV_PART_H 00024 #define O2SCL_DERIV_PART_H 00025 00026 #include <string> 00027 #include <iostream> 00028 #include <fstream> 00029 #include <cmath> 00030 #include <o2scl/boson.h> 00031 #include <o2scl/fermion.h> 00032 #include <o2scl/classical.h> 00033 00034 #ifndef DOXYGENP 00035 namespace o2scl { 00036 #endif 00037 00038 /** 00039 \brief Storage for deriviatives wrt \f$ \mu \f$ and T. 00040 00041 The variables \c dndmu, \c dndT, and \c dsdT correspond 00042 to 00043 \f[ 00044 \left(\frac{d n}{d \mu}\right)_{T,V}, \quad 00045 \left(\frac{d n}{d T}\right)_{\mu,V}, \quad \mathrm{and} \quad 00046 \left(\frac{d s}{d T}\right)_{\mu,V} 00047 \f] 00048 respectively. All other derivatives can be expressed simply in 00049 terms of these three. Note that volume derivatives are trivial, 00050 since both the entropy and number scale linearly with the 00051 volume. 00052 00053 \hline 00054 00055 <b>Derivatives wrt to chemical potential and temperature:</b> 00056 00057 There is a Maxwell relation 00058 \f[ 00059 \left(\frac{d s}{d \mu}\right)_{T,V} = 00060 \left(\frac{d n}{d T}\right)_{\mu,V} 00061 \f] 00062 The pressure derivatives are trivial 00063 \f[ 00064 \left(\frac{d P}{d \mu}\right)_{T,V}=n, \quad 00065 \left(\frac{d P}{d T}\right)_{\mu,V}=s 00066 \f] 00067 The energy density derivatives are related through the 00068 thermodynamic identity: 00069 \f[ 00070 \left(\frac{d \varepsilon}{d \mu}\right)_{T,V}= 00071 \mu \left(\frac{d n}{d \mu}\right)_{T,V}+ 00072 T \left(\frac{d s}{d \mu}\right)_{T,V} 00073 \f] 00074 \f[ 00075 \left(\frac{d \varepsilon}{d T}\right)_{\mu,V}= 00076 \mu \left(\frac{d n}{d T}\right)_{\mu,V}+ 00077 T \left(\frac{d s}{d T}\right)_{\mu,V} 00078 \f] 00079 00080 \hline 00081 00082 <b>Other derivatives:</b> 00083 00084 Note that the derivative of the entropy with respect to the 00085 temperature above is not the specific heat per particle, \f$ c_V \f$. 00086 The specific heat per particle is 00087 \f[ 00088 c_V = \frac{T}{N} \left( \frac{\partial S}{\partial T} \right)_{V,N} 00089 = \frac{T}{n} \left( \frac{\partial s}{\partial T} \right)_{V,n} 00090 \f] 00091 As noted in \ref part_section in the User's Guide for \o2p, we 00092 work in units so that \f$ \hbar = c = k_B = 1 \f$. In this case, 00093 \f$ c_V \f$ is unitless as defined here. To compute \f$ c_V \f$ 00094 in terms of the derivatives above, note that the 00095 descendants of deriv_part provide all of the thermodynamic 00096 functions in terms of \f$ \mu, V \f$ and \f$ T \f$, so we have 00097 \f[ 00098 s=s(\mu,T,V) \quad \mathrm{and} \quad n=n(\mu,T,V) \, . 00099 \f] 00100 We can then construct a function 00101 \f[ 00102 s=s[\mu(n,T,V),T,V] 00103 \f] 00104 and then write the required derivative directly 00105 \f[ 00106 \left(\frac{\partial s}{\partial T}\right)_{n,V} = 00107 \left(\frac{\partial s}{\partial \mu}\right)_{T,V} 00108 \left(\frac{\partial \mu}{\partial T}\right)_{n,V} + 00109 \left(\frac{\partial s}{\partial T}\right)_{\mu,V} \, . 00110 \f] 00111 Now we use the identity 00112 \f[ 00113 \left(\frac{\partial \mu}{\partial T}\right)_{n,V} = - 00114 \left(\frac{\partial n}{\partial T}\right)_{\mu,V} 00115 \left(\frac{\partial n}{\partial \mu}\right)_{T,V}^{-1} \, , 00116 \f] 00117 and the Maxwell relation above to give 00118 \f[ 00119 C_V = \frac{T}{n} 00120 \left[ 00121 \left(\frac{\partial s}{\partial T}\right)_{\mu,V} 00122 -\left(\frac{\partial n}{\partial T}\right)_{\mu,V}^2 00123 \left(\frac{\partial n}{\partial \mu}\right)_{T,V}^{-1} 00124 \right] 00125 \f] 00126 which expresses the specific heat in terms of the three 00127 derivatives which are given. 00128 00129 For, \f$ c_P \f$, defined as 00130 \f[ 00131 c_P = \frac{T}{N} \left( \frac{\partial S}{\partial T} 00132 \right)_{N,P} 00133 \f] 00134 (which is also unitless) we can write functions 00135 \f[ 00136 S=S(N,T,V) \qquad \mathrm{and} \qquad V=V(N,P,T) 00137 \f] 00138 which imply 00139 \f[ 00140 \left( \frac{\partial S}{\partial T} \right)_{N,P} = 00141 \left( \frac{\partial S}{\partial T} \right)_{N,V} + 00142 \left( \frac{\partial S}{\partial V} \right)_{N,T} 00143 \left( \frac{\partial V}{\partial T} \right)_{N,P} \, . 00144 \f] 00145 Thus we require the derivatives 00146 \f[ 00147 \left( \frac{\partial S}{\partial T} \right)_{N,V} , 00148 \left( \frac{\partial S}{\partial V} \right)_{N,T} , 00149 \qquad\mathrm{and}\qquad 00150 \left( \frac{\partial V}{\partial T} \right)_{N,P} 00151 \, . 00152 \f] 00153 00154 To compute the new entropy derivatives, we can write 00155 \f[ 00156 S=S(\mu(N,T,V),T,V) 00157 \f] 00158 to get 00159 \f[ 00160 \left( \frac{\partial S}{\partial T} \right)_{N,V} = 00161 \left( \frac{\partial S}{\partial \mu} \right)_{T,V} 00162 \left( \frac{\partial \mu}{\partial T} \right)_{N,V} + 00163 \left( \frac{\partial S}{\partial T} \right)_{\mu,V} \, , 00164 \f] 00165 and 00166 \f[ 00167 \left( \frac{\partial S}{\partial V} \right)_{N,T} = 00168 \left( \frac{\partial S}{\partial \mu} \right)_{T,V} 00169 \left( \frac{\partial \mu}{\partial V} \right)_{N,T} + 00170 \left( \frac{\partial S}{\partial V} \right)_{\mu,T} \, . 00171 \f] 00172 These require the chemical potential derivatives which have 00173 associated Maxwell relations 00174 \f[ 00175 \left( \frac{\partial \mu}{\partial T} \right)_{N,V} = 00176 -\left( \frac{\partial S}{\partial N} \right)_{T,V} 00177 \qquad\mathrm{and}\qquad 00178 \left( \frac{\partial \mu}{\partial V} \right)_{N,T} = 00179 -\left( \frac{\partial P}{\partial N} \right)_{T,V} \, . 00180 \f] 00181 Finally, we can rewrite the derivatives on the right hand sides 00182 in terms of derivatives of functions of \f$ \mu, V \f$ and 00183 \f$ T \f$, 00184 \f[ 00185 \left( \frac{\partial S}{\partial N} \right)_{T,V} = 00186 \left( \frac{\partial S}{\partial \mu} \right)_{T,V} 00187 \left( \frac{\partial N}{\partial \mu} \right)_{T,V}^{-1} \, , 00188 \f] 00189 and 00190 \f[ 00191 \left( \frac{\partial P}{\partial N} \right)_{T,V} = 00192 \left( \frac{\partial P}{\partial \mu} \right)_{T,V} 00193 \left( \frac{\partial N}{\partial \mu} \right)_{T,V}^{-1} \, . 00194 \f] 00195 00196 The volume derivative, 00197 \f[ 00198 \left( \frac{\partial V}{\partial T} \right)_{N,P} \, , 00199 \f] 00200 is related to the coefficient of thermal expansion, sometimes 00201 called \f$ \alpha \f$, 00202 \f[ 00203 \alpha \equiv \frac{1}{V} 00204 \left( \frac{\partial V}{\partial T} \right)_{N,P} \, . 00205 \f] 00206 We can rewrite the derivative 00207 \f[ 00208 \left( \frac{\partial V}{\partial T} \right)_{N,P} = 00209 -\left( \frac{\partial P}{\partial T} \right)_{N,V} 00210 \left( \frac{\partial P}{\partial V} \right)_{N,T}^{-1} \, . 00211 \f] 00212 The first term can be computed from the Maxwell relation 00213 \f[ 00214 \left( \frac{\partial P}{\partial T} \right)_{N,V} = 00215 \left( \frac{\partial S}{\partial V} \right)_{N,T} \, , 00216 \f] 00217 where the entropy derivative was computed above. The second term 00218 (related to the inverse of the isothermal compressibility, \f$ 00219 \kappa_T \equiv (-1/V) (\partial V/\partial P)_{T,N} \f$ can be 00220 computed from the function \f$ P = P(\mu(N,V,T),V,T) \f$ 00221 \f[ 00222 \left( \frac{\partial P}{\partial V} \right)_{N,T} = 00223 \left( \frac{\partial P}{\partial \mu} \right)_{T,V} 00224 \left( \frac{\partial \mu}{\partial V} \right)_{N,T} + 00225 \left( \frac{\partial P}{\partial V} \right)_{\mu,T} 00226 \f] 00227 where the chemical potential derivative was computed above. 00228 00229 The results above can be collected to give 00230 \f[ 00231 \left( \frac{\partial S}{\partial T} \right)_{N,P} = 00232 \left( \frac{\partial S}{\partial T} \right)_{\mu,V} + 00233 \frac{S^2}{N^2} 00234 \left( \frac{\partial N}{\partial \mu} \right)_{T,V} - 00235 \frac{2 S}{N} 00236 \left( \frac{\partial N}{\partial T} \right)_{\mu,V} \, , 00237 \f] 00238 which implies 00239 \f[ 00240 c_P = 00241 \frac{T}{n} 00242 \left( \frac{\partial s}{\partial T} \right)_{\mu,V} + 00243 \frac{s^2 T}{n^3} 00244 \left( \frac{\partial n}{\partial \mu} \right)_{T,V} - 00245 \frac{2 s T}{n^2} 00246 \left( \frac{\partial n}{\partial T} \right)_{\mu,V} \, , 00247 \f] 00248 00249 This derivation also gives the well-known relationship between 00250 the specific heats at constant volume and constant pressure, 00251 \f[ 00252 c_P = c_V + \frac{T \alpha^2}{n \kappa_T} \, . 00253 \f] 00254 00255 No derivative with respect to the bare mass is given, since 00256 classes cannot know how to relate the effective mass to the 00257 bare mass. 00258 00259 */ 00260 class deriv_part { 00261 00262 public: 00263 00264 /// Derivative of number density with respect to chemical potential 00265 double dndmu; 00266 00267 /// Derivative of number density with respect to temperature 00268 double dndT; 00269 00270 /// Derivative of entropy density with respect to temperature 00271 double dsdT; 00272 00273 /// Derivative of number density with respect to the effective mass 00274 double dndm; 00275 00276 }; 00277 00278 #ifndef DOXYGENP 00279 } 00280 #endif 00281 00282 #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