← Back to team overview

yade-users team mailing list archive

Re: [Question #404550]: import particles to another script

 

Question #404550 on Yade changed:
https://answers.launchpad.net/yade/+question/404550

Jérôme Duriez proposed the following answer:
Hi,

In addition to just use .yade save with O.save() and O.load(), you may
use the following method.


First, use the export.text() function [1] to export the generated particles as a list in a text file

Second, during "next simulation", use this text file through
ymport.text() [2] function: you need to run
O.bodies.append(ymport.text()) to actually import the particles in your
new simulation

You previously need to import the export and ymport modules to access these functions:
from yade import ymport,export


The history in terms of shear relative displacement and shear contact forces is lost with this method (which had never been an issue for me)


[1] https://yade-dem.org/doc/yade.export.html#yade.export.text
[2] https://yade-dem.org/doc/yade.ymport.html#yade.ymport.text

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