Python Scripting in PFC

Python is a general purpose, open-source programming language with good support for scientific and numerical programming. Python is fully documented and has been extended to allow PFC models to be manipulated from Python scripts. Itasca's own scripting language, FISH, continues to be supported and developed.

Python Powered

Control PFC entirely using Python data files and/or using the enhanced interactive IPython console built right into PFC. IPython provides a powerful set of tools, such as:

  • GUI-based script shell;
  • interactive data visualization;
  • comprehensive object introspection;
  • Python script parallel processing; and
  • robust error handling.

Scientific Plotting

Create custom publication quality figures using matplotlib, a Python 2D plotting library that produces figures in a variety of hardcopy formats and interactive environments across platforms. Plot types include lines, bars, pie, polar, statistical, contours, fields, and a large number of specialty charts.

Power Computing

Use NumPy for scientific computing with Python for:

  • a powerful N-dimensional array object;
  • sophisticated (broadcasting) functions;
  • tools for integrating C/C++ and Fortran code;
  • useful linear algebra, Fourier transform, and random number capabilities; and database integration.

Science & Engineering

Advanced, customizable calculations are available via SciPy which builds on the NumPy array object. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers, and other tasks common in science and engineering.

GUI Customization

Pyside provides Python bindings for the Qt library that is used by the PFC graphical interface. With PySide, users can modify, manipulate or extend the PFC GUI, create and control custom GUI panes, including labels, text boxes, pane docking, and command buttons. Streamline your modeling of complex problems by creating custom applications with dedicated user dialogs to input parameters and post-process simulation results.

FISH vs. Python Scripting

The FISH programming environment is still available. Python has the advantage of being faster, easy to use, and has additional functionality. However, an important difference between the Python and FISH programming environments is that the Python state is not connected to the model state or saved in the SAV files (i.e., the Python state is not affected by the NEW or RESTORE commands, and the Python state is not saved in model state files).

Python in PFC Webinar

A short introduction to Itasca's Particle Flow Code (PFC ) software and our recent integration of Python scripting capabilities.

Narrated by Sacha Emam, PFC Product Manager, Software and Consulting Engineer.


Latest News
  • Thank You to our Summer Interns ITASCA Minneapolis is lucky to have welcomed nine amazing and dedicated summer interns in our...
    Read More
  • Introducing IMAT: Transforming Mining Analysis Solutions Introducing IMAT: Revolutionizing mining analysis with advanced geotechnical modeling and seismic data integration....
    Read More
  • ITASCA Unveils XSite 4.0: Advancing Hydraulic Fracturing Simulation ITASCA announces the launch of XSite 4.0, a groundbreaking advancement in hydraulic fracturing simulation software....
    Read More

Upcoming Events
26 Aug
FLAC3D V9.1 and Griddle V2.0 2024
... Read More
17 Sep
MassMin
Held once every four years, MassMin unites global experts to tackle the industry's most pressing sustainability challenges. MassMin pro... Read More
22 Sep
SMRI Fall 2024
The Solution Mining Research Institute (SMRI) was established in 1965 as a venue for the solution mining and underground storage indust... Read More