yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #05797
Re: [Question #192224]: MemoryError in saveTmp
Question #192224 on Yade changed:
https://answers.launchpad.net/yade/+question/192224
Status: Answered => Open
ceguo is still having a problem:
Hi Bruno,
Thanks for your reply.
-To encapsulate a simulation and call from python, I use the module `yadeimport` adapted from `yade-trunk`. Actually it is provided by Jan. My previous solution is copying all the libraries to the python lib directory properly, which also works smoothly. Here I show how to use yadeimport:
=====================================================
from yadeimport import *
from yade.wrapper import *
from yade import pack
class simDEM(object):
def __init__(self,sd=1):
self.__id='thread'+str(sd)
self.__O=Omega()
self.__O.materials.append(FrictMat(young=1e9,poisson=1.,frictionAngle=.3,density=2650))
self.__sp=pack.SpherePack()
self.__sp.makeCloud(minCorner=(0,0,0),maxCorner=(20,20,0),rRelFuzz=.5,num=2000,periodic=True,porosity=0.28,seed=sd)
self.__sp.toSimulation()
self.__O.cell.hSize=utils.Matrix3(20,0,0, 0,20,0, 0,0,1)
for p in self.__O.bodies:
p.state.blockedDOFs='zXY'
self.__O.dt=.5*utils.PWaveTimeStep()
def consolidate(self,stress=(-2.e6,-2.e6,0,0,0,0)):
...
def finalize(self):
self.__O.exitNoBacktrace()
For `yadeimport`, I can send to anyone interested in this method (Jan
sent to me). This method is useful for coupled problems as in my case I
coupled yade with another FEM code.
-As my test is very time-consuming, I usually run during night. So I
didn't monitor the RAM usage. Just when I came back in the morning, I
saw the error message.
Ning
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.