← Back to team overview

yade-users team mailing list archive

Re: [Question #701161]: Knowing the particle coordinates, generate sphere particles in batches

 

Question #701161 on Yade changed:
https://answers.launchpad.net/yade/+question/701161

    Status: Answered => Open

xuanshenyu is still having a problem:
Hi,Jan
I'm sorry for inappropriate expression.

First, I know the coordinates of sphere particle, and they are saved in CSV or txt files. 
Just like:
1,1,0
1,2,0
1,3,0
1,4,0
...
Then,I want to call the csv or txt file in yade to generate sphere particles.

>###
radius = 0.5
coordinates = numpy.genfromtxt("xyz.csv",delimiter=",") 
O.bodies.append([sphere((x,y,z),radius) for x,y,z in coordinates]) # can be written more verbose
###

-this is amazing, so powerful.

> I still have a question about linux system. The user manual recommends
running yade in the Ubuntu system, but the research group cluster is the
centos system. Will that cause any problems?

Shenyu

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.