Using MFront with OpenGeoSys

Work in progress

This page is a work in progress.

It was published in this state to make existing content available to users and highlight missing parts to contributors.

Contributors: please see Documentation Contribution Guide to contribute to the documentation.

Users: the content of this page has been verified and is correct. Please return later for more content!


MFront can be used to run simulation with constitutive model not available in OpenGeoSys or with a modification of one of available ones.


OpenGeoSys has to be compiled with the flag -DOGS_USE_MFRONT in that case. It will enable MFront support and download necessary libraries. For more details about compiling OpenGeoSys, see developer guide - build configuration and developer guide - MFront installation.

Preparing MFront file

The details of preparing MFront file will not be discussed here. Only the necessary details will be stated.

Name of the model

At the beginning of the file, name of the model has to be provided as follows:

@Behaviour ModelName

The MFront file has to be the same as name provided in the line above:


Material properties

The material properties, that should be read from project file and be used in the MFront model have to be defined using following syntax:

@MaterialProperty type MatPropName

The project file has to contain references pointing from one of the parameters to material properties used by the MFront model. For details, see next section.

Preparing project file

Details on how to use a constitutive relation defined with MFront is described here.

Preparing OpenGeoSys to use a new MFront model

After the MFront file has been prepared, it has to be placed in the folder containing OpenGeoSys source code at the following path:


in the same folder there is the CMakeLists.txt. In that file, there is a list containing names of all MFront models stored in the folder. Name of the newly added model has to be added to that list:


To make the new “ModelName” available rerun the “configure” and “generate” CMake-steps, and recompile OpenGeoSys. (This process should take less time than the first time, as only new code will be compiled.)


If a compilation error is encountered, it can be caused by inconsistent use of name of the model. It is case sensitive and it has to be written in exactly the same way everywhere, where it is used.


Benchmarks using MFront

Available MFront models

Testing MFront model with MTest

This article was written by Feliks Kiszkurno. If you are missing something or you find an error please let us know.
Generated with Hugo 0.122.0 in CI job 437561 | Last revision: April 3, 2024
Commit: [PL/CT] Pass shape matrix cache to local assemblers of ComponentTransport 845cbb1  | Edit this page on