TFEL,
MFront and MTestTFEL libraries
TFEL/Math features
TFEL/Material
features
MFront
mfront-query
tfel-check
flangStress, Time from the tfel::math
namespaceStandardElastoViscoPlasticity’s inelastic_flowStandardElastoViscoPlasticity’s
inelastic_flow@AuxiliaryStateVariable using
StandardElastoViscoPlasticity’s inelastic_flow@AuxiliaryStateVariable using
StandardElastoViscoPlasticity’s stress_potentiallibc++ is usedzero method to create tensorial objects@Integrator for the Implicit DSLs and the
Default DSLs@FlowRule block in isotropic
DSLs@GenerateMTestFileOnFailure
keyword@GenerateMTestFileOnFailure
keyword@GenerateMTestFileOnFailure
keyword@ComputeStress and
@ComputeFinalStressTFELConfig, TFELMFront and
TFELMTest@Includes, @Link and
@TFELLibraries to the `Model DSLTFEL librairies in material propertiesTFELHOME environment variableTFEL_APPEND_VERSION and
TFEL_VERSION_FLAVOURTFEL’s version and flavourTFEL_APPEND_VERSION or
TFEL_VERSION_FLAVOUR is definedWindows’s
MAX_PATH limitModel DSL can be embedded in
behaviours using the @Model keywordpybindEuroplexus interface has been removed, as
Europlexus now uses the generic interface
through MGIS (see https://github.com/thelfer/tfel/issues/739 for
details).TFEL_APPEND_VERSION set to
ON or when defining the string variable
TFEL_VERSION_FLAVOUR, the python modules are
now modified to reflect those information. This old behaviour can be
restored by setting the unversioned-python-module-names
option to ON.Stress,
Temperature, etc..) have been moved from
tfel::math to tfel::math::unit.IsotropicHardeningRule::computeElasticLimitAndDerivative
now returns the derivative of the elastic limit (computed at the middle
of the time step) with respect to the equivalent plastic strain at the
middle of the time step rather than the derivative with respect to the
increment of the equivalent plastic strain.
TFEL librariesTFEL to work properlyDepending on the system and compilation options, some of following
variables shall be set for TFEL to work properly:
TFELHOME, PATH, LD_LIBRARY_PATH
and PYTHONPATH.
TFEL now installs automatically the following files in
the installation directory (refered to
<install_prefix> in the following):
<install_prefix>/share/tfel/env/env.sh for
UNIX systems and the bash shell. This file
shall be used as follows:
$ source <install_prefix>/share/tfel/env/env.sh<install_prefix>\share\tfel\env\env.ps1 for
PowerShell shell under Windows. This file
shall be used as follows:
$ .\<install_prefix>\share\tfel\env\env.ps1<install_prefix>\share\tfel\env\env.bat for
the historical cmd shell under Windows. This
file shall be used as follows:
$ call <install_prefix>\share\tfel\env\env.batNote
Those variables are not required if
TFELis installed system-wide (for instance in/usr/local) and that theTFEL’s binaries are not relocated (i.e. moved to a different directory than the one specified during the compilation process as the installation directory).
This version now supports a new environment variable to specify the
TFEL installation directory that always supersedes the
TFELHOME environment variable. The name of this variable
depends on the version of the project, the fact that a development
version has been compiled and the flavour (optionally specified with the
cmake variable TFEL_VERSION_FLAVOUR). The name
of this variable can be retrieved with the --tfel-home
option of tfel-config described below.
tfel-config--registry-key
optionOn Windows, the --registry-key option
returns the registry key which is used to determine the TFEL’s
installation path.
--tfel-home
optionThe --tfel-home option returns the environment variable
in which the TFEL’s installation path shall be defined.
$ tfel-config-5.1.0-dev-release --tfel-home
TFELHOME_5_1_0_dev_release
--python-module-suffix optionThis option return the suffix of the python module. Such
suffix is not empty only the following conditions are met:
TFEL has been compiled with option
TFEL_APPEND_VERSION set to ON and or with the
string variable TFEL_VERSION_FLAVOUR defined,unversioned-python-module-names option has been set
to ON (the default value if OFF).The option --python-module-suffix is only available if
the python bindings is available.
--configThis option requests flags associated with the
TFELConfig library.
--mfront-log-streamThis option requests flags associated with the
MFrontLogStream library.
--mfrontThis option requests flags associated with the
TFELMFront library.
--mtestThis option requests flags associated with the TFELMTest
library.
$ tfel-config-5.1.0-release --python-module-suffix
5_1_0_release
TFEL/Math
featurestfel::types
namespaceThe tfel::types namespace contains type aliases that are
helpful to deduce a type from another. This is mostly useful to support
quantities.
The implementation of the computeLambda provides a
simple example of its usage:
template <tfel::math::ScalarConcept StressType>
TFEL_HOST_DEVICE constexpr StressType computeLambda(
const StressType& young, const types::real<StressType>& nu) noexcept
requires(tfel::math::checkUnitCompatibility<tfel::math::unit::Stress,
StressType>()) {
return nu * young / ((1 + nu) * (1 - 2 * nu));
}
zero method to
create tensorial objectsA static method named zero is now available to create
fixed-size tensorial objects.
constexpr auto s = stensor<2u, double>::zero();The sortEigenValues function takes a vector of three
values and sort them in ascending or descending order. This function is
useful has the eigenvalues returned by
stensor::computeEigenValues can only partially sorted
depending on the space dimension, except in 3D:
1D, the eigenvalues are never sorted as the rotation
matrix giving the eigen tensors must be the identity.2D, only the inplane eigenvalues can be sorted: the
third eigenvalue is always given by the out of plane direction.TFEL/Material
featuresIsotropicModuli objects are defined for the elastic
moduli of an isotropic material. It makes the manipulation of isotropic
materials easier. See
TFEL/Material/IsotropicModuli.hxx.
The Eshelby and Hill tensors which were available in isotropic medium
are now also available in anisotropic medium. See
TFEL/Material/IsotropicEshelbyTensor.hxx for isotropic
medium and TFEL/Material/AnisotropicEshelbyTensor.hxx for
anisotropic medium.
The localisation tensors which connect a remote uniform strain to the
local strain in an ellipsoid are available both in isotropic and
anisotropic medium. See
TFEL/Material/LocalisationTensor.hxx for isotropic medium,
and TFEL/Material/AnisotropicEshelbyTensor.hxx for
anisotropic medium.
Different homogenization bounds are available for an arbitrary number of phases, in dimension 2 or 3:
Ponte Castaneda and Willis scheme for distributions of ellipsoidal
inclusions for biphasic media is available, see
TFEL/Material/LinearHomogenizationSchemes.hxx
The creation of ParticulateMicrostructure objects is
possible and permits to consider very general microstructures, with an
arbitrary number of phases, each phase being a distribution of
ellipsoidal inclusions with very general properties. The construction of
such particulate microstructures is detailed in the documentation of the
TFEL/Material library.
Moreover, three classical schemes are implemented for these microstructures:
Some polarizations can also be imposed on each phase, and the strain localisators can be provided.
Python bindings are generated using the pybind11
library.
tfel.material.homogenizationSome new functionalities are available for homogenization, via the
tfel.material.homogenization module. It mirrors the
functionalities available in the namespace
tfel::material::homogenization::elasticity.
MFrontThis version introduces the following main features in
MFront:
Many warnings have been added to detect potential misuses of
MFront or known bad practices.
Reporting warnings is activated by default and can be disabled by
passing the command line argument --report-warnings=false
to MFront.
Warnings are associated with keywords and code blocks. Warnings can
be disabled by appending the safe option to them. For
instance, in an implicit DSL, specifying a convergence threshold greater
than \(10^{-10}\) is considered to
loose in most cases and thus triggers a warning. This warning can be
disabled as follows:
@Epsilon<safe> 1;This safe option can be ignored by passing the
--ignore-safe command line argument to MFront.
This argument is useful when analysing an existing file (written by
another person) to question implementation choices.
@TangentOperator.Default family@Integrator code block.@Integrator code block.@Integrator code block.@Integrator code block or in
UpdateAuxiliaryStateVariable code block.Dt or all
the tangent operator blocks are used in the
@PredictionOperator code block, if defined.Dt or all
the tangent operator blocks are used in the
@TangentOperator code block, if defined.Dt or all
the tangent operator blocks are used in the @Integrator
code block if the implementation declares that the
@Integrator computes it (using any of the
@ProvidesTangentOperator and
@ProvidesSymmetricTangentOperator) keywords).Dt
and any of the tangent operator blocks are used in the
@Integrator code block if a @TangentOperator
code block has been declared or if the implementation has not stated
that it shall compute the consistent tangent operator.A warning is reported if the implementation of the flow rule(s) contains:
dt,eto at the beginning of the time step,deto,sig,theta parameter,@Model keyword).Note
Using the increment of the external state variable and the time increment to compute the rate of an external state variable can be legitimate, but it is better to compute this rate in [InitLocalVariables?] and take into account the fact that the
Cast3Msolver may set the time increment to zero when activating is forced convergence algorithm.
A warning is reported if the implementation of the flow rule(s) does not contain:
f and its derivative df_dseq,df_dp when required,R and dR_dp is an isotropic harderning
rule has been defined for this flow rule.theta) or the iterMax parameter.@Model keyword).@InitializeLocalVariablesCast3M interfaceCast3M
interface, which is a portability issue as the behaviour can’t be
compiled with other interfaces:
@CastemGenerateMTestFileOnFailure,
@UMATGenerateMTestFileOnFailure,
@CastemUseTimeSubStepping,
@UMATUseTimeSubStepping,
@CastemMaximumSubStepping,
@UMATMaximumSubStepping,
@CastemDoSubSteppingOnInvalidResults,
@UMATDoSubSteppingOnInvalidResults,
@CastemFiniteStrainStrategy,
@UMATFiniteStrainStrategy,
@CastemFiniteStrainStrategies and
@UMATFiniteStrainStrategies.generic interface@GenericInterfaceGenerateMTestFileOnFailure to the
generic interface, which is a portability issue as the
behaviour can’t be compiled with other interfaces.@BehaviourVariable keyword@BehaviourVariable first_phase_plastic_behaviour {
file: "Plasticity.mfront",
variables_suffix: "1",
external_names_prefix: "FirstPhase",
store_gradients: true,
store_thermodynamic_forces: true,
shared_material_properties: {".+"},
shared_external_state_variables: {".+"}
};@Model keywordIn previous versions, the @Model keyword allowed to call
from a behaviour point-wise models using the historical
Model DSL.
The @Model keyword now allows to use point-wise models
implemented using the following DSLs: DefaultModel,
RungeKuttaModel and ImplicitModel. In this
case, a behaviour variable factory is automatically associated with the
point-wise models which shares all its material properties and external
state variables with the calling behaviour. Every persistent variables
of the point-wise model are declared as auxiliary state variables. For
each persistent variable of the point-wise model, a local variable meant
to contain the increment of this variable over the time step is
declared.
Point-wise models are called at the initialization stage of the
behaviour. The auxiliary state variables associated with the point-wise
models are updated at beginning of the
updateAuxiliarySateVariables method before
any user defined code (see the
@UpdateAuxiliaryStateVariables keyword).
The following command line arguments are now supported:
--report-warnings: this command line argument enables
or disables the reporting of warnings:
--report-warnings or
--report-warnings=true enable the reporting of warnings
(which is the default behaviour of MFront).--report-warnings=false disables the reporting of
warnings.--warning-error: this command line argument allows to
treat warnings as errors.
--warning-error or --warning-error=true
turns warnings into errors.--warning-error=false does not turn warnings into
errors (which is the default behaviour of MFront).-Werror is equivalent to
--warning-error=true.-ignore-safe allows to ignore the safe
option of keywords and code blocks.Isotropic DSLs all introduced the elastic strain as a state variable. When the elastic material properties are now to be constant in time, then the Hooke law can be written in an incremental form \[ {\left.\underline{\sigma}\right|_{t+\Delta\,t}}={\left.\underline{\sigma}\right|_{t}}+\lambda\,{\mathrm{tr}{\left(\Delta\,\underline{\varepsilon}^{\mathrm{to}}\right)}}+2\,\mu\,{\left(\Delta\,\underline{\varepsilon}^{\mathrm{to}}-\Delta\,p\,{\left.n\right|_{t+\theta\,\Delta\,t}}\right)} \] where \(\lambda\) and \(\mu\) are the first Lamé’s coefficient and the shear modulus, \(\Delta\,p\) is the increment of the equivalent plastic strain and \({\left.n\right|_{t+\theta\,\Delta\,t}}\) the flow direction at the middle of the time step.
The use_stress_update_algorithm DSL option prevents the
declaration of the elastic strain and switches to this incremental form
to compute the stress.
@DSL IsotropicStrainHardeningMisesCreep{
use_stress_update_algorithm : true
};The @IsotropicHardeningRule and
@IsotropicHardeningRules allow to use the isotropic
hardening rules available in the StandardElastoViscoPlasticity
brick.
@IsotropicHardeningRule "Voce" {flow_id : 0, R0 : 125e6, Rinf : 500e6, b : 20};@IsotropicHardeningRules{
flow_id : 0,
isotropic_hardening : "Voce" {R0 : 125e6, Rinf : 500e6, b : 20},
isotropic_hardening : "Linear" {R0 : 50e6}
};IsotropicPlasticMisesFlow DSLIf an isotropic hardening rule is defined in the
IsotropicPlasticMisesFlow DSL, and if no flow rule is
defined, the following flow rule is automatically defined:
@FlowRule {
f = seq - R;
df_dseq = 1;
df_dp = -dR_dp;
}The following flow rules are currently available: Data,
Linear, Power,
StrainRateSensitive, Swift,
UserDefined, and Voce.
This list can be retrieved as follows:
$ mfront --list-isotropic-hardening-rules@Predictor code blockThe code block @Predictor allows to specify an intial
guess for the (visco-)plastic strain increments.
@Predictor{
dp = sqrt(deto| deto);
}StandardElastoViscoPlasticity brickAll inelastic flows now allows to change the external name of the
equilvaent strain with the equivalent_strain_external_name
option.
@Brick StandardElastoViscoPlasticity{
stress_potential : Hooke{young_modulus : 150e9, poisson_ratio : 0.3},
inelastic_flow : "Plastic" {
criterion : "Mises",
isotropic_hardening : "Linear" {R0 : 33e6, H : 438e6},
equivalent_strain_external_name : "CumulatedEquivalentPlasticStrain"
}
};All inelastic flows now allows the save the value of the stress
criterion at \(t+\theta\,\Delta\,t\) in
a dedicated auxiliary state variable by setting the
save_stress_criterion option to true.
The external name of this auxiliary state variable defaults to
EquivalentStress + id, where id is the identifier of the
inelastic flow. This name can be changed using the
stress_criterion_external_name option.
@Brick StandardElastoViscoPlasticity{
stress_potential : Hooke{young_modulus : 150e9, poisson_ratio : 0.3},
inelastic_flow : "Plastic" {
criterion : "Mises",
isotropic_hardening : "Linear" {R0 : 33e6, H : 438e6},
stress_criterion_external_name : "StressCriterion",
save_stress_criterion : true
}
};All inelastic flows now allows the save the value of the stress
criterion at \(t+\theta\,\Delta\,t\) in
a dedicated auxiliary state variable by setting the
save_yield_surface_radius option to true.
The external name of this auxiliary state variable defaults to
YieldSurfaceRadius + id, where id is the identifier of the
inelastic flow. This name can be changed using the
yield_surface_radius_external_name option.
@Brick StandardElastoViscoPlasticity{
stress_potential : Hooke{young_modulus : 150e9, poisson_ratio : 0.3},
inelastic_flow : "Plastic" {
criterion : "Mises",
isotropic_hardening : "Linear" {R0 : 33e6, H : 438e6},
yield_surface_radius_external_name : "CurrentYieldStrength",
save_yield_surface_radius : true
}
};The save_thermal_expansion boolean option has been
introduced in all stress potentials deriving from
the HookeStressPotentialBase.
This option states if the computed thermal expansion(s) at the end of
the time step shall be stored in an auxiliary state variable. The
external name of this variable is ComputedThermalExpansion.
For an isotropic thermal expansion, this variable is a scalar. For an
orthotropic material, this variable is an array of (3) scalars.
@Brick StandardElastoViscoPlasticity{
stress_potential : Hooke{
young_modulus : 150e9,
poisson_ratio : 0.3,
thermal_expansion : 1e-5,
save_thermal_expansion : true
}
};@ElasticMaterialProperties and
@ComputeStiffnessTensorThe @ElasticMaterialProperties and
@ComputeStiffnessTensor now accept the same options than
the stress potentials deriving from the
HookeStressPotentialBase:
@ElasticMaterialProperties{
young_modulus: 150e9,
poisson_ratio: 0.3
};@ComputeThermalExpansionThe @ComputeThermalExpansion keyword now accepts the
same options than the stress potentials deriving from the
HookeStressPotentialBase:
@ComputeThermalExpansion{
thermal_expansion1: 1.e-5,
thermal_expansion2: 0.2e-5,
thermal_expansion3: 1.2e-5,
thermal_expansion_reference_temperature: 293.15,
initial_geometry_reference_temperature: 293.15,
save_thermal_expansion: true
};@HillTensorThe @HillTensor keyword now accepts the same options
than the Hill’s stress criterion available in the
StandardElastoViscoPlasticity brick:
@HillTensor H {F: 0.371, G: 0.629, H: 4.052, L: 1.5, M: 1.5, N: 1.5};mfront-queryThe following command line arguments are now supported:
--report-warnings: this command line argument enables
or disables the reporting of warnings:
--report-warnings or
--report-warnings=true enable the reporting of warnings
(which is the default behaviour of mfront-query).--report-warnings=false disables the reporting of
warnings.--warning-error: this command line argument allows to
treat warnings as errors.
--warning-error or --warning-error=true
turns warnings into errors.--warning-error=false does not turn warnings into
errors (which is the default behaviour of
mfront-query).-Werror is equivalent to
--warning-error=true.tfel-checkBy default, tfel-check discards a command failure if at
least one test is defined. The rationale behind this choice is that some
command may succeed in producing the expected results but may still fail
to exit properly.
This behavior can be controlled by the
--discard-commands-failure which takes true or
false as argument.
$ tfel-check --discard-commands-failure=false
entering directory '/tmp/tests'
* beginning of test './test.check'
** Exec-1 ./main [ FAILED]
** Compare-1 'results.res' and 'results.res', column '1' [SUCCESS]
* end of test './test.check' [ FAILED]
======
$ tfel-check --discard-commands-failure=true
entering directory '/tmp/tests'
* beginning of test './test.check'
** Exec-1 ./main [ FAILED]
** Compare-1 'results.res' and 'results.res', column '1' [SUCCESS]
* end of test './test.check' [SUCCESS]
======
@TFELLibrariesThe @TFELLibraries keyword let the user specify TFEL
libraries to link with. This keyword must be followed by an array of
strings.
The following libraries are available: Config,
Exception, Glossary, Tests,
UnicodeSupport, Utilities,
System, Math, MathCubicSpline,
MathKriging, MathParser, NUMODIS,
Material, MFront, MTest.
@TFELLibraries {"MathParser"};New tutorials on implementation of homogenization schemes for biphasic linear elastic media are available in the gallery.
New tutorials on implementation of homogenization schemes in
non-linear elasticity are available in the gallery: Taylor scheme, Sachs
scheme, \(\beta\)-rule. These tutorials
use the keyword @BehaviourVariable for the integration and
the computation of tangent operator of the local behaviours. The
implementation shows how to use any behaviour law on each phase.
Python bindings are now generated using the pybind11
library.
mfront modulesetDebugMode function is now available.For more details, see https://github.com/thelfer/tfel/issues/849
For more details, see https://github.com/thelfer/tfel/issues/846
flang For more details, see https://github.com/thelfer/tfel/issues/741
The list of internal state variables are now shown in the comment of the generated example of input file:
**
** File generated by MFront from the Norton.mfront source
** Example of how to use the Norton behaviour law
** Author Helfer Thomas
** Date 23 / 11 / 06
**
*Material, name=@CALCULIXBEHAVIOUR_NORTON
** list of internal state variables:
** <SDV1: ElasticStrain_0>, <SDV2: ElasticStrain_1>, <SDV3: ElasticStrain_2>,
** <SDV4: ElasticStrain_3>, <SDV5: ElasticStrain_4>, <SDV6: ElasticStrain_5>,
** <SDV7: EquivalentViscoplasticStrain>
*Depvar
7
** The material properties are given as if we used parameters to explicitly
** display their names. Users shall replace those declaration by
** theirs values
*User Material, constants=4
<NortonCoefficient>, <NortonExponent>, <YoungModulus>, <PoissonRatio>
For more details, see https://github.com/thelfer/tfel/issues/822
For more details, see https://github.com/thelfer/tfel/issues/793
Stress, Time from the tfel::math
namespaceFor more details, see https://github.com/thelfer/tfel/issues/790
For more details, see https://github.com/thelfer/tfel/issues/789
For more details, see https://github.com/thelfer/tfel/issues/779.
For more details, see https://github.com/thelfer/tfel/issues/778
For more details, see https://github.com/thelfer/tfel/issues/777
StandardElastoViscoPlasticity’s inelastic_flowThis feature is described in Section 5.6.1.
For more details, see https://github.com/thelfer/tfel/issues/763
StandardElastoViscoPlasticity’s inelastic_flowThis feature is described in Section 5.6.3.
For more details, see https://github.com/thelfer/tfel/issues/762
@AuxiliaryStateVariable using
StandardElastoViscoPlasticity’s inelastic_flowThis feature is described in Section 5.6.2.
For more details, see https://github.com/thelfer/tfel/issues/761
@AuxiliaryStateVariable using
StandardElastoViscoPlasticity’s stress_potentialThis feature is described in Section 5.6.4.
For more details, see https://github.com/thelfer/tfel/issues/760
For more details, see https://github.com/thelfer/tfel/issues/739
libc++ is usedFor more details, see https://github.com/thelfer/tfel/issues/708
For more details, see https://github.com/thelfer/tfel/issues/724
zero method to create tensorial objectsThis feature is described in Section 3.2.
For more details, see https://github.com/thelfer/tfel/issues/721
@Integrator for the Implicit DSLs and the
Default DSLs
For more details, see https://github.com/thelfer/tfel/issues/717
For more details, see https://github.com/thelfer/tfel/issues/698
For more details, see https://github.com/thelfer/tfel/issues/661
@FlowRule block in isotropic
DSLsFor more details, see https://github.com/thelfer/tfel/issues/702
 ## Issue #697: [cyrano] Add a warning when the maximum number of sub steppings is too high
For more details, see https://github.com/thelfer/tfel/issues/697
@GenerateMTestFileOnFailure keywordFor more details, see https://github.com/thelfer/tfel/issues/696
@GenerateMTestFileOnFailure
keywordFor more details, see https://github.com/thelfer/tfel/issues/695
@GenerateMTestFileOnFailure
keywordFor more details, see https://github.com/thelfer/tfel/issues/694
For more details, see https://github.com/thelfer/tfel/issues/692
For more details, see https://github.com/thelfer/tfel/issues/690
@ComputeStress and
@ComputeFinalStressFor more details, see https://github.com/thelfer/tfel/issues/689
TFELConfig, TFELMFront and
TFELMTestThis feature is described in Section 2.3.
For more details, see https://github.com/thelfer/tfel/issues/685
@Includes, @Link and
@TFELLibraries to the `Model DSLFor more details, see https://github.com/thelfer/tfel/issues/684
TFEL librairies in material propertiesFor more details, see https://github.com/thelfer/tfel/issues/683
For more details, see https://github.com/thelfer/tfel/issues/677
TFELHOME environment variableFor more details, see https://github.com/thelfer/tfel/issues/676
TFEL_APPEND_VERSION and
TFEL_VERSION_FLAVOURFor more details, see https://github.com/thelfer/tfel/issues/674
TFEL’s version and flavourFor more details, see https://github.com/thelfer/tfel/issues/673
TFEL_APPEND_VERSION or
TFEL_VERSION_FLAVOUR is definedFor more details, see https://github.com/thelfer/tfel/issues/672
Windows’s
MAX_PATH limitFor more details, see https://github.com/thelfer/tfel/issues/667
For more details, see https://github.com/thelfer/tfel/issues/666
For more details, see https://github.com/thelfer/tfel/issues/654
Model DSL can be embedded in
behaviours using the @Model keywordFor more details, see https://github.com/thelfer/tfel/issues/640
pybindFor more details, see https://github.com/thelfer/tfel/issues/293