← Back to team overview

yade-users team mailing list archive

[Question #669824]: Problem about material

 

New question #669824 on Yade:
https://answers.launchpad.net/yade/+question/669824

I write a code like this:
----------------------------------------------------------------------------------------------
O.reset()


density=float(1600)
young=100e6
po=0.4
frictionAngle= float(atan(0.32))
sigmaT=1e3
epsCrackOnset=1e-4
relDuctility=30
globals()['density']=locals()['density']
globals()['young']=locals()['young']
globals()['po']=locals()['po']
globals()['frictionAngle']=locals()['frictionAngle']
globals()['sigmaT']=locals()['sigmaT']
globals()['epsCrackOnset']=locals()['epsCrackOnset']
globals()['relDuctility']=locals()['relDuctility']


density1=8000
young1=209e9
po1=0.29
frictionAngle1=float(atan(0.7))
globals()['density1']=locals()['density1']
globals()['young1']=locals()['young1']
globals()['po1']=locals()['po1']
globals()['frictionAngle1']=locals()['frictionAngle1']

qiu=O.materials.append(CpmMat(density=density,young=young,poisson=po,frictionAngle=frictionAngle,sigmaT=sigmaT,epsCrackOnset=epsCrackOnset,relDuctility=relDuctility,label='qiu'))

dao=O.materials.append(FrictMat(density=density1,young=young1,poisson=po1,frictionAngle=frictionAngle1,label='dao'))


O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=15))
O.bodies.append(facet([(0,0,0),(1,1,0),(1,0,0)]))
O.bodies.append(facet([(0,0,0),(1,1,0),(0,1,0)]))
O.bodies.append(facet([(0,0,1),(1,1,1),(1,0,1)]))
O.bodies.append(facet([(0,0,1),(1,1,1),(0,1,1)]))



Nb1=len(O.bodies)
globals()['Nb1']=locals()['Nb1']

from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,.8),rMean=.08)
sp.toSimulation()


Nb2=len(O.bodies)
globals()['Nb2']=locals()['Nb2']

for i in xrange(0,Nb1):
O.bodies[i].material=O.materials[dao]

for i in xrange(Nb1,Nb2):
O.bodies[i].material=O.materials[qiu]



O.bodies[8].state.vel=(0,0,0.1)
O.bodies[9].state.vel=(0,0,0.1)
O.bodies[10].state.vel=(0,0,-0.1)
O.bodies[11].state.vel=(0,0,-0.1)


O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()], 
[Ip2_CpmMat_CpmMat_CpmPhys(),Ip2_FrictMat_CpmMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()], 
[Law2_ScGeom_CpmPhys_Cpm(),Law2_ScGeom_FrictPhys_CundallStrack()]),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
   
]
O.dt=0.05*PWaveTimeStep()

-------------------------------------------------------------------------------------------------

when I run it, I ge the message:

 FATAL /home/dj/yade/trunk/core/ThreadRunner.cpp:30 run: Exception occured: 
Body #12: Body::material type CpmMat doesn't correspond to Body::state type State (should be CpmState instead).


 Could you give me some suggestion?Thanks a lot!

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