Atom attributes for ellipsoid atom style

Submitted by Leader on Tue, 12/09/2014 - 19:29

Hi all,

I am trying to create a single ellipsoid particle to do some comparison with a spherical particle but I have got the following error message:

"ERROR: Fix wall/gran (id zwalls1): requires atom attributes radius, omega, torque (../fix_wall_gran.cpp:88)"

I looked at "fix wall/gran command" & "set command" but I could not find where should I define these a attributes. Could some one please give me some hints about this and how to set the commands associated with ellipsoid style correctly.

Many thanks,

Leader

ckloss's picture

ckloss | Fri, 12/12/2014 - 15:56

Hi Leader,

granular walls won't work with ellipsoids - this is not implemnted.

Best wishes
Christoph

Leader | Mon, 12/15/2014 - 23:19

Hi Christoph,

Thanks for your reply. I changed the pair_style into "gayberne" (I am still not sure if this is the correct choice for ellipsoid atom style ?) I also deactivated "fix wall command" just to see how the ellipse appears on paraview. The program run with no errors but I had two issues here; first the particle appeared on paraview as sphere not as an ellipsoid? Second the particle size did not change when I change "shape values " under set command?. Any ideas what I'm doing wrong here.

Many Thanks,
Leader

ckloss's picture

ckloss | Wed, 01/14/2015 - 15:19

Hi,

gayberne is a soft ellipsoid style (not granular). The LIGGGHTS granular walls won't work with it, and also there is currently no output route to VTK

Best wishes
Christoph

Daniel Queteschiner | Thu, 01/15/2015 - 13:54

Paraview doesn't know anything about your particles' shape. You have to use Sphere glyphs and adjust the Scale option in the Glyph Transform section to get the correct axis ratio. Then of course you want to orient the ellipsoids correctly. To get the information about the particles' orientation (quaternion) out of LIGGGHTS you have to use
compute q all property/atom quatw quati quatj quatk
and dump it to an output file
To be of any use in paraview you have to convert the quaternion to a direction vector (custom postprocessing required!). Once you have done this you can check the Orient option in the glyph properties to make use of the direction vector you calculated.

richti83's picture

richti83 | Thu, 01/15/2015 - 18:06

Fortunately my ParaView Rigid Reader can understand the format used in the example examples/LAMMPS/ellipse/in.ellipse.gayberne
and does the magic quat-math in C++ which is faster than python or calculatorfilter.
in the script modify the dump 1 all line to:

dump 1 all custom 100 post/ellipsoid*.dump &
id type x y z c_q[1] c_q[2] c_q[3] c_q[4]

After you run liggghts you get post/ellipsoid*.dump Fileseries.
Install liggghts_rigid_reader [1] and open the fileseries in ParaView

To split the two types use a threshold filter with type=[1..1] and a second threshold with type=[2..2]
Add a Sphere Source with radius 0.5
Attach a Transform filter, set scale x to 3

Now one need to connect the dump data with the two bodies. I use this programmable filter:

input1 = self.GetInputDataObject(0, 0) #threshold
input2 = self.GetInputDataObject(0, 1) #body
output = self.GetOutputDataObject(0)
#
newPoints = vtk.vtkPoints()
newcells = vtk.vtkCellArray()
#
P=input1.GetPointData()
B=input2.GetPointData()
BODIES=input1.GetNumberOfPoints()
EDGES=input2.GetNumberOfPoints()
SURFACES=input2.GetNumberOfCells()
c=0
for body in range(0,BODIES):
r=input1.GetPoint(body)
M=P.GetAbstractArray('M')
T11=M.GetComponent(body,0)
T12=M.GetComponent(body,1)
T13=M.GetComponent(body,2)
T21=M.GetComponent(body,3)
T22=M.GetComponent(body,4)
T23=M.GetComponent(body,5)
T31=M.GetComponent(body,6)
T32=M.GetComponent(body,7)
T33=M.GetComponent(body,8)
for surface in range(0,SURFACES):
cell = input2.GetCell(surface)
COUNT=cell.GetNumberOfPoints()
for j in range(0,COUNT): #alle punkte der jeweiligen zelle
id=cell.GetPointId(j)
#print id
coord = input2.GetPoint(id)
x, y, z = coord[:3]
#print x,y,z
#print r
xnew=T11*x+T12*y+T13*z+r[0]
ynew=T21*x+T22*y+T23*z+r[1]
znew=T31*x+T32*y+T33*z+r[2]
newPoints.InsertPoint(c, xnew, ynew, znew)
c+=1
newcells.InsertNextCell(3)
newcells.InsertCellPoint(c-1)
newcells.InsertCellPoint(c-2)
newcells.InsertCellPoint(c-3)
output.SetPoints(newPoints)
output.SetCells(5,newcells)

You can download it here: http://www.richtisoft.de/transfer/transform.py (not sure if the forum preserves all indents)
Attach one per threshold. (you get an error about 'AttributeError: 'NoneType' object has no attribute 'GetPointData', don't worry)

Click ProgrammableFIlter1, rightclick->change input, hold ctrl and select Sphere1 (now the programable filter has two inputs, one for the position and quat and one for the body which should be translated)
Click ProgrammableFIlter2, rightclick->change input, hold ctrl and select Transform1

Now your pipeline should look like this: http://www.richtisoft.de/transfer/PipelineBrowser.png
I've uploaded my final state here http://www.richtisoft.de/transfer/ellipsoid.pvsm

I've no clue what the lammps-script does, however this is the animation:
https://www.youtube.com/watch?v=vWjGbk_wmhI

Now we need some more support in LIGGGHTS for this cool feature :-)

Best,
Christian.

[1] https://github.com/richti83/ParaView_Reader_for_LIGGGHTS/tree/master/pre... (attention: only compatibel with ParaView 4.3)
[2] http://www.richtisoft.de/transfer/ellipsoid.pvsm (change post/ directory when you are asked for)
[3] http://www.richtisoft.de/transfer/transform.py

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact