|
PSCF v1.5.0
|
Base class for SCFT thermodynamic property calculators. More...
#include <ScftThermo.h>
Public Member Functions | |
Construction | |
| ScftThermo (System< D, T > const &system) | |
| Constructor. | |
State modifiers | |
| void | compute () |
| Compute SCFT free energy density and pressure for current fields. | |
| void | clear () |
| Clear all thermodynamic data. | |
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 = SystemConstRef<D,T> |
| Base class type name alias. | |
Protected Member Functions | |
| System< D, T > const & | system () const |
| Get the associated System. | |
| Mixture< D, T > const & | mixture () const |
| Get the Mixture. | |
| Interaction const & | interaction () const |
| Get the Interaction. | |
| Domain< D, T > const & | domain () const |
| Get the Domain. | |
| CFields< D, T > const & | c () const |
| Get the concentration (c) field container. | |
| WFields< D, T > const & | w () const |
| Get the chemical potential (w) field container. | |
| WFields< D, T > const & | h () const |
| Get the external potential (h) field container (if any). | |
| Mask< D, T > const & | mask () const |
| Get the mask (if any). | |
| FileMaster const & | fileMaster () const |
| Get the FileMaster. | |
| Protected Member Functions inherited from Pscf::Rp::SystemConstRef< D, T > | |
| SystemConstRef () | |
| Default constructor. | |
| SystemConstRef (System< D, T > const &system) | |
| Constructor - creates associations. | |
| ~SystemConstRef () | |
| Destructor. | |
| void | associate (System< D, T > const &system) |
| Create associations with a system and its components. | |
| System< D, T > const & | system () const |
| Get the associated System. | |
| Mixture< D, T > const & | mixture () const |
| Get the Mixture. | |
| Interaction const & | interaction () const |
| Get the Interaction. | |
| Domain< D, T > const & | domain () const |
| Get the Domain. | |
| CFields< D, T > const & | c () const |
| Get the concentration (c) field container. | |
| WFields< D, T > const & | w () const |
| Get the chemical potential (w) field container. | |
| WFields< D, T > const & | h () const |
| Get the external potential (h) field container (if any). | |
| Mask< D, T > const & | mask () const |
| Get the mask (if any). | |
| FileMaster const & | fileMaster () const |
| Get the FileMaster. | |
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, and external).
Template parameters:
Definition at line 38 of file ScftThermo.h.
|
protected |
Base class type name alias.
Definition at line 149 of file ScftThermo.h.
| Pscf::Rp::ScftThermo< D, T >::ScftThermo | ( | System< D, T > const & | system | ) |
Constructor.
| system | parent System object |
Definition at line 42 of file ScftThermo.tpp.
References system().
Referenced by Pscf::Rp::System< D, T >::System().
| 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 56 of file ScftThermo.tpp.
References c(), hasData(), mixture(), UTIL_CHECK, and w().
Referenced by write().
| void Pscf::Rp::ScftThermo< D, T >::clear | ( | ) |
Clear all thermodynamic data.
Definition at line 258 of file ScftThermo.tpp.
|
inline |
Have free energies and pressure been computed?
Definition at line 249 of file ScftThermo.h.
|
inline |
Get total Helmholtz free energy per monomer / kT.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 209 of file 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 217 of file ScftThermo.h.
References UTIL_CHECK.
|
inline |
Get the interaction contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 225 of file ScftThermo.h.
References UTIL_CHECK.
|
inline |
Get the external field contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 233 of file 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 241 of file 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 265 of file ScftThermo.tpp.
References compute(), Util::Dbl::Dbl(), domain(), fHelmholtz(), h(), hasData(), Util::Int::Int(), mixture(), and pressure().
|
inlineprotected |
Get the associated System.
Definition at line 54 of file SystemConstRef.h.
Referenced by ScftThermo().
|
inlineprotected |
Get the Mixture.
Definition at line 60 of file SystemConstRef.h.
|
inlineprotected |
Get the Interaction.
Definition at line 66 of file SystemConstRef.h.
|
inlineprotected |
|
inlineprotected |
Get the concentration (c) field container.
Definition at line 78 of file SystemConstRef.h.
Referenced by compute().
|
inlineprotected |
Get the chemical potential (w) field container.
Definition at line 84 of file SystemConstRef.h.
Referenced by compute().
|
inlineprotected |
Get the external potential (h) field container (if any).
Definition at line 90 of file SystemConstRef.h.
Referenced by write().
|
inlineprotected |
Get the mask (if any).
Definition at line 96 of file SystemConstRef.h.
|
inlineprotected |
Get the FileMaster.
Definition at line 102 of file SystemConstRef.h.