我在python中使用一个名为pyansys
的库,其中使用了一种名为save_as_vtk
的方法。
此方法为我生成一个文件,并将其保存到我的工作目录中。我希望将该文件保存在其他位置...我不希望它移动,因为有时它是20 Gb以上,并且会花费太长时间。
有人有想法吗?
谢谢!
我是pyansys
软件包的维护者。
此问题在https://github.com/akaszynski/pyansys/issues/219中回答
此处重复:
似乎ResultFile.save_as_vtk已经具有文件名参数:
def save_as_vtk(self, filename, rsets=None, result_types=['ENS']):
"""Writes results to a vtk readable file.
The file extension will select the type of writer to use.
``'.vtk'`` will use the legacy writer, while ``'.vtu'`` will
select the VTK XML writer.
Parameters
----------
filename : str
Filename of grid to be written. The file extension will
select the type of writer to use. ``'.vtk'`` will use the
legacy writer, while ``'.vtu'`` will select the VTK XML
writer.