Hello everyone,

I’m trying to model srd particles in a no-slip cylinder, and am having trouble creating the wall.

I’ve defined variables for xlo/xhi and ylo/yhi as follows:

variable xlength equal 10

variable ylength equal 10

variable zlength equal 10

variable x0 equal v_xlength/2

variable y0 equal v_ylength/2

variable radius equal 4.5

variable WallSRDxlo equal v_x0-sqrt(v_radius*v_radius-(y-v_y0)*(y-v_y0))

variable WallSRDxhi equal v_x0+sqrt(v_radius*v_radius-(y-v_y0)*(y-v_y0))

variable WallSRDylo equal v_y0-sqrt(v_radius*v_radius-(x-v_x0)*(x-v_x0))

variable WallSRDyhi equal v_y0+sqrt(v_radius*v_radius-(x-v_x0)*(x-v_x0))

I then set the wall fix:

fix 4 all wall/srd xlo WallSRDxlo xhi WallSRDxhi ylo WallSRDylo yhi WallSRDyhi

Which doesn’t complain. However, when I then run the simulation all the atoms escape and are lost, whereas I’d like them to stay within the cylinder. I initially create the atoms inside a cylinder of radius 4 inside the wall.

I get the feeling that you can’t define xlo etc using atom-vector positions, if that’s the case is there a way to do this? I’d use something like wall/region, but I don’t think that works with srd particles.

Full code here: http://pastebin.com/AA6pCY5i

Many thanks,

Sam Brown

Hello everyone,

I'm trying to model srd particles in a no-slip cylinder, and am having

trouble creating the wall.

I've defined variables for xlo/xhi and ylo/yhi as follows:

variable xlength equal 10

variable ylength equal 10

variable zlength equal 10

variable x0 equal v_xlength/2

variable y0 equal v_ylength/2

variable radius equal 4.5

variable WallSRDxlo equal v_x0-sqrt(v_radius*v_radius-(y-v_y0)*(y-v_y0))

variable WallSRDxhi equal v_x0+sqrt(v_radius*v_radius-(y-v_y0)*(y-v_y0))

variable WallSRDylo equal v_y0-sqrt(v_radius*v_radius-(x-v_x0)*(x-v_x0))

variable WallSRDyhi equal v_y0+sqrt(v_radius*v_radius-(x-v_x0)*(x-v_x0))

I then set the wall fix:

fix 4 all wall/srd xlo WallSRDxlo xhi WallSRDxhi ylo WallSRDylo yhi

WallSRDyhi

Which doesn't complain. However, when I then run the simulation all the

atoms escape and are lost, whereas I'd like them to stay within the

cylinder. I initially create the atoms inside a cylinder of radius 4 inside

the wall.

I get the feeling that you can't define xlo etc using atom-vector positions,

if that's the case is there a way to do this? I'd use something like

wall/region, but I don't think that works with srd particles.

sam,

have you read the documentation for fix wall/srd?

it doesn't say anything that it allows to build any

shaped container, but it provides simply a _flat_

wall or "face". so your entire "vector math" is completely

bogus (also you are using properties that are only

available to atom style variables in an equal style

variable).

you can use variables only to determine the wall/face

location. also, you are not referencing the variables

correctly. the documentation even gives examples

with variables (prefixing them with v_ ). so in your

case, you simply provide strings which have a

"numerical value" of 0. no surprise that particles

go everywhere.

if you use any of the other wall options, they won't

be using srd, but simply add a force to the center

of the particles.

axel.