Dear Community,
I have used fix controller
to control the pressure/force acting on a wall using region
and fix wall/gran/region
commands. I have attached the code here.
units lj
atom_style sphere
region box block 0 10 0 10 0 10
region smallbox block 1 8 1 8 1 8
create_box 1 box
change_box all boundary f f f
create_atoms 1 random 1000 12123123 smallbox overlap 1.
comm_modify vel yes
pair_style granular
pair_coeff * * hertz/material 300000.000000001 0.69 0.17 tangential linear_history 3.1e1 1.0 0.1 rolling sds 200.0 100.0 0.1 twisting marshall damping coeff_restitution
#fix grav all gravity 1. vector 0 0 -1
fix 2 all nve/sphere
fix side_wall_z all wall/gran granular hertz/material 1e6 0.3 0.3 tangential mindlin NULL 1.0 0.5 zplane 0 10
fix side_wall_x all wall/gran granular hertz/material 1e6 0.3 0.3 tangential mindlin NULL 1.0 0.5 xplane 0 10
fix side_wall_y all wall/gran granular hertz/material 1e6 0.3 0.3 tangential mindlin NULL 1.0 0.5 yplane 0 10
timestep 0.001
variable dz internal -0.1
region top_wall block 0 10 0 10 10 20 move NULL NULL v_dz side out
fix top_wall all wall/gran/region granular hertz/material 1e6 0.3 0.3 tangential mindlin NULL 1.0 0.5 region top_wall contacts
compute average_force_z all reduce sum f_top_wall[4]
variable intensive_average_force equal c_average_force_z/atoms
fix pressure_control all controller 50 0.001 0.1 1.1 0.1 v_intensive_average_force -1 dz
thermo_style custom step time press temp c_average_force_z v_dz f_pressure_control[1]
thermo 500
dump 4 all movie 500 movie.mpg type type
run 6000000
I have two confusions regarding the region ... move NULL NULL v_dz
command.
- If I use
variable dz equal ramp(0,10)
followed byrun 1000
then the region moves by 10 in 1000 time steps.
So if I givevariable dz equal 0.1
, does the region move by dz from the initial position and stay there throughout the rest of the run commands? - Ideally in the fix controller command, I would want the control variable to be the position of the wall. Is there a way to control that directly, perhaps this relates to by previous point.
It would be great if someone can clarify the usage.
Additionally, if anyone has any tips on visualising the regions it would be great!
Thanks!