Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-11 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Status: Answered => Solved Kun Zeng confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-11 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Thanks Jan -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list:

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-11 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský proposed the following answer: (1) yes, the two pieces of code are equivalent, but still you use rect(...), so I see no reason why this eorks and the previous did not :-D (2) as FEM part is not

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Hi Jan, Sorry to post so many comments and questions above. I changed the NameError part in my code into this: rects = (movables + rect((p000,p100,p110,p010)) +

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Hi Jan, You mean the file named " example2-yade-prepoc.py" ? In my simualtion, I use this code to do preparation of the polyhedara particle layers:

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský proposed the following answer: Ok, I have read the previous pssages in detail > I would like to generate a beam by FEM and falling down on the Polyhedra particles layers which I generated by Yade

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: The whole outcome is this: Traceback (most recent call last): File "example1.py", line 90, in dem = YADE_API(demName) File

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Hi Jan, I do used this code in my example1-yade.py file and it still same error: NameError: global name 'rect' is not defined... from libyade import yade from yade import * from

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský requested more information: As I wrote, I have tried your code and had no problem and I don't see where this NameError could come from, since rect is defined in the code.. please post here once

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-09 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: I would like to generate a beam by FEM and falling down on the Polyhedra particles layers which I generated by Yade before this coupling(ymport into this coupling). And when I run

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-05 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský requested more information: Hi Kun, so there must be some inconsistency. In the last code you posted there is ### def rect(vs,**kw): v1,v2,v3,v4 = vs return [ yade.utils.facet((v1,v2,v3),**kw),

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-05 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Hi Jan, I run the .sh file and it still shows: Traceback (most recent call last): File "example1.py", line 90, in dem = YADE_API(demName) File

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský requested more information: Thanks for the files, what is the problem now (I did not face any)? Jan -- You received this question notification because your team yade-users is an answer contact for

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: The complete code of example1-yade.py is as below: from libyade import yade from yade import * from yade import polyhedra_utils from yade import ymport from yade import Vector3

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský requested more information: >NameError: global name 'rect' is not defined > ... > from yade.utils import facet > but it shows: > ImportError: cannot import name rect rect is not part of yade, it is

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Hi Jan, sorry for post so much questions here. I thought i figure the facet problem by changing the code to: yade.utils.facet((v1,v2,v3),**kw) And I run my code it shows: File

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Thanks Jan. I add from yade import Vector3 at the top of my code. it works. However, I changed the facet to: def rect(vs,**kw): v1,v2,v3,v4 = vs return [ f =

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský proposed the following answer: Similar to facet, use either from yade import Vector3 or yade.Vector3 cheers Jan -- You received this question notification because your team yade-users is an answer

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Sorry Jan, It is "NameError: name 'Vector3' is not defined" ... -- You received this question notification because your team yade-users is an answer contact for Yade.

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: I run my code again and it still shows : sh example1.sh Traceback (most recent call last): File "example1.py", line 90, in dem = YADE_API(demName) File

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Jan Stránský requested more information: Sorry, have not checked your code in detail, there you have indeed Vector3.. Does the error really says 'vector' is not defined? According to the error, it considered

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Kun Zeng posted a new comment: Hi Jan, Yes, I use Vector3 in my code. But the error shows ' name 'vector' is not defined ' like this: p000 = Vector3(0,0,0). -- You received this question notification because

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-04 Thread Jan Stránský
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Status: Open => Answered Jan Stránský proposed the following answer: Hello, > NameError: global name 'facet' is not defined if you use standalone yade, it imports a lot of stuff (like function facet) at

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-03 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Description changed to: I change the code of the example1-yade.py file in [1] to the following code: from libyade import yade from yade import polyhedra_utils from yade import ymport from yade import * widthl

Re: [Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-03 Thread Kun Zeng
Question #658909 on Yade changed: https://answers.launchpad.net/yade/+question/658909 Description changed to: I change the code of the example1-yade.py file in [1] to the following code: from libyade import yade from yade import polyhedra_utils from yade import ymport from yade import * widthl

[Yade-users] [Question #658909]: Question about FEM and DEM coupling

2017-10-03 Thread Kun Zeng
New question #658909 on Yade: https://answers.launchpad.net/yade/+question/658909 I change the code of the example1-yade.py file in [1] to the following code: from libyade import yade from yade import polyhedra_utils from yade import ymport from yade import * widthl = .3 widthr = .3 widthc = .3