yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #10713
Re: [Question #259209]: Static and dynamic loading and straining of a cylindrical sample
Question #259209 on Yade changed:
https://answers.launchpad.net/yade/+question/259209
behzad posted a new comment:
Yes, but we can update the engine with a Pyrunner, as I did below.
My question was in a uniaxial loading, do we need to use the
TriaxialStressController() by putting goal1=goal2=0, goal3=f(t)? or we
simply control the stress level by applying the desired load to the
loading plate?
O.reset()
from yade import utils, plot
from yade import pack, qt
id_Mat1=O.materials.append(FrictMat(young=1e8,poisson=0.3,density=1000,frictionAngle=1))
Mat=O.materials[id_Mat1]
id_Mat2=O.materials.append(FrictMat(young=1e10,poisson=0.3,density=1000,frictionAngle=1))
Rigid=O.materials[id_Mat2]
s1=utils.sphere([0.0,0.0,1.0],1.0,fixed=False,material=Mat)
s2=utils.sphere([0.0,0.0,3.0],1.0,fixed=False,material=Mat)
O.bodies.append(s1)
O.bodies.append(s2)
box_1 = O.bodies.append(box((0,0,0),(1,1,.001),fixed=True,material=Rigid))
box_2 = O.bodies.append(box((0,0,4.),(1,1,.0001),fixed=False,material=Rigid))
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,0])
]
O.engines=O.engines+[UniaxialStrainer(strainRate=0.0,axis=2,asymmetry=1,posIds=[3],negIds=[2],
crossSectionArea=0.00196,blockDisplacements=False,blockRotations=False,setSpeeds=True,label='strainer')]
O.engines=O.engines+[PyRunner(iterPeriod=5,command='addPlotData()',label='plotDataCollector')]
O.engines=O.engines+[PyRunner(iterPeriod=1,command='calcul()',label='Rate')]
def addPlotData():
yade.plot.addData(t=O.iter,Upper_z=O.bodies[3].state.pos[2],Lower_z=O.bodies[2].state.pos[2],F_z=O.forces.f(3)[2])
plot.plots={'t':('Upper_z',),'t ':('Lower_z'),' t':('F_z')}
plot.plot()
alpha= 0.5
O.step()
def calcul():
kn_a= 1.98e8
Gz= alpha/(kn_a*O.dt)
F_z=O.forces.f(3)[2]
goal_z=abs(math.sin(O.iter*1e-4)*1e7+1e7)
Uz= Gz*(F_z-goal_z)
if O.iter < 300000:
if abs((F_z-goal_z)/goal_z)< 0.005:
strainer.strainRate=0.0;
O.run(3);
else:
strainer.strainRate=Uz/4
O.run(3);
else:
print 'finished';
exit
qt.View()
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.