← Back to team overview

yade-users team mailing list archive

Re: [Question #234129]: plastic energy dissipation

 

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

lingran gave more information on the question:
sorry for the mistakes. Here is the new version of my code:

aa=dict(O.energy.items())
E=aa['plastDissip']
f=open('plastic energy dissipation.txt','w')

for k in range (1,4000):
        O.run(1,True)
        aa=dict(O.energy.items())
        for i in O.interactions:
                Ft=i.phys.shearForce
                du=i.geom.shearInc
                kt=i.phys.ks
                Fn=i.phys.normalForce
                Ftt=Ft-kt*du
                maxFs=Fn.norm()*i.phys.tangensOfFrictionAngle

                if(Ftt.norm() > maxFs):
                        ratio = maxFs / Ftt.norm()
                        trialForce=Ftt
                        Ftt *= ratio
                        e=((1/kt)*(trialForce-Ftt)).dot(Ftt)
                        E=E+e

        f.write('%d %f %f %f\n' %(O.iter,O.time,E,aa['plastDissip']))

f.close()

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.