JDFTx  1.2.0
FluidComponent.h
1 /*-------------------------------------------------------------------
2 Copyright 2013 Ravishankar Sundararaman, Kendra Letchworth-Weaver
3 
4 This file is part of JDFTx.
5 
6 JDFTx is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 JDFTx is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with JDFTx. If not, see <http://www.gnu.org/licenses/>.
18 -------------------------------------------------------------------*/
19 
20 #ifndef JDFTX_FLUID_FLUIDCOMPONENT_H
21 #define JDFTX_FLUID_FLUIDCOMPONENT_H
22 
23 #include <fluid/S2quad.h>
24 #include <fluid/Molecule.h>
25 
28 {
30  enum Name
31  { //Neutral solvent molecules:
32  H2O,
34  CCl4,
36  DMC,
37  EC,
38  PC,
39  DMF,
40  THF,
42  Chlorobenzene,
45  DMSO,
48  Methanol,
49  Octanol,
50  Glyme,
51  EthyleneGlycol,
53  //Cations:
61  //Anions:
68  };
69  const Name name;
70 
72  enum Type
73  { Solvent, Cation, Anion
74  };
75  const Type type;
76  static Type getType(Name name);
77 
85  };
86  const Functional functional;
87  double epsLJ;
88 
91  { Pomega,
94  }
95  representation;
96 
98  unsigned quad_nBeta, quad_nAlpha, quad_nGamma;
99 
101  { ConstantSpline,
103  Fourier
104  }
106 
107  //Bulk solvent properties (used by various PCM's):
108  double epsBulk;
109  double Nbulk;
110  double pMol;
111  double epsInf;
112  double Pvap;
113  double sigmaBulk;
114  double Rvdw;
115  double Res;
116 
117  double Nnorm;
118 
119  //Molecule geometry and site properties:
120  Molecule molecule;
121 
122  double pureNbulk(double T) const;
123 
124  FluidComponent(Name name, double T, Functional functional);
125 
126  //Extra properties when participating in a classical density functional FluidMixture:
127  std::shared_ptr<class SO3quad> quad;
128  std::shared_ptr<class TranslationOperator> trans;
129  std::shared_ptr<class IdealGas> idealGas;
130  std::shared_ptr<class Fex> fex;
131  std::shared_ptr<struct ScalarEOS> eos;
132  unsigned offsetIndep;
133  unsigned offsetDensity;
134  void addToFluidMixture(class FluidMixture* fluidMixture);
135 };
136 
137 #endif // JDFTX_FLUID_FLUIDCOMPONENT_H
Representation
Ideal gas representation (does not affect simple fluids which always use IdealGasMonoatomic) ...
Definition: FluidComponent.h:90
K+.
Definition: FluidComponent.h:56
double Res
electrostatic radius of solvent (derived from nonlocal response) in bohrs
Definition: FluidComponent.h:115
(http://en.wikipedia.org/wiki/Isobutanol)
Definition: FluidComponent.h:44
Fl-.
Definition: FluidComponent.h:63
Custom cation (molecule and other parameters initialized manually)
Definition: FluidComponent.h:60
(http://en.wikipedia.org/wiki/Chlorobenzene)
Definition: FluidComponent.h:43
unsigned offsetDensity
Offset to the site densities that belong to this component.
Definition: FluidComponent.h:133
std::shared_ptr< struct ScalarEOS > eos
Equation of states for ScalarEOS functionals.
Definition: FluidComponent.h:131
double Nbulk
bulk number-density of molecules in bohr^-3 (used as initial guess in mixtures)
Definition: FluidComponent.h:109
Ethylene carbonate.
Definition: FluidComponent.h:37
Mixture of fluids that provides the total free energy functional for minimization Constructing Fex an...
Definition: FluidMixture.h:32
Multi-site molecule model.
Definition: Molecule.h:31
double sigmaBulk
bulk surface tension in Eh/bohr^2
Definition: FluidComponent.h:113
double epsInf
optical-frequency dielectric constant
Definition: FluidComponent.h:111
unsigned quad_nGamma
Subdivisions for euler angle outer-product quadrature.
Definition: FluidComponent.h:98
H3O+.
Definition: FluidComponent.h:58
Dichloromethane (methyl chloride)
Definition: FluidComponent.h:47
default and recommended
Definition: FluidComponent.h:102
Na+ cluster with 6 octahedrally coordinated H2O molecules.
Definition: FluidComponent.h:55
H3O+ cluster with 4 H2O molecules.
Definition: FluidComponent.h:59
FluidComponent(Name name, double T, Functional functional)
set default properties
S2quadType s2quadType
Quadrature on S2 that generates the SO(3) quadrature (default: Octahedron) HACK: Kendra made default ...
Definition: FluidComponent.h:97
double epsBulk
bulk dielectric constant
Definition: FluidComponent.h:108
Name
Component names.
Definition: FluidComponent.h:30
unsigned offsetIndep
Offset to the independent variables of this component.
Definition: FluidComponent.h:132
double Rvdw
effective van der Waals radius of liquid (derived from equation of state) in bohrs ...
Definition: FluidComponent.h:114
OH-.
Definition: FluidComponent.h:65
enum FluidComponent::TranslationMode translationMode
type of translation operator used for sampling rigid molecule geometry
multipole density representation truncated at l=1 (default)
Definition: FluidComponent.h:93
OH- cluster with 4 H2O molecules.
Definition: FluidComponent.h:66
Dimethylformamide.
Definition: FluidComponent.h:39
Dimethyl sulfoxide.
Definition: FluidComponent.h:46
Acetonitrile.
Definition: FluidComponent.h:35
Abstract base class for functionals.
Definition: ExCorr_internal.h:42
TranslationMode
Definition: FluidComponent.h:100
site-potential representation
Definition: FluidComponent.h:92
directly work with orientation probability density
Definition: FluidComponent.h:91
Carbon tetrachloride.
Definition: FluidComponent.h:34
Type
Type of component - used to determine role of component in simpler PCMs.
Definition: FluidComponent.h:72
Named fluid components for which bulk properties / geometries / excess functionals are available...
Definition: FluidComponent.h:27
Custom anion (molecule and other parameters initialized manually)
Definition: FluidComponent.h:67
double epsLJ
Lennard-Jones well depth for mean-field LJ functional.
Definition: FluidComponent.h:87
std::shared_ptr< class IdealGas > idealGas
Indep <-> Density converter and entropy calculator.
Definition: FluidComponent.h:129
(http://en.wikipedia.org/wiki/Carbon_disulfide),
Definition: FluidComponent.h:45
Quadratures on S2 used to generate quadratures on SO(3)
Dimethyl carbonate.
Definition: FluidComponent.h:36
double pMol
dipole moment of each molecule in e-bohr
Definition: FluidComponent.h:110
double pureNbulk(double T) const
get density of solvent component in the pure phase at temperature T (returns 1 mol/liter for ions) ...
double Pvap
vapor pressure in Eh/bohr^3
Definition: FluidComponent.h:112
K+ cluster with 6 octahedrally coordinated H2O molecules.
Definition: FluidComponent.h:57
std::shared_ptr< class Fex > fex
Excess functional (in excess to sphere mixture and long-range)
Definition: FluidComponent.h:130
double Nnorm
If Nnorm>=0, this component is switched to the canonical ensemble (number fixed to Nnorm) ...
Definition: FluidComponent.h:117
Cl-.
Definition: FluidComponent.h:62
std::shared_ptr< class TranslationOperator > trans
translation operator
Definition: FluidComponent.h:128
Hard sphere + mean field Lennard-Jones perturbation (useful for ions in solution) ...
Definition: FluidComponent.h:83
H2O functional from [J. Lischner and T. A. Arias, J. Phys. Chem. B 114, 1946 (2010)] (DEPRECATED) ...
Definition: FluidComponent.h:81
Custom solvent (molecule and other parameters initialized manually)
Definition: FluidComponent.h:52
Diethyl ether (http://en.wikipedia.org/wiki/Diethyl_ether_(data_page))
Definition: FluidComponent.h:41
void addToFluidMixture(class FluidMixture *fluidMixture)
Initialize fex, idealGas and register with fluidMixture.
Water.
Definition: FluidComponent.h:32
No excess functional beyond hard spheres / electrostatics (or fex may be initialized manually) ...
Definition: FluidComponent.h:84
Chloroform.
Definition: FluidComponent.h:33
H2O functional from [R. Sundararaman, K. Letchworth-Weaver and T.A. Arias, J. Chem. Phys. 137, 044107 (2012)].
Definition: FluidComponent.h:82
Propylene carbonate.
Definition: FluidComponent.h:38
S2quadType
List of available quadratures.
Definition: S2quad.h:53
Na+.
Definition: FluidComponent.h:54
ClO4-.
Definition: FluidComponent.h:64
std::shared_ptr< class SO3quad > quad
orientation quadrature
Definition: FluidComponent.h:127
Tetrahydrofuran.
Definition: FluidComponent.h:40
Generic hard sphere + weighted density functional constrained to equation of state based on [R...
Definition: FluidComponent.h:80