usage of fix move/mesh with linear/variable style

Submitted by c00l on
ckloss

>>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

Christoph

Fri, 12 Jul 2013 - 14:10 Permalink
c00l

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?

Regards
Oliver

Wed, 31 Jul 2013 - 14:44 Permalink
ckloss_

>>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

Cheers
Christoph

Mon, 5 Aug 2013 - 19:19 Permalink

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.