← Back to team overview

yade-users team mailing list archive

[Question #234129]: plastic energy dissipation

 

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

Hello all,

I am trying to calculate plastic energy dissipation according to yade’s source code and trying to compare it with O.energy.item(). Unlucky, they are not consistent and I have no idea where is wrong. I need your suggestions. 

Here is the main part 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()

Thanks.
Best regards.
Lingran


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