question about couette flow in example sub-directory

Dear All,
I am a fresh man for using Lammps. As the first step, I have read the manual and tried to simulate 2D couette flow using the input script, which is given in the lammps*/example/flow sub-directory.
It is known that the velocity profile should be almost linear for couette flow. However, I can’t obtain linear velocity profile by using fix ave/spatial command. The obtained velocity profile seems like power function curve.
I found that there were several same questions about couette flow on the Mail-list during the past three years. However, none of these questions are solved with satisfactory answers. Since couette flow is such a classical fluid mechanics problem, I think that someone should have successfully simulated couette flow using lammps. Would you please show me the right input script? I hope it could give linear velocity profile. If so, I appreciate you very much.
Following is the original input script for 2D-couette flow given in lammps*/example/flow sub-directory:

2-d LJ flow simulation

dimension 2
boundary p s p
atom_style atomic
neighbor 0.3 bin
neigh_modify delay 5

create geometry

lattice hex 0.7
region box block 0 20 0 10 -0.25 0.25
create_box 3 box
create_atoms 1 box
mass 1 1.0
mass 2 1.0
mass 3 1.0

LJ potentials

pair_style lj/cut 1.12246
pair_coeff * * 1.0 1.0 1.12246

define groups

region 1 block INF INF INF 1.25 INF INF
group lower region 1
region 2 block INF INF 8.75 INF INF INF
group upper region 2
group boundary union lower upper
group flow subtract all boundary
set group lower type 2
set group upper type 3

initial velocities

compute mobile flow temp
velocity flow create 1.0 482748 temp mobile
fix 1 all nve
fix 2 flow temp/rescale 200 1.0 1.0 0.02 1.0
fix_modify 2 temp mobile

Couette flow

velocity lower set 0.0 0.0 0.0
velocity upper set 3.0 0.0 0.0
fix 3 boundary setforce 0.0 0.0 0.0
fix 4 all enforce2d

Poiseuille flow

#velocity boundary set 0.0 0.0 0.0
#fix 3 lower setforce 0.0 0.0 0.0
#fix 4 upper setforce 0.0 NULL 0.0
#fix 5 upper aveforce 0.0 -1.0 0.0
#fix 6 flow addforce 0.5 0.0 0.0
#fix 7 all enforce2d

Run

timestep 0.003
thermo 500
thermo_modify temp mobile
dump 1 all atom 50 dump.flow
run 10000

Best regards,
Jun Zhang

Dear All,
I am a fresh man for using Lammps. As the first step, I have read the manual and tried to simulate 2D couette flow using the input script, which is given in the lammps*/example/flow sub-directory.
It is known that the velocity profile should be almost linear for couette flow. However, I can’t obtain linear velocity profile by using fix ave/spatial command. The obtained velocity profile seems like power function curve.

The examples shipped with lammps are meant to quickly demonstrate how to set up a certain type of calculation. They are not meant to show how to run those simulations well. In general, the lammps distribution and documentation expects that you already have experience in running MD and know the difference between a demonstration of the principle and a proper production simulation.

Axel

Try modifying the in.flow.couette exaple script to run a larger problem for
longer, to get better statistics.

Steve

Dear Jun,

I submitted recently to the lammps web site a user script of a
DPD-thermostated, LJ chains liquid sheared between (111) fcc walls. It
is not online yet, but here are the files.

Best,
Laurent

2011/12/8 Jun Zhang <[email protected]>:

shear.tgz (110 KB)

Dear Laurent:
Thank you so much for sharing your input script of LJ chains liquid sheared between fcc walls. After I understand the basic coutte flow in the lammps*/example/flow sub-directory, I will read your input scrpt carefully.
At present, I still want to learn the basic coutte flow. Basically, I have known that why the original input script can’t give linear velocity profile. This is because that in couette flow, there is macroscopic streaming velocity in x direction. However, the orginal input script control the temperature of fluid atoms as a whole, i.e.,
compute mobile flow temp
fix 2 flow temp/rescale 200 1.0 1.0 0.02 1.0
fix_modify 2 temp mobile
Obviously, it is inappropriate.
I have tried to improve it by using the following command:
compute zhang flow temp/profile 1 0 0 y 20
fix 2 flow temp/rescale 200 1.0 1.0 0.02 1.0
fix_modify 2 temp zhang
After using “compute temp/profile”, the obtained velocity profile is improved much better. It is almost linear! Please see the attached JPG file.
However, another question arise: the vecolity close to the upper wall exceeds the given wall velocity, which is set as 3.0 in the input script. I don’t know why. If anybody could answer this question, or provide me a reasonable input script for the basic couette flow, I appreciate you vech much.

Best regards,
Jun Zhang

vel-profile.jpg

Dear All:
I have successfully obtained the linear velocity profile for the 2D couette flow. Thanks for your help, especially for Dr. Wang fengchao. The present input profile have revised two points:
(1) the original fix temp/rescale is changed to:
compute zhang flow temp/profile 1 0 0 y 20
fix 1 all nve
fix 2 flow temp/rescale 200 1.0 1.0 0.02 1.0
fix_modify 2 temp zhang

In this way, the macroscopic streaming velocity in the x direction has been considered when calculating temperature.
(2) “units box” has been added when setting the velocity of the wall atoms:
velocity lower set 0.0 0.0 0.0 units box
velocity upper set 3.0 0.0 0.0 units box
In this way, the velocity units will be standard for LJ model.
Following is my input script:

2-d LJ flow simulation

dimension 2
boundary p s p
atom_style atomic
neighbor 0.3 bin
neigh_modify delay 5

create geometry

lattice hex 0.7
region box block 0 20 0 10 -0.25 0.25
create_box 3 box
create_atoms 1 box
mass 1 1.0
mass 2 1.0
mass 3 1.0

LJ potentials

pair_style lj/cut 2.5
pair_coeff * * 1.0 1.0 2.5

define groups

region 1 block INF INF INF 1.25 INF INF
group lower region 1
region 2 block INF INF 8.75 INF INF INF
group upper region 2
group boundary union lower upper
group flow subtract all boundary
set group lower type 2
set group upper type 3

initial velocities

compute zhang flow temp/profile 1 0 0 y 20
velocity flow create 1.0 482748 temp mobile
fix 1 all nve
fix 2 flow temp/rescale 200 1.0 1.0 0.02 1.0
fix_modify 2 temp zhang

Couette flow

velocity lower set 0.0 0.0 0.0 units box
velocity upper set 3.0 0.0 0.0 units box
fix 3 boundary setforce 0.0 0.0 0.0
fix 4 all enforce2d

Poiseuille flow

#velocity boundary set 0.0 0.0 0.0
#fix 3 lower setforce 0.0 0.0 0.0
#fix 4 upper setforce 0.0 NULL 0.0
#fix 5 upper aveforce 0.0 -1.0 0.0
#fix 6 flow addforce 0.5 0.0 0.0
#fix 7 all enforce2d

Run

timestep 0.003
thermo 5000
thermo_modify temp mobile
dump 1 all atom 10000 dump.*
fix 8 all ave/spatial 2 5000 10000 y center 0.05 vx vy units reduced file vel.profile
run 100000

Best regards,
Jun Zhang