LJ pair_style for modeling two phase flow

Hey all,

I was trying to model two immiscible fluids in a channel. Many of the literature that I referred to use an LJ potential of the form:

V=4epsilon[(sigma/r)^12 - delta_ij(sigma/r)^6] where delta_ij varies between +1 to -1 with -1 used for interactions between two immiscible liquid.

I wanted to know if there is a prebuild pair_style in Lammps that does it or if I would need to edit the code for LJ_cut.

Thank you.
BR/Joseph

ps: one of the papers tht I referred: "Microscopic studies of static and dynamic contact angles" P.A. Thompson et al. , 1993

Hey all,

I was trying to model two immiscible fluids in a channel. Many of the
literature that I referred to use an LJ potential of the form:

V=4epsilon[(sigma/r)^12 - delta_ij(sigma/r)^6] where delta_ij varies
between +1 to -1 with -1 used for interactions between two immiscible
liquid.

I wanted to know if there is a prebuild pair_style in Lammps that does
it or if I would need to edit the code for LJ_cut.

you can always use pair_style table for custom functional forms
of pairwise additive potentials.

axel.

Not officially yet. I was wondering if there was any demand for this.

I've attached a preliminary version of the code for a new pair style
named "lj/charmm/coul/charmm/inter" (which is similar to
"lj/charmm/coul/charmm") which does exactly what you want. I can
create a version of "lj/cut" with the same features if you prefer. (I
was going to make a few variants anyway.) It supports mixing rules to
deal with the new "delta_ij" parameter (referred to as "Lij" in the
documentation below). This allows you to use a very large number of
atom types in your simulation without being forced to define the
"delta_ij" (or Lij) parameter for every pair of atom types. (I've
seen simulations with almost 40 atom types.)

The code I attached looks complicated because it also has a number of
other features which you probably don't care about (quadratic
soft-core repulsion, separate coeffs for inter-molecular and
intra-molecular interactions).

To use the new pair style, add the attached code to your LAMMPS "src"
directory, recompile. A simple usage example is attached. Some more
detailed documentation is included below.

If you prefer to write your own custom version of lj/cut, it's not
hard. Check out this discussion:
http://lammps.sandia.gov/threads/msg24134.html

--(more) Detailed Documentation--

I don't have time tonight to write down full documentation which is
up-to-official standards, but here is a quick sloppy description of
the features of "lj/charmm/coul/charmm/inter":

General Formula used:
U(r) = e * (Ca*K*(s/r)^12 + Cb*L*(s/r)^6 )
   (where "Ca" and "Cb" depend on coeff_style such as "eskl" or
"es4k4l" as shown below. "Ca" and "Cb" are usually +/- 4, 1, or 2)

Examples:

pair_style lj/charmm/coul/charmm/inter 7.5 8.0
pair_style lj/charmm/coul/charmm/inter 7.5 8.0 eskl maxmax
pair_style lj/charmm/coul/charmm/inter 7.5 8.0 es4k4l maxmax rsoftcore 1.0

pair_coeff 1 1 0.40 3.6
pair_coeff 1 1 0.40 3.6 1.0 -0.5
pair_coeff 1 1 0.40 3.6 1 -1 0.0 0.0 0 0 0.8 3.6 1 -1

(In the last example, the first 4 coefficients specify the epsilon,
sigma, K, L coefficients between atoms in the same molecule. The next
4 coefficients specify the 1-4 interactions, and the last 4
coefficients are only used for interactions between atoms in different
molecules.)

Following the pair_style command you have the option to specify one of
several coeff_styles and mixing_styles:

Currently, coeff_style must be one of these choices:
coeff_style meaning:

pair_lj_softcore2.cpp (9.06 KB)

pair_lj_softcore2.h (2.61 KB)

pair_lj_remix.h (8.98 KB)

pair_lj_remix.cpp (15.9 KB)

pair_lj_charmm_coul_charmm_inter.h (3.55 KB)

pair_lj_charmm_coul_charmm_inter.cpp (36.3 KB)

test_inter_fluid_es4k4l_rcore.tar.gz (15 KB)

I would feel uneasy using repulsive VdW forces between atoms in vaccum
(that is what you do when you use delta_ij < 0). It does not make
sense from a physical point of view, and you will not only get
immiscible fluids but repulsive fluids that will not remain together
unless you apply a pressure. In the literature I know, immiscibility
is simply obtained by *reducing* (slightly) the cross interaction
energy epsilon_12 between atoms of the 2 liquids, see for instance :

http://link.aps.org/doi/10.1103/PhysRevE.81.056306

By the way, there is no need to build a new pair style to implement
your modified LJ, it is in fact a standard LJ with modified epsilon
and sigma:

4epsilon'_ij[(sigma'_ij/r)^12 - (sigma'_ij/r)^6] =
4epsilon[(sigma/r)^12 - delta_ij(sigma/r)^6]

with: epsilon'_ij = delta_ij^2 epsilon and sigma'_ij =
delta_ij^(-1/6) sigma (from the back of my memory, so it has to be
checked)

In other words, your formulation not only modifies the depth of the LJ
potential well, but also the equilibrium distance. So my advice would
be to simply decrease epsilon_12 until the 2 liquids become
immiscible.

Best,
Laurent