← Back to team overview

yade-users team mailing list archive

[Question #633047]: calculate the overall energy in JCFpmMat

 

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

Hi,

https://answers.launchpad.net/yade/+question/632448, in this thread, totalShearCracksE was introduced. 
I add this into my simulation, but got an error: 

AttributeError: No such attribute: totalShearCracksE

My code segment is as follows:

O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.0),Bo1_Box_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.0),Ig2_Box_Sphere_ScGeom()],
		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,totalShearCracksE=0.,totalTensCracksE=0.)]
	),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
	NewtonIntegrator(damping=0.6,gravity=(0,0,-9.8)),
	PyRunner(command='addPlotData()',iterPeriod=100),

]
O.trackEnergy=True
O.step()

def addPlotData():
     Dis = -wall.state.displ()[2]
    shearE = totalShearCracksE
    tensileE = totalTensCracksE
    plot.addData(Dis=Dis,sE=shearE,tE=tensileE)
plot.plots={'Dis':('shearE','tensileE')}
plot.plot()

I am a new user of Yade, thus this question may be a very easy one, but it beyonds my capability.

Thanks for your help,
Xavier

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