Muller-Plathe algorithm to measure viscosity in couette flow

Dear lammps users,

I am trying to measure the viscosity of water undergoing a shear flow (couette flow). Is it possible to use the Muller-Plathe algorithm to measure viscosity? My concern is that the shear velocity created by Muller-Plathe method may interfere with the shear velocity of couette flow. My whole purpose is to compare the result of this methodology with viscosity calculated from Green-Kubo formula.

My second question relates to the sample input file which is in the example folder of lammps and which uses Muller-Plathe algorithm. I have put the whole input file at the end of this email. I don’t understand the following line.

variable visc equal -(f_4/(2*(step*0.005-125)*lx+1.0e-10))/(v_dVx/(ly/2))

May anyone please explain to me why f_4 is divided by (step*0.005-125)*lx+1.0e-10) and again divided by (v_dVx/(ly/2))?

Regards,

Farshad

Comments below.

Steve

Thanks so much Steve for your helpful explanation.

Comments below.

Steve

Dear lammps users,

I am trying to measure the viscosity of water undergoing a shear flow (couette flow). Is it possible to use the Muller-Plathe algorithm to measure viscosity? My concern is that the shear velocity created by Muller-Plathe method may interfere with the shear velocity of couette flow. My whole purpose is to compare the result of this methodology with viscosity calculated from Green-Kubo formula.

The MP method sets up its own flow profile. So no, you cannot induce Couette flow

yourself (e.g. by dragging a wall across the fluid), and then do MP on top of that.

The examples/VISCOSITY dir has an MP script and a wall script and a GK script.
They all give similar answers, but they are different methods.

My second question relates to the sample input file which is in the example folder of lammps and which uses Muller-Plathe algorithm. I have put the whole input file at the end of this email. I don’t understand the following line.

variable visc equal -(f_4/(2*(step*0.005-125)*lx+1.0e-10))/(v_dVx/(ly/2))

May anyone please explain to me why f_4 is divided by (step*0.005-125)*lx+1.0e-10) and again divided by (v_dVx/(ly/2))?

That is the formula in the MP paper (cited on the fix viscosity doc page).
f_4 is the momentum flux
step*0.005-125 is the elapsed time (subtracting off the equil time)

lx is the cross-sectional area (in 2d)

1.0e-10 is a fudge factor to avoid a divide-by-0.0 on the 1st time step

dVx is the delta in velocity in the MP flow profile

ly/2 is the distance over which that delta occurs, so dividing by it gives a slope