Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91754090
isotropic_hardening.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 14, 03:16
Size
3 KB
Mime Type
text/x-c++
Expires
Sat, Nov 16, 03:16 (2 d)
Engine
blob
Format
Raw Data
Handle
22318979
Attached To
rTAMAAS tamaas
isotropic_hardening.cpp
View Options
/**
* @file
*
* @author Lucas Frérot <lucas.frerot@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2017 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Tamaas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Tamaas. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "isotropic_hardening.hh"
#include "influence.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
/* -------------------------------------------------------------------------- */
template
<
model_type
type
>
IsotropicHardening
<
type
>::
IsotropicHardening
(
Model
*
model
,
Real
sigma_0
,
Real
h
)
:
model
(
model
),
sigma_0
(
sigma_0
),
h
(
h
)
{
plastic_strain
.
setNbComponents
(
trait
::
components
*
trait
::
components
);
cumulated_plastic_strain
.
setNbComponents
(
1
);
plastic_strain
.
resize
(
model
->
getDiscretization
());
cumulated_plastic_strain
.
resize
(
model
->
getDiscretization
());
}
/* -------------------------------------------------------------------------- */
template
<>
void
IsotropicHardening
<
model_type
::
volume_2d
>::
applyTangentIncrement
(
Grid
<
Real
,
dim
>&
output
,
const
Grid
<
Real
,
dim
>&
input
,
const
Grid
<
Real
,
dim
>&
strain
,
const
Grid
<
Real
,
dim
>&
strain_increment
)
const
{
const
influence
::
ElasticHelper
<
dim
>
elasticity
(
this
->
model
->
getShearModulus
(),
this
->
model
->
getPoissonRatio
());
using
pmatrix
=
MatrixProxy
<
Real
,
dim
,
dim
>
;
using
cpmatrix
=
MatrixProxy
<
const
Real
,
dim
,
dim
>
;
Loop
::
loop
(
[
&
elasticity
,
this
](
pmatrix
out
,
cpmatrix
in
,
cpmatrix
epsilon
,
cpmatrix
delta_epsilon
,
cpmatrix
ep
,
const
Real
&
p
)
{
auto
sigma_tr
=
elasticity
(
epsilon
-
ep
+
delta_epsilon
);
decltype
(
sigma_tr
)
dev
;
dev
.
deviatoric
(
sigma_tr
,
3
);
auto
von_mises
=
std
::
sqrt
(
1.5
)
*
dev
.
l2norm
();
if
(
von_mises
-
hardening
(
p
)
>
0
)
{
Real
dp
=
(
von_mises
-
hardening
(
p
))
/
(
3
*
elasticity
.
mu
+
h
);
// Applying tangent from Bonnet & Frangi, p.175
const
Real
beta
=
3
*
elasticity
.
mu
*
dp
/
von_mises
;
const
Real
gamma
=
3
*
elasticity
.
mu
/
(
3
*
elasticity
.
mu
+
this
->
h
);
const
Real
dot
=
dev
.
dot
(
in
);
dev
*=
3
*
elasticity
.
mu
*
(
gamma
-
beta
)
*
dot
/
(
von_mises
*
von_mises
);
out
.
deviatoric
(
in
);
out
*=
2
*
elasticity
.
mu
*
beta
;
out
+=
dev
;
}
else
out
=
0
;
},
range
<
pmatrix
>
(
output
),
range
<
cpmatrix
>
(
input
),
range
<
cpmatrix
>
(
strain
),
range
<
cpmatrix
>
(
strain_increment
),
range
<
cpmatrix
>
(
this
->
plastic_strain
),
this
->
cumulated_plastic_strain
);
}
/* -------------------------------------------------------------------------- */
/* Template instanciation */
/* -------------------------------------------------------------------------- */
template
class
IsotropicHardening
<
model_type
::
volume_2d
>
;
__END_TAMAAS__
Event Timeline
Log In to Comment