Dear All,
I’m reaching out to you all regarding help using fix controller. I am doing a granular sim where i want to move a granule (update it’s position) based on the stresses acting on the granular ensemble.
Let me briefly describe my system. I have 4 large granules which are like 4 large walls which bound a collection of small granules. My goal is to move one of the 4 large granules so that the stress ratio (sigma_xx/sigma_yy) of the smaller granules is 1. For the frictionless system, it is effectively 1 as verified by LAMMPs and theoretical expectations. The problem is when I include friction, the stress ratio is no longer 1 which is once again theoretically expected. However, I would like to move the walls such that the stress ratio can be controlled to reach 1 (or another constant value) which I think I can achieve via fix controller.
I was thinking of doing this: Move the position of granule # 1379 (one of the wall granules in my system) such that variable stress_ratio_equal is 1. I think my input deck regarding the concerning sections should be as follows:
group granules id 1:1375
group walls id 1376:1379
group top_wall id 1376
group bottom_wall id 1377
group left_wall id 1378
group right_wall id 1379
group stationary_walls id 1376 1377 1378
fix 1 granules nve/sphere
fix 2 granules viscous 1
fix 3 stationary move linear 0 0 0
compute peratom atoms stress/atom NULL pair
compute p atoms reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
compute p1 atoms reduce sum c_peratom[4] c_peratom[5] c_peratom[6]
variable press equal -(c_p[1]+c_p[2])/(20.043.8*0.2)
variable stress_ratio equal c_p[1]/c_p[2]
variable foo internal -0.0001
fix 7 all enforce2d
fix 222 right_wall move variable NULL v_zero NULL v_foo v_zero NULL
fix 1111 all controller 10 0.01 1 0.00001 0.00 v_stress_ratio 1 foo
My concern is this in the LAMMPS docs:
“For this fix to work, the control variable must actually induce a change in a running LAMMPS simulation. Typically this will only occur if there is some other command (e.g. a thermostat fix) which uses the control variable as an input parameter.”
My control variable is the velocity of the wall dictated by fix move (id 222) and process variable is v_stress_ratio. However, when I run this, the right_wall doesn’t move at all. I don’t know how else I can change the position of the wall granule apart from fix move such that I attain the desired state.
Any help will be much appreciated!
Thanks