Since version 2026, Flux 3D and Flux PEEC are no longer available.

Please use SimLab to create a new 3D project or to import an existing Flux 3D project.

Please use SimLab to create a new PEEC project (not possible to import an existing Flux PEEC project).

/!\ Documentation updates are in progress – some mentions of 3D may still appear.

PyFlux language syntax

PyFlux: what is it?

PyFlux is a Flux specific language, which can be defined in the following manner:
PyFlux =

Python programming language +

Flux command language

PyFlux is therefore an overload of Python into which Flux commands are added.

PyFlux syntax

The PyFlux syntax is based:

Flux entities and PyFlux objects

PyFlux is an object-oriented programming language. There is a PyFlux type (class) corresponding to each Flux type-entity. The Flux entities are PyFlux objects (instances). The structure of the object is defined by fields called attributes, which possess a set of methods. The methods form the object interface.

A PyFlux type can have sub-types, which inherit the attributes and methods from their parent type. The sub-types are distinguished from their parent type by means of the supplementary attributes and methods.

Example: Point type

The structure of the Flux entity in the PyFlux language is presented in the example of the Point entity.

Flux entities / PyFlux types

Some examples of the Flux type-entity and its corresponding PyFlux type are presented in the table below.

Flux type-entity PyFlux type
Domain Type DomainType
Infinite Box InfiniteBox
Periodicity Periodicity
Symmetry Symmetry
Coordinate System CoordSys
Transformation Transf
Line Line
Point Region RegionPoint
Line Region RegionLine
Face Region RegionFace
Mesh Point MeshPoint
Mesh Line MeshLine
Mesh Generator MeshGenerator

Other PyFlux types

The PyFlux types corresponding to the basic data types are presented in the table below.

Basic data type PyFlux type
Integer I04
Real R08
String C80
File File