usage of fix move/mesh with linear/variable style

Submitted by c00l on Wed, 07/03/2013 - 10:50

I want to use the fix move/mesh with the linear/variable style but I don’t know in which way I have dot define the variables for the velocity. Is it an array that has the same number of elements as time steps? Or is it a scalar and I have to change its value every time step. Can you give an short example please.
And a further issue, is it possible to import data form a file, so that I can impose measured motions.

ckloss's picture

ckloss | Fri, 07/12/2013 - 14:10

>>Or is it a scalar and I have to change its value every time step
yes, this is the case. Just define an equal-style variable. See doc of variable for more info


c00l | Wed, 07/31/2013 - 14:44

Ok. And how can I change the value of this variable during a run?

I tried to change its value by a loop like that:


variable vx_a index 15 50 45 77 10 17 10 10 10
variable vy equal 0.0
variable vz equal 0.0
variable vx equal ${vx_a}

fix movecad1 all move/mesh mesh Felgendummy linear/variable v_vx v_vy v_vz

variable n loop 10
label runloop
variable vx equal ${vx_a}
run 1000
next n
next vx_a
jump SELF runloop

But it doesn’t work. The mesh is moving with the initial velocity during the whole simulation.
Is it possible to change the value during a run, without using a run command in a loop?


ckloss_ | Mon, 08/05/2013 - 19:19

>>But it doesn’t work.
That's because "equal" is a one-time assignment. If you have a time-dependent formula for vx, it will work