Commit 4b645c51 by Francois Gygi

Added ets contribution (T*Entropy) to the Mermin free energy.


git-svn-id: http://qboxcode.org/svn/qb/trunk@257 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 853c42be
......@@ -3,7 +3,7 @@
// EnergyFunctional.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: EnergyFunctional.C,v 1.19 2004-09-14 22:24:11 fgygi Exp $
// $Id: EnergyFunctional.C,v 1.20 2004-10-04 18:37:13 fgygi Exp $
#include "EnergyFunctional.h"
#include "Sample.h"
......@@ -569,7 +569,14 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
tmap["nonlocal"].stop();
ecoul_ = ehart_ + esr_ - eself_;
etotal_ = ekin_ + econf_ + eps_ + enl_ + ecoul_ + exc_;
ets_ = 0.0;
if ( s_.ctrl.fermi_temp > 0.0 )
{
const double wf_entropy = wf.entropy();
const double boltz = 1.0 / ( 11605.0 * 2.0 * 13.6058 );
ets_ = - wf_entropy * s_.ctrl.fermi_temp * boltz;
}
etotal_ = ekin_ + econf_ + eps_ + enl_ + ecoul_ + exc_ + ets_;
if ( compute_hpsi )
{
......@@ -916,6 +923,7 @@ void EnergyFunctional::print(ostream& os) const
<< " <exc> " << setw(15) << exc() << " </exc>\n"
<< " <esr> " << setw(15) << esr() << " </esr>\n"
<< " <eself> " << setw(15) << eself() << " </eself>\n"
<< " <ets> " << setw(15) << ets() << " </ets>\n"
<< " <etotal> " << setw(15) << etotal() << " </etotal>\n"
<< flush;
}
......
......@@ -3,7 +3,7 @@
// EnergyFunctional.h
//
////////////////////////////////////////////////////////////////////////////////
// $Id: EnergyFunctional.h,v 1.12 2004-09-14 22:24:11 fgygi Exp $
// $Id: EnergyFunctional.h,v 1.13 2004-10-04 18:37:13 fgygi Exp $
#ifndef ENERGYFUNCTIONAL_H
#define ENERGYFUNCTIONAL_H
......@@ -55,7 +55,7 @@ class EnergyFunctional
int namax_;
int nsp_;
double ekin_, econf_, eps_, enl_, ehart_,
ecoul_, exc_, esr_, eself_, etotal_;
ecoul_, exc_, esr_, eself_, ets_, etotal_;
valarray<double> sigma_ekin,sigma_econf,sigma_eps,sigma_ehart,sigma_exc,
sigma_enl, sigma_esr, sigma;
......@@ -78,6 +78,7 @@ class EnergyFunctional
double exc(void) const { return exc_; }
double esr(void) const { return esr_; }
double eself(void) const { return eself_; }
double ets(void) const { return ets_; }
const ConfinementPotential *confpot(int ikp) const { return cfp[ikp]; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment