yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20821
Re: [Question #684213]: microstrain field
Question #684213 on Yade changed:
https://answers.launchpad.net/yade/+question/684213
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
> It seems that I can just get one VTK file.
> TW.defToVtk("strain.vtk")
you specified only one file name, so you get only one file.
Have a look at [2] for an idea how to save multiple files. Will need some modification for PyRunner, something like:
###
class TWExporter:
def __init__(self,base):
self.base = base
self.i = 0
def export(self):
TW.setState(1)
TW.defToVtk("strain_{:03d}.vtk".format(self.i))
self.i += 1
twExporter = TWExporter("strain")
O.engines = [
...
PyRunner(...,command="twExporter.export()"),
]
###
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.