Code Monkey home page Code Monkey logo

dft's Introduction

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



dft's People

Contributors

nbwilding avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.