yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #28568
[Question #703686]: face material
New question #703686 on Yade:
https://answers.launchpad.net/yade/+question/703686
Hello all
I am trying to simulate a landslide. I will generate spheres and materials between the balls, but I do not know how to generate materials between spheres and face.The last line of code error, I don't know how to write.Please help me.
This is the code
################################
from yade import pack
import gts, os.path, locale
#-----------------------Creat materials----------------------
O.materials.append( CohFrictMat( young=1E8,poisson=0.35,density=2100,frictionAngle=radians(30),normalCohesion=2e4,shearCohesion=2e4,momentRotationLaw=True,label='cMat' ) ) # material to create the gridConnections
O.materials.append( FrictMat( young=9E8,poisson=0.38,density=2100,frictionAngle=radians(22),label='fMat' ) ) # material for general interactions
#------------------Create spheres and facet-----------------
surf=gts.read(open('2222.gts'))
surf1=gts.read(open('1111.gts'))
if surf.is_closed():
pred=pack.inGtsSurface(surf)
aabb=pred.aabb()
dim0=aabb[1][0]-aabb[0][0]; radius=dim0/100. # get some characteristic dimension, use it for radius
O.bodies.append(pack.regularHexa(pred,radius=radius,gap=0,material='cMat'))
for b in O.bodies:
b.shape.color = (0,191/255.,1)
O.bodies.append(pack.gtsSurface2Facets(surf1),wire=False,material='fMat')
##########################################
File "/usr/bin/yade", line 336, in runScript
execfile(script,globals())
File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 87, in execfile
exec_(code, myglobals, mylocals)
File "MLS.py", line 24, in <module>
O.bodies.append(pack.gtsSurface2Facets(surf1),wire=False)
Boost.Python.ArgumentError: Python argument types in
BodyContainer.append(BodyContainer, list)
did not match C++ signature:
append(yade::pyBodyContainer {lvalue}, std::vector<boost::shared_ptr<yade::Body>, std::allocator<boost::shared_ptr<yade::Body> > >)
append(yade::pyBodyContainer {lvalue}, boost::shared_ptr<yade::Body>)
Looking forward to your answers
Appreciate
Wang
--
You received this question notification because your team yade-users is
an answer contact for Yade.