OpenPNM | Python package for performing pore network | Data Visualization library
kandi X-RAY | OpenPNM Summary
kandi X-RAY | OpenPNM Summary
OpenPNM is a comprehensive framework for performing pore network simulations of porous materials.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Plot the coordinates of a network
- Convert locations to indices
- Label axes
- Scale axes
- Export a project to an xmf file
- Joins two graphs
- Convert a project into a nested dict
- Convert a project to a paraview
- Convert to a dict
- Plot a 2D networkx
- Convenience function to create face sites
- Add a model to the model
- R Join two nodes
- R Stops a network connecting two pores
- Finds all connected nodes in a network
- Wrapper function for chemical effects
- Generate a CBCC curve
- Convert network to STL
- Constructs Delaunay triangulation triangulation
- Plot the connectivity of a network
- Creates a network structure from a STatoil
- Plot edges
- Plot a 3D network
- Export a project to vtk format
- Convert a network to Poreos format
- Create a network structure from a marock file
OpenPNM Key Features
OpenPNM Examples and Code Snippets
Community Discussions
Trending Discussions on OpenPNM
QUESTION
I'm using an in-house Python library for scientific computing. I need to consecutively copy an object, modify it, and then delete it. The object is huge which causes my machine to run out of memory after a few cycles.
The first problem is that I use python's del
to delete the object, which apparently only dereferences the object, rather than freeing up RAM.
The second problem is that even when I encapsulate the whole process in a function, after the function is invoked, the RAM is still not freed up. Here's a code snippet to better explain the issue.
...ANSWER
Answered 2018-Mar-12 at 17:31There are some really smart python people on here. They may be able to tell you better ways to keep your memory clear, but I have used leaky libraries before, and found one (so-far) foolproof way to guarantee that your memory gets cleared after use: execute the memory hog in another process.
To do this, you'd need to arrange for an easy way to make your long calculation be executable separately. I have done this by adding special flags to my existing python script that tells it just to run that function; you may find it easier to put that function in a separate .py file, e.g.:
do_something_with.pyCommunity Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install OpenPNM
You can use OpenPNM like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page