thelfer / tfel

Main repository of TFEL/MFront project
https://thelfer.github.io/tfel/web/index.html
Other
87 stars 40 forks source link

[mtest] Add to ability to define failure criteria in `ptest` #233

Closed thelfer closed 1 year ago

leopeuziat commented 2 years ago

Is it possible to define the failure criteria in an external MFront files ?

thelfer commented 1 year ago

Failure criteria can be added to pipe modelling using the @FailureCriterion keyword. Note that no failure criterion is currently shipped with MTest. The failure criteria must be provided by external librairies.

A failure criterion is called at the end of each time step to detect failure of the pipe.

Each failure criterion adds a column to the output file giving the status of the criterion:

In case of failure, three policies can be selected using the @FailurePolicy keyword:

Example of usage

@FailurePolicy 'FreezeState';
@FailureCriterion 'ElongationAtBreak' {maximum_value : 1e-4};

Note This example assumes that a failure criterion named ElongationAtBreak has been loaded from an external library.