← Back to team overview

yade-users team mailing list archive

[Question #631650]: makecloud and export

 

New question #631650 on Yade:
https://answers.launchpad.net/yade/+question/631650

Hi,
      I'm a new yade user. I plan to make a module and the export format is STL, but I find in my code ,when I define the material of the particle ,my gravity engine doesn't work ,and I can't find the effective way to export it. Could anyone give me a clue of what is going on?
Thanks a lot in advance.
   ZDJ

*******code *********
# !/usr/bin/python
# -*- coding: utf-8 -*-

###########################
# IMPORT MODULES
###########################

from yade import export
from yade import pack
from yade import qt

###########################
# DEFINE MATERIALS
###########################

steel=FrictMat(young=2.06e11,poisson=0.29,density=7861,frictionAngle=0.0,label='steel')
O.materials.append(steel)

###########################
# DEFINE PRED & MAKECLOUD
###########################

# create lower plank
plank=O.bodies.append(geom.facetBox(center=(0.0125,0.025,0),extents=(0.0125,0.025,0.00125),wire=False))
sp=pack.SpherePack()
sp.makeCloud((0,0,0.00125),(0.025,0.05,0.008),rMean=0.0006,rRelFuzz=0.5)
sp.toSimulation(color=(0.8,0.8,0.8),material='steel')

# create aabbwalls and delete the -z & +z walls
walls=aabbWalls(oversizeFactor=1.0)
O.bodies.append(walls)
O.bodies.erase(walls[4].id)	# delete wall in -z axis 
O.bodies.erase(walls[5].id)	# delete wall in +z axis

###########################
# ENGINES
###########################
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_CundallStrack()]
	),
	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
]

O.dt=0.8*PWaveTimeStep()
# O.step()

qt.View()
qt.Controller()

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.