yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #25527
Re: [Question #696759]: How can polyhedron use CpmMat 、Ip2_CpmMat_CpmMat_CpmPhys()and Law2_ScGeom_CpmPhys_Cpm() ?
Question #696759 on Yade changed:
https://answers.launchpad.net/yade/+question/696759
Status: Answered => Open
weijie is still having a problem:
Hi Jan, and thank you again.
>poly1.state = CpmState()
After I add poly1. state = CpmState(), I find poly1 disappeared in the scene.I've tried for a long time and it's still like this.script see[1].
Best regards
Jie
################################
from __future__ import print_function
from yade import polyhedra_utils,qt
concrete = CpmMat(
young = 24e9,
poisson = .2,
frictionAngle = atan(0.8),
epsCrackOnset = 1e-4,
relDuctility =30,
sigmaT = 3.5e6,
)
concreteId = O.materials.append(concrete)
poly1= polyhedra_utils.polyhedra(material=concrete,size=(1,1,1),seed=5)
poly1.state = CpmState()
poly1.state.pos = (0,0,0)
O.bodies.append(poly1)
m=FrictMat(density=1000,young=1e5,poisson=0.5,frictionAngle=radians(20))
O.materials.append(m)
######### Create wall
wallThickness = 0.1
length = 1.5
height = 1.5
vC =((-0.5*length,0.5*wallThickness,0.5*height),(0.5*length,0.5*wallThickness,0.5*height),(0.5*length,0.5*wallThickness,-0.5*height),(-0.5*length,0.5*wallThickness,-0.5*height),(-0.5*length,-0.5*wallThickness,0.5*height),(0.5*length,-0.5*wallThickness,0.5*height),(0.5*length,-0.5*wallThickness,-0.5*height),(-0.5*length,-0.5*wallThickness,-0.5*height))
vD=((-0.5*length,0.5*wallThickness,0.5*height),(0.5*length,0.5*wallThickness,0.5*height),(0.5*length,0.5*wallThickness,-0.5*height),(-0.5*length,0.5*wallThickness,-0.5*height),(-0.5*length,-0.5*wallThickness,0.5*height),(0.5*length,-0.5*wallThickness,0.5*height),(0.5*length,-0.5*wallThickness,-0.5*height),(-0.5*length,-0.5*wallThickness,-0.5*height))
bC = polyhedra_utils.polyhedra(material=m,v=vC,color=[0,0.5,1])
bC.state.pos = [0,0.5*length,0]
bD = polyhedra_utils.polyhedra(material=m,v=vD,color=[0,0.5,1])
bD.state.pos = [0,-0.5*length,0]
O.bodies.append((bC,bD))
v=0.1
bC.state.vel = (0,-v,0)
bD.state.vel = (0,+v,0)
bC.state.blockedDOFs = "xyzXYZ"
bD.state.blockedDOFs = "xyzXYZ"
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb()]),
InteractionLoop(
[Ig2_Polyhedra_Polyhedra_ScGeom()],
[Ip2_CpmMat_CpmMat_CpmPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_CpmPhys_Cpm(),Law2_ScGeom_FrictPhys_CundallStrack()],
),
NewtonIntegrator(),
]
O.dt = 0. #run one iteration
O.step()
poly1.material=m #change material
O.dt = 1e-6
--
You received this question notification because your team yade-users is
an answer contact for Yade.