yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #19940
[Question #681461]: Use of randomDensePack
New question #681461 on Yade:
https://answers.launchpad.net/yade/+question/681461
Hi , Im from Peru and I started using yade like one month ago to make a model of the behaviour of a dry stone retaining wall called "pircas" here.
By now, Im looking for the angle of repose of the stones .I was trying to use makeclouds, but the porosity when changing parameters only gives me back something not representative for what im looking for. Im looking for a model with more density,thats why i looked for other ways and i found the function randomDensePack.
I have two questions:
First, what function for densing the initial pack can be helpful to use?
Second,in case randomDensePack is the alternative:
1. In the manual,i could see that it is used for TriaxialTest but that is not the test that i want.
When using randomDensePack ,it can be used only to simulate an initial boundary? or how can i delete the triaxial test influence of the function? Is there any parameter to vary for the purpose?
2. Im sharing the script,in case im making some mistake please let me know.And if possible, could you let me know if this script can be representative for knowing the angle of repose.
from yade import pack, qt, plot
from math import *
acely=0 # aceleracion cte fuera de plano
damping=0.8 # simulacion pseudo estatica
# Definicion del material mat1 para la pirca **********
mat1=FrictMat()
mat1.density = 2.821e3 #kg/m3
mat1.frictionAngle = radians(58.74)
mat1.young = 31.04e8
mat1.poisson = 0.18
O.materials.append(mat1)
pred=pack.inAlignedBox((0,0,0),(4,4,4))
spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=.15,rRelFuzz=0,material=mat1,returnSpherePack=True)
spheres.toSimulation()
#Imprime la cantidad total de cuerpos
Q=len(O.bodies)
print 'numero de cuerpos', Q
# Definicion del piso
piso=utils.wall(position=Vector3(0,0,0), axis=2, sense=0, material=mat1, color=(0.5,0.5,0.5))
O.bodies.append(piso)
# Definicion del verificador de la fuerza de desbalance
def checkUnbalanced():
print ((O.iter, utils.unbalancedForce(), utils.sumForces([5],(0,0,1)), O.bodies[5].state.pos[2]))
#'iter %d, unbalanced forces = %f, suma de fuerzas en eje vertical = %f, posicion respecto de la base= %f'
#devuelve la fuerza resultante del body proyectado en el eje vertical
if unbalancedForce()<.0001: # para asegurar la estabilidad
O.pause()
# Definicion de los sujetos a plotear
def addPlotData():
plot.addData(iter_clumps=O.iter, unbal=unbalancedForce())
plot.plots={'iter_clumps':'unbal'}
# MOTOR DEL ALGORITMO DEM
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()], # interaccion geometrica
[Ip2_FrictMat_FrictMat_FrictPhys()], # interaccion fisica
[Law2_ScGeom_FrictPhys_CundallStrack()] ),# leyes de contacto - aplicacion de fuerzas,
NewtonIntegrator(damping=damping,gravity=[0,acely,-9.81]), # aplicacion de la gravedad
PyRunner(command='checkUnbalanced()',iterPeriod=1000,label='checker'),
# llama al checkunbalanced cada 1000 iteraciones
PyRunner(command='addPlotData()',iterPeriod=1000), # llama al addPlotData cada 1000 iteraciones
# Detalles de la simulacion
O.dt=0.5*PWaveTimeStep() # establece el intervalo de tiempo como una fraccion del
plot.live=True # ploteo en tiempo real
qt.Controller() # abre la ventana del controlador
V=qt.View() # abre la ventada de la vista
R=yade.qt.Renderer() # llama a la renderizacion
R.bgColor=(1.,1.,1.) # definel color blan
#end
Thank you in advance ,
Grace Mejico
--
You received this question notification because your team yade-users is
an answer contact for Yade.