yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01426
Re: RockPM problem
Please, take it
______________________________
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями
Anton Gladkyy
2009/7/8 Václav Šmilauer <eudoxos@xxxxxxxx>
> Can you provide some simple script that fails?
>
> I had a look at your code in SVN, it seems OK. It is enough if you have
> just a few spheres. Did you add Ip2_RpmMat_RpmMat_RpmPhys() to the
> InteractionDispatchers/InteractionPhysicsMetaEngine?
>
> V.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help : https://help.launchpad.net/ListHelp
>
from yade import pack
from yade import utils
from math import *
import yade.plot
from euclid import *
#_______________________________________________________________________
PI = 3.14159265;
a = 62 #Size a, [mm] X
b = 40 #Size b, [mm] Y
h = 33 #Size h, [mm] Z
grainSize = 10 #Grain size, [mm]
distBetweenGrains = 0 #Distance between grains, [mm]
rho=1000 #Grain density, [kg/m^3]
poisson = 0.3 #Poisson coefficient
young = 30e9 #Young module
frictionAngle = 0.52 # Friction angle
boxThick = 3 #Box thickness, [mm]
boxHeight = 10 #Box height, [mm]
boxCoef = 3 #In how many times box larger, than an example
pressCoef = 1.5 #In how many times press larger, than an example
#_______________________________________________________________________
a = 0.001*a
b = 0.001*b
h = 0.001*h
grainSize = 0.001*grainSize
distBetweenGrains = 0.001*distBetweenGrains
boxThick = 0.001*boxThick
boxHeight = 0.001*boxHeight
physClass = 'RpmMat'
#_______________________________________________________________________
kw={'density':rho,'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'physParamsClass':physClass}
kw_facets={'frictionAngle':frictionAngle,'color':[0.98,0.984,0.576],'young':2e11,'dynamic':False,'physParamsClass':physClass}
kw_press={'frictionAngle':frictionAngle,'color':[0.757,0.278,0.976],'young':2e11,'dynamic':False,'physParamsClass':physClass}
ids_spheres=O.bodies.append(pack.regularHexa (pack.inAlignedBox((-a/2,-b/2,-boxHeight/2*boxCoef),(a/2,b/2,h-boxHeight/2*boxCoef)),radius=grainSize/2,gap=distBetweenGrains,color=(0.282,0.875,1),**kw))
#box
O.bodies.append(utils.alignedFacetBox((0,0,0),(a*boxCoef,b*boxCoef,boxHeight/2*boxCoef),31,**kw_facets))
#press
id_press=O.bodies.append(utils.facet([[(1.5*a*pressCoef),0,h/2+a/50],[(-a/2*pressCoef),(b*pressCoef),(h/2+a/50)],[(-a/2*pressCoef),(-b*pressCoef),(h/2+a/50)]],**kw_press))
#_______________________________________________________________________
try:
from yade import qt
qt.Controller()
except ImportError: pass
O.engines=[
BexResetter(),
BoundingVolumeMetaEngine([InteractingSphere2AABB(),InteractingFacet2AABB(),MetaInteractingGeometry2AABB()]),
InsertionSortCollider(),
InteractionDispatchers(
[ef2_Sphere_Sphere_Dem3DofGeom(),ef2_Facet_Sphere_Dem3DofGeom()],
[SimpleElasticRelationships()],
[Law2_Dem3DofGeom_RockPMPhys_Rpm()]
#[Law2_Dem3DofGeom_SimplePhys_Simple()]
),
GravityEngine(gravity=[0,0,-9.81]),
NewtonsDampedLaw(damping=.5)
]
#______________________________________________________________________PLOT___________________________________________________
#yade.plot.plots={'i':('t'),'t':('z_sph',('v_sph','g^'))}
yade.plot.plots={'t':('x_sph',('v_sph'))}
#yade.plot.plots={'t':('F')}
#yade.plot.plots={'t':('Sigma')}
def myAddPlotData():
## store some numbers under some labels
sph=O.bodies[ids_spheres[2]]
yade.plot.addData({'t':O.time,'i':O.iter,'x_sph':sph.phys['se3'][0],'v_sph':sqrt(sum([v**2 for v in sph.phys['velocity']]))})
#______________________________________________________________________PLOT___________________________________________________
O.dt=utils.PWaveTimeStep()
O.saveTmp('init')
from yade import qt
qt.Controller()
O.run(200000)
Follow ups
References