TFEL,
MFront and MTestTFEL/Config
improvements
TFEL/Exceptions
improvements
TFEL/System
improvements
TFEL/Math improvements
TFEL/Math/Parser
improvements
TFEL/Material
improvements
TFEL/Glossary
improvements
MFront improvements
madnex file to
the search pathsmadnex input file as a madnex search
pathStandardElastoViscoPlasticity brickRungeKutta domain specific languageImplicitCZMDSLCast3M interfaceCast3M interface for
point-wise models implemented using the Model domain
specific languagegeneric interface
for material propertiesgeneric interface
for point-wise models implemented using the Model domain
specific languageMaterialProperty DSLModel DSLMTest improvements
madnex
file3D
behavioursaster interfacegeneric interfacecomputeIntegralValue and computeMeanValue
post-processings for tests on pipesgeneric interfaceCast3M interfaceDTAU_DDF tangent operator in the
GenericBehaviour classmfm-test-generator
improvements
python bindings
TFEL/System python modulemtest python moduleBehaviour classMTesttest to a madnex filemtest python
modulemfm_test_generator python modulemfront-query
improvements
tfel-check
improvements
DTAU_DDF in generic interfacemfront interface for material properties shall generate
overloaded functions for every numerical type supportedcastem interface for point-wise models handled by the
Model DSLcastem interface for behaviours@MaterialProperty keyword for models described by the
Model DSL<iostream> header in modelsModel DSLgeneric behavioursTFEL’ arraymaster branch (future version 4.1) with
gcc-8.1.0TFEL/Math arrays@AdditionalOutputs keywordgetOutputName for MaterialProperty
classPhysicalConstants in the Model DSLPhysicalConstants in the MaterialProperty
DSLModel DSLModel DSLMFrontptestptestDSL options to override material properties,
external state variables and parametersData to std::vector and
std::map shall work if the object is emptysetParameter function for material properties generated
with the python interface--parameters-file query for material
propertiesderivative_type metafunction to higher order
derivativesExternalMaterialPropertyDescription classExternalMaterialPropertyDescription class@Output from compiled file through python
bindings@Material, @Law, @Author,
@Date, @Description from compiled file through
Python bindingrkCastem algorithm assumes that a variable
young is definedgeneric
interfacereportContractViolation on GPUsconstexpr all the thingsmfront fileImplicit DSLmadnex fileaster interfacemadnex supportMTest file generation (all kind of state
variables)3D behaviour in ptestMTestThe page describes the new functionalities of Version 4.1 of the
TFEL project.
The user defined variables shall not start with mfront_
which is used internally.
MFrontAs described in Section 9.3, behaviours can now declare initialize
functions. Each initialize function has a dedicated name. If
@initialize_function@ be the name of a initialize function,
MFront will automatically register
execute@initialize_function@IntializeFunction as a member
name.
As described in Section 9.4, behaviours can now declare
post-processings. Each post-processing has a dedicated name. If
@postprocessing@ be the name of a post-processing,
MFront will automatically register
execute@postprocessing@PostProcessing as a member name.
TFEL/Config
improvementsTFEL_HOST,
TFEL_DEVICE and TFEL_HOST_DEVICE macrosThe TFEL_HOST decorator can be used to mark functions
that shall be used on the host.
The TFEL_DEVICE decorator can be used to mark functions
that shall be used on the device.
The TFEL_HOST_DEVICE decorator can be used to mark
functions that shall be used on the host and on the device.
TFEL/Exceptions
improvementsreportContractViolation on GPUsThe TFEL_NO_REPORT_CONTRACT_VIOLATION macro replaces the
standard implementation of the reportContractViolation by a
dummy version which does nothing.
This macros is automatically defined with CUDA and
SYCL.
TFEL/System
improvementsExternalLibraryManager classThe getUnitSystem allow to retrieve the unit system
associated with an entry point (material property, behaviour,
model).
generic interfaceThe generic interface generates a function dedicated for
each initialize function and each modelling hypothesis supported (see
Section 9.3 for details about initialize functions).
The ExternalLibraryManager class now exposes the
following methods:
getGenericBehaviourInitializeFunctions, which returns
the initialize functions associated with a behaviour.getGenericBehaviourInitializeFunction, which returns
the function implementing a initialize function.getGenericBehaviourInitializeFunctionOutputs, which
returns the outputs of a initialize function function.getGenericBehaviourInitializeFunctionOutputs, which
returns the types of the outputs of a initialize function function.generic interfaceThe generic interface generates a function dedicated for
each post-processing and each modelling hypothesis supported (see
Section 9.4 for details about post-processings).
The ExternalLibraryManager class now exposes the
following methods:
getGenericBehaviourPostProcessingFunctions, which
returns the post-processings associated with a behaviour.getGenericBehaviourPostProcessingFunction, which
returns the function implementing a post-processing.getGenericBehaviourPostProcessingFunctionOutputs, which
returns the outputs of a post-processing function.getGenericBehaviourPostProcessingFunctionOutputs, which
returns the types of the outputs of a post-processing function.hasTemperatureBeenRemovedFromExternalStateVariables
methodIn previous versions of MFront, the temperature was
automatically defined as the first external state variable by domain
specific languages handling behaviours.
By conventions, for consistency with behaviour interfaces derived
from the Abaqus’ UMAT interface, the
temperature was removed from the list of external state variables
exported by the behaviour. This list can be retrieved using the
getUMATExternalStateVariablesNames method of the
ExternalLibraryManager class.
Following Issue #50 (see Sections 9.2.3 and 15.84), this automatic declaration is now optional.
For backward compatibility, the
getUMATExternalStateVariablesNames method still return the
list of external state variables without the temperature. To know if the
temperature was removed, the user must call the
hasTemperatureBeenRemovedFromExternalStateVariables
method.
In pratice, if the
hasTemperatureBeenRemovedFromExternalStateVariables method
returns true, the full list of external state variables is
given by the temperature followed by the list of external state
variables returned by the
getUMATExternalStateVariablesNames method.
getLaw
methodThe getLaw method returns the law name associated with a
material property as defined by the @Law keyword in
MFront.
getAuthor
methodThe getAuthor method returns the author name associated
with an entry point as defined by the @Author keyword in
MFront. If this author name is not defined, an empty string
is returned.
getDate
methodThe getDate method returns the date associated with an
entry point as defined by the @Date keyword in
MFront. If this date is not defined, an empty string is
returned.
getDescription methodThe getDescription method returns the description
associated with an entry point as defined by the
@Description keyword in MFront. If this
description is not defined, an empty string is returned.
getMaterialPropertyOutput methodThe getMaterialPropertyOutput method returns the
external name associated with the output of a material property.
ExternalMaterialKnowledgeDescriptionThe ExternalMaterialKnowledgeDescription gathers
information exported by MFront about an entry point
(material property or behaviour). This class has been introduced as a
base class for the ExternalMaterialPropertyDescription and
ExternalBehaviourDescription classes.
This class exposes the following data members:
library: the name of the libraryentry_point: the name of the entry pointunit_sytem: the unit sytem using by an entry point.
This can be empty.tfel_version: the version of TFEL used to generate the
entry pointbuild_id: the build identifier (if any)source: the MFront source filemfront_interface: the name of the interface used to
generate the entry point.material: the name of the material, as introduced by
the @Material keyword in MFront.author: the author of the implementation, as introduced
by the @Author keyword in MFront.date: the date of the implementation, as introduced by
the @Date keyword in MFront.description: the description of the entry point, as
introduced by the @Description keyword in
MFront.ExternalMaterialPropertyDescription classThe ExternalMaterialPropertyDescription class now
inherits from the ExternalMaterialKnowledgeDescription
class.
The ExternalMaterialPropertyDescription class exposes
the following new data members:
law: the name of the law defining the material property
as introduced by the @Law keyword.output: the external name of the ouput of the the
material property.The getParameterDefaultValue returns the default value
of a parameter.
hasBounds method indicates if the given variable
has bounds (either lower or upper bounds).hasLowerBound method indicates if the given
variable has a lower bound.hasUpperBound method indicates if the given
variable has a upper bound.getLowerBound method returns the lower bound of the
given variable.getUpperBound method returns the upper bound of the
given variable.hasPhysicalBounds method indicates if the given
variable has physical bounds (either lower or upper physical
bounds).hasLowerPhysicalBound method indicates if the given
variable has a lower physical bound.hasUpperPhysicalBound method indicates if the given
variable has a upper physical bound.getLowerPhysicalBound method returns the lower
physical bound of the given variable.getUpperPhysicalBound method returns the upper
physical bound of the given variable.ExternalBehaviourDescription classThe ExternalBehaviourDescription class now inherits from
the ExternalMaterialKnowledgeDescription class.
hasTemperatureBeenRemovedFromExternalStateVariables data
memberThe ExternalBehaviourDescription class now have
hasTemperatureBeenRemovedFromExternalStateVariables boolean
public data member which states if the temperature was removed from the
list of external state variables.
TFEL/Math
improvementsconstexpr keywordThe computeLinearInterpolation allows to compute the
linear inteporlation of a set of data by the arrays of abscissae and
values respectively.
The computeLinearInterpolationAndDerivative returns the
a pair containing the value resulting for the linear interpolation and
the derivative.
The first template argument of those functions is a boolean stating if extrapolation must be performed.
constexprconstexpr std::array<time, 3u> abscissae{time{0}, time{1}, time{2}};
constexpr std::array<stress, 3u> values{stress{1}, stress{2}, stress{4}};
constexpr auto v = tfel::math::computeLinearInterpolation<true>(abscissae, values,
time{-1});The CubicSplineCollocationPoint structure describes a
collocation point used to build an interpolation by a cubic spline.
Cubic spline interpolation requires a set of such collocation points.
For example, the CubicSpline class can build a vector of
collocation point from data. The set of collocation points can also be
precomputed.
The computeCubicSplineInterpolation allows to perform
the interpolation using a set of collocation points. The
computeCubicSplineInterpolationAndDerivative computes the
interpolated value and the derivative at the cubic spline.
The first template argument of those functions is a boolean stating if extrapolation must be performed.
constexprusing CollocationPoint =
tfel::math::CubicSplineCollocationPoint<time, stress>;
constexpr auto pts = std::array<CollocationPoint, 3u>{
CollocationPoint{time{0}, stress{1}, stressrate{0.75}}, //
CollocationPoint{time{1}, stress{2}, stressrate{1.5}}, //
CollocationPoint{time{2}, stress{4}, stressrate{2.25}}};
constexpr auto f_values = std::array<stress, 4u>{
tfel::math::computeCubicSplineInterpolation<true>(pts, time{-1}),
tfel::math::computeCubicSplineInterpolation<true>(pts, time{0.4}),
tfel::math::computeCubicSplineInterpolation<true>(pts, time{1.2}),
tfel::math::computeCubicSplineInterpolation<true>(pts, time{3}),derivative_type metafunction to higher order
derivativesThe derivative_type metafunction now accepts multiple
arguments defining the variable types with respect to which the function
type is derived.
The declarations:
// declaration valid in Version 4.0 and 4.1
auto d2E_dT2 = derivative_type<derivative_type<stress, temperature>, temperature>{};and
// declaration valid in Version 4.1
auto d2E_dT2 = derivative_type<stress, temperature, temperature>{};are now equivalent.
The clamp method is available in all mutable arrays in
TFEL/Math, including all tensorial objects.
constexpr auto a = [] {
auto values = tfel::math::fsarray<3u, int>{-14, 12, -3};
values.clamp(-4, 4);
return values;
}();
static_assert(a[0] == -4);
static_assert(a[1] == 4);
static_assert(a[2] == -3);TFEL/Math/Parser
improvementsThe differentiation of formula defined by the Evaluator
class has been improved in several manner.
For example, the derivation of the formula 2*sin(x)
would lead in previous versions in the following ev
TFEL/Material
improvementsconstexpr keywordThe inverse Langevin function is used in many statistically based network behaviours describing rubber-like materials.
The Langevin function \(\mathcal{L}\) is defined as follows: \[ \mathcal{L}{\left(x\right)}={{\displaystyle \frac{\displaystyle 1}{\displaystyle \coth{\left(x\right)}}}}-{{\displaystyle \frac{\displaystyle 1}{\displaystyle x}}} \]
The complexity of the inverse Langevin function \(\mathcal{L}^{-1}{\left(x\right)}\) motivated the development of various approximations [1–3].
Figure 1 compares those approximations. The approximations of Bergström and Boyce [2] and Jedynak [3] are undistinguishable. See Jedynak for a quantitative discussion of the error generated by those approximations [3]. It is worth noting that all those approximations mostly differs near the pole of inverse Langevin function \(\mathcal{L}^{-1}{\left(x\right)}\).
The InverseLangevinFunctionApproximations enumeration
lists the approximations that have been implemented and that can be
evaluated in a constexpr context:
COHEN_1991 is associated with the
approximation proposed by Cohen [1]: \[
\mathcal{L}^{-1}{\left(x\right)} \approx
y{{\displaystyle \frac{\displaystyle 3-y^{2}}{\displaystyle 1-y^{2}}}}.
\]JEDYNAK_2015 is associated with the
approximation proposed by Jedynak [3]: \[
\mathcal{L}^{-1}{\left(x\right)} \approx
y \, {{\displaystyle \frac{\displaystyle c_{0} + c_{1}\,y +
c_{2}\,y^{2}}{\displaystyle 1 + d_{1}\,y + d_{2}\,y^{2}}}}
\]KUHN_GRUN_1942 or MORCH_2022 are
associated with a taylor expansion of \(\mathcal{L}^{-1}{\left(x\right)}\) at \(0\): \[
\mathcal{L}^{-1}{\left(x\right)} \approx
y\,P{\left(y^{2}\right)} \quad\text{with}\quad
P{\left(y^{2}\right)}=\sum_{i=0}^{9}c_{i}\,{\left(y^{2}\right)}^{i}
\] where \(P\) is a \(9\)th order polynomial. Hence, the Taylor
expression is of order \(19\).The computeApproximateInverseLangevinFunction computes
one approximation of the inverse Langevin function and the
computeApproximateInverseLangevinFunctionAndDerivative
function computes ne approximation of the inverse Langevin function and
its derivative. These functions have two template parameters: the
approximation selected and the numeric type to be used. By default, the
JEDYNAK_2015 approximation is used and the numeric type can
be deduced from the type of the argument.
The approximation proposed by Bergström and Boyce [2] is given by the following function: \[ \mathcal{L}^{-1}{\left(x\right)} \approx \left\{ \begin{aligned} c_{1} \tan{\left(c_{2} \, x\right)} + c_{3} \, x &\quad\text{if}\quad \left|x\right| \leq c_{0}\\ {{\displaystyle \frac{\displaystyle 1}{\displaystyle \mathop{sign}{\left(x\right)}-x}}}&\quad\text{if}\quad \left|x\right| > c_{0} \end{aligned} \right. \]
The
computeBergstromBoyce1998ApproximateInverseLangevinFunction
function computes this approximation and the
computeBergstromBoyce1998ApproximateInverseLangevinFunctionAndDerivative
function computes this function and its derivative. These functions
can’t be declared constexpr because of tangent function is
not constexpr. These functions have one template parameter,
the numeric type to be used. This template parameter can be
automatically deduced from the type of the argument.
using ApproximationFunctions = InverseLangevinFunctionApproximations;
// compute Cohen's approximation of the inverse Langevin function
const auto v = computeApproximateInverseLangevinFunction<
ApproximationFunctions::COHEN_1991>(y)
// compute Jedynak's approximation of the inverse Langevin function and its derivative
const auto [f, df] = computeApproximateInverseLangevinFunctionAndDerivative(y)TFEL/Glossary
improvementsMost entries of the glossary now declare physical bounds. The physical bounds are associated with an unit system. Currently, only the Internal System of units (SI) is supported.
MFront
improvementsThe @UnitSystem allows to select an unit system.
Currently, only the Internal System of units (SI) is supported.
@UnitSystem SI;@InitLocalVariables code blockThe user can now abort the behaviour integration by returning
false or FAILURE from the
@InitLocalVariables code block.
If an unit system is declared and that a variable is associated with
a glossary entry and that no physical bounds have been declared for this
variable, MFront will automatically declare the physical
bounds from the glossary entry.
Consider the following example:
@DSL MaterialLaw;
@Law TestUnitSystem;
@UnitSystem SI;
@Output stress E;
E.setGlossaryName("YoungModulus");
@StateVariable temperature T;
T.setGlossaryName("Temperature");
@Function{
constexpr auto Ta = temperature{3000};
E = 150e9 * exp(T / Ta);
};MFront will automatically associate the following
physical bounds to the temperature T:
$ mfront-query --has-physical-bounds=Temperature TestUnitSystem.mfront
true
$ mfront-query --physical-bounds-value=Temperature TestUnitSystem.mfront
[0:*[Domain specific language can have options which can modify their default behaviour.
The boolean option parameters_as_static_variables
modifies the way parameters are treated. This option can be declared as
follows:
@DSL Default{parameters_as_static_variables : true};By default, MFront behaves as if this option was set to
false.
If true, the parameters will be treated as static
variables. In particular, the values of the parameters can not be
changed as runtime. From the solver point of view, the behaviour does
not declare any parameter.
If the current domain specific language calls other domain specific languages (for example, a behaviour calling an external material property), the value of this option is automatically passed to those domain specific languages (unless superceeded by global options, as detailled in Sections 9.2.9 and 9.2.10).
In previous versions, a build identifier could be specified using the
TFEL_BUILD_ID environment variable.
The build_identifier option is another way of specifying
the build identifier, as follows:
@DSL IsotropicPlasticMisesFlow{
build_identifier : "Cyrano-3.4"
};However, the build_identifier is not meant to be
directly specified in the MFront source file. It shall
rather be defined on the command line (see Section 9.2.9).
In previous versions of MFront, the temperature was
automatically defined as the first external state variable by domain
specific languages handling behaviours, as this is required by most
behaviour interfaces derived from Abaqus’ UMAT
interface.
This automatic declaration can now be disabled using the
automatic_declaration_of_the_temperature_as_first_external_state_variable
boolean option, as follows:
@DSL IsotropicPlasticMisesFlow{
automatic_declaration_of_the_temperature_as_first_external_state_variable : false
};By default, MFront behaves as if this option was set to
true. Currently, only the generic interface supports
behaviours which do not declare the temperature a the first external
state variable.
IsotropicMisesCreep,
IsotropicMisesPlasticFlow,
IsotropicStrainHardeningMisesCreep and
MultipleIsotropicMisesFlows domain specific languages used
to automatically declare the temperature at the middle of the time step
in a local variable named T_. This declaration is disabled
if the
automatic_declaration_of_the_temperature_as_first_external_state_variable
option is set to false.
By default, parameters may be initialized from a text file in the
current directory, if this text file exists. This feature is implemented
and enabled by default for behaviours. For material properties, this
feature is implemented by some interfaces (Cast3M,
Cyrano, Octave, Python).
This behaviour can now be changed by using the
parameters_initialization_from_file boolean option.
In previous versions, the default out of bound policy was
tfel::material::None, which meant that nothing is done when
a variable is out of its bound.
This behaviour can now be changed by using the
default_out_of_bounds_policy string option which can take
the values None, Warning or
Strict.
The out_of_bounds_policy_runtime_modification boolean
option states if the out of bounds policy can be changed at runtime. By
default, this option is true.
If true, many interfaces (Cast3M,
Python, Java, etc..) uses environment
variables to modify the out of bounds policy.
The overriding_parameters option allows to specify
overriding parameters. This parameters must be a map associating
variables names and default values of the overriding parameters.
The following codes allows to turn the temperature, defined by default as an external state variable, into a parameter:
$ mfront --obuild --interface=generic \
--behaviour-dsl-option='overriding_parameters:{T:293.15}' \
Plasticity.mfront Note that the temperature increment is implicitly overriden but a parameter whose default value is null.
The modelling_hypothesis and
modelling_hypotheses options can be used to specify the
modelling hypotheses to be treated. This option is specific to
behaviours.
The hypotheses must be a subset of the hypotheses supported be the behaviour.
$ mfront --obuild --interface=generic \
--behaviour-dsl-option=modelling_hypothesis:PlaneStrain \
Plasticity.mfrontOptions passed to domain specific languages can be defined globally using one of the following command line arguments:
--dsl-option, which allows to define an option for all
domain specific languages.--material-property-dsl-option, which allows to define
an option for all domain specific languages related to material
properties.--behaviour-dsl-option, which allows to define an
option for all domain specific languages related to behaviours.--model-dsl-option, which allows to define an option
for all domain specific languages related to models.The options defined by command line arguments are merged with the
options defined inside the MFront file. In case of
conflicts, an option defined on the command-line overwrites the option
defined in the MFront file.
$ mfront --obuild --interface=generic \
--behaviour-dsl-option=parameters_as_static_variables:true \
Plasticity.mfrontOptions passed to domain specific languages can be defined globally
using an external file in a JSON-like format using one of the following
command line arguments: --dsl-options-file,
--material-property-dsl-options-file,
--behaviour-dsl-options-file or
--model-dsl-options-file.
The options defined by command line arguments are merged with the
options defined inside the MFront file. In case of
conflicts, an option defined on the command-line overwrites the option
defined in the MFront file.
$ mfront --obuild --interface=generic \
--behaviour-dsl-options-file=options.json \
Plasticity.mfrontwhere the options.json file may look like:
overriding_parameters : {T : 293.15, dT : 0},
parameters_as_static_variables : trueThe list of options associated with a domain specific language can be
retrieved using the --list-dsl-options command line
argument as follows:
$ mfront --list-dsl-options=RungeKutta
- parameters_as_static_variables: boolean stating if the parameter shall be treated as static variables.
- automatic_declaration_of_the_temperature_as_first_external_state_variable: boolean stating if the temperature shall be automatically declared as an external state variable.The @InitializeFunction keyword introduces a code block
that can be used to initialize internal state variables at the very
beginning of the computation. Initalize functions may have user
so-called initialize funtion variables.
In this version, only the generic interface generates
functions associated with initialize functions (See Section 4.1.2 to see
how to retrieve the initialize functions generated by the
generic interfaces).
Because initialize functions are called before any behaviour integration, special care to the meaning of the variables must be taken:
Concerning material properties, they have their values at the beginning of the time step.
About initialisation of local variables
The code block defined by the
@InitLocalVariablescode block shall be called before the execution of an initialize function.
The following code defines an initializer function which initializes the elastic strain from the value of stress:
@InitializeFunction ElasticStrainFromInitialStress{
const auto K = 2 / (3 * (1 - 2 * nu));
const auto pr = trace(sig) / 3;
const auto s = deviator(sig);
eel = eval((pr / K) * Stensor::Id() + s / mu);
}Initialize function variables are introduced by the
@InitializeFunctionVariable keyword.
Initialize function variables are only defined in initialize functions, and can’t be used in the other code blocks.
Contrary most variables (internal state variables, external state variables, etc.), initialize function variables can be defined after the first code block. However, care must be taken to declare initialize function variables before their use in an initialize function.
Note that an initialize function variable can be used in differents initialize function.
The @PostProcessing keyword introduces a code block that
can be used to perform computations independently of the behaviour
integration. The outputs of post-processings are stored in so-called
post-processing variables.
Post-processings are typically meant to be called at the end of a time step, when the equilibrium has been reached.
In this version, only the generic interface generates
functions associated with post-processings (See Section 4.1.3 to see how
to retrieve the post-processing functions generated by the
generic interfaces).
Because post-processings are called independently of the behaviour integration step, special care to the meaning of the variables must be taken:
The values of the thermodynamic forces, state variables, auxiliary
state variables at the beginning of the time step are available in a
special data structure named initial_state.
Concerning material properties, they have their values at the end of the time step as usual.
For the gradients and external state variables have their values at
the end of the time step. Their values at the beginning of the time step
are avaiable in the initial_state data structure. Their
increments have their usual values.
About initialisation of local variables
The code block defined by the
@InitLocalVariablescode block shall be called before the execution of the post-processing. However, this code block will be called with the thermodynamic forces, state variables, auxiliary state variables at the end of the time step.
The following code defines a post-processing computing the principal strain at the end of the time step:
//! principal strains
@PostProcessingVariable tvector<3u,strain> εᵖ;
εᵖ.setEntryName("PrincipalStrain");
//! compute the principal strain
@PostProcessing PrincipalStrain {
εᵖ = eto.computeEigenValues();
}Post-processing variables are introduced by the
@PostProcessingVariable keyword.
Post-processing variables are only defined in post-processings, and can’t be used in the other code blocks.
Contrary most variables (internal state variables, external state variables, etc.), post-processing variables can be defined after the first code block. However, care must be taken to declare post-processing variables before their use in a post-processing.
Note that a post-processing variable can be used in differents post-processings. Typically, one may compute the principal strains in a dedicated post-processing and in a post-processing computing the principal strains and the strain eigen vectors.
madnex file
to the search pathsMFront files may depend on other MFront
files. A madnex file can be used resolve those dependencies
using the --madnex-search-path command line argument.
Let us consider a madnex file containing the
YoungModulusTest material property associated with no
material and a file Test.mfront requiring to have access to
this material property. For example, the Test.mfront may
contain an instruction such as:
@MaterialLaw "YoungModulusTest";The Test.mfront file can be compiled as follows:
$ mfront --obuild --interface=generic `
--madnex-search-path=MaterialProperties.mdnx `
Test.mfrontmadnex search
pathsOptions to the --madnex-search-path can be decomposed
as
<file_path>:<material_knowledge_type>:<material_identifier>
where <material_knowledge_type> and
<material_identifier> are optionals, as in the
previous example.
material_knowledge_type may have one of the following
values material_property, behaviours and
models.
If material_knowledge_type is not specified, materials
properties, behaviours and models are all considered (in that
order).
The <material_identifier> is interpreted as a
regular expression.
The regular expression that selects material knowledge associated
with all materials is .+, but this will exclude material
knowledge associated with no material.
The regular expression .* will select material knowledge
associated to all material and material knowledge associated
with no material. This is what happen if not
material_identifier is specified.
The special material identifier <none> selects
only material knowledge associated with no material.
MaterialProperties.mdnx: appends all the materials
properties, behaviours, models associated to any materials or to no
material to the search path.MaterialProperties.mdnx:material_property: appends all
the materials properties, associated to any materials or to no material
to the search path.MaterialProperties.mdnx:material_property:Zircaloy4:
appends all the materials properties, associated to
Zircaloy4 to the search path.madnex files
are searchedThe madnex files specified in madnex search
paths are first search in the current directory, and then in the
directories specified by the --search-path command line
arguments.
madnex input file as a madnex search pathWhen MFront uses a madnex input file, this
file is automatically added to the madnex search path.
Let us consider a file a madnex file containing a
behaviour Test and a material property
YoungModulusTest which is used by the Test
behaviour, then the following instructions work as expected:
$ mfront --obuild --interface=aster --behaviour=Test Example.mdnx
Treating target : all
The following libraries have been built :
- libAsterBehaviour.so : astertest
$ mfront-query --list-dependencies --behaviour=Test Example.mdnx
madnex:Example.mdnx:MaterialProperty::YoungModulusTest StandardElastoViscoPlasticity brickThe UserDefined isotropic hardening rule allows the user
to specify the radius of the yield surface as a function of the
equivalent plastic strain p.
This function shall be given by a string option named R
and must depend on p. The function may also depend on other
variables. Let A be such a variable. The
UserDefined isotropic hardening rule will look if an option
named A has been given:
MFront file.If required, the derivative of R with respect to
p can be provided through the option dR_dp.
The derivative dR_dp can depend on the variable
R.
If this derivative is not provided, automatic differentiation will be
used. The user shall be warned that the automatic differentiation
provided by the tfel::math::Evaluator class may result in
inefficient code.
@Parameter stress R0 = 200e6;
@Parameter stress Hy = 40e6;
@Parameter real b = 100;
@Brick StandardElastoViscoPlasticity{
stress_potential : "Hooke" {young_modulus : 150e9, poisson_ratio : 0.3},
inelastic_flow : "Plastic" {
criterion : "Mises",
isotropic_hardening : "UserDefined" {
R : "R0 + Hy * (1 - exp(-b * p))", // Yield radius
dR_dp : "b * (R0 + Hy - R)"
}
}
};UserDefinedViscoplasticityThe UserDefinedViscoplasticity inelastic flow allows the
user to specify the viscoplastic strain rate vp as a
function of f and p where:
f is the positive part of the \(\phi{\left(\underline{\sigma}-\sum_{i}\underline{X}_{i}\right)}-\sum_{i}R_{i}{\left(p\right)}\)
where \(\phi\) is the stress
criterion.p is the equivalent viscoplastic strain.This function shall be given by a string option named
vp. This function must depend on f. Dependance
to p is optional.
The function may also depend on other variables. Let A
be such a variable. The UserDefinedViscoplasticity flow
will look if an option named A has been given to the
flow:
MFront file.If required, the derivatives of vp with respect to
f and p can be provided through the options
dvp_df and dvp_dp. The derivatives
dvp_df and dvp_dp can depend on two additional
variables, vp and seps, which denotes the
viscoplastic strain rate and a stress threshold.
If those derivatives are not provided, automatic differentiation will
be used. The user shall be warned that the automatic differentiation
provided by the tfel::math::Evaluator class may result in
inefficient code.
@Parameter temperature Ta = 600;
@Parameter strain p0 = 1e-8;
@Brick StandardElastoViscoPlasticity{
stress_potential : "Hooke" {young_modulus : 150e9, poisson_ratio : 0.3},
inelastic_flow : "UserDefinedViscoplasticity" {
criterion : "Mises",
E : 8.2,
A : "8e-67 * exp(- T / Ta)",
m : 0.32,
vp : "A * (f ** E) / ((p + p0) ** m)",
dvp_df : "E * vp / (max(f, seps))"
// dvp_dp is evaluated by automatic differentiation (which is not recommended)
}
};The Data isotropic hardening rule allows the user to
define an isotropic hardening rule using a curve defined by a set of
pairs of equivalent strain and equivalent stress.
This isotropic hardening rule can be parametrised using three entries:
values: which must a dictionnary giving the value of
the yield surface radius as a function of the equivalent plastic
strain.interpolation: which allows to select the interpolation
type. Possible values are linear (default choice) and
cubic_spline.extrapolation: which allows to select the extrapolation
type. Possible values are bound_to_last_value (or
constant) and extrapolation (default
choice).@Brick StandardElastoViscoPlasticity{
stress_potential : "Hooke" {young_modulus : 150e9, poisson_ratio : 0.3},
inelastic_flow : "Plastic" {
criterion : "Mises",
isotropic_hardening : "Data" {
values : {0 : 150e6, 1e-3 : 200e6, 2e-3 : 400e6},
interpolation : "linear"
}
}
};The Delobelle-Robinet-Schaffler (DRS) kinematic hardening rule has been introduced to describe orthotropic viscoplasticity of Zircaloy alloys [4, 5]. It describes both dynamic and static recovery by the following evolution law: \[ \underline{\dot{a}}= \dot{p}\,\underline{\mathbf{E}}_{c}\,\colon\,\underline{n} -D\,\dot{p}\,\underline{\mathbf{R}}_{d}\,\colon\,\underline{a} -f\,{\left({{\displaystyle \frac{\displaystyle a_{\mathrm{eq}}}{\displaystyle a_{0}}}}\right)}^{m}\,{\displaystyle \frac{\displaystyle \partial a_{\mathrm{eq}}}{\displaystyle \partial \underline{a}}} \] with \(a_{\mathrm{eq}}=\sqrt{\underline{a}\,\colon\,\underline{\mathbf{R}}_{s}\,\colon\,\underline{a}}\) and \({\displaystyle \frac{\displaystyle \partial a_{\mathrm{eq}}}{\displaystyle \partial \underline{a}}}={{\displaystyle \frac{\displaystyle \underline{\mathbf{R}}_{s}\,\colon\,\underline{a}}{\displaystyle a_{\mathrm{eq}}}}}\)
The three fourth order tensors \(\underline{\mathbf{E}}_{c}\), \(\underline{\mathbf{R}}_{d}\) and \(\underline{\mathbf{R}}_{s}\) are assumed to have the same structure as the Hill tensors and are defined by \(6\) components (see this page for details).
The f and a0 parameters are optional and
defaults to \(1\).
kinematic_hardening : "DRS" {
C : 150.e9, // kinematic moduli
D : 1e2, // back-strain callback coefficient
f : 10,
m : 5,
Ec : {0.33, 0.33, 0.33, 1, 1, 1},
Rs : {0.33, 0.63, 0.33, 1, 1, 1},
Rd : {0.33, 0.33, 0.33, 1, 1, 1} //
},RungeKutta domain specific languagerkCastem algorithmThe rkCastem algorithm compares the values of the stress
computed by a predictor step and corrector step. The error between those
values must be normalised. In previous versions, the existence of a
variable named young was assumed.
The @StressErrorNormalizationFactor allows to specify
this normalization factor more explicitely and consistenly.
For backward compatibility with previous versions, the
young variable will be used, if an appropriate variable is
defined and if the @StressErrorNormalizationFactor keyword
was not used.
Note that if the @StressErrorNormalizationFactor keyword
is not used and that the young variable is not defined,
MFront will look:
YoungModulus glossary name.ImplicitCZMDSLThe domain specific language ImplicitCZMDSL allows to
implement a cohesive zone model using an implicit scheme.
Cast3M interfaceThe Cast3M interface has been extended to support
point-wise models, i.e. generic behaviours without gradients, as
generated by the DefaultModel DSL, the
RungeKuttaModel DSL and the ImplicitModel
DSL.
Proper support for models will land in Cast3M Version
2023. In the meantime, the generated models can be tested with
MTest (See Section 10.9).
Cast3M interface
for point-wise models implemented using the Model domain
specific languageThe Model domain specific language (DSL) is mostly
superseeded by the domain specific languages introduced in Version 3.4.3
(namely the DefaultModel, RungeKuttaModel and
ImplicitModel DSLs). However, backward-compatibility still
requires to maintain the Model domain specific
language.
The generated function has the same prototype as behaviours. From the
Cast3M point of view, point-wise models implemented by the
Model domain specific language are no different than the
ones implemented by the DefaultModel,
RungeKuttaModel and ImplicitModel DSLs.
Proper support for models will land in Cast3M Version
2023. In the meantime, the generated models can be tested with
MTest (See Section 10.9).
generic interface
for material propertiesThe generic interface for material properties generates
functions matching the following prototype:
mfront_gmp_real (*)(mfront_gmp_OutputStatus* const, // output status
const mfront_gmp_real* const, // arguments
const mfront_gmp_size_type, // number of arguments
const mfront_gmp_OutOfBoundsPolicy); // out of bounds policyThe mfront_gmp_OutputStatus structure and the
mfront_gmp_OutOfBoundsPolicy enumeration type are described
in the next paragraphs.
The arguments are passed using a continuous array. The number of
arguments is used to make some basic consistency checks. The list of
arguments can be retrieved using the ExternalLibraryManager
class (See Section @???).
If the material property declares parameters (and that the
parameters_as_static_variables DSL option was not
specified), their names and default values can be retrieved using the
ExternalLibraryManager class. The value of those parameters
can also be modified using the ExternalLibraryManager class
(See Section @???).
Note: link with the
cyranointerface for material propertiesThe
genericinterface for material properties is very similar to thecyranointerface. In pratice, both interfaces shares a common base class (calledGenericMaterialPropertyInterfaceBase).
mfront_gmp_OutputStatus structureThe mfront_gmp_OutputStatus structure describes the
output status of the evaluation of a material property.
This data structure is defined as follows:
/*!
* \brief this structure summarizes the exit status of a function conforming to
* one of the `generic` material property interface.
*/
typedef struct {
/*!
* \brief exit status
*
* The exit status is zero if the result has been correctly evaluated.
*
* If the exit status is 1, a result has been computed, but it must be used
* with caution. This is typically used to report that one argument was out of
* its bounds.
*
* All negative values indicates that the result is not usable. For a material
* property, thereturned is `nan`.
*
* For a material property, a negative value has the following meaning:
*
* - If the exit status is -1, an argument was out of its physical bounds, or
* out of its bounds and a strict out of bounds policy is declared.
* - If the exit status is -2, a C++ exception was thrown. If the exception
* was a child of `std::exception`, the content of the string returned by
* the `what` method is copyied in the `message` field. Otherwise, the
* message field contains the "unknown exception" string.
* - If the exit status is -3, an error occured in the `C` library, i.e. the
* `errno` value was set to a non zero value during the computation.
* The value of `errno` corresponding to the error is stored to in the
* `c_error_number` field of this structure. The string returned by
* `strerrno` is returned. Note that the `errno` value is always reset to
* the value it had before the call.
* - If the exit status is -4, the computed value is invalid (either \nan`,
* `inf`, or `-inf`).
* - If the exit status is -5, the number of arguments is invalid.
*/
int status;
//! \brief error number reported by the C library.
int c_error_number;
/*!
* \brief bounds status
* This status has the following meaning:
* - zero means that no argument was outside its bounds or its physical
* bounds.
* - a negative values means that one argument went beyond its physical
* bounds.
* The absolute value gives the rank of this argument (here the rank starts
* at 1).
* - a positive value means that one argument went beyond its bounds.
* The value gives the rank of this argument (here the rank starts at 1).
*/
int bounds_status;
//! \brief error message
char msg[512];
} mfront_gmp_OutputStatus; // end of struct mfront_gmp_OutputStatusmfront_gmp_OutOfBoundsPolicy enumeration typeThe mfront_gmp_OutOfBoundsPolicy enumeration type is
defined as follows:
/*!
* \brief available out of bounds policies
*/
typedef enum {
GENERIC_MATERIALPROPERTY_NONE_POLICY, /*!<
* With this policy, nothing is done if
* the arguments are out of their
* bounds (checks are not even
* performed).
*/
GENERIC_MATERIALPROPERTY_WARNING_POLICY, /*!<
* With this policy, checks on the
* arguments are performed. If one
* argument if out of its bounds,
* this will be reported in the
* output status and an
* appropriate error message will be
* reported. The computations are
* however performed.
*/
GENERIC_MATERIALPROPERTY_STRICT_POLICY /*!<
* With this policy, checks on the
* arguments are performed. If one
* argument if out of its bounds,
* this will be reported in the
* output status and an appropriate
* error message will be reported.
*/
} mfront_gmp_OutOfBoundsPolicy; // end of mfront_gmp_OutOfBoundsPolicygeneric interface
for point-wise models implemented using the Model domain
specific languageThe Model domain specific language (DSL) is mostly
superseeded by the domain specific languages introduced in Version 3.4.3
(namely the DefaultModel, RungeKuttaModel and
ImplicitModel DSLs). However, backward-compatibility still
requires to maintain the Model domain specific
language.
It is also interesting to use of the existing point-wise models in
solvers based on the MFrontGenericInterfaceSupport. This is
the main motivation of the development for generic
interface for point-wise models implemented using the Model
domain specific language.
An interesting consequence of this development is those point-wise
models can now be tested in MTest.
$ mfront --obuild --interface=generic UO2_Shrinkage_RAPHAEL2008.mfront
Treating target : all
The following libraries have been built :
- libUO2-generic.so : UO2_Shrinkage_RAPHAEL2008_AxisymmetricalGeneralisedPlaneStrain UO2_Shrinkage_RAPHAEL2008_AxisymmetricalGeneralisedPlaneStress UO2_Shrinkage_RAPHAEL2008_Axisymmetrical UO2_Shrinkage_RAPHAEL2008_PlaneStress UO2_Shrinkage_RAPHAEL2008_PlaneStrain UO2_Shrinkage_RAPHAEL2008_GeneralisedPlaneStrain UO2_Shrinkage_RAPHAEL2008_Tridimensional
$ This can be tested in MTest. As an exemple, the
following test computes the swelling of uranium dioxide for a constant
temperature for a burn-up increasing from \(0\) to \(5\,
at.%\) (time has no physical meaning here):
@ModellingHypothesis 'Tridimensional';
@Behaviour<generic> 'src/libUO2-generic.so' 'UO2_Shrinkage_RAPHAEL2008';
@ExternalStateVariable 'BurnUp_AtPercent' {0 : 0, 1 : 5};
@ExternalStateVariable 'Temperature' 800;
@Times{0, 1 in 100};MaterialProperty DSLA new tutorial dedicated to the MaterialProperty DSL is
available on this page.
The physical constants defined in the TFEL/PhysicalConstants
library are available through the PhysicalConstants
type alias. This alias is defined by taking the numeric type and the
usage of quantity.
constexpr auto R = PhysicalConstants::R;Model DSL@StateVariable and @ExternalStateVariableThe keywords @StateVariable and
@ExternalStateVariable are synomymous of the
@Output and @Input keywords respectively.
Those aliases were introduced for consistency with behaviours.
The keywords @StateVariable,
@ExternalStateVariable, @Output,
@Input and @Parameters now allow to specify
the type of the variables they define. See this page for details on types supported by
MFront.
Note that only scalar types are supported by models.
Quantities are now fully supported in the Model DSL.
The physical constants defined in the TFEL/PhysicalConstants
library are available through the PhysicalConstants
type alias. This alias is defined by taking the numeric type and the
usage of quantity.
constexpr auto R = PhysicalConstants::R;derivative_type metafunction to higher order
derivativesIn variable declaration, the derivative_type
metafunction now accepts multiple arguments defining the variable types
with respect to which the function type is derived.
The following declarations
// declaration valid in Version 4.0 and 4.1
@LocalVariable derivative_type<derivative_type<stress, temperature>, temperature> d2E_dT2;and
// declaration valid in Version 4.1
@LocalVariable derivative_type<stress, temperature, temperature> d2E_dT2;are now equivalent.
The --pedantic option of MFront now allows
to check several criteria to ensure a good quality assurance of the
.mfront file.
$ mfront --pedantic MFrontFileName.mfrontDTAU_DDF tangent operator for the generic
interfaceThe generic interface for finite strain behaviour can
now return the derivative of the Kirchhoff stress with respect to the
spatial increment of the deformation gradient \({\left.{\underset{\tilde{}}{\mathbf{F}}}\right|_{t+\Delta\,t}}\,\cdot\,{\left.{\underset{\tilde{}}{\mathbf{F}}}\right|_{t}}^{-1}\).
For a given slip system of normal \(\vec{n}\), the climb tensor is defined as \(\vec{n}\,\otimes\vec{n}\).
If sliding systems are declared, MFront generates a
class containing the definition of all normals, slip directions,
orientation tensors (see this page for
details).
This class now contains the climb tensors:
climb_tensorsith family of slip systems’
is stored in a variable named climb_tensorsi.Note
In previous versions of
MFront, climb tensors could have been computed using the normals usingbuildFromVectorDiadicProductmethod from thestensorclass.
MTest
improvementsmadnex fileMTest test to a madnex fileThe TFELMTest library exposes a data structure named
TestDescription which describes an MTest file
and two functions called respectively loadMTestFileContent
and write.
This data structure and functions are exported in
python, as described in Section 12.4. Section 12.4.1
provides an example of use.
TestDescription data structureThe TestDescription data structure exposes the following
data members:
author, which describes the author of the test.date, which describes the date at which the test has
been created.scheme, which describes the type of test. Valid values
are mtest and ptest.description, which describes a description of the
test.behaviour, name of the behaviour to which the test is
associated. This data member is required to export the
file in the madnex file format.material, name of the material to which the test is
associated. This data member can be empty.content, content of the MTest file. This
content can be filled from an existing MTest file using the
loadMTestFileContent function.loadMTestFileContent functionThe loadMTestFileContent function loads the content of
an MTest file and stores it in the content
data member of a TestDescription data structure.
write
functionThe write function exports an MTest test,
described by a TestDescription data structure, to a
file.
The file format is deduced from the extension of the file.
Currently, only extensions associated with the madnex file
format are supported if TFEL is compiled with support
of this file format. Those extensions are: mdnx,
madnex (deprecated) or edf (experimental data
file, deprecated). Note that the behaviour member of the metadata must
be specified for export in the madnex file format.
We highly recommend to use the following substitution variables when defining the test:
@interface@, which is meant to be replaced by the
interface to be used. This is very handy if the test can be run for
different interfaces@library@, which is meant to be replaced by the path to
the shared library containing the tested behaviour.@behaviour@, which contains the name of the function
implementing the behaviour for the considered interface.madnex fileTo execute a test stored in a madnex file, the user must
specify:
madnex file--test (or
-t) command line argument.--behaviour (or -b) command line
argument.--material (or -m) command line argument. If
the material is not specified, or if the special material name
<none> is used, the behaviour associated with the
test is assumed not associated with any material.Note that the --test (or -t) command line
argument can accept regular expressions to select as set of tests.
The following example executes the UniaxialTensileTest
test associated with the Plasticity behaviour (and not
attached to any material) using the behaviour
cyranoplasticity compiled with the cyrano
interface in a shared library libCyranoBehaviours.so
located in the src subdirectory and stored in the
Plasticity.mdnx file:
$ mtest --behaviour=Plasticity --test=UniaxialTensileTest \
--@interface@=cyrano --@behaviour@="'cyranoplasticity'" \
--@library@="'src/libCyranoBehaviours.so'" \
Plasticity.mdnxmadnex fileThe user can execute all tests associated with a behaviour using the
--all-tests command line arguments. The user must specify
the name of the behaviour (using the --behaviour (or
-b) command line argument) and optionally the name of the
material (using the --material (or -m) command
line argument).
$ mtest --behaviour=Plasticity --@interface@=cyrano \
--@behaviour@="'cyranoplasticity'" \
--@library@="'src/libCyranoBehaviours.so'" \
--all-tests Plasticity.mdnx \The --all-tests command line argument is equivalent to
--test=".+".
madnex filemtest allows to select a test inside a
madnex file using the following path syntax:
madnex:<file>:<material>:<behaviour>:<test>
where:
<file> is the path to the madnex
file.<material> is the name of the material
considered. This name can be empty or <none> if the
considered test is not associated to a material.<behaviour> is the name of the behaviour<test> is the name of the testThe effect of a non-deformable mandrel located inside the pipe can be
modelled by defining the evolution of its radius \(R_{m}\) using the
@MandrelRadiusEvolution keyword. The inner radius \(R_{i}\) will then satisfy the following
unilateral boundary condition:
\[ R_{i} - R_{m} \geq 0 \]
This boundary condition is imposed by using a Lagrange multiplier. Its value is given by the contact pressure in the output file. The total pressure applied to the inner surface of the pipe is given by the sum of the imposed pressure (if any) and the contact pressure. Only the imposed inner pressure is used to compute the end cap effect.
This boundary condition is not compatible with:
If the evolution of the axial growth of the mandrel is defined using
the @MandrelAxialGrowthEvolution keyword, an axial binding
between the mandrel and the pipe is assumed, i.e. the difference between
the axial growth of the pipe \(\varepsilon^{p}_{zz}\) and the axial growth
of the mandrel \(\varepsilon^{p}_{zz}\)
is assumed to be constant to its value when the contact between the
mandrel and the pipe is detected:
\[ \varepsilon^{p}_{zz}-\varepsilon^{m}_{zz}=\textrm{Cste} \]
This axial boundary condition is not compatible with the boundary condition imposing the evolution of the axial growth of the pipe.
3D behavioursThe SmallStrainTridimensionalBehaviourWrapper class
allows to wrap a tridimensional behaviour into a behaviour usable in one
of the following modelling hypotheses:
Shear components of the strain tensor which are not meaningful for the targeted modelling hypothesis are set to zero.
After the behaviour integration, only the meaningful components of the stress tensor and stiffness matrix are retained.
The internal state variables are all declared as scalars.
For instance, let us assume that the 3D behaviour
declares an internal state variable called s. In this case,
the wrapped behaviour will then declared 6 internal state
variables associated with s named respectively
sXX, sYY, sZZ, sXY,
sXZ, sYZ.
MTestThe following code shows how to wrap a tridimensional behaviour to be used under the axisymmetrical plane strain modelling hypothesis:
// Choice of the modelling hypothesis
@ModellingHypothesis "AxisymmetricalGeneralisedPlaneStrain";
// Declaration of the behaviour
@Behaviour<
generic, // interface name
SmallStrainTridimensionalBehaviourWrapper> // wrapper
"src/libBehaviour.so" "ImplicitNorton";mtest python moduleThe following code shows how to load a tridimensional behaviour and how to wrap this behaviour to be used in plane strain:
import mtest
import tfel.material
h = tfel.material.ModellingHypothesis.TRIDIMENSIONAL
b1 = mtest.Behaviour('generic', 'src/libBehaviour.so',
'ImplicitNorton', h)
# ['ElasticStrain', 'p']
print(b1.getInternalStateVariablesNames())
b2 = mtest.Behaviour(wrapper = 'SmallStrainTridimensionalBehaviourWrapper',
library = 'src/libBehaviour.so',
function = 'ImplicitNorton',
hypothesis = 'PlaneStrain')
# ['ElasticStrainXX', 'ElasticStrainYY', 'ElasticStrainZZ',
# 'ElasticStrainXY', 'ElasticStrainXZ', 'ElasticStrainYZ', 'p']
print(b2.getInternalStateVariablesNames())The @RotationMatrix keyword now has a
Direction option which now let the user specify:
The given vectors are not required to be normalised. In the \(3D\) case, the second vector is not required to be orthogonal to the first one. If not, the second direction of orthotropy is deduced from the second vector by removing its projection along the first one.
// using direction in 2D
@RotationMatrix<Direction> {0,1};// using directions in 3D
@RotationMatrix<Direction> {{0,1,0},{1,0,0}};aster interfaceBehaviours written in the logarithmic strain framework and generated
with the aster interface were not handled by
MTest because the logarithmic strain framework is treated
by code_aster and not by the aster
interface.
However, this is an issue for users using MTest for the
identification of the behaviour, as described in Issue #55.
MTest now automatically wraps the behaviour to handle
those behaviours. The wrapper handles the pre and post-processing steps
around the behaviour integration.
generic interfaceMTest support material properties built using the
generic interface:
mtest::MaterialProperty can manipulate can load
such material properties.@MaterialProperty keyword now has a
generic option.@MaterialProperty<generic> 'YoungModulus' 'src/libGenericInconel600.so' 'Inconel600_YoungModulus';computeIntegralValue and computeMeanValue
post-processings for tests on pipesAdded two PipeTest functions to calculate the integral
and the average of a scalar value in the thickness of the tube for a
ptest problem. Each function allows to calculate the
corresponding quantities in the current or initial configurations
@AdditionalOutputs {'mean_value_initial_configuration':'SRR',
'mean_value_current_configuration':'SRR'}; // compute mean values of SRR
@AdditionalOutputs {'integral_value_initial_configuration':'SRR',
'integral_value_current_configuration':'SRR'}; // compute integral values of SRRgeneric interfaceThe @MaterialProperty keyword now have a
generic option allowing to load material properties
generated with the generic interface.
@MaterialProperty<generic> 'YoungModulus' 'src/libGenericInconel600.so' 'Inconel600_YoungModulus';Cast3M interfacePoint-wise models generated with the Cast3M interface
are now supported (see Sections 9.10 and 9.11).
@Model 'src/libM5-umat.so' 'umatm5_deziroxoxidationmodel_srma2020';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:
0 means that the criterion is not met, i.e. no failure
is detected and the pipe is sound.1 means that the criterion is met, i.e. failure is
detected and the pipe is broken.In case of failure, three policies can be selected using the
@FailurePolicy keyword:
ReportOnly: failure does not affect computation. The
evaluation of the failure criteria only affects the output file.StopComputation: failure leads to reject the current
time step. If substepping is enabled, the time step is divided by two.
With this policy, one can thus only approach the failure time, but never
go beyond.FreezeState (or
FreezeStateUntilEndOfComputation): if a failure is
detected, the state of the structure is freezed and do not evolve. No
equilibrium is performed, the behaviour is no more called and
PipeTest will output the same results again and again until
the end of computation. This option may be useful when optimizing
material parameters.@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.
The @OxidationModel keyword introduces a model which
computes an oxidation length at either the inner boundary or the outer
boundary of the pipe. This keyword must be followed by a data map with
the following entries:
model: the name of model.library: the name of the library in which the model is
available.boundary: the name of boundary on which the model is
defined. This variable must be equal to inner_boundary or
outer_boundary.An oxidation model must define an internal state variable named
OxidationLength. The values of the material properties and
external state variables passed to an oxidation model are computed on
the boundary on which the model is defined.
The definition of a least one oxidation model automatically defines
an evolution named OxidationStatus which states if an
integration point is inside an oxidation layer.
@OxidationModel{
model : 'umatm5deziroxoxidationmodel_srma2020b',
library : 'src/libUmatM5.so',
boundary : 'outer_boundary'
};DTAU_DDF tangent operator in the
GenericBehaviour classThe finite strain behaviours, generated by the generic
interface and supported by the GenericBehaviour class, can
now use the derivative of the Kirchoff stress with respect to the
spatial increment of the deformation gradient as tangent operator (See
Section 9.16.4 for details).
mfm-test-generator
improvementsmadnex filemfm-test-generator test to a madnex fileThe MFMTestGenerator library exposes a data structure
named TestDescription which describes an
mfm-test-generator file and two functions called
respectively loadMFMTestGeneratorFileContent and
write.
This data structure and functions are exported in
python, as described in Section 12.6.1. Section 12.6.1.1
provides an example of use.
TestDescription data structureThe TestDescription data structure exposes the following
data members:
author, which describes the author of the test.date, which describes the date at which the test has
been created.scheme, which describes the type of test. Valid values
are mtest and ptest.description, which describes a description of the
test.behaviour, name of the behaviour to which the test is
associated. This data member is required to export the
file in the madnex file format.material, name of the material to which the test is
associated. This data member can be empty.content, content of the mfm-test-generator
file. This content can be filled from an existing
mfm-test-generator file using the
loadMFMTestGeneratorFileContent function.loadMFMTestGeneratorFileContent functionThe loadMFMTestGeneratorFileContent function loads the
content of an mfm_test_generator file and stores it in the
content data member of a TestDescription data
structure.
write
functionThe write function exports an
mfm_test_generator test, described by a
TestDescription data structure, to a file.
The file format is deduced from the extension of the file.
Currently, only extensions associated with the madnex file
format are supported if TFEL is compiled with support
of this file format. Those extensions are: mdnx,
madnex (deprecated) or edf (experimental data
file, deprecated). Note that the behaviour member of the metadata must
be specified for export in the madnex file format.
We highly recommend to use the following substitution variables when defining the test:
@interface@, which is meant to be replaced by the
interface to be used. This is very handy if the test can be run for
different interfaces@library@, which is meant to be replaced by the path to
the shared library containing the tested behaviour.@behaviour@, which contains the name of the function
implementing the behaviour for the considered interface.python bindingsTFEL/System python moduleThe ExternalLibraryManager class now exposes the
getUnitSystem to retrieve the unit system associated with
an entry point (material property, behaviour, model).
generic
interfaceThe generic interface generates a function dedicated for
each initialize function and each modelling hypothesis supported (see
Section 9.3 for details about initialize functions).
The ExternalLibraryManager class now exposes the
following methods:
getGenericBehaviourInitializeFunctionFunctions, which
returns the initialize functions associated with a behaviour.getGenericBehaviourInitializeFunctionFunctionOutputs,
which returns the outputs of a initialize function function.getGenericBehaviourInitializeFunctionFunctionOutputs,
which returns the types of the outputs of a initialize function
function.generic
interfaceThe generic interface generates a function dedicated for
each post-processing and each modelling hypothesis supported (see
Section 9.4 for details about post-processings).
The ExternalLibraryManager class now exposes the
following methods:
getGenericBehaviourPostProcessingFunctions, which
returns the post-processings associated with a behaviour.getGenericBehaviourPostProcessingFunctionOutputs, which
returns the outputs of a post-processing function.getGenericBehaviourPostProcessingFunctionOutputs, which
returns the types of the outputs of a post-processing function.mtest python moduleThe following PipeTest methods are now available:
computeMeanValue, which computes the mean value of a
scalar variable.computeIntegralValue, which computes the integral value
of a scalar variable.import std
from mtest import PipeTest, StudyCurrentState, SolverWorkSpace, \
PipeTestConfiguration as ptc
t = PipeTest()
# geometry and meshing
t.setInnerRadius(4.2e-3)
t.setOuterRadius(4.7e-3)
t.setNumberOfElements(10)
t.setElementType('Linear')
# modelling hypothesis
t.setAxialLoading('None')
t.setTimes([0,1])
t.setInnerPressureEvolution(1.5e6)
t.setOuterPressureEvolution({0:1.5e6,1:10e6})
t.setBehaviour('LogarithmicStrain1D','castem','../behaviours/castem/libMFrontCastemBehaviours.so','umatelasticity')
t.setMaterialProperty('YoungModulus',150e9)
t.setMaterialProperty('PoissonRatio',0.3)
t.setExternalStateVariable('Temperature',{0:293.15,1:693.15})
t.setOutputFileName("pipe.res")
s = StudyCurrentState()
wk = SolverWorkSpace()
t.completeInitialisation()
t.initializeCurrentState(s)
t.initializeWorkSpace(wk)
mean_ic = t.computeMeanValue(s,'SRR',ptc.INTIAL_CONFIGURATION)
mean_cc = t.computeMeanValue(s,'SRR',ptc.CURRENT_CONFIGURATION)
integral_ic = t.computeIntegralValue(s,'SRR',ptc.INTIAL_CONFIGURATION)
integral_cc = t.computeIntegralValue(s,'SRR',ptc.CURRENT_CONFIGURATION)Behaviour classNamed arguments are now supported in the Behaviour
constructor. The following arguments can be specified:
interface: name of the interface to be used
(optional).library: name of the shared library to be loaded.function: name of the function implementing the
behaviour.hypothesis: hypothesis to be used.wrapper: name of the behaviour wrapper to be used
(optional).The following piece of code loads a behaviour implemented in the
src/libBehaviour.so shared library by the
ImplicitNorton function for the PlaneStrain
modelling hypothesis:
b = mtest.Behaviour(library = 'src/libBehaviour.so',
function = 'ImplicitNorton',
hypothesis = 'PlaneStrain')MTesttest to a madnex fileThe TestDescription data structure (see Section
10.1.1.1) and the loadMTestFileContent and
write functions (see Sections 10.1.1.2 and 10.1.1.3) are
exposed in the mtest python module.
import mtest
d = mtest.TestDescription()
d.author = 'John Doe'
d.date = '01/03/2022'
d.name = 'UniaxialTensileTest'
d.scheme = 'mtest'
d.behaviour = 'Plasticity'
mtest.loadMTestFileContent(d, 'Plasticity.mtest')
mtest.write(d,'Plasticity.mdnx')mtest python
modulegeneric interfaceMaterial properties generated with the generic interface
are supported by the mtest.MaterialProperty class.
import mtest
mp = mtest.MaterialProperty('src/libGenericInconel600.so', 'Inconel600_YoungModulus')PipeTest classThe addOxidationModel allows to define a new oxidation
model. It accepts three named arguments:
library: the name of the library in which the model is
available.model: the name of model.boundary: the name of boundary on which the model is
defined. This variable must be equal to inner_boundary or
outer_boundary.p.addOxidationModel(library = 'src/libUmatM5.so',
model = 'umatm5deziroxoxidationmodel_srma2020b',
boundary = 'outer_boundary')mfm_test_generator python modulemfm-test-generator test to a madnex fileThe TestDescription data structure (see Section
11.1.1.1) and the loadMFMTestGeneratorFileContent and
write functions (see Sections 11.1.1.2 and 11.1.1.3) are
exposed in the mfm_test_generator python
module.
import mfm_test_generator
d = mfm_test_generator.TestDescription()
d.author = 'John Doe'
d.date = '01/03/2022'
d.name = 'UniaxialTensileTest'
d.behaviour = 'Plasticity'
mfm_test_generator.loadMFMTestGeneratorFileContent(d, 'Plasticity.mfmtg')
mfm_test_generator.write(d,'Plasticity.mdnx')The PipeTest class have two methods related to failure
criteria:
addFailureCriterion, which corresponds to the
@FailureCriterion keyword (see Section 10.10).setFailurePolicy, which corresponds to the
@FailurePolicy keyword (see Section 10.10).mfront-query
improvementsMFront fileThe --list-dependencies query lists all the dependencies
of an MFront file.
If a dependency is encoded in a madnex file, an internal
representation of the path to this dependency is returned (see example
below).
$ mfront-query --list-dependencies --search-path=generate \
--madnex-search-path=MaterialProperties.mdnx \
Test.mfront
madnex:generate/MaterialProperties.mdnx:MaterialProperty::YoungModulusTestThe --output query displays information about the output
of a material property.
$ mfront-query --output Inconel600_YoungModulus.mfront
- YoungModulus (E): The Young modulus of an isotropic materialThe --inputs query displays information about the inputs
of a material property. The --state-variables query is
equivalent to --inputs.
$ mfront-query --inputs Inconel600_YoungModulus.mfront
- Temperature (TK): The temperatureThe following queries have been implemented:
--has-bounds, which returns true if a
variable has bounds, false otherwise.--bounds-type, which returns the bounds type associated
to a variable.--bounds-value, which shows the bounds value associated
as a range.--has-physical-bounds, which returns true
if a variable has physical bounds, false otherwise.--physical-bounds-type, which returns the physical
bounds type associated to a variable.--physical-bounds-value, which shows the physical
bounds value associated as a range.Those queries expects the external name of a variable as argument. The variable may be the output of the material property, any of the input or a parameter.
$ mfront-query --has-physical-bounds=Temperature Inconel600_YoungModulus.mfront
- true
$ $ mfront-query --physical-bounds-type=Temperature Inconel600_YoungModulus.mfront
Lower
$ mfront-query --physical-bounds-value=Temperature Inconel600_YoungModulus.mfront
[0:*[The --unit-system query allows to retrieve the unit
system. If no unit system is declared, an empty string is returned.
The list of initialize functions defined by a behaviour can be
retrieved using the --initialize functions query, as
follows:
mfront-query --initialize-functions Plasticity.mfront
- ElasticStrainFromInitialStress: no description available.The list of initialize function’ variables defined by a behaviour can
be retrieved using the --initialize function-variables
query.
The list of post-processings defined by a behaviour can be retrieved
using the --post-processings query, as follows:
$ mfront-query --post-processings Elasticity.mfront
- PrincipalStrain: compute the principal strain. Modified post-processing variables are:
- PrincipalStrain (εᵖ)The list of post-processing’ variables defined by a behaviour can be
retrieved using the --post-processing-variables query, as
follows:
$ mfront-query --post-processing-variables Elasticity.mfront
- PrincipalStrain (εᵖ)MTest
tests associated with a behaviour in a madnex fileThe --list-behaviour-mtest-tests command line argument
can be used to display the list of tests associated with a behaviour in
a madnex file.
Optionnally, this command line argument accept the options
sorted-by-behaviours or unsorted (see the
examples below).
$ mfront-query --list-behaviour-mtest-tests --test=".+Tensile.+" Plasticity.mdnx
- tests associated with behaviour Plasticity
- UniaxialTensileTest$ mfront-query --list-behaviour-mtest-tests=unsorted --test=".+Tensile.+" Plasticity.mdnx
UniaxialTensileTestmfm-test-generator tests associated with a behaviour in a
madnex fileThe --list-behaviour-mfm-test-generator-tests command
line argument can be used to display the list of tests associated with a
behaviour in a madnex file.
Optionnally, this command line argument accept the options
sorted-by-behaviours or unsorted (see the
examples below).
$ mfront-query --list-behaviour-mfm-test-generator-tests --test=".+Tensile.+" Plasticity.mdnx$ mfront-query --list-behaviour-mfm-test-generator-tests=unsorted --test=".+Tensile.+" Plasticity.mdnxThe following queries are available to retrieve information about climb tensors:
--climb-tensors: list all the climb tensors, sorted by
family”.--climb-tensors-by-index: list all the climb
tensors.--climb-tensors-by-slip-system: list all the climb
tensors sorted by slip systems.The query --code-block returns the information about
code block.
$ mfront-query --code-block=Integrator UserDefinedViscoplasticityTest.mfront
- Integrator:
- code:
feel -= this->deto;
if(!perturbatedSystemEvaluation){
}
const auto& s = this->sig;
const auto seq = sigmaeq(s);
const auto iseq = 1/max(seq,(this->relative_value_for_the_equivalent_stress_lower_bound) * this->young);
const auto dseq_ds = 3*deviator(s)*(iseq/2);
const auto d2seq_dsds = (Stensor4::M()-(dseq_ds^dseq_ds))*iseq;
const auto& n = dseq_ds;
const auto& dn_ds = d2seq_dsds;
feel += this->dp* n;
dfeel_ddp = n;
dfeel_ddeel += (2 * this->mu)*(this->theta) * ((this->dp) * dn_ds);
const auto mfront_udvf_f = seq;
const auto vp = [this, mfront_udvf_f] {
if(mfront_udvf_f >= stress{0}){
return strainrate{(this->A)*(std::pow(mfront_udvf_f,this->E))};
}
return strainrate{0};
}();
const auto dvp_dseqe = [this, mfront_udvf_f] {
if(mfront_udvf_f >= stress{0}){
return derivative_type<strainrate, stress>{(this->A)*((this->E)*(std::pow(mfront_udvf_f,(this->E)-(1))))};
}
return derivative_type<strainrate, stress>{0};
}();
fp -= (this->dt) * vp;
dfp_ddeel += (2 * this->mu)*(this->theta) * (-(this->dt) * dvp_dseqe * dseq_ds);tfel-check
improvementsTFEL executables and python
interpreterThe following substitutions are automatically declared:
@mfront@, @mfront-query@,
@mtest@, @mfront-doc@,
@mfm-test-generator@.
In python bindings are enabled, the @python
substitution is also automatically declared.
Those substitutions are declared after reading the configuration files and after parsing the command line arguments, so those default substitutions can be overriden by the user.
The shall_fail option allows to specify if a given
command is expected to fail (or succeed).
expected_output optionThe expected_output option to @Command
allows to specifiy the output of a command. This option may be a string
(single line output) or an array of strings (multiple lines output).
Note that the output lines of commands are always trimmed on the end.
expected_numerical_output optionThe expected_numerical_output option to
@Command allows to test the numerical output of a command.
This option must be defined as a map with two entries:
value: the expected valuecriterion_value: the criterion value used to test the
outputoutput_validation_regex optionThe output_validation_regex allows to specifiy a regular
expression which shall validate the output of the command. The output of
the command is concatenated in a single string for the test.
DTAU_DDF in generic interfaceThis feature is described in Sections 9.16.4 and 10.12.
For more details, see https://github.com/thelfer/tfel/issues/351
This feature is described in Section 13.3.8.
For more details, see https://github.com/thelfer/tfel/issues/323
This feature is described in Sections 9.17 and 13.3.7.
For more details, see https://github.com/thelfer/tfel/issues/317
This feature is described in Section sec:tfel_4.1:tfel_material:inverse_langevin_function.
For more details, see https://github.com/thelfer/tfel/issues/314
mfront interface for material properties shall generate
overloaded functions for every numerical type supportedFor more details, see https://github.com/thelfer/tfel/issues/302
  ## Issue 301: [mfront] mfront interface for material
properties shall generate a version of supporting quantites
For more details, see https://github.com/thelfer/tfel/issues/301
castem interface for point-wise models handled by the
Model DSLThis feature is described in Section 9.10. See also Section 10.9.
For more details, see https://github.com/thelfer/tfel/issues/300
castem interface for
behavioursThis feature is described in Section 9.11. See also Section 10.9.
For more details, see https://github.com/thelfer/tfel/issues/299
@MaterialProperty keyword for models described by the
Model DSLThe @MaterialProperty and @Coef keywords
have been added for consistency with DSLs related to behaviours and in
particular the @DefaultModel, @RungeKuttaModel
and @ImplicitModel DSLs. They are equivalent to the
@ConstantMaterialProperty keyword.
For more details, see https://github.com/thelfer/tfel/issues/298
<iostream> header in
modelsFor more details, see https://github.com/thelfer/tfel/issues/297
Some code blocks return boolean values and others return instances of the IntegrationResult enumeration. This is inconsistent from the user point of view. Allowing bidirectional convertion between the IntegrationResult enumeration and boolean values mitigates this issue.
For more details, see https://github.com/thelfer/tfel/issues/296
This feature is described in Section 9.1.2.
For more details, see https://github.com/thelfer/tfel/issues/295
For more details, see https://github.com/thelfer/tfel/issues/282
Model DSLFor more details, see https://github.com/thelfer/tfel/issues/276
This feature is described in Section 5.3.2.
For more details, see https://github.com/thelfer/tfel/issues/266
generic behavioursFor more details, see https://github.com/thelfer/tfel/issues/265
This feature is described in Section 5.3.1.
For more details, see https://github.com/thelfer/tfel/issues/264
TFEL’ arrayFor more details, see https://github.com/thelfer/tfel/issues/263
master branch (future version 4.1) with
gcc-8.1.0The issue is related to MFront tests using quantities
such tests fails to build with old compilers, i.e. gcc
8.1.0.
The enable-mfront-quantity-tests option can be
optionnaly specified to enable or disable tests of behaviours using
quantities. This option is ON by default.
For more details, see https://github.com/thelfer/tfel/issues/262
TFEL/Math arraysThis feature is described in Section 5.3.4.
For more details, see https://github.com/thelfer/tfel/issues/256
For more details, see https://github.com/thelfer/tfel/issues/255
This feature is described in Section 13.2.3.
For more details, see https://github.com/thelfer/tfel/issues/254
For more details, see https://github.com/thelfer/tfel/issues/249
@AdditionalOutputs keywordFor more details, see https://github.com/thelfer/tfel/issues/248
getOutputName for MaterialProperty classFor more details, see https://github.com/thelfer/tfel/issues/245 
PhysicalConstants in the Model DSLThis feature is described in Section 9.15.4.
For more details, see https://github.com/thelfer/tfel/issues/244
PhysicalConstants in the MaterialProperty
DSLThis feature is described in Section 9.14.2
For more details, see https://github.com/thelfer/tfel/issues/243
Model DSLThis feature is described in Section 9.15.3.
For more details, see https://github.com/thelfer/tfel/issues/242
Model DSLThis feature is described in Section 9.15.2.
For more details, see https://github.com/thelfer/tfel/issues/241
This feature is described in Section 9.1.
For more details, see https://github.com/thelfer/tfel/issues/239
For more details, see https://github.com/thelfer/tfel/issues/238
MFrontThis feature is described in Section 9.1.
For more details, see https://github.com/thelfer/tfel/issues/237
ptestThis feature is described in Sections 10.11 and 12.5.2.
For more details, see https://github.com/thelfer/tfel/issues/236.
The compilation process used by MFront is now documented
on this page: https://thelfer.github.io/tfel/web/compiling-mfront-shared-libraries.html
For more details, see https://github.com/thelfer/tfel/issues/235.
ptestThis feature is described in Sections 10.10 and 12.7.
For more details, see https://github.com/thelfer/tfel/issues/233.
This feature is described in Section 14.3.
 For more details, see https://github.com/thelfer/tfel/issues/231.
This feature is described in Section 14.3.
 For more details, see https://github.com/thelfer/tfel/issues/230.
 ## Issue 229:[tfel-check] Allow to specify that a command shall fail
This feature is described in Section 14.2.
For more details, see https://github.com/thelfer/tfel/issues/229.
For more details, see https://github.com/thelfer/tfel/issues/225.
For more details, see https://github.com/thelfer/tfel/issues/224.
This feature is described in depth in Section 9.2.10.
For more details, see https://github.com/thelfer/tfel/issues/223.
This feature is described in depth in Section 9.2.8.
For more details, see https://github.com/thelfer/tfel/issues/222.
For more details, see https://github.com/thelfer/tfel/issues/219.
DSL options to override material properties,
external state variables and parametersThis feature is described in Section 9.2.7.
For more details, see https://github.com/thelfer/tfel/issues/216.
Scalar external state variables can be overriden by parameters. Note
that if an external state variable is overriden, the increment of this
variable must also be overriden. If no overriding parameter is specified
for this increment, MFront will automatically define such a
parameter with a null default value.
For more details, see https://github.com/thelfer/tfel/issues/215.
For more details, see https://github.com/thelfer/tfel/issues/210.
Data to std::vector and
std::map shall work if the object is empty For more details, see https://github.com/thelfer/tfel/issues/209.
 ## Issue 208: [tfel-check] Automatic declaration of substitutions
for TFEL executables and python
interpreter
This feature is described in Section 14.1.
For more details, see https://github.com/thelfer/tfel/issues/208.
For more details, see https://github.com/thelfer/tfel/issues/207.
setParameter function for material properties generated
with the python interface
For more details, see https://github.com/thelfer/tfel/issues/200.
--parameters-file query for material propertiesFor more details, see https://github.com/thelfer/tfel/issues/199.
derivative_type metafunction to higher order
derivativesFor more details, see https://github.com/thelfer/tfel/issues/197.
ExternalMaterialPropertyDescription classThis feature is described in Section 4.3.2.1.
For more details, see https://github.com/thelfer/tfel/issues/192.
ExternalMaterialPropertyDescription
classThose features are described in Section 4.3.2.2.
For more details, see https://github.com/thelfer/tfel/issues/191.
@Output from compiled file through python
bindingsThis feature is described in Section 4.1.9.
For more details, see https://github.com/thelfer/tfel/issues/187.
@Material, @Law, @Author,
@Date, @Description from compiled file through
Python bindingThose features are described in Sections 4.1.5, 4.1.6, 4.1.7 and 4.1.8.
For more details, see https://github.com/thelfer/tfel/issues/186.
rkCastem algorithm assumes that a variable
young is definedThis feature is described in Section 9.8.1.
For more details, see https://github.com/thelfer/tfel/issues/183.
This feature is described in Section 13.2.1.
For more details, see https://github.com/thelfer/tfel/issues/181
This feature is described in Section 13.2.2.
For more details, see https://github.com/thelfer/tfel/issues/180
generic
interfaceThe feature is described in Section 10.6.
For more details, see : https://github.com/thelfer/tfel/issues/177.
The feature is described in Section sec:tfel:4.1:ptest:integral_value.
For more details, see : https://github.com/thelfer/tfel/issues/175.
Previous versions of TFEL/Math did not implement the
evaluation the derivative of the formula power<N>(x).
This is now implemented properly.
For more details, see : https://github.com/thelfer/tfel/issues/172.
The computation of the derivative of power functions lead to the
following issues in previous versions of TFEL. The
derivative of a(x)**b(x) with respect to x was
computed as
(b(x)*a(x)**b(x)/a(x))*da(x)+log(a(x))*a(x)**b(x)*db(x)
where da(x) and db(x) denote the deriative of
a and with respect to x.
b(x)*a(x)**b(x)/a(x)*da(x) is singular
if a(x) is null. This term is now computed as
b(x)*a(x)**(b(x)-1)*da(x).log(a(x))*a(x)**b(x)*db(x) is singular
if a(x) is null although log(a(x))*a(x)**b(x)
has a well defined limit as a tends to zero. The new implementation
takes this case into account.For more details, see : https://github.com/thelfer/tfel/issues/171.
In previous versions, the formula x**N was evaluated
using std::pow(x,N) even if N was an
integer.
This formula is now evaluated as:
tfel::math::power<N>(x) if N is in
the ranges [-16:-1] or [2:16].x**0 is evaluated as 1.x**1 is evaluated as x.std::pow(x,N) otherwise.See also Issue 172.
For more details, see : https://github.com/thelfer/tfel/issues/170.
In previous versions, the evaluation of derivatives of a formula
could lead to inefficient evaluation tree. For example, the derivative
of the formula x+exp(y) with respect to x was
computed as 1+exp(y)*0, which required a useless evaluation
of exp(y). Version 4.1 evaluates this derivative as
1.
For more details, see : https://github.com/thelfer/tfel/issues/169.
reportContractViolation on GPUsSee Section 3.1.
For more details, see : https://github.com/thelfer/tfel/issues/157.
See Sections 2.1 and 7.2.
For more details, see : https://github.com/thelfer/tfel/issues/150.
constexpr all the thingsSee Section 7.1.
For more details, see : https://github.com/thelfer/tfel/issues/148.
For more details, see : https://github.com/thelfer/tfel/issues/146.
This feature is described in Section 9.6.
For more details, see : https://github.com/thelfer/tfel/issues/145.
mfront fileThis feature is described in Section 13.1.1.
For more details, see : https://github.com/thelfer/tfel/issues/144.
This feature is described in Section 9.5.
For more details, see : https://github.com/thelfer/tfel/issues/143.
For more details, see : https://github.com/thelfer/tfel/issues/125.
This feature is described in Section 9.2.6.
For more details, see : https://github.com/thelfer/tfel/issues/124.
This feature is described in Section 9.2.5.
For more details, see : https://github.com/thelfer/tfel/issues/123.
Implicit DSLFor more details, see : https://github.com/thelfer/tfel/issues/122.
madnex fileThis feature is described in depth in Section 10.1.
For more details, see : https://github.com/thelfer/tfel/issues/111.
For more details, see : https://github.com/thelfer/tfel/issues/108.
This feature is described in Section 9.2.4.
For more details, see : https://github.com/thelfer/tfel/issues/94.
This feature is described in Section 9.13.
For more details, see : https://github.com/thelfer/tfel/issues/92.
This feature is described in Section 9.2.2.
For more details, see : https://github.com/thelfer/tfel/issues/90.
This feature is described in Section 9.12.
For more details, see : https://github.com/thelfer/tfel/issues/90.
This feature is described in Section 9.2.11.
For more details, see : https://github.com/thelfer/tfel/issues/83.
This feature is described in Section 9.2.9.
For more details, see : https://github.com/thelfer/tfel/issues/82.
aster interfaceThe wrapper is described in Section 10.5.
For more details, see : https://github.com/thelfer/tfel/issues/55.
For more details, see : https://github.com/thelfer/tfel/issues/57.
This option is described in depth in Section 9.2.3.
For more details, see : https://github.com/thelfer/tfel/issues/50.
The feature is described in Section 10.2.
For more details, see : https://github.com/thelfer/tfel/issues/38.
tfel-config now supports an command line option named
--python-bindings-support which displays true if
python bindings are available, false
otherwise.
For more details, see : https://github.com/thelfer/tfel/issues/39.
madnex supporttfel-config now supports an command line option named
--madnex-support which displays true if madnex
files are supported, false otherwise.
For more details, see : https://github.com/thelfer/tfel/issues/38.
MTest file generation (all kind of state
variables)In previous versions, only scalar and symmetric tensors state
variables were supported when generation MTest file on
integration failure.
All kind of state variables are now supported.
For more details, see : https://github.com/thelfer/tfel/issues/36.
The Behaviour class has new methods:
expandExternalStateVariablesNames (wrapped in
python)getExternalStateVariableType (wrapped in python)getExternalStateVariablePosition (wrapped in
python)The @ExternalStateVariable now allows to define
tensorial external state variables components by components or an array
as follows:
// Definition of an symmetric tensor external state variable
@ExternalStateVariable<function> "g" {"0", "1", "2", "3 * t", "4", "5 * t"};
// Definition of an symmetric tensor external state variable components by components
@ExternalStateVariable<function> "g2XX" "0";
@ExternalStateVariable<function> "g2YY" "2";
@ExternalStateVariable<function> "g2ZZ" "t";
@ExternalStateVariable<function> "g2XY" "3";
@ExternalStateVariable<function> "g2XZ" "4";
@ExternalStateVariable<function> "g2YZ" "5*t";For more details, see : https://github.com/thelfer/tfel/issues/28.
For more details, see : https://github.com/thelfer/tfel/issues/28.
The type of the external state variables are now exported.
ExternalLibraryManager has a new method called
getUMATExternalStateVariablesTypes (wrapped in
python)ExternalBehaviourDescription has a new method called
evtypes (wrapped in python)Generation of MTest file also supports tensor external
state variables.
For more details, see : https://github.com/thelfer/tfel/issues/27.
For more details, see : https://github.com/thelfer/tfel/issues/26.
This feature is described in Section 9.3.
For more details, see : https://github.com/thelfer/tfel/issues/25.
This feature is described in Section 9.4.
For more details, see : https://github.com/thelfer/tfel/issues/24.
Some exported variables used to contain a double underscore in their names. Such names are reserved by the C++ standard for internal use by the compilers.
For more details, see : https://github.com/thelfer/tfel/issues/23.
This option is described in depth in Section 9.2.1.
For more details, see : https://github.com/thelfer/tfel/issues/22.
As described in Section 12.3, named parameters are now supported in
the constructor of the Behaviour class. The (optional)
wrapper argument can now be used to specify a behaviour
wrapper.
Currently, two behaviours wrappers are available:
LogarithmicStrain1D: which turns a small strain
behaviour in axisymmetrical generalised plane strain into a finite
strain behaviour in the logarithmic strain framework following the
ETO-PK1 kinematic assumption used by the MTest for the
simulation of pipe in finite strain.SmallStrainTridimensionalBehaviourWrapper which allows
to use a small strain tridimensional behaviour under the following
modelling hypotheses: axisymmetrical generalised plane strain, plane
strain, axisymmetry.For more details, see : https://github.com/thelfer/tfel/issues/20.
3D behaviour in ptestThanks the SmallStrainTridimensionalBehaviourWrapper
class detailled in Section 10.3, tridimensional behaviours can be used
under the following modelling hypotheses: generalised plane strain,
plane strain, axisymmetrical generalised plane strain.
For more details, see : https://github.com/thelfer/tfel/issues/18.
MTestThis option is described in depth in Section 10.4.
For more details, see : https://github.com/thelfer/tfel/issues/15.