← Back to team overview

yade-users team mailing list archive

Re: [Question #703791]: Positive and negative alternating loading

 

Question #703791 on Yade changed:
https://answers.launchpad.net/yade/+question/703791

Jan Stránský proposed the following answer:
Instant replay:
Basically you have it in [1], first isotropic compression, then shear. You do the same approach, just with different velGrad values.

MWE:
###
from yade import plot

coords = [1+2*i for i in range(4)]
O.bodies.append([sphere((x,y,z),1) for x in coords for y in coords for z in coords])
O.periodic = True
O.cell.setBox(8,8,8)

O.engines += [PyRunner(iterPeriod=1,command="addPlotData()")]

def addPlotData():
    stress = getStress()
    plot.addData(
        strainXZ = O.cell.trsf[0,2],
        stressXZ = stress[0,2],
    )
plot.plots = {"strainXZ":"stressXZ"}

# isotropic compression
O.cell.velGrad = Matrix3(-1,0,0, 0,-1,0, 0,0,-1)
while abs(getStress()[0,0]) < 1e6:
    O.step()

# cyclic loading
shearVelGrad = Matrix3(0,0,+0.1, 0,0,0, 0,0,0)
for cycle in range(3):
    # positive shear
    O.cell.velGrad = shearVelGrad
    while O.cell.trsf[0, 2] < .5:
        O.step()
    # negative shear
    O.cell.velGrad = -shearVelGrad
    while O.cell.trsf[0, 2] > -.5:
        O.step()

plot.plot()
###

Cheers
Jan

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