Plotting force, unit question.

Asked by Szabó Bence

Hello Yade friends!

I'm trying to simulate a tillage tool - soil interaction. I plotted the draft force, but on the diagram i see 1e11 scale at the force number, but it should be around 1e3 in Newton.
The density [kg/m3], the young modulus [Pa], the dimensions of the box, spheres, tool are in [mm].
Am I wrong something with units in my code?

Thanks for your helping!

My code:

from yade import pack, plot, qt

talaj=O.materials.append(FrictMat(density=2600,young=6e7,poisson=0.25,frictionAngle=radians(30),label="01"))
acel=O.materials.append(FrictMat(density=7850,young=2e8,poisson=0.3,frictionAngle=radians(30),label="02"))

O.bodies.append(geom.facetBox((109.14,200,940),(280,320,750),wallMask=55,fixed=True,material='02'))

sp=pack.SpherePack()
c4=pack.SpherePack([((0,0,0),5),((9.8,0,0),4.75),((5.1,7.4,0),4),((5.1,-7.7,0),4.25),((5.1,0,8),4.5)])

sp.makeClumpCloud((-170.86,-120,190),(389.14,740,1690),
                  [c4],

                  num=-1)
sp.toSimulation(color=(0.45,0.28,0.0),material='01')

from yade import ymport

kes=O.bodies.append(ymport.stl('nkapa.STL',wire=False,material='02',color=(0.5,0.5,0.5)))

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(

  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
    TranslationEngine(translationAxis=[0,0,1],velocity=0,ids=kes),
 NewtonIntegrator(gravity=(0,-9.81,0),damping=0.2),

 PyRunner(command='checkUnbalanced()',realPeriod=0.2),

 PyRunner(command='addPlotData()',iterPeriod=100)

]

O.dt=.5*PWaveTimeStep()

def checkUnbalanced():
    if unbalancedForce()<0.1:
        O.engines[3].velocity=4

def addPlotData():

 Fz=sum(O.forces.f(id)[2]for id in kes)
 plot.addData(Fz=Fz*-1,t=O.time,unbalanced=unbalancedForce(),i=O.iter)

plot.plots={'t':('Fz')}

plot.plot()

O.saveTmp()

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Szabó Bence
Solved:
Last query:
Last reply:
Revision history for this message
Karol Brzezinski (kbrzezinski) said (last edit ):
#1

Hi,

I think that you should be consistent with units and use meters for the dimensions of the box, spheres, tool. The forces acting on the tool originates mostly from gravity. Your dimension is three orders of magnitude too big, thus mass is overestimated nine orders of magnitude. Mass influences the vertical load, load influences frictional force, etc. In the end, you get the results too big 1e9 times.

Best wishes,
Karol

PS And one loosely related comment - you will be disappointed by the simulation speed, when you will start to use proper units :)

Revision history for this message
Szabó Bence (bencusur) said :
#2

Hello,
Thanks for your reply.
I exactly know the parameters of the tool i designed it in solidworks then exported to stl then imported into the simulation (width 220mm, lenght 175, height 500mm ). I compared the sizes of the tool and the box so i set these parameters and im only guessing the parameters are in mm.
I tought the sizes of the box are 560mm x 640mm x 1500 mm, and the spheres similarly mm.
Is it true?

Thanks for your helping!

Cheers,
Bence

Revision history for this message
Karol Brzezinski (kbrzezinski) said :
#3

You haven't provided the *.stl file, and I cannot run your example. However, I am quite sure that Yade doesn't exchange unit information with Solidworks by your *.stl file. Just change units to meters in Solidworks and export again if you are not convinced.

Cheers,
Karol

Revision history for this message
Szabó Bence (bencusur) said :
#4
Revision history for this message
Szabó Bence (bencusur) said :
#5

Thank you for your advice!
I think i solved the problem.
I exported the *.stl in meter after that i changed the dimensions of the box and the spheres.
I tought that the dimensions i set is in mm but its in m, my fault.

Thanks again!

Cheers,
Bence