FEFLOW and Python

 

An online documentation of the FEFLOW Python API can be found on this link: "https://dhi.github.io/ifm/"

 

The integration of Python in FEFLOW or FEFLOW in Python provides an additional option to interact with FEFLOW using your own code.

There are three options for Python use with FEFLOW:

Requirements:

  • Installation of FEFLOW 7.5 (default includes an internal FEFLOW-related Python version)

  • For using the FEFLOW kernel in an external Python interpreter the interpreter needs to support any Python version in between 2.7 and 3.8.

The FEFLOW-Python integration provides three basic method blocks:

Available Methods

FEFLOW IFM-related methods

Methods available without the need to load the FEFLOW document. There is a distinction whether the ifm module is loaded from the console / Python interpreter or from the Scripting menu in the graphical interface.

Printing list of IFM-related methods in Execute Python commands console.

 

In addition to the methods shown in figure above though the Scripting menu, the methods forceLicense, getKernelVersion and loadDocument are available in the console / Python interpreter.

 

import sys

sys.path.append(r'C:\Program Files\DHI\2022\FEFLOW 7.5\bin64\')

import ifm

dir(ifm)

FEFLOW Document-related methods (doc)

All the different methods available only if the document is loaded via doc = ifm.loadDocument('myFile.fem')

 

import sys

sys.path.append(r 'C:\Program Files\DHI\2022\FEFLOW 7.5\bin64\')

import ifm

dir(doc)

FEFLOW GUI-related methods

These methods are only available through the Execute Python Commands dialog of the Scripting menu in the graphical interface.

Printing list of GUI-related methods in Execute Python commands console.

Table of Contents

Index

Glossary

-Search-

Back