Skip to content
/ DFT Public

A classical Density Functional Theory code to calculate the properties of hard spheres or Lennard-Jones particles in planar geometry i.e. near an infinite hard or soft wall.

License

Notifications You must be signed in to change notification settings

nbwilding/DFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This C code uses Classical Density Functional Theory to find the density profile of a fluid at a planar wall for a prescribed bulk density. The fluid potential is written as the sum of a hard part and a Lennard-Jones-like attractive part with truncated  interactions. The hard part is treated by Rosenfeld's functional measure theory with a choice of either the original form, or the White Bear version (See R. Roth, J. Phys. Condensed Matter, 22, 063102 (2010) for more details). The attractive part is treated in a simple mean fashion.  The code also allows calculation of the local compressibility profile, the adsorption and the surface tension. Checking capability includes comparison with the pressure sum rule and the Gibbs adsorption theorem.
Nigel Wilding, March 2018.

More details of the implementation can be found in the notes file "planar.pdf".

Example usage.

1. Lennard-Jones fluid at some temperature T, near an attractive wall.

To calculate the density profile for Lennard-Jones particles at temperature T=1.022566 and bulk density density 0.597846 (which corresponds to the liquid density at liquid-vapor coexistence), near an attractive wall having well depth \epsilon_w=1.0, run with

DFT 1.022566 0.15 1.0 0.597846 ew1.0

The last argument is the "runcode", ie. output appears in the file ew1.0.dat

2. Hard spheres at a hard wall

To calculate the density profile of hard spheres at a hard wall at bulk density 0.304665, first comment out #define LJ and #define LR and recompile. Then run with

DFT 1. 0.1 0.304665 tesths

Putput appears in the file tesths.dat



About

A classical Density Functional Theory code to calculate the properties of hard spheres or Lennard-Jones particles in planar geometry i.e. near an infinite hard or soft wall.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published