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

    Status: Answered => Open

Ziyu Wang is still having a problem:
Hello,
Sorry for post a MWE that can not run..(My original intention is to worry about 
the trouble caused by too long code),I will post my script that can be run.
>>Are you trying to set that value? It is just an output quantity, it is not a 
>>user input. 
In fact, I didn't clearly express my meaning. I mean that I keep running, and 
the strain value has been large (=0.4), but there is still no stress-softening 
stage(the stress did not decrease rapidly,which represent failure,I guess)

Following is my script:
###########
from yade import pack,plot, utils, export, timing
import numpy as np
damp=0.2
stabilityThreshold=0.01
key='_triax_base_'
young=3.18e9

mn,mx=Vector3(0,0,0),Vector3(0.05,0.05,0.05)
O.materials.append(JCFpmMat(type=1,density=2000,young=9e9,poisson=0.3,tensileStrength=2e7,cohesion=2e7,frictionAngle=radians(20),label='sphere'))
O.materials.append(JCFpmMat(type=1,frictionAngle=0,density=0,label='wall'))

walls=aabbWalls([mn,mx],thickness=0,material='wall')
wallIds=O.bodies.append(walls)

sp=pack.SpherePack()
pred=pack.inAlignedBox(mn,mx)
sp=pack.randomDensePack(pred,radius=0.0015,rRelFuzz=0.333,returnSpherePack=True,memoizeDb='/tmp/triax.sqlite')
spheres=sp.toSimulation(material='sphere')

triax=TriaxialStressController(
        maxMultiplier=1.+2e4/young, 
        finalMaxMultiplier=1.+2e3/young, 
        thickness = 0,
        stressMask = 7,
        internalCompaction=True, 
)
newton=NewtonIntegrator(damping=damp)

def recorder():
        yade.plot.addData(
        i=O.iter,
        e11=-triax.strain[0],e22=-triax.strain[1],e33=-triax.strain[2],
        s11=-triax.stress(triax.wall_right_id)[0],
        s22=-triax.stress(triax.wall_top_id)[1],
        s33=-triax.stress(triax.wall_front_id)[2],
        numberTc=interactionLaw.nbTensCracks,
        numberSc=interactionLaw.nbShearCracks,
        unb=unbalancedForce()
)
        plot.saveDataTxt('triax_JCFPM_Wy=1.5Mpa,rate=-0.03')

O.engines=[
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
        InteractionLoop(
                [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
                [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys()],
                
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,Key='triax_JCFPM_Wy=1.5Mpa,rate=-0.03',label='interactionLaw')]
        ),
        
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8),
        triax,
        TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+key),
        newton,
        
PyRunner(iterPeriod=int(1000),initRun=True,command='recorder()',label='data',dead=0),
]

triax.goal1=triax.goal2=triax.goal3=-1.5e6
while 1:
        O.run(500,1)
        unb=unbalancedForce()
        print('unbalanced force:',unb,'mean stres:',triax.meanStress)
        if unb<stabilityThreshold : 
                break

triax.internalCompaction=False
triax.stressMask=3
triax.goal1=-1.5e6
triax.goal2=-1.5e6
triax.goal3=-0.03


plot.plots={'e33':('s33',None,'unb'),'i':('numberTc','numberSc',None,'s33')}
plot.plot()
O.run()
################
Thanks!

-- 
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     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to