Fix move with variable.

Submitted by tshan on Wed, 11/17/2010 - 14:19

Hi,

I want move the side walls as a function of time t to conduct the undrained triaxial test with no volumetric change. However, when I try this fix move variable command, it seems to be some errors in my script:

variable dy equal 0.01/(0.1+${vc}*dt*(step-40000))-0.1
variable vy equal 0.01*${vc}/(0.1-${vc}*dt*(step-40000))^2
fix F_moveleft all move/mesh/gran variable NULL -0.05-0.5*${dy} NULL NULL -0.5*${vy} NULL units box leftwall 1

The output of liggghts:

variable vc equal -0.1
variable dy equal 0.01/(0.1+${vc}*dt*(step-40000))-0.1
variable dy equal 0.01/(0.1+-0.1*dt*(step-40000))-0.1
variable vy equal 0.01*${vc}/(0.1-${vc}*dt*(step-40000))^2
variable vy equal 0.01*-0.1/(0.1-${vc}*dt*(step-40000))^2
variable vy equal 0.01*-0.1/(0.1--0.1*dt*(step-40000))^2
fix F_moveleft all move/mesh/gran variable NULL -0.05-0.5*${dy} NULL NULL -0.5*${vy} NULL units box leftwall 1
fix F_moveleft all move/mesh/gran variable NULL -0.05-0.5*-1.387778781e-17 NULL NULL -0.5*${vy} NULL units box leftwall 1
fix F_moveleft all move/mesh/gran variable NULL -0.05-0.5*-1.387778781e-17 NULL NULL -0.5*-0.1 NULL units box leftwall 1
Note: A fix move/mesh/gran error or warning may appear as fix move error or warning
e STL geometry.
WARNING: STL file may be incompatible: Vertex outside simulation box. You may want to enlarge the box or scale the STL geometry.
ERROR: Illegal fix move command

Could someone tell me how to fix it?

Thanks a lot!

Best,
Tong

ckloss's picture

ckloss | Wed, 11/17/2010 - 14:28

First, values like 1.387778781e-17 don't look too good.... you should fix that
Second, you should not do calculations within the command. You should only use variables or numeric values
If that does not help, you could try to go into the code to see what happens

Christoph

tshan | Wed, 11/17/2010 - 15:14

Hi Christoph,

First, does the variable function allow the variable that changes with time t=step*dt? If this is the situation, is that mean the variable you mentioned will become much larger during computation? By the way, I have tried much larger ones but it did not work.

Second, I have tried your second suggestion but the issue seems to be still.

I was into the fix_move_tri.cpp file and found several line relating to this erro, but just could not understand where the error is. Could you help me point out?

...
if (strcmp(arg[5],"NULL") == 0) yvarstr = NULL;
else if (strstr(arg[5],"v_") == arg[5]) {
int n = strlen(&arg[5][2]) + 1;
yvarstr = new char[n];
strcpy(yvarstr,&arg[5][2]);
} else error->all("Illegal fix move command");
...

Thanks!

Best,
Tong

marketos | Wed, 11/17/2010 - 15:46

Hi Tong,

I think that for the fix move with the option variable you need to do this:

variable vy equal .... (check the manual for the command variable if necessary)
fix moveUp all move/mesh/gran variable NULL NULL NULL NULL NULL v_vy BotWall 1

Basically you need to prefix the name of your variable with a v_
You will probably also need to set up extra variables for the other velocities too- variable dx equal 0.05 etc..

Hope that helps,

George