Being able to modify some coefficients of a behaviour without recompiling is a very handy feature for the end user and is mandatory for parametric studies.
To achieve this, most mechanical solvers have introduced material properties, declared with the
@MaterialProperty keyword in
MFront, which are evaluated by the calling solver and then passed to the behaviour. The main idea behind material properties is to write generic behaviours that can be used to describe a wide range of materials.
There are a important shortcomings associated with the use of material properties:
MFrontimplementation. This can not be achieved with material properties since their is no easy cross-solver way to define their default values from the behaviour implementation.
Parameters, defined through the
@Parameter keyword, are meant to be an alternative solution: parameters are internal coefficients that can be modified by the end user at (almost) no cost. A parameter must have a default value which must be considered as the reference value.
Parameters are global values shared by all instances of the behaviour. Parameters are thus associated to the behaviour and not to a material (or model in the
Cast3M wording). Parameters thus have a few shortcomings (compared to material properties).
Parameters are defined with the
@Parameter keyword. The following syntax are allowed:
A glossary name or an entry name can be associated to a parameter through the
setGlossaryName or the
There are two ways to modify a parameter at runtime:
From our point of view, the first method is preferable but is not always avaiable. Some examples are provided below.
@Parameter is available in
***parameter section can be used to define parameters from the input file.
Let us take an example of a behaviour named
Mazars (the behaviour name is defined by the value given to the
@Behaviour keyword and prefixed by the material name, given by
@Material keyword (if any)). We suppose that this behaviour defines a parameter whose entry name is
DamageThreshold (entry names are defined through the
If a file named
Mazars-parameters.txt is in the current directory, it is automatically read at the first behaviour call. This file must contain lines beginning with a parameter name and its value. No comments are allowed.
If our case, this file may contain the following line:
If a parameter is not defined in this file, it will have its default value.
This functionality is illustrated below: