problems when using templates to generate a clumps model
Ive made a model with spheres to represent pircas in Peru ( very similar to the function of a dry stone retaining walls) and now for comparing results and making my model more representative to the form of the rocks, Im using clumps . I use templates and when running it , what only appears is one sphere and not all clumps with the packing in the volume I want.
At my first attempt using templates,
Im copying the script in case i can have a hand with it. Thank you so much in advance.
from yade import pack, qt, plot
from numpy import arange
import numpy as np
import random
#DATOS DE ENTRADA
r=0.07
H=1 #altura del muro
B=.45 #base mayor
b=.25 #base menor
L=4 #longitud del muro
#EN SERVICIO
EmpujeTop=
EmpujeBottom=
damp=0.7
aceloutofplane=0
ii=0
# GEOMETRIA *******
a=(B-b)*.5
Vol1=pack.
Vol2=pack.
Vol3=pack.
Vol4=Vol1-
Esferas=
O.bodies.
relRadList1 = [.04,.03]
relPosList1 = [[0.035,
#peanut:
relRadList2 = [.05,.05]
relPosList2 = [[0,0,0]
relRadList4 = [0.025,
relPosList4 = [[0,0,0]
#stick:
relRadList3 = [0.05,0.
relPosList3 = [[.04,0,
templates= []
templates.
templates.
templates.
templates.
O.bodies.
# DEFINICION DEL MATERIAL *******
mat1 = JCFpmMat()
mat1.cohesion =0 #Pa32.37e3
mat1.density = 2821 #kg/m3
mat1.frictionAngle = radians(58.74) #rad
mat1.poisson = 0.18
mat1.young = 37.04e9 #Pa
# DEFINICION DE LA JUNTA *******
mat1.jointCohesion = 262000 #Pa
mat1.jointFrict
mat1.jointNorma
mat1.jointShear
O.materials.
# APLICACION DE FUERZAS *******
listSphereA=[]
listSphereB=[]
listSphereC=[]
listSphereD=[]
for x1 in O.bodies:
if isinstance(
listSphereA.
for x2 in O.bodies:
if isinstance(
listSphereB.
for x3 in O.bodies:
if isinstance(
listSphereC.
for x4 in O.bodies:
if isinstance(
listSphereD.
ha=1*H/8.000
hb=3*H/8.000
hc=5*H/8.000
hd=7*H/8.000
m=EmpujeBottom-
Ea=m*ha+EmpujeTop
Eb=m*hb+EmpujeTop
Ec=m*hc+EmpujeTop
Ed=m*hd+EmpujeTop
Fa=Ea*(
Fb=Eb*(
Fc=Ec*(
Fd=Ed*(
def aplicarFuerzaA():
for i in listSphereA:
O.forces.
def aplicarFuerzaB():
for i in listSphereB:
O.forces.
def aplicarFuerzaC():
for i in listSphereC:
O.forces.
def aplicarFuerzaD():
for i in listSphereD:
O.forces.
# CONDICIONES DE BORDE *******
Borde1=
Borde2=
Borde3=
Borde4=
O.bodies.
O.bodies.
O.bodies.
O.bodies.
listSphereBase=[]
for i in listSphereBase:
O.bodies[
# DEFINICION DE FUNCIONES *******
for m in O.bodies:
if isinstance(
listSphereBas
listSphereTodo=[]
for i in listSphereTodo:
O.bodies[
def checkUnbalanced():
print ('iter %d, unbalanced forces = %f'%(O.iter, utils.unbalance
print 'Fzas en c/ esfera (N)', Fa, Fb, Fc, Fd
print ( 'Desplazamiento superior'
listTopBodies=[]
for z1 in O.bodies:
if isinstance(
listTopBodies
w=max(listTopBo
def addPlotData():
plot.addData(
plot.plots=
# ENGINE *******
O.engines=[
ForceResetter(),
InsertionSort
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegra
PyRunner(
PyRunner(
PyRunner(
PyRunner(
PyRunner(
PyRunner(
VTKRecorder(
]
for b in O.bodies:
b.mat=mat1
b.state=
# DETALLES FINALES *******
O.dt=0.
plot.plot(
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.
R.bgColor=
V.screenSize = (900,900) # tamano de pantalla
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: