← Back to team overview

yade-users team mailing list archive

[Question #685081]: cannot get contact forces from my code

 

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

Hello all and thank you for your help in advanced.

I am using Yade-2019-08-08.git-775ae74 on Ubuntu18.04

I have coded a Trixial test as bellow and have some questions, but the most important one is the 5th question.
1- When I run my code, no plot will show up however I coded plotting commands
2- The strange problem is when I try to modify my code a little, I get nothing (or a filled 1-color page) as the 3D show of the specimen. 
3- The timp steps are so low and run will take a long time (more than 1 hour)
4- I cannot save the dada as a text file that I coded its command at the end of my code
5- I do not know how can I get micro information such as contact forces through my code
6- I do not see on the screen the printed test text I used in my code.
7- please let me know if I have any other problem with my code

Also, I get these warnings when I run my code:



This is my code:
In [1]: <WARNING> InsertionSortCollider:261 virtual void InsertionSortCollider::action(): verletDist is set to 0 because no spheres were found. It will result in suboptimal performances, consider setting a positive verletDist in your script.
<WARNING> Shop:445 static Real Shop::PWaveTimeStep(boost::shared_ptr<Scene>): PWaveTimeStep has not found any suitable spherical body to calculate dt. dt is set to 1.0


from yade import pack, plot
sp=pack.Spherepack()
mn, mx=Vector3(0,0,0), Vector3(10,10,10)
sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=0.2,num=2000,porosity=0.5)	
sp.toSimulation()
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=radians(30),density=2600,label='spheres'))	
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=0,density=0,label='frictionless'))	
walls=aabbWalls(thickness=1e-10,material='frictionless')	
wallIds=O.bodies.append(walls)	
O.bodies.append([sphere(center,rad,material='spheres') for center, rad in sp])
triax=TriaxialCompressionEngine(
	wall_bottom_id=wallIds[2],
	wall_top_id=wallIds[3],
	wall_left_id=wallIds[0],
	wall_right_id=wallIds[1],
	wall_back_id=wallIds[4],
	wall_front_id=wallIds[5],
	internalCompaction=False,
	sigmaIsoCompaction=-50e3,
	sigmaLateralConfinement=-50e3,
	max_vel=10,
	strainRate=0.01,
	label="triax",
)
O.engines=[
	ForceResetter(),	
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),	
	InteractionLoop(
	[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],	
	[Ip2_FrictMat_FrictMat_FrictPhys()],	
	[Law2_ScGeom_FrictPhys_CundallStrack()]	
	),
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	triax,
	NewtonIntegrato(gravity=(0,0,-9.81),damping=0.5)
	PyRunner(command='checkUnbalanced()',realPeriod=2),
	PyRunner(command='addPlotData()',iterPeriod=100),
	PyRunner(command='history()',iterPeriod=20)
]
O.dt=.5*PWaveTimeStep()
def history():
	plot.addData(i=O.iter,
	e11=-triax.strain[0],e22=-triax.strain[1],e33=-triax.strain[2],
	s11=-triax.stress(0)[0],s22=-triax.stress(2)[1],s33=-triax.stress(4)[2])
def addPlotData():
	plot.addData(unbalanced=unbalancedForce(),i=O.iter,**O.energy
		s11=-triax.stress[0],s22=-triax.stress[1],s33=-triax.stress[2],
		e11=-triax.strain[0],e22=-triax.strain[1],e33=-triax.strain[2],
		Etot=O.energy.total())
O.trackEnergy=True
def checkUnbalanced():
	if unbalancedForce()<.05:
		O.pause()
		plot.saveDataTxt('bbb.txt.bz2')
print "******  TEST TEXT  ******"
plot.plots={'i':('unbalanced'),'i ':('s11','s22','s33'),' i':('e11','e22','e33'),' i ':(O.energy.keys,None,'Etot'),}
Gl1_Sphere.stripes=True
O.run()
plot.plot()
O.saveTmp()
plot.saveDataTxt('results')


Thank you for your help.

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