|
PSCF v1.4.0
|
Base class for SCFT thermodynamic property calculators. More...
#include <ScftThermo.h>
Public Member Functions | |
State modifiers | |
| void | compute () |
| Compute SCFT free energy density and pressure for current fields. | |
| void | clear () |
| Clear all thermodynamic data. | |
SCFT Property Access and Output | |
| bool | hasData () const |
| Have free energies and pressure been computed? | |
| double | fHelmholtz () const |
| Get total Helmholtz free energy per monomer / kT. | |
| double | fIdeal () const |
| Get the ideal gas contribution to fHelmholtz. | |
| double | fInter () const |
| Get the interaction contribution to fHelmholtz. | |
| double | fExt () const |
| Get the external field contribution to fHelmholtz. | |
| double | pressure () const |
| Get the precomputed pressure times monomer volume / kT. | |
| void | write (std::ostream &out) |
| Write SCFT thermodynamic properties to a file. | |
Protected Types | |
| using | SystemConstRefT = typename T::SystemConstRef |
| Base class type name alias. | |
| using | SystemT = typename T::System |
| Parent System type name alias. | |
Protected Member Functions | |
| ScftThermo (SystemT const &system) | |
| Constructor. | |
| ~ScftThermo () | |
| Destructor. | |
Base class for SCFT thermodynamic property calculators.
This class computes and stores values for the SCFT Helmholtz free energy and pressure, and free energy components (ideal, interaction, external). Specializations of this template are used as base classes for class templates named ScftThermo<D> that are defined in Rpc and Rpg namespaces.
Template parameters:
Definition at line 37 of file scft/ScftThermo.h.
|
protected |
Base class type name alias.
Definition at line 135 of file scft/ScftThermo.h.
|
protected |
Parent System type name alias.
Definition at line 138 of file scft/ScftThermo.h.
|
protected |
|
protected |
Destructor.
Definition at line 45 of file ScftThermo.tpp.
| void Pscf::Rp::ScftThermo< D, T >::compute | ( | ) |
Compute SCFT free energy density and pressure for current fields.
Resulting values are retrieved by the fHelmholtz(), fIdeal(), fInter(), fExt(), and pressure() accessor functions.
Definition at line 52 of file ScftThermo.tpp.
Referenced by write().
| void Pscf::Rp::ScftThermo< D, T >::clear | ( | ) |
Clear all thermodynamic data.
Definition at line 254 of file ScftThermo.tpp.
|
inline |
Have free energies and pressure been computed?
Definition at line 259 of file scft/ScftThermo.h.
Referenced by write().
|
inline |
Get total Helmholtz free energy per monomer / kT.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 219 of file scft/ScftThermo.h.
References UTIL_CHECK.
Referenced by write().
|
inline |
Get the ideal gas contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 227 of file scft/ScftThermo.h.
References UTIL_CHECK.
|
inline |
Get the interaction contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 235 of file scft/ScftThermo.h.
References UTIL_CHECK.
|
inline |
Get the external field contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 243 of file scft/ScftThermo.h.
References UTIL_CHECK.
|
inline |
Get the precomputed pressure times monomer volume / kT.
This function retrieves a value computed by computeFreeEnergy(). The value is -1 times the grand-canonical free energy per monomer divided by kT.
Definition at line 251 of file scft/ScftThermo.h.
References UTIL_CHECK.
Referenced by write().
| void Pscf::Rp::ScftThermo< D, T >::write | ( | std::ostream & | out | ) |
Write SCFT thermodynamic properties to a file.
This function outputs Helmholtz free energy per monomer, pressure (in units of kT per monomer volume), the volume fraction and chemical potential of each species, and all unit cell parameters.
If data is not available (i.e,. if hasData() == false), this function calls compute() on entry.
If parameter "out" is a file that already exists, this function will append to the end of that file, rather than overwriting it. Calling writeParamNoSweep and writeThermo in succession with the same output stream will thus produce a single file containing both input parameters and calculated thermodynamic properties.
| out | output stream |
Definition at line 261 of file ScftThermo.tpp.
References compute(), fHelmholtz(), hasData(), and pressure().