Dict

class openpnm.io.Dict[source]

Generates hierarchical dicts with a high degree of control over the structure.

This is the most important class in the io module, since many other classes use this to manipulate and format the data structures.

Also, it is possible to use Python’s pickle module to save dicts to file.

Methods

export_data(dct, filename)

Saves data from the given dictionary into the specified file.

from_dict(dct[, project, delim])

This method converts a correctly formatted dictionary into OpenPNM objects, and returns a handle to the project containing them.

import_data(filename)

Load data from the specified pickle file into a Python dictionary

to_dict([network, phases, element, ...])

Returns a single dictionary object containing data from the given OpenPNM objects, with the keys organized differently depending on optional arguments.