viscelastic contact

Asked by emnaemna

This is my script. I didn't know why the script doesn't work?
I want to define the property of my material ( young poisson density ) and i want utilise this contact law .
Where is the problem
# -*- coding: utf-8
from yade import qt, plot
# Parameters
tc=0.001# collision time
en=0.3 # normal restitution coefficient
es=0.3 # tangential restitution coefficient
frictionAngle=radians(35)#
density=2700
young=69.0e9
poisson= 0.346
params=getViscoelasticFromSpheresInteraction(tc,en,es)
# default spheres material
dfltSpheresMat=O.materials.append(ViscElMat(poisson=poisson,density=density,frictionAngle=frictionAngle,**params))
O.dt=.002*tc # time step
# add 2 particles to the simulation
# they the default material (utils.defaultMat)
O.bodies.append([
   # fixed: particle's position in space will not change (support)
   utils.sphere(center=(0.5,0.5,0.5),radius=.2,fixed=True,material=dfltSpheresMat),
   # this particles is free, subject to dynamics
   utils.sphere((0.5,0.5,1),radius=.2,material=dfltSpheresMat)
])

# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom()], # collision geometry
      [Ip2_ViscElMat_ViscElMat_ViscElPhys()], # collision "physics"
      [Law2_ScGeom_ViscElPhys_Basic()], # contact law -- apply forces
   ),
   NewtonIntegrator(damping=0.0,gravity=(0,0,-9.81)),
   PyRunner(command='myAddData()', iterPeriod=20)
]

plot.plots={
        'i':('t',), # plot t(i)
        't':('v1','z1') # v1(t)
}
def myAddData():
        b=O.bodies[1]
        plot.addData(z1=b.state.pos[2], v1=b.state.vel.norm(), i=O.iter, t=O.time)

plot.plot(subPlots=False)

O.saveTmp()

## to see it
qt.View()

O.run()

Best Regards

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hien Nguyen (giahien) said :
#1

Hi,

I run your script and receive error:
AttributeError: No such attribute: poisson

Which version of YADE are you using?
As I check for my version (Yade-1.07.0), here is the properties of ViscElMat:
-----
ViscElMat.Capillar ViscElMat.frictionAngle ViscElMat.mro
ViscElMat.CapillarType ViscElMat.gamma ViscElMat.mRtype
ViscElMat.cn ViscElMat.id ViscElMat.newAssocState
ViscElMat.cs ViscElMat.kn ViscElMat.theta
ViscElMat.density ViscElMat.ks ViscElMat.updateAttrs
ViscElMat.dict ViscElMat.label ViscElMat.Vb
ViscElMat.dispHierarchy ViscElMat.massMultiply
ViscElMat.dispIndex ViscElMat.mR
-----
There is no 'poisson' there.
Though 'poisson' still stated in documentation [1], I don't know why, some developer will give you correct answer.

Other point, when you use the function getViscoelasticFromSpheresInteraction(tc,en,es) [2]
It already gave the material kt and kn. (Attention, it's marked as deprecated.)

For instance you can modify you code from:
dfltSpheresMat=O.materials.append(ViscElMat(poisson=poisson,density=density,frictionAngle=frictionAngle,**params))
to:
dfltSpheresMat=O.materials.append(ViscElMat(density=2700,frictionAngle=radians(35),**params))
That should work.

ps.
Someone please correct me if I said something incorrect as I don't use this kind of material.
Regards.
[1] https://yade-dem.org/doc/yade.wrapper.html?highlight=viscelmat#yade.wrapper.ViscElMat
[2] https://yade-dem.org/doc/yade.utils.html#yade.utils.getViscoelasticFromSpheresInteraction

Revision history for this message
emnaemna (emna-masmoudi92) said :
#2

I want to use The Aluminuim material and i want to use viscoelastic contact ... There is no solution?
I can make
FrictMat(young=young,poisson=poisson,density=density,frictionAngle=frictionAngle)
I want to make the same thing with ViscElMat(young=young,poisson=poisson,density=density,frictionAngle=frictionAngle,**params) because i want to use the viscoelastic contact law .

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.