Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mfront-wrapper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
navier-fenics
mfront-wrapper
Commits
88bca57f
Commit
88bca57f
authored
Feb 21, 2020
by
Jeremy BLEYER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working MFront wrapper for FEniCS
parents
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
12419 additions
and
0 deletions
+12419
-0
demos/logarithmic_strain_plasticity.py
demos/logarithmic_strain_plasticity.py
+72
-0
demos/small_strain_vonMises_plasticity.py
demos/small_strain_vonMises_plasticity.py
+75
-0
materials/IsotropicLinearHardeningPlasticity.mfront
materials/IsotropicLinearHardeningPlasticity.mfront
+78
-0
materials/LogarithmicStrainPlasticity.mfront
materials/LogarithmicStrainPlasticity.mfront
+24
-0
materials/include/MFront/GenericBehaviour/IsotropicLinearHardeningPlasticity-generic.hxx
...cBehaviour/IsotropicLinearHardeningPlasticity-generic.hxx
+67
-0
materials/include/MFront/GenericBehaviour/LogarithmicStrainPlasticity-generic.hxx
.../GenericBehaviour/LogarithmicStrainPlasticity-generic.hxx
+70
-0
materials/include/TFEL/Material/IsotropicLinearHardeningPlasticity.hxx
...lude/TFEL/Material/IsotropicLinearHardeningPlasticity.hxx
+579
-0
materials/include/TFEL/Material/IsotropicLinearHardeningPlasticityBehaviourData.hxx
...erial/IsotropicLinearHardeningPlasticityBehaviourData.hxx
+220
-0
materials/include/TFEL/Material/IsotropicLinearHardeningPlasticityIntegrationData.hxx
...ial/IsotropicLinearHardeningPlasticityIntegrationData.hxx
+183
-0
materials/include/TFEL/Material/LogarithmicStrainPlasticity.hxx
...als/include/TFEL/Material/LogarithmicStrainPlasticity.hxx
+693
-0
materials/include/TFEL/Material/LogarithmicStrainPlasticityBehaviourData.hxx
...FEL/Material/LogarithmicStrainPlasticityBehaviourData.hxx
+194
-0
materials/include/TFEL/Material/LogarithmicStrainPlasticityIntegrationData.hxx
...L/Material/LogarithmicStrainPlasticityIntegrationData.hxx
+183
-0
materials/src/IsotropicLinearHardeningPlasticity-generic.cxx
materials/src/IsotropicLinearHardeningPlasticity-generic.cxx
+188
-0
materials/src/IsotropicLinearHardeningPlasticity-generic.d
materials/src/IsotropicLinearHardeningPlasticity-generic.d
+471
-0
materials/src/IsotropicLinearHardeningPlasticity.cxx
materials/src/IsotropicLinearHardeningPlasticity.cxx
+111
-0
materials/src/IsotropicLinearHardeningPlasticity.d
materials/src/IsotropicLinearHardeningPlasticity.d
+428
-0
materials/src/LogarithmicStrainPlasticity-generic.cxx
materials/src/LogarithmicStrainPlasticity-generic.cxx
+893
-0
materials/src/LogarithmicStrainPlasticity-generic.d
materials/src/LogarithmicStrainPlasticity-generic.d
+477
-0
materials/src/LogarithmicStrainPlasticity.cxx
materials/src/LogarithmicStrainPlasticity.cxx
+169
-0
materials/src/LogarithmicStrainPlasticity.d
materials/src/LogarithmicStrainPlasticity.d
+429
-0
materials/src/Makefile.mfront
materials/src/Makefile.mfront
+52
-0
materials/src/targets.lst
materials/src/targets.lst
+49
-0
meshes/thick_cylinder.xml
meshes/thick_cylinder.xml
+2428
-0
meshes/thick_cylinder_facet_region.xml
meshes/thick_cylinder_facet_region.xml
+2423
-0
meshes/thick_cylinder_physical_region.xml
meshes/thick_cylinder_physical_region.xml
+1570
-0
mfront_wrapper/mfront_wrapper.py
mfront_wrapper/mfront_wrapper.py
+293
-0
No files found.
demos/logarithmic_strain_plasticity.py
0 → 100644
View file @
88bca57f
from
dolfin
import
*
import
mfront_wrapper
as
mf
import
numpy
as
np
length
,
width
,
height
=
1.
,
40e-3
,
100e-3
nb_elt_p
,
nb_elt_l
=
10
,
30
mesh
=
BoxMesh
(
Point
(
0
,
-
width
/
2
,
-
height
/
2.
),
Point
(
length
,
width
/
2
,
height
/
2.
),
nb_elt_l
,
2
,
nb_elt_p
)
V
=
VectorFunctionSpace
(
mesh
,
"CG"
,
2
)
u
=
Function
(
V
)
def
left
(
x
,
on_boundary
):
return
near
(
x
[
0
],
0
)
and
on_boundary
def
right
(
x
,
on_boundary
):
return
near
(
x
[
0
],
length
)
and
on_boundary
bc
=
[
DirichletBC
(
V
,
Constant
((
0.
,)
*
3
),
left
),
DirichletBC
(
V
.
sub
(
0
),
Constant
(
0.
),
right
)]
facets
=
MeshFunction
(
"size_t"
,
mesh
,
2
)
AutoSubDomain
(
right
).
mark
(
facets
,
1
)
ds
=
Measure
(
"ds"
,
subdomain_data
=
facets
)
# Building function with vx=1 on left boundary to compute reaction
v
=
Function
(
V
)
bcv
=
DirichletBC
(
V
.
sub
(
0
),
Constant
(
1.
),
left
)
bcv
.
apply
(
v
.
vector
())
Vpost
=
FunctionSpace
(
mesh
,
"CG"
,
1
)
file_results
=
XDMFFile
(
"beam_GL_plasticity.xdmf"
)
file_results
.
parameters
[
"flush_output"
]
=
True
file_results
.
parameters
[
"functions_share_mesh"
]
=
True
selfweight
=
Expression
((
"0"
,
"0"
,
"-t*qmax"
),
t
=
0.
,
qmax
=
50e6
,
degree
=
0
)
material
=
mf
.
NonlinearMaterial
(
'src/libBehaviour.so'
,
"LogarithmicStrainPlasticity"
)
problem
=
mf
.
MFrontNonlinearProblem
(
u
,
material
)
problem
.
set_loading
(
dot
(
selfweight
,
u
)
*
dx
)
problem
.
bc
=
bc
prm
=
problem
.
solver
.
parameters
prm
[
"absolute_tolerance"
]
=
1e-6
prm
[
"relative_tolerance"
]
=
1e-6
P0
=
FunctionSpace
(
mesh
,
"DG"
,
0
)
p_avg
=
Function
(
P0
,
name
=
"Plastic strain"
)
Nitermax
,
tol
=
20
,
1e-4
# parameters of the Newton-Raphson procedure
Nincr
=
30
load_steps
=
np
.
linspace
(
0.
,
1.
,
Nincr
+
1
)
file_results
.
write
(
u
,
0
)
file_results
.
write
(
p_avg
,
0
)
results
=
np
.
zeros
((
Nincr
+
1
,
3
))
for
(
i
,
t
)
in
enumerate
(
load_steps
[
1
:]):
selfweight
.
t
=
t
problem
.
solve
(
u
.
vector
())
results
[
i
+
1
,
0
]
=
assemble
(
-
u
[
2
]
*
ds
(
1
))
/
(
width
*
height
)
results
[
i
+
1
,
1
]
=
t
results
[
i
+
1
,
2
]
=
assemble
(
action
(
-
problem
.
L
,
v
))
file_results
.
write
(
u
,
t
)
# file_results.write(p_avg, t)
import
matplotlib.pyplot
as
plt
plt
.
figure
()
plt
.
plot
(
results
[:,
0
],
results
[:,
1
],
"-o"
)
plt
.
xlabel
(
r
"Displacement"
)
plt
.
ylabel
(
"Load"
)
plt
.
figure
()
plt
.
plot
(
results
[:,
1
],
results
[:,
2
],
"-o"
)
plt
.
xlabel
(
r
"Load"
)
plt
.
ylabel
(
"Horizontal Reaction"
)
plt
.
show
()
demos/small_strain_vonMises_plasticity.py
0 → 100644
View file @
88bca57f
from
dolfin
import
*
import
mfront_wrapper
as
mf
import
numpy
as
np
hypothesis
=
"axisymmetric"
# axisymmetric
Re
,
Ri
=
1.3
,
1.
# external/internal radius
# elastic parameters
E
=
70e3
nu
=
0.3
# yield strength
sig0
=
250.
Et
=
E
/
100.
# hardening slope
H
=
E
*
Et
/
(
E
-
Et
)
mesh
=
Mesh
(
"../meshes/thick_cylinder.xml"
)
facets
=
MeshFunction
(
"size_t"
,
mesh
,
"../meshes/thick_cylinder_facet_region.xml"
)
ds
=
Measure
(
'ds'
,
subdomain_data
=
facets
)
if
hypothesis
==
"plane_strain"
:
q_lim
=
float
(
2
/
sqrt
(
3
)
*
ln
(
Re
/
Ri
)
*
sig0
)
measure
=
1
elif
hypothesis
==
"axisymmetric"
:
x
=
SpatialCoordinate
(
mesh
)
q_lim
=
float
(
2
*
ln
(
Re
/
Ri
)
*
sig0
)
measure
=
2
*
pi
*
abs
(
x
[
0
])
V
=
VectorFunctionSpace
(
mesh
,
"CG"
,
2
)
u
=
Function
(
V
,
name
=
"Displacement"
)
bc
=
[
DirichletBC
(
V
.
sub
(
1
),
0
,
facets
,
1
),
DirichletBC
(
V
.
sub
(
0
),
0
,
facets
,
3
)]
n
=
FacetNormal
(
mesh
)
loading
=
Expression
(
"-q*t"
,
q
=
q_lim
,
t
=
0
,
degree
=
2
)
mat_prop
=
{
"YoungModulus"
:
E
,
"PoissonRatio"
:
nu
,
"HardeningSlope"
:
H
,
"YieldStrength"
:
sig0
}
material
=
mf
.
NonlinearMaterial
(
'materials/src/libBehaviour.so'
,
'IsotropicLinearHardeningPlasticity'
,
hypothesis
=
hypothesis
,
material_properties
=
mat_prop
)
problem
=
mf
.
MFrontNonlinearProblem
(
u
,
material
,
quadrature_degree
=
4
)
problem
.
set_loading
(
loading
*
dot
(
n
,
u
)
*
measure
*
ds
(
4
))
problem
.
bc
=
bc
p
=
problem
.
register_state_variable
(
name
=
"EquivalentPlasticStrain"
)
epsel
=
problem
.
register_state_variable
(
name
=
"ElasticStrain"
,
shape
=
4
)
print
(
problem
.
state_variables
)
file_results
=
XDMFFile
(
"results/plasticity_results.xdmf"
)
file_results
.
parameters
[
"flush_output"
]
=
True
file_results
.
parameters
[
"functions_share_mesh"
]
=
True
P0
=
FunctionSpace
(
mesh
,
"DG"
,
0
)
p_avg
=
Function
(
P0
,
name
=
"Plastic_strain"
)
Nincr
=
40
load_steps
=
np
.
linspace
(
0
,
1.1
,
Nincr
+
1
)[
1
:]
**
0.5
results
=
np
.
zeros
((
Nincr
+
1
,
2
))
for
(
i
,
t
)
in
enumerate
(
load_steps
):
loading
.
t
=
t
problem
.
solve
(
u
.
vector
())
file_results
.
write
(
u
,
t
)
p_avg
.
assign
(
project
(
epsel
[
0
],
P0
))
file_results
.
write
(
p_avg
,
t
)
results
[
i
+
1
,
:]
=
(
u
(
Ri
,
0
)[
0
],
t
)
import
matplotlib.pyplot
as
plt
plt
.
plot
(
results
[:,
0
],
results
[:,
1
],
"-o"
)
plt
.
xlabel
(
"Displacement of inner boundary"
)
plt
.
ylabel
(
r
"Applied pressure $q/q_{lim}$"
)
plt
.
show
()
materials/IsotropicLinearHardeningPlasticity.mfront
0 → 100644
View file @
88bca57f
@DSL DefaultDSL;
@Behaviour IsotropicLinearHardeningPlasticity;
@Author Thomas Helfer;
@Date 14/10/2016;
@Description{
An implicit implementation of a simple
isotropic plasticity behaviour with
isotropic linear hardening.
The yield surface is defined by:
"\["
" f(\sigmaeq,p) = \sigmaeq-s_{0}-H\,p"
"\]"
}
@MaterialProperty stress young;
young.setGlossaryName("YoungModulus");
@MaterialProperty real nu;
nu.setGlossaryName("PoissonRatio");
@MaterialProperty stress H;
H.setEntryName("HardeningSlope");
@MaterialProperty stress s0;
s0.setGlossaryName("YieldStress");
@StateVariable StrainStensor eel;
eel.setGlossaryName("ElasticStrain");
@StateVariable strain p;
p.setGlossaryName("EquivalentPlasticStrain");
/*!
* computation of the prediction operator: we only provide the elastic
* operator.
*
* We could also provide a tangent operator, but this would mean
* saving an auxiliary state variable stating if a plastic loading
* occured at the previous time step.
*/
@PredictionOperator{
// silent "unused parameter" warning
static_cast<void>(smt);
const auto lambda = computeLambda(young,nu);
const auto mu = computeMu(young,nu);
Dt = lambda*Stensor4::IxI()+2*mu*Stensor4::Id();
}
/*!
* behaviour integration using a fully implicit Euler-backwark scheme.
*/
@ProvidesSymmetricTangentOperator;
@Integrator{
const auto lambda = computeLambda(young,nu);
const auto mu = computeMu(young,nu);
eel += deto;
const auto se = 2*mu*deviator(eel);
const auto seq_e = sigmaeq(se);
const auto b = seq_e-s0-H*p>stress{0};
if(b){
const auto iseq_e = 1/seq_e;
const auto n = eval(3*se/(2*seq_e));
const auto cste = 1/(H+3*mu);
dp = (seq_e-s0-H*p)*cste;
eel -= dp*n;
if(computeTangentOperator_){
if(smt==CONSISTENTTANGENTOPERATOR){
Dt = (lambda*Stensor4::IxI()+2*mu*Stensor4::Id()
-4*mu*mu*(dp*iseq_e*(Stensor4::M()-(n^n))+cste*(n^n)));
} else {
Dt = lambda*Stensor4::IxI()+2*mu*Stensor4::Id();
}
}
} else {
if(computeTangentOperator_){
Dt = lambda*Stensor4::IxI()+2*mu*Stensor4::Id();
}
}
sig = lambda*trace(eel)*Stensor::Id()+2*mu*eel;
}
materials/LogarithmicStrainPlasticity.mfront
0 → 100644
View file @
88bca57f
@DSL IsotropicPlasticMisesFlow;
@Behaviour LogarithmicStrainPlasticity;
@Author Helfer Thomas;
@Date 5/12/13;
@StrainMeasure Hencky;
@ElasticMaterialProperties {210e9,0.};
@Parameter s0 = 250e6;
@Parameter Et = 1e6;
@LocalVariable stress R;
@InitLocalVariables{
// hardening slope
R = young*Et/(young-Et);
}
@FlowRule{
f = seq-R*p-s0;
df_dseq = 1;
df_dp = -R;
}
materials/include/MFront/GenericBehaviour/IsotropicLinearHardeningPlasticity-generic.hxx
0 → 100644
View file @
88bca57f
/*!
* \file IsotropicLinearHardeningPlasticity-generic.hxx
* \brief This file declares the umat interface for the IsotropicLinearHardeningPlasticity behaviour law
* \author Thomas Helfer
* \date 14 / 10 / 2016
*/
#ifndef LIB_GENERIC_ISOTROPICLINEARHARDENINGPLASTICITY_HXX
#define LIB_GENERIC_ISOTROPICLINEARHARDENINGPLASTICITY_HXX
#include"TFEL/Config/TFELConfig.hxx"
#include"MFront/GenericBehaviour/BehaviourData.h"
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
/* NOMINMAX */
#include <windows.h>
#ifdef small
#undef small
#endif
/* small */
#endif
/* _WIN32 */
#ifndef MFRONT_SHAREDOBJ
#define MFRONT_SHAREDOBJ TFEL_VISIBILITY_EXPORT
#endif
/* MFRONT_SHAREDOBJ */
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
MFRONT_SHAREDOBJ
void
IsotropicLinearHardeningPlasticity_setOutOfBoundsPolicy
(
const
int
);
MFRONT_SHAREDOBJ
int
IsotropicLinearHardeningPlasticity_setParameter
(
const
char
*
const
,
const
double
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
IsotropicLinearHardeningPlasticity_AxisymmetricalGeneralisedPlaneStrain
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
IsotropicLinearHardeningPlasticity_Axisymmetrical
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
IsotropicLinearHardeningPlasticity_PlaneStrain
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
IsotropicLinearHardeningPlasticity_GeneralisedPlaneStrain
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
IsotropicLinearHardeningPlasticity_Tridimensional
(
MFront_GB_BehaviourData
*
const
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* LIB_GENERIC_ISOTROPICLINEARHARDENINGPLASTICITY_HXX */
materials/include/MFront/GenericBehaviour/LogarithmicStrainPlasticity-generic.hxx
0 → 100644
View file @
88bca57f
/*!
* \file LogarithmicStrainPlasticity-generic.hxx
* \brief This file declares the umat interface for the LogarithmicStrainPlasticity behaviour law
* \author Helfer Thomas
* \date 5 / 12 / 13
*/
#ifndef LIB_GENERIC_LOGARITHMICSTRAINPLASTICITY_HXX
#define LIB_GENERIC_LOGARITHMICSTRAINPLASTICITY_HXX
#include"TFEL/Config/TFELConfig.hxx"
#include"MFront/GenericBehaviour/BehaviourData.h"
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
/* NOMINMAX */
#include <windows.h>
#ifdef small
#undef small
#endif
/* small */
#endif
/* _WIN32 */
#ifndef MFRONT_SHAREDOBJ
#define MFRONT_SHAREDOBJ TFEL_VISIBILITY_EXPORT
#endif
/* MFRONT_SHAREDOBJ */
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
MFRONT_SHAREDOBJ
void
LogarithmicStrainPlasticity_setOutOfBoundsPolicy
(
const
int
);
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_setParameter
(
const
char
*
const
,
const
double
);
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_setUnsignedShortParameter
(
const
char
*
const
,
const
unsigned
short
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_AxisymmetricalGeneralisedPlaneStrain
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_Axisymmetrical
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_PlaneStrain
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_GeneralisedPlaneStrain
(
MFront_GB_BehaviourData
*
const
);
/*!
* \param[in,out] d: material data
*/
MFRONT_SHAREDOBJ
int
LogarithmicStrainPlasticity_Tridimensional
(
MFront_GB_BehaviourData
*
const
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* LIB_GENERIC_LOGARITHMICSTRAINPLASTICITY_HXX */
materials/include/TFEL/Material/IsotropicLinearHardeningPlasticity.hxx
0 → 100644
View file @
88bca57f
/*!
* \file TFEL/Material/IsotropicLinearHardeningPlasticity.hxx
* \brief this file implements the IsotropicLinearHardeningPlasticity Behaviour.
* File generated by tfel version 3.3.0-dev
* \author Thomas Helfer
* \date 14 / 10 / 2016
*/
#ifndef LIB_TFELMATERIAL_ISOTROPICLINEARHARDENINGPLASTICITY_HXX
#define LIB_TFELMATERIAL_ISOTROPICLINEARHARDENINGPLASTICITY_HXX
#include<string>
#include<iostream>
#include<limits>
#include<stdexcept>
#include<algorithm>
#include"TFEL/Raise.hxx"
#include"TFEL/PhysicalConstants.hxx"
#include"TFEL/Config/TFELConfig.hxx"
#include"TFEL/Config/TFELTypes.hxx"
#include"TFEL/Metaprogramming/StaticAssert.hxx"
#include"TFEL/TypeTraits/IsFundamentalNumericType.hxx"
#include"TFEL/TypeTraits/IsReal.hxx"
#include"TFEL/Math/General/IEEE754.hxx"
#include"TFEL/Material/MaterialException.hxx"
#include"TFEL/Material/MechanicalBehaviour.hxx"
#include"TFEL/Material/MechanicalBehaviourTraits.hxx"
#include"TFEL/Material/OutOfBoundsPolicy.hxx"
#include"TFEL/Material/BoundsCheck.hxx"
#include"TFEL/Material/IsotropicPlasticity.hxx"
#include"TFEL/Material/Lame.hxx"
#include"TFEL/Material/Hosford1972YieldCriterion.hxx"
#include"TFEL/Material/IsotropicLinearHardeningPlasticityBehaviourData.hxx"
#include"TFEL/Material/IsotropicLinearHardeningPlasticityIntegrationData.hxx"
#include "MFront/GenericBehaviour/State.hxx"
#include "MFront/GenericBehaviour/BehaviourData.hxx"
namespace
tfel
{
namespace
material
{
struct
IsotropicLinearHardeningPlasticityParametersInitializer
{
static
IsotropicLinearHardeningPlasticityParametersInitializer
&
get
();
double
minimal_time_step_scaling_factor
;
double
maximal_time_step_scaling_factor
;
void
set
(
const
char
*
const
,
const
double
);
/*!
* \brief convert a string to double
* \param[in] p : parameter
* \param[in] v : value
*/
static
double
getDouble
(
const
std
::
string
&
,
const
std
::
string
&
);
private
:
IsotropicLinearHardeningPlasticityParametersInitializer
();
IsotropicLinearHardeningPlasticityParametersInitializer
(
const
IsotropicLinearHardeningPlasticityParametersInitializer
&
);
IsotropicLinearHardeningPlasticityParametersInitializer
&
operator
=
(
const
IsotropicLinearHardeningPlasticityParametersInitializer
&
);
/*!
* \brief read the parameters from the given file
* \param[out] pi : parameters initializer
* \param[in] fn : file name
*/
static
void
readParameters
(
IsotropicLinearHardeningPlasticityParametersInitializer
&
,
const
char
*
const
);
};
//! \brief forward declaration
template
<
ModellingHypothesis
::
Hypothesis
,
typename
Type
,
bool
use_qt
>
class
IsotropicLinearHardeningPlasticity
;
//! \brief forward declaration
template
<
ModellingHypothesis
::
Hypothesis
hypothesis
,
typename
Type
>
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
const
IsotropicLinearHardeningPlasticity
<
hypothesis
,
Type
,
false
>&
);
/*!
* \class IsotropicLinearHardeningPlasticity
* \brief This class implements the IsotropicLinearHardeningPlasticity behaviour.
* \param hypothesis, modelling hypothesis.
* \param Type, numerical type.
* \author Thomas Helfer
* \date 14 / 10 / 2016
* An implicit implementation of a simple
* isotropic plasticity behaviour with
* isotropic linear hardening .
*
* The yield surface is defined by :
* \[
* f(\sigmaeq,p) = \sigmaeq-s_{0}-H\,p
* \]
*/
template
<
ModellingHypothesis
::
Hypothesis
hypothesis
,
typename
Type
>
class
IsotropicLinearHardeningPlasticity
<
hypothesis
,
Type
,
false
>
final
:
public
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>
,
public
IsotropicLinearHardeningPlasticityBehaviourData
<
hypothesis
,
Type
,
false
>
,
public
IsotropicLinearHardeningPlasticityIntegrationData
<
hypothesis
,
Type
,
false
>
{
static
constexpr
unsigned
short
N
=
ModellingHypothesisToSpaceDimension
<
hypothesis
>::
value
;
TFEL_STATIC_ASSERT
(
N
==
1
||
N
==
2
||
N
==
3
);
TFEL_STATIC_ASSERT
(
tfel
::
typetraits
::
IsFundamentalNumericType
<
Type
>::
cond
);
TFEL_STATIC_ASSERT
(
tfel
::
typetraits
::
IsReal
<
Type
>::
cond
);
friend
std
::
ostream
&
operator
<<
<>
(
std
::
ostream
&
,
const
IsotropicLinearHardeningPlasticity
&
);
static
constexpr
unsigned
short
TVectorSize
=
N
;
typedef
tfel
::
math
::
StensorDimeToSize
<
N
>
StensorDimeToSize
;
static
constexpr
unsigned
short
StensorSize
=
StensorDimeToSize
::
value
;
typedef
tfel
::
math
::
TensorDimeToSize
<
N
>
TensorDimeToSize
;
static
constexpr
unsigned
short
TensorSize
=
TensorDimeToSize
::
value
;
using
ushort
=
unsigned
short
;
using
Types
=
tfel
::
config
::
Types
<
N
,
Type
,
false
>
;
using
real
=
typename
Types
::
real
;
using
time
=
typename
Types
::
time
;
using
length
=
typename
Types
::
length
;
using
frequency
=
typename
Types
::
frequency
;
using
stress
=
typename
Types
::
stress
;
using
strain
=
typename
Types
::
strain
;
using
strainrate
=
typename
Types
::
strainrate
;
using
stressrate
=
typename
Types
::
stressrate
;
using
temperature
=
typename
Types
::
temperature
;
using
thermalexpansion
=
typename
Types
::
thermalexpansion
;
using
thermalconductivity
=
typename
Types
::
thermalconductivity
;
using
massdensity
=
typename
Types
::
massdensity
;
using
TVector
=
typename
Types
::
TVector
;
using
Stensor
=
typename
Types
::
Stensor
;
using
Stensor4
=
typename
Types
::
Stensor4
;
using
FrequencyStensor
=
typename
Types
::
FrequencyStensor
;
using
ForceTVector
=
typename
Types
::
ForceTVector
;
using
StressStensor
=
typename
Types
::
StressStensor
;
using
StressRateStensor
=
typename
Types
::
StressRateStensor
;
using
DisplacementTVector
=
typename
Types
::
DisplacementTVector
;
using
StrainStensor
=
typename
Types
::
StrainStensor
;
using
StrainRateStensor
=
typename
Types
::
StrainRateStensor
;
using
StiffnessTensor
=
typename
Types
::
StiffnessTensor
;
using
Tensor
=
typename
Types
::
Tensor
;
using
FrequencyTensor
=
typename
Types
::
FrequencyTensor
;
using
StressTensor
=
typename
Types
::
StressTensor
;
using
ThermalExpansionCoefficientTensor
=
typename
Types
::
ThermalExpansionCoefficientTensor
;
using
DeformationGradientTensor
=
typename
Types
::
DeformationGradientTensor
;
using
DeformationGradientRateTensor
=
typename
Types
::
DeformationGradientRateTensor
;
using
TemperatureGradient
=
typename
Types
::
TemperatureGradient
;
using
HeatFlux
=
typename
Types
::
HeatFlux
;
using
TangentOperator
=
StiffnessTensor
;
using
PhysicalConstants
=
tfel
::
PhysicalConstants
<
real
>
;
public
:
typedef
IsotropicLinearHardeningPlasticityBehaviourData
<
hypothesis
,
Type
,
false
>
BehaviourData
;
typedef
IsotropicLinearHardeningPlasticityIntegrationData
<
hypothesis
,
Type
,
false
>
IntegrationData
;
typedef
typename
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
SMFlag
SMFlag
;
typedef
typename
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
SMType
SMType
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
ELASTIC
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
SECANTOPERATOR
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
TANGENTOPERATOR
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
CONSISTENTTANGENTOPERATOR
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
NOSTIFFNESSREQUESTED
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
STANDARDTANGENTOPERATOR
;
using
IntegrationResult
=
typename
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
IntegrationResult
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
SUCCESS
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
FAILURE
;
using
MechanicalBehaviour
<
MechanicalBehaviourBase
::
STANDARDSTRAINBASEDBEHAVIOUR
,
hypothesis
,
Type
,
false
>::
UNRELIABLE_RESULTS
;
using
StressFreeExpansionType
=
StrainStensor
;
private
:
#line 26 "IsotropicLinearHardeningPlasticity.mfront"
StrainStensor
deel
;
#line 28 "IsotropicLinearHardeningPlasticity.mfront"
strain
dp
;
real
minimal_time_step_scaling_factor
;
real
maximal_time_step_scaling_factor
;