export_data

Project.export_data(phases=[], filename=None, filetype=None)[source]

Exports the pore and throat data from the given object(s) into the specified file and format.

Parameters
  • phases (list[GenericPhase]) – The data on each supplied phase will be added to file

  • filename (str) – The file name to use. If none is supplied then one will be automatically generated based on the name of the project containing the supplied Network, with the date and time appended.

  • filetype (str) –

    Which file format to store the data. If a valid extension is included in the filename, this is ignored. Option are:

    ’vtk’

    (default) The Visualization Toolkit format, used by various softwares such as Paraview. This actually produces a ‘vtp’ file. NOTE: This can be quite slow since all the data is written to a simple text file. For large data simulations consider ‘xdmf’.

    ’csv’

    The comma-separated values format, which is easily openned in any spreadsheet program. The column names represent the property name, including the type and name of the object to which they belonged, all separated by the pipe character.

    ’xdmf’

    The extensible data markup format, is a very efficient format for large data sets. This actually results in the creation of two files, the xmf file and an associated hdf file. The xmf file contains instructions for looking into the hdf file where the data is stored. Paraview opens the xmf format natively, and is very fast.

    ’mat’

    Matlab ‘mat-file’, which can be openned in Matlab.

Notes

This is a helper function for the actual functions in the io module. For more control over the format of the output, and more information about the format refer to openpnm.io.