network_to_stl#

network_to_stl(network, filename=None, maxsize='auto', fileformat='STL Format', logger_level=0)[source]#

Saves (transient/steady-state) data from the given objects into the specified file.

Parameters:
  • network (Network.) – The network containing the desired data.

  • phases (list[Phase] (place holder, default is None).) – List of phases containing the desired data.

  • filename (str (optional).) – The name of the file containing the data to export.

  • maxsize (a float or a string "auto" (optional).) – The maximum size of the mesh elements allowed. “auto” corresponds to an automatic determination based on pores and throats sizes. Any float value will be used as a maximum size. Small values result in finner meshes, but slower mesh calculations.

  • fileformat (str (optional).) – Default is “STL Format” which corresponds to STL format. Other formats such as Gmsh and Fluent are supported (see ngsolve.org).

  • logger_level (integer between 0 and 7 (optional).) – Default is 0. The logger level set in netgen package.

Notes

The STL Format is a Standard Triangle (or Tessellation) Language supported by many CAD packages and used for 3D printing. Export to this format may be slow since a 3D closed surface mesh is built. Requires installation of “netgen”.