Positive and negative alternating loading

Asked by 内山康太郎

I am Japanese. Sorry for my rude English ...

and, I am new to yade .... I am also new to programming and DEM.

In the simple shear test in the tutorial, a positive shear force is applied to the stress σxz until a threshold shear strain is reached.

But,I want to apply a positive shear stress to stress σxz and then a negative shear force to stress σxz.
Could you please give me some advice or program.

Examples with tutorial (Periodic simple shear)↓
https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/04-periodic-simple-shear.py

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> a positive shear force is applied

no, the script applies strain (of course, stress is then a consequence) [1]

> I want to apply a positive shear stress to stress σxz and then a negative shear force to stress σxz.

if you are ok with the same approach (apply strain), then simply:
###
O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0)
# some running until "then"
O.cell.velGrad = Matrix3(0, 0, -.1, 0, 0, 0, 0, 0, 0) # note the opposite non-zero value
###

Cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/04-periodic-simple-shear.py#L75

Revision history for this message
内山康太郎 (kenkoutaro) said :
#2

Thank you very much, Jan.

I have one more question.
How can I execute O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0, 0) followed by O.cell.velGrad = Matrix3(0, 0, -.1, 0, 0, 0, 0, 0, 0, 0)

Can you please give me a program to do this?

Revision history for this message
Jan Stránský (honzik) said :
#3

Something like
###
O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0, 0)
O.step()
O.cell.velGrad = Matrix3(0, 0, -.1, 0, 0, 0, 0, 0, 0, 0)
###
?

Please be more specific

Basically you have it in [1], first isotropic compression, then shear. You do the same approach, just with different velGrad values.

Cheers
Jan

Revision history for this message
内山康太郎 (kenkoutaro) said :
#4

>Please be more specific
Absolutely.

1st, isotropic compression

2nd, add positive shear
 (O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0, 0))

3rd. Proceed with analysis for positive the distorsion value (shear strain)
 (abs(O.cell.trsf[0, 2]) > .5)

4th. add negative shear
 (O.cell.velGrad = Matrix3(0, 0, -.1, 0, 0, 0, 0, 0, 0, 0))

5th, Proceed with analysis for negative the distorsion value (shear strain)
 (abs(O.cell.trsf[0, 2]) > .5)

6th, add positive shear
(O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0, 0, 0))

We want to loop from the second to the sixth.

An image of the loop is shown in the URL below.
I want to obtain a curve (stress-strain curve of soil) plotting stress σ on the vertical axis and strain γ on the horizontal axis.

 URL: https://www.researchgate.net/figure/Hyperbolic-model-of-the-stress-strain-space-for-a-soil-under-cyclic-loading-Initial_fig2_324525212

Revision history for this message
Best Jan Stránský (honzik) said :
#5

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

Revision history for this message
内山康太郎 (kenkoutaro) said :
#6

I can't thank you enough.

Revision history for this message
内山康太郎 (kenkoutaro) said :
#7

Thanks Jan Stránský, that solved my question.