I have a metal slab surrounded by fluids. At lower temperature, the fluids is always moving around the slab and slab is in the middle of the simulation box. However, At higher temperature, after about 150ps, the slab starts to have a z-direction velocity and move upside and down.
I dont know why it happened. I am trying to fix the metal slab in a fictitious box but to allow it move ‘freely’ inside that fictitious box. After looking up the manual, I found three possible solutions. Fix rigid, spring, wall. Which one is a better option here?
Is there any suggestions?
Thank you.
Of all the options you mentioned only fix spring is suitable if you want to keep doing research. The others would turn your simulation into a computer animation.
I understand your point sir. That’s why I want to compare the original simulation and restrained simulation so that I can find out what happened here for z-direction velocity.
Thank you!
fix recenter is a bad choice as it does not change the simulation dynamics, but only retranslates the positions. This makes them unusable for any kind of dynamics analysis unless you only what to look at motions relative to the centered object.
Yes, it is periodic in all x,y,z directions.
I don’t make fluid flow. I just set the temperature and it will move around the metal slab.
That’s what I want to try here so that I can find out why after some time the metal slab has a z-direction velocity and it won’t stop moving.
The following commands are my test to use fix spring. I try to get the center of mass for group 1 in the beginning.
compute 1 1 com
variable x equal c_1[1]
variable y equal c_1[2]
variable z equal c_1[3]
run 0
variable com_x equal ${x}
variable com_y equal ${y}
variable com_z equal ${z}
fix 1 1 spring tether 50 ${com_x} ${com_y} ${com_z} 0
I followed the variable command mannual but I still got the error message, Compute used in variable between runs is not current.
How to solve it? I am a little confused here.
Thank you.
For most compute styles cannot “consume” them (i.e. trigger the computation) in between run commands. For some you can use them if they are “consumed” on the same timestep during a run before, but you are not doing that. That is a principal property of computes and there are technical reasons for that.
Could also try fix momentum to occasionally zero out the total momentum of the box (say every 1000 timesteps), along with fix recenter. That is what I use to pin density profiles of liquid-vapor simulations for fix ave/chunk, seems to work well.