DefaultCZMDSL
keywords@Author
keyword@AuxiliaryStateVar
keyword@AuxiliaryStateVariable
keyword@Behaviour
keyword@Bounds
keyword@Brick
keyword@Coef
keyword@ComputeThermalExpansion
keyword@DSL
keyword@Date
keyword@Description
keyword@ExternalStateVar
keyword@ExternalStateVariable
keyword@Import
keyword@Includes
keyword@InitLocalVariables
keyword@InitLocalVars
keyword@InitializeLocalVariables
keyword@IntegerConstant
keyword@Integrator
keyword@Interface
keyword@IsTangentOperatorSymmetric
keyword@IsotropicBehaviour
keyword@IsotropicElasticBehaviour
keyword@Library
keyword@Link
keyword@LocalVar
keyword@LocalVariable
keyword@MFront
keyword@Material
keyword@MaterialLaw
keyword@MaterialProperty
keyword@Members
keyword@ModellingHypotheses
keyword@ModellingHypothesis
keyword@OrthotropicBehaviour
keyword@Parameter
keyword@Parser
keyword@PhysicalBounds
keyword@PredictionOperator
keyword@Private
keyword@Profiling
keyword@ProvidesSymmetricTangentOperator
keyword@ProvidesTangentOperator
keyword@RequireStiffnessOperator
keyword@RequireStiffnessTensor
keyword@RequireThermalExpansionCoefficientTensor
keyword@Sources
keyword@StateVar
keyword@StateVariable
keyword@StaticVar
keyword@StaticVariable
keyword@TangentOperator
keyword@UpdateAuxiliaryStateVariables
keyword@UpdateAuxiliaryStateVars
keyword@UseQt
keyword@Author
keywordThe @Author
keyword is used give the name of the person who wrote the mfront
file.
All the following words are appended to the author’s name up to a final semi-colon.
Note: The name of the person who formulated the material property, behaviour or model shall be given in the description section (see the @Description
keyword).
@Author Éric Brunon;
@AuxiliaryStateVar
keywordThe @AuxiliaryStateVar
keyword is a deprecated synonymous of @AuxiliaryStateVariable
.
@AuxiliaryStateVariable
keywordThe AuxiliaryStateVariable
keyword introduces one or several new auxiliary state variables. It is followed by a type name and the name(s) of the variable(s) declared, separated by commas.
// scalar auxiliary state variable
@AuxiliaryStateVariables strain p;
// symmetric tensors auxiliary state variable
@AuxiliaryStateVariables StrainStensor evp,evp2;
@Behaviour
keywordThe @Behaviour
defines the name of the behaviour. The name must be a valid C++
class name.
The following characters are legal as the first character of an identifier, or any subsequent character:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The following characters are legal as any character in an identifier except the first:
0
1
2
3
4
5
6
7
8
9
@Behaviour Norton;
@Bounds
keywordThe @Bounds
keyword let the user define the domain of validity of the law.
The @Bounds
keyword is followed by a variable name, the keyword in and an interval. The interval may contain the infinity, represented by the ’*’ character.
What happens if a variable if found to be out of its bounds depends on the interface used. Most interfaces let the user choose one of three following policies:
None
, which means that nothing is done.Warning
, which means that a message is displayed, but computations are not stopped.Strict
, which means that computations are stopped with an error message.@Bounds T in [293.15:873.15];
@Brick
keywordThe @Brick
keyword introduces a behaviour brick.
@Brick "StandardElasticity";
@Coef
keywordThe @Coef
keyword is a deprecated synonymous of @MaterialProperty
.
@ComputeThermalExpansion
keywordThe keyword @ComputeThermalExpansion
is not documented yet
@DSL
keywordThe @DSL
keyword specify the domain specific language (dsl) used.
The list of available dsl’s is returned by the --list-dsl
option of mfront
:
$ mfront --list-dsl
As the time of writting this notice, the following dsl’s are available:
DefaultDSL
: this parser is the most generic one as it does not make any restriction on the behaviour or the integration method that may be used.DefaultCZMDSL
: this parser is the most generic one as it does not make any restriction on the behaviour or the integration method that may be used.DefaultFiniteStrainDSL
: this parser is the most generic one as it does not make any restriction on the behaviour or the integration method that may be used.Implicit
: this parser provides a generic integrator based on an implicit scheme. The elastic strain is not automatically defined as a state variableImplicitII
: this parser provides a generic integrator based on a theta method. Unlike Implicit
, the elastic strain is not automatically defined as a state variable.ImplicitFiniteStrain
: this parser provides a generic integrator based on a theta method..IsotropicMisesCreep
: this parser is used for standard creep behaviours of the form \(\dot{p}=f(s)\) where \(p\) is the equivalent creep strain and \(s\) the equivalent mises stress.IsotropicPlasticMisesFlow
: this parser is used for standard plastics behaviours with yield surface of the form \(f(s,p)=0\) where \(p\) is the equivalent creep strain and \(s\) the equivalent mises stress.IsotropicStrainHardeningMisesCreep
: this parser is used for standard strain hardening creep behaviours of the form \(\dot{p}=f(s,p)\) where \(p\) is the equivalent creep strain and \(s\) the equivalent mises stress.MaterialLaw
: this parser is used to define material properties.Model
: this parser is used to define simple material models.MultipleIsotropicMisesFlows
: this parser is used to define behaviours combining several isotropic flows. Supported flow type are ‘Creep’ (\(\dot{p}=f(s)\)) ‘StrainHardeningCreep’ (\(\dot{p}=f(s,p)\)) and ‘Plasticity’ (\(f(p,s)=0\)) where \(p\) is the equivalent plastic strain and \(s\) the equivalent mises stress.RungeKutta
: this parser provides a generic integrator based on one of the many Runge-Kutta algorithm.@DSL Implicit;
@Date
keywordThe @Date
keyword allows the user to precise when the mfront file was written.
All the following words are appended to the date up to a final semi-colon.
@Date 2008-11-17;
@Description
keywordThe @Description
describes the material property, behaviour or model which is implemented in a mfront file.
This keyword is followed by a block containing all the relevant piece of information including:
@Description
{4Cr-4Ti.
Corrélation établie sur la nuance V-
Propriétés extraites du document :
Propriétés et comportement mécanique d alliages
de Vanadium avant, après et sous irradiation
Marion Le Flem, Jean-Luc Bechade, Annick Bougault,
Aurore Michaux, Lionel Gosmain, Jean-Louis Seran2008-2967/A
DMN/SRMA/LA2M/NT/ }
@ExternalStateVar
keywordThe @ExternalStateVar
keyword is a deprecated synonymous of @ExternalStateVariable
.
@ExternalStateVariable
keywordThe ExternalStateVariable
keyword introduces one or several new external state variables. It is followed by a type name and the name(s) of the variable(s) declared, separated by commas.
The external state variables names must be valid C++
identifiers.
The following characters are legal as the first character of an identifier, or any subsequent character:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The following characters are legal as any character in an identifier except the first:
0
1
2
3
4
5
6
7
8
9
One may declare an array of external state variables by specifying the array size after the external state variable name.
It is recommended to associate to a external state variable a glossary or an entry name through the methods setGlossaryName
or setEntryName
respectively.
// scalar external state variable
@ExternalStateVariable strain s;
@Import
keywordThe @Import
keyword allows the inclusion of one or several (external) mfront files. This keyword is followed by a string or an array of strings. Each string stands for a mfront file name that is meant to be imported.
This instruction interrupts the treatment of the current file and starts the sequential treatment of each file to be imported.
Files to be imported are searched, in that order:
--search-path
or the --include
(-I
) mfront
’ command line options.MFRONT_INCLUDE_PATH
environment variable.@Import "SlidingSystemsCC.mfront";
@Includes
keywordThe @Includes
introduces a block were the user may define some preprocessor directives, typically #include directives (hence the name).
@Includes{
#include<fstream>
}
@InitLocalVariables
keywordThe @InitLocalVariables
keyword is a deprecated synonymous of @InitializeLocalVariables
.
@InitLocalVars
keywordThe @InitLocalVars
keyword is a deprecated synonymous of @InitializeLocalVariables
.
@InitializeLocalVariables
keywordThe @InitializeLocalVariables
introduces a code block meant to initialize the local variables (see the @LocalVariable
keyword).
//! volumic fraction of each phase
@LocalVariable real fv[Np];
//! interaction matrix
@LocalVariable tfel::math::tmatrix<Nss,Nss,real> mh;
@InitLocalVariables<Append>{
// volumic fraction of each phase
for(unsigned short i=0;i!=Np;++i){
1.0/static_cast<real>(Np) ;
fv[i]=
}// interaction matrix
const real h1 = 1.;
const real h2 = 1.;
const real h3 = 1.;
const real h4 = 1.;
const real h5 = 1.;
const real h6 = 1.;
mh = InteractionMatrix::getInteractionMatrix(h1,h2,h3,
h4,h5,h6); }
@IntegerConstant
keywordThe keyword @IntegerConstant
is not documented yet
@Integrator
keywordThe keyword @Integrator
is not documented yet
@Interface
keywordThe @Interface
keyword let the user specify interfaces to be used. The keyword is followed by a list of interface name, separated by commas.
Using this keyword is considered a bad pratice. The user shall use the --interface
command line argument to specify which interface shall be used.
@Interface castem;
@IsTangentOperatorSymmetric
keywordThe keyword @IsTangentOperatorSymmetric
is not documented yet
@IsotropicBehaviour
keywordThe @IsotropicBehaviour
declares the behaviour to be isotropic. As this symmetry is the default one, this keyword is seldom used.
@IsotropicBehaviour;
@IsotropicElasticBehaviour
keywordThe @IsotropicElasticBehaviour
is used to declare that the elastic behaviour is isotropic even though the material as been declared orthotropic. This declaration affects the @RequireStiffnessTensor
behaviour.
@IsotropicElasticBehaviour;
@Library
keywordThe @Library
keyword let the user specify part of the generated libary name. This keyword is followed by the name of library.
This name must be a valid C++ identifier. The following characters are legal as the first character of an identifier, or any subsequent character:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The following characters are legal as any character in an identifier except the first:
0
1
2
3
4
5
6
7
8
9
@Library AlcyoneLibrary;
@Link
keywordThe @Link
keyword let the user specify additional linker flags used to build their shared library/executables. This keyword must be followed by a string or an array of strings.
Usage of the @Link
keyword is deprecated a linker flags are not portable. The user may prefer using the LDFLAGS
environment variable.
// explicit link with libm.so
// (not necessary in pratice)
@Link "-lm";
@LocalVar
keywordThe @LocalVar
keyword is a deprecated synonymous of @LocalVariable
.
@LocalVariable
keywordThe keyword @LocalVariable
is not documented yet
@MFront
keywordThe keyword @MFront
is not documented yet
@Material
keywordThe @Material
keyword let the user specify which material is treated by the current file. This keyword is followed by the name of the material.
This name must be a valid C++
identifier. The following characters are legal as the first character of an identifier, or any subsequent character:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The following characters are legal as any character in an identifier except the first:
0
1
2
3
4
5
6
7
8
9
@Material UO2;
@MaterialLaw
keywordThe @MaterialLaw
keyword imports the definition of a material law defined in a mfront file and compiles, as part of the current library, an function using the mfront
interface. This function is available in every standard code blocks.
The @MaterialLaw
keyword is followed by a string or an array of string identifying mfront
files.
Files to be imported are searched, in that order:
--search-path
or the --include
(-I
) mfront
’ command line options.MFRONT_INCLUDE_PATH
environment variable.The mfront
interface has been created to avoid names conflict.
For internal reasons, mfront
reports the creation of an auxiliary library which is of no use.
@MaterialLaw "UO2_YoungModulus.mfront";
@MaterialProperty
keywordThe @MaterialProperty
keyword let the user define one or several material properties. This keyword is followed by the type of the material property and a list of material properties names separated by commas.
The material properties names must be valid C++
identifiers.
The following characters are legal as the first character of an identifier, or any subsequent character:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The following characters are legal as any character in an identifier except the first:
0
1
2
3
4
5
6
7
8
9
One may declare an array of material properties by specifying the array size after the material property name.
It is recommended to associate to a material property a glossary or an entry name through the methods setGlossaryName
or setEntryName
respectively.
// scalar material property
@MaterialProperty stress young;
"YoungModulus"); young.setGlossaryName(
@Members
keywordThe keyword @Members
is not documented yet
@ModellingHypotheses
keywordThe keyword @ModellingHypotheses
is not documented yet
@ModellingHypothesis
keywordThe keyword @ModellingHypothesis
is not documented yet
@OrthotropicBehaviour
keywordThe @OrthotropicBehaviour
declares the behaviour to be orthotropic.
@OrthotropicBehaviour;
@Parameter
keywordThe @Parameter
keyword declares a new parameter or a list of new parameters. Optionally, the default value of the declared parameters may also be given following various C++ standard assignment syntaxes.
The default value of a parameter can also be declared after its declaration using the setDefaultValue
method.
@Parameter R0 = 500;
@Parameter Q1{1000000000},b1{0.000001};
@Parameter Q2(0),b2(0);
@Parameter fc;
1.e-2); fc.setDefaultValue(
@Parser
keywordThe @Paser
keyword is a deprecated synonymous of @DSL
.
@PhysicalBounds
keywordThe @PhysicalBounds
keyword let the use define the physical domain of a variable.
The @PhysicalBounds
keyword is followed by a variable name, the keyword in and an interval. The interval may contain the infinity, represented by the ’*’ character.
In implicit schemes, if physical bounds are set on a integration variable, this variable is bounded to satisfy them during the internal iterations.
If a variable is found to be out of its physical bounds, the computations are stopped. The tests are performed at different stages of the integration depending on the nature of the variable.
// a temperature (in Kelvin) can't be negative
@PhysicalBounds T in [0:*[;
@PredictionOperator
keywordThe keyword @PredictionOperator
is not documented yet
@Private
keywordThe @Private
keyword let the user define private methods or members of in the generated behaviour class.
@Private{
void display(void) const{
std::cout << "eto " << this->eto << std::endl;
}// end of @Private }
@Profiling
keywordThe @Profiling
keyword is followed by a boolean. If true, several high resolutions clocks will be introduced in the generated code to profile performance bottlenecks. The total time spend in various portions of the generated code will be stored and displayed when the calling process exits.
@Profiling true;
@ProvidesSymmetricTangentOperator
keywordThe keyword @ProvidesSymmetricTangentOperator
is not documented yet
@ProvidesTangentOperator
keywordThe keyword @ProvidesTangentOperator
is not documented yet
@RequireStiffnessOperator
keywordThe @RequireStiffnessOperator
keyword is a deprecated synonymous of @RequireStiffnessTensor
.
@RequireStiffnessTensor
keywordThe @RequireStiffnessTensor
keyword requires the stiffness tensor to be computed by the calling code. This generally means that some extra material properties will be introduced and handled by the interface before the behaviour integration.
By default, the stiffness tensor will have the same symmetry than the behaviour (see @IsotropicElasticBehaviour
to change this in the case of an orthotropic behaviour).
@RequireStiffnessTensor true;
@RequireThermalExpansionCoefficientTensor
keywordThe @RequireThermalExpansionCoefficientTensor
keyword requires the thermal expansion coefficient tensor to be computed by the calling code. This generally means that some extra material properties will be introduced and handled by the interface before the behaviour integration.
The thermal expansion tensor will have the same symmetry than the behaviour. For example, for an isotropic behaviour, the thermal expansion tensor will be proportional to the identity. For an orthotropic behaviour, the thermal expansion tensor is diagonal and expressed in the material frame.
@RequireThermalExpansionCoefficientTensor true;
@Sources
keywordThe @Sources
keyword let the user define a code block that will be integrated in the generated sources of a behaviour. This allows the user to implement their own classes or functions. This declarations of such classes or functions can be made in a code block introduced by the @Includes
keyword.
@Includes{
//! declaration of the function f
void f(void);
}
@Sources{
// source of the function
void f(void){
std::cout << "Example of a function " << std::endl;
// end of f
} }
@StateVar
keywordThe @StateVar
keyword is a deprecated synonymous of @StateVariable
.
@StateVariable
keywordThe StateVariable
keyword introduces one or several new state variables. It is followed by a type name and the name(s) of the variable(s) declared, separated by commas.
The state variables names must be valid C++
identifiers.
The following characters are legal as the first character of an identifier, or any subsequent character:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The following characters are legal as any character in an identifier except the first:
0
1
2
3
4
5
6
7
8
9
One may declare an array of state variables by specifying the array size after the state variable name.
It is recommended to associate to a state variable a glossary or an entry name through the methods setGlossaryName
or setEntryName
respectively.
// scalar state variable
@StateVariables strain p;
// symmetric tensors state variable
@StateVariables StrainStensor evp,evp2;
@StaticVar
keywordThe @StaticVar
keyword is a deprecated synonymous of @StaticVariable
.
@StaticVariable
keywordThe @StaticVariable
keyword let the user define a constant value. Unlike parameters (see the @Parameter
keyword), static variables’ values can’t be changed after compilation.
This keyword must be followed by the type of the constant, its name, an equal sign and its value.
@StaticVariable real A = 1.234e56;
@TangentOperator
keywordThe TangentOperator
keyword introduces a code block used to define the tangent operator. This code is called once the integration variables, the stresses and the auxiliary state variables (see the @UpdateAuxiliaryStateVariables
keyword) have been updated.
The kind of tangent operator requested is given by variable named smt
(stiffness matrix type). As the time of writting this notice, the possible values for smt
are the following:
ELASTIC
: the elastic operator is requested (undamaged).SECANT
: the secant operator is requested. This operator is only meaningful for behaviours describing brittle damage. The expected operator is then the elastic operator modified by the damage variables.TANGENTOPERATOR
: the tangent operator is requested. This operator is seldom implemented as the consistent tangent operator is more interesting (and easier to compute).CONSISTENTTANGENTOPERATOR
: the consistent tangent operator is requested. If an implicit scheme is used in small strain, the consistent tangent operator can be computed using the jacobian of the implicit system, see the mfront behaviours documentation for details.@TangentOperator{
using namespace tfel::material::lame;
if((smt==ELASTIC)||(smt==SECANTOPERATOR)){
computeAlteredElasticStiffness<hypothesis,Type>::exe(Dt,lambda,mu);else if (smt==CONSISTENTTANGENTOPERATOR){
}
StiffnessTensor De;
Stensor4 Je;
computeElasticStiffness<N,Type>::exe(De,lambda,mu);
getPartialJacobianInvert(Je);
Dt = De*Je;else {
} return false;
} }
@UpdateAuxiliaryStateVariables
keywordThe UpdateAuxiliaryStateVariables
introduces a code block meant to update the auxiliary state variables after integration.
In implicit domain specific languages, the code declared by UpdateAuxiliaryStateVariables
is called once the integration variables (including state variables) and stresses (see the @ComputeFinalStress
keyword) have been updated. The external state variables are not updated.
In Runge-Kutta domain specific languages, the code declared by UpdateAuxiliaryStateVariables
is called after each successful time step. Keep in mind that most Runge-Kutta algorithms performs internal substeppings: in this case, the code declared by UpdateAuxiliaryStateVariables
may be called several time during the behaviour integration. An additional variable called dt_
, which is lower than the total time step increment dt
if substeppings is performed, gives the current time increment. The external state variables are set to their values at the current date.
@UpdateAuxiliaryStateVariables{
// valeur de milieu de pas, q ayant
// déjà été mis à jour
const real q_ = q-(1-theta)*dq;
const real Q = Q0 + (Qm - Q0) * (1 - exp(-2 * Mu * q_) );
R+=b*(Q-R)*dp; }
@UpdateAuxiliaryStateVariables{
sigeq = sqrt(sig|sig); }
@UpdateAuxiliaryStateVars
keywordThe @UpdateAuxiliaryStateVars
keyword is a deprecated synonymous of @UpdateAuxiliaryStateVariables
.
@UseQt
keywordThe UseQt
keyword (use quantities) specify if the behaviour compilation should perform compile-time units checks. It is followed by a boolean.
This feature is still experimental and is disabled in most cases.
@UseQt true;