Project

class openpnm.utils.Project(*args, **kwargs)[source]

This class provides a container for all OpenPNM objects in a given simulation.

A simulation is defined as a Network and all of it’s associated objects. When instantiating a Network, a Project can be passed as an argument, but if not given one is created. When instantiating any other object either a Network or a Project can be supplied. In the former case, the Network’s Project is retrieved and used. The end result is that all objects are stored in a specific Project.

The Project to which any object belongs can be retrieved with obj.project. Conversely, printing a Project displays a list of all objects it contains.

Moreover, all Projects are registered with the Workspace. Since there can be only instance of the Workspace it is possible to view all open Projects by printing the Workspace.

See also

Workspace

Attributes
grid
name
names
network
workspace

Methods

check_data_health(obj)

Checks the health of pore and throat data arrays.

check_geometry_health()

Performs a check to find pores with overlapping or undefined Geometries.

check_network_health()

This method checks the topological health of the network

check_physics_health(phase)

Performs a check to find pores which have overlapping or missing Physics.

export_data([phases, filename, filetype])

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

find_full_domain(obj)

Finds the full domain object associated with a given object.

find_geometry(physics)

Finds the Geometry associated with a given Physics

find_phase(obj)

Finds the Phase associated with a given object.

find_physics([geometry, phase])

Finds the Physics object(s) associated with a given Geometry, Phase, or combination.

inspect_locations(element, indices[, objs, mode])

Shows the values of all props and/or labels for a given subset of pores or throats.

load_object(filename)

Loads a single object from a pickle file

purge_object(obj[, deep])

Removes an object from the Project.

save_object(obj)

Saves the given object or list of objects to a pickle file

save_project([filename])

Saves the current project to a pnm file.

show_model_dependencies(prop, obj)

Brief explanation of 'show_model_dependencies'

algorithms

geometries

phases

physics