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

Hello,
I am trying to write a tension test script on a grid, so i can calibrate my 
grid parameters,
My script is based on the example : 
trunk/examples/grids/CohesiveGridConnectionSphere.py
The problem is that the velocity is applied instantly not permanently, so the 
force in my grid go through an oscillation once the velocity is applied, even 
if the iterperiod is set to 1,
The tension force in my grid does not cumulate; it goes through the same value 
and then return to the initial state for every velocity application, 
Therefore, I cannot reach the rupture state, 
Anyone can help my with this problem?
This is my script,
# materials properties

O.materials.append(CohFrictMat(young=20e5,poisson=0.3,density=3e2,frictionAngle=radians(10),normalCohesion=8.5e6,shearCohesion=8.5e6,momentRotationLaw=True,label='spheremat'))


# functions and laws


O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_GridConnection_Aabb()]),
    InteractionLoop([Ig2_GridNode_GridNode_GridNodeGeom6D()],
    
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
    [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]),
    GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.7),
    NewtonIntegrator(gravity=(0,0,-10),damping=0.9,label='newton'),
    PyRunner(command='history1()',iterPeriod=100,label='recorder',dead=True),
    
PyRunner(iterPeriod=20,command='myAddPlotData()',label='recorder1',dead=True)
    ]

L=0.6 #length[m]  
l=0.21 #width[m] 
nbL=21
nbl=8
r=0.006
nodesIds=[]
color=[255./255.,102./255.,0./255.]
for i in range(0,nbL):
    for j in range(0,nbl):
        
nodesIds.append(O.bodies.append(gridNode([0,j*l/(nbl-1),-i*L/(nbL-1)],r,wire=False,fixed=False,material='spheremat',color=color)))
        
#Create connection between the nodes
for i in range(0,len(nodesIds)):
        for j in range(i+1,len(nodesIds)):
                dist=(O.bodies[i].state.pos - O.bodies[j].state.pos).norm()
                if(dist<=(L/(nbL-1))*1.01):
                        O.bodies.append(gridConnection(i,j,r,color=color))

#nodes fixe :
for i in range (0,72):
    O.bodies[i].state.blockedDOFs='xyzXYZ'

#apply the tension force :
def history1():

    global Fn,Ft

    if O.iter>5000:
        for i in range (len(nodesIds)-72,len(nodesIds)):
            O.bodies[i].state.dynamic=False
            O.bodies[i].state.vel[2]=-0.0002


plot.plots={'epz':('Fz')}

#plot tension force in grid :
def myAddPlotData():
    
    
    
F=(abs(O.forces.f(64)[2])+abs(O.forces.f(65)[2])+abs(O.forces.f(66)[2])+abs(O.forces.f(67)[2])+abs(O.forces.f(68)[2])+abs(O.forces.f(69)[2])+abs(O.forces.f(70)[2])+abs(O.forces.f(71)[2]))/(210)
    s1=O.bodies[68]
    s2=O.bodies[100]
    ep=((s2.state.pos-s1.state.pos).norm()-(4*0.03))*100/(4*0.03)

    plot.addData(Fz=F,epz=ep)

    #plot.saveDataTxt('dataFile.txt.bz2',vars=('Fz','epz'))


plot.plot()
recorder.dead=False
recorder1.dead=False
O.run(100000,True)


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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to