This wiki contains simple tutorial models designed to get you acquainted step by step with the concepts and the syntax of ONELAB models.
The list below gives the main new concepts introduced by each tutorial. Explanations are given as comments directly in the models files, which you can browse directly from the list. Useful tips for using the graphical user interface are also available.
You can download all the tutorials on your computer with the command:
git clone https://gitlab.onelab.info/doc/tutorials.git
Additional examples highlighting various physical models and numerical techniques are available here.
Warning: these tutorials require the very latest Gmsh and GetDP versions (the stable versions will not work): simply download the ONELAB bundle to get uptodate versions
ONELAB tutorial for Gmsh and GetDP
The following examples introduce new features gradually, starting with the Electrostatic microstrip line model. Make sure to read the model files: each new feature is explained directly where it is used in the form of inline comments. (See also the ONELAB syntax guide for Gmsh and GetDP.)

 Physical regions and Abstract regions
 Stiffness term of a Laplacian problem
 Browse model files

 Righthandside term of a Poisson problem
 ONELAB variables
 Boundary conditions at infinity
 Browse model files


\nabla u
GetDP specific formulation for linear elasticity  First and second order elements
 Triangular and quadrangular elements
 Browse model files


Electrostatic microstrip with floating potentials
 Global quantities and their special shape functions
 Computation of the energy dual, i.e. of the armature charge of the electrode
 More on ONELAB parameters (flags, model options, check boxes, menus, ...)
 Browse model files

Thermal contact resistance and floating temperature
 Contact thermal resistance (idealised thin region with hign thermal conductivity)
 Thermal electrode (floating temperature in a region of high thermal conductivity)
 Computation of heat flux through surfaces
 Import of a source field from a file
 Browse model files

2D potential flow with computation of the lift force
 Potential flow, irrotational flow
 Multivalued scalar field
 Lift and Magnus effect, stagnation points
 Runtime variables
 Elementary algorithms in the Resolution section
 Nonlinear iteration to achieve Kutta's condition
 Browse model files

2D magnetodynamics  electromagnet and transformer
 Eddy current problems in frequency and timedomain
 Complexvalued solutions (phasors)
 Use of a template library containing generic formulations
 Browse model files

Coupled finite element and circuit equations
 Coupling of finite elements and electric circuits
 Definition of lumped circuit elements
 Creation of netlists combining lumped elements and global finite element quantities
 Browse model files
ONELAB tutorial for Python
(See also the ONELAB syntax guide for Python.)

Double pendulum in Python
 Python ONELAB client
 Browse model files
ONELAB tutorial for C++

Double pendulum in C++
 C++ ONELAB client
 Browse model files