Grid Generation for Computing Science in Python

Do I need a Python module / package that provides a grid on which I can do computational science? I do not do graphics, so I do not think the blender package is what I want.

Does anyone know of a good package?

+7
source share
3 answers

If you are trying to solve FE or CFD style equations on a grid, you can use MeshPy in 2 and 3 dimensions. Meshpy is a good wrapper around existing tetgen and triangle tools.

If you are looking for more typical graphical style meshes, there was an interesting conversation in PyCon 2011 called “Algorithmic Generation of OpenGL Geometry” , which described a pragmatic approach to process mesh generation. The code from the presentation is available online.

If you are interested in restoring surfaces from data, you cannot go past the Standford 3D Scanning Repository , home of Stanford Rabbit.

Edit:

An alternative to the free alternative could be to use something like gmsh , which is platform independent and uses similar tools for meshpy in its -end backend.

+5
source

Perhaps the most useful packages

I created a repository showing some examples.

In addition, there is optimesh to improve the quality of any mesh.

(Disclaimer: I am the author of pygmsh, pygalmesh, dmsh and optimesh.)

+5
source

I recommend using NumPy (especially if you used MATLAB before). Many python scientists / mechanical engineers may agree, but I'm biased because he found this in much of last year's research. This is part of SciPy: http://numpy.scipy.org/ I was fond of numpy.linspace (a, b, N) , which makes a vector of length N equally spaced values ​​from a to b. You can use numpy.ndarray to create an N x M matrix, or if you want 2D arrays to use numpy.meshgrid .

+1
source

All Articles