Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
b7d348ce
Commit
b7d348ce
authored
5 years ago
by
Thomas Nagel
Committed by
Dmitri Naumov
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed Lubby2 from rate form to incremental form.
parent
8a7b7034
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MaterialLib/SolidModels/Lubby2.cpp
+23
-25
23 additions, 25 deletions
MaterialLib/SolidModels/Lubby2.cpp
with
23 additions
and
25 deletions
MaterialLib/SolidModels/Lubby2.cpp
+
23
−
25
View file @
b7d348ce
...
@@ -25,7 +25,7 @@ namespace Lubby2
...
@@ -25,7 +25,7 @@ namespace Lubby2
template
<
int
DisplacementDim
>
template
<
int
DisplacementDim
>
Eigen
::
Matrix
<
double
,
Lubby2
<
DisplacementDim
>::
JacobianResidualSize
,
Eigen
::
Matrix
<
double
,
Lubby2
<
DisplacementDim
>::
JacobianResidualSize
,
Lubby2
<
DisplacementDim
>::
KelvinVectorSize
>
Lubby2
<
DisplacementDim
>::
KelvinVectorSize
>
calculatedGdEBurgers
(
double
const
dt
)
calculatedGdEBurgers
()
{
{
Eigen
::
Matrix
<
double
,
Lubby2
<
DisplacementDim
>::
JacobianResidualSize
,
Eigen
::
Matrix
<
double
,
Lubby2
<
DisplacementDim
>::
JacobianResidualSize
,
Lubby2
<
DisplacementDim
>::
KelvinVectorSize
>
Lubby2
<
DisplacementDim
>::
KelvinVectorSize
>
...
@@ -35,17 +35,16 @@ calculatedGdEBurgers(double const dt)
...
@@ -35,17 +35,16 @@ calculatedGdEBurgers(double const dt)
dGdE
.
template
topLeftCorner
<
Lubby2
<
DisplacementDim
>
::
KelvinVectorSize
,
dGdE
.
template
topLeftCorner
<
Lubby2
<
DisplacementDim
>
::
KelvinVectorSize
,
Lubby2
<
DisplacementDim
>::
KelvinVectorSize
>
()
Lubby2
<
DisplacementDim
>::
KelvinVectorSize
>
()
.
diagonal
()
.
diagonal
()
.
setConstant
(
-
2.
/
dt
);
.
setConstant
(
-
2.
);
return
dGdE
;
return
dGdE
;
}
}
template
<
int
DisplacementDim
,
typename
LinearSolver
>
template
<
int
DisplacementDim
,
typename
LinearSolver
>
MathLib
::
KelvinVector
::
KelvinMatrixType
<
DisplacementDim
>
tangentStiffnessA
(
MathLib
::
KelvinVector
::
KelvinMatrixType
<
DisplacementDim
>
tangentStiffnessA
(
double
const
GM0
,
double
const
KM0
,
double
const
dt
,
double
const
GM0
,
double
const
KM0
,
LinearSolver
const
&
linear_solver
)
LinearSolver
const
&
linear_solver
)
{
{
// Calculate dGdE for time step
// Calculate dGdE for time step
auto
const
dGdE
=
calculatedGdEBurgers
<
DisplacementDim
>
(
dt
);
auto
const
dGdE
=
calculatedGdEBurgers
<
DisplacementDim
>
();
// Consistent tangent from local Newton iteration of material
// Consistent tangent from local Newton iteration of material
// functionals.
// functionals.
...
@@ -185,7 +184,6 @@ Lubby2<DisplacementDim>::integrateStress(
...
@@ -185,7 +184,6 @@ Lubby2<DisplacementDim>::integrateStress(
KelvinMatrix
C
=
KelvinMatrix
C
=
tangentStiffnessA
<
DisplacementDim
>
(
local_lubby2_properties
.
GM0
,
tangentStiffnessA
<
DisplacementDim
>
(
local_lubby2_properties
.
GM0
,
local_lubby2_properties
.
KM0
,
local_lubby2_properties
.
KM0
,
dt
,
linear_solver
);
linear_solver
);
// Hydrostatic part for the stress and the tangent.
// Hydrostatic part for the stress and the tangent.
...
@@ -219,21 +217,21 @@ void Lubby2<DisplacementDim>::calculateResidualBurgers(
...
@@ -219,21 +217,21 @@ void Lubby2<DisplacementDim>::calculateResidualBurgers(
{
{
// calculate stress residual
// calculate stress residual
res
.
template
segment
<
KelvinVectorSize
>(
0
).
noalias
()
=
res
.
template
segment
<
KelvinVectorSize
>(
0
).
noalias
()
=
(
stress_curr
-
stress_t
)
/
dt
-
(
stress_curr
-
stress_t
)
-
2.
/
dt
*
2.
*
((
strain_curr
-
strain_t
)
-
(
strain_Kel_curr
-
strain_Kel_t
)
-
((
strain_curr
-
strain_t
)
-
(
strain_Kel_curr
-
strain_Kel_t
)
-
(
strain_Max_curr
-
strain_Max_t
));
(
strain_Max_curr
-
strain_Max_t
));
// calculate Kelvin strain residual
// calculate Kelvin strain residual
res
.
template
segment
<
KelvinVectorSize
>(
KelvinVectorSize
).
noalias
()
=
res
.
template
segment
<
KelvinVectorSize
>(
KelvinVectorSize
).
noalias
()
=
1.
/
dt
*
(
strain_Kel_curr
-
strain_Kel_t
)
-
(
strain_Kel_curr
-
strain_Kel_t
)
-
1.
/
(
2.
*
properties
.
etaK
)
*
(
properties
.
GM0
*
stress_curr
-
dt
/
(
2.
*
properties
.
etaK
)
*
2.
*
properties
.
GK
*
strain_Kel_curr
);
(
properties
.
GM0
*
stress_curr
-
2.
*
properties
.
GK
*
strain_Kel_curr
);
// calculate Maxwell strain residual
// calculate Maxwell strain residual
res
.
template
segment
<
KelvinVectorSize
>(
2
*
KelvinVectorSize
).
noalias
()
=
res
.
template
segment
<
KelvinVectorSize
>(
2
*
KelvinVectorSize
).
noalias
()
=
1.
/
dt
*
(
strain_Max_curr
-
strain_Max_t
)
-
(
strain_Max_curr
-
strain_Max_t
)
-
0.5
*
properties
.
GM0
/
properties
.
etaM
*
stress_curr
;
dt
*
0.5
*
properties
.
GM0
/
properties
.
etaM
*
stress_curr
;
}
}
template
<
int
DisplacementDim
>
template
<
int
DisplacementDim
>
...
@@ -252,23 +250,23 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
...
@@ -252,23 +250,23 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
// build G_11
// build G_11
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
0
,
0
)
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
0
,
0
)
.
diagonal
()
.
diagonal
()
.
setConstant
(
1.
/
dt
);
.
setConstant
(
1.
);
// build G_12
// build G_12
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
0
,
KelvinVectorSize
)
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
0
,
KelvinVectorSize
)
.
diagonal
()
.
diagonal
()
.
setConstant
(
2.
/
dt
);
.
setConstant
(
2.
);
// build G_13
// build G_13
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
0
,
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
0
,
2
*
KelvinVectorSize
)
2
*
KelvinVectorSize
)
.
diagonal
()
.
diagonal
()
.
setConstant
(
2.
/
dt
);
.
setConstant
(
2.
);
// build G_21
// build G_21
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
KelvinVectorSize
,
0
)
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
KelvinVectorSize
,
0
)
.
noalias
()
=
.
noalias
()
=
-
0.5
*
properties
.
GM0
/
properties
.
etaK
*
KelvinMatrix
::
Identity
();
-
0.5
*
dt
*
properties
.
GM0
/
properties
.
etaK
*
KelvinMatrix
::
Identity
();
if
(
s_eff
>
0.
)
if
(
s_eff
>
0.
)
{
{
KelvinVector
const
eps_K_aid
=
KelvinVector
const
eps_K_aid
=
...
@@ -281,15 +279,15 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
...
@@ -281,15 +279,15 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
properties
.
etaK
/
s_eff
*
sig_i
;
properties
.
etaK
/
s_eff
*
sig_i
;
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
KelvinVectorSize
,
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
KelvinVectorSize
,
0
)
0
)
.
noalias
()
+=
0.5
*
eps_K_aid
*
dmu_vK
.
transpose
()
+
.
noalias
()
+=
0.5
*
dt
*
eps_K_aid
*
dmu_vK
.
transpose
()
+
1.
/
properties
.
etaK
*
eps_K_i
*
dG_K
.
transpose
();
dt
/
properties
.
etaK
*
eps_K_i
*
dG_K
.
transpose
();
}
}
// build G_22
// build G_22
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
KelvinVectorSize
,
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
KelvinVectorSize
,
KelvinVectorSize
)
KelvinVectorSize
)
.
diagonal
()
.
diagonal
()
.
setConstant
(
1.
/
dt
+
properties
.
GK
/
properties
.
etaK
);
.
setConstant
(
1.
+
dt
*
properties
.
GK
/
properties
.
etaK
);
// nothing to do for G_23
// nothing to do for G_23
...
@@ -297,14 +295,14 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
...
@@ -297,14 +295,14 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
2
*
KelvinVectorSize
,
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
2
*
KelvinVectorSize
,
0
)
0
)
.
noalias
()
=
.
noalias
()
=
-
0.5
*
properties
.
GM0
/
properties
.
etaM
*
KelvinMatrix
::
Identity
();
-
0.5
*
dt
*
properties
.
GM0
/
properties
.
etaM
*
KelvinMatrix
::
Identity
();
if
(
s_eff
>
0.
)
if
(
s_eff
>
0.
)
{
{
KelvinVector
const
dmu_vM
=
1.5
*
_mp
.
mvM
(
t
,
x
)[
0
]
*
properties
.
GM0
*
KelvinVector
const
dmu_vM
=
1.5
*
_mp
.
mvM
(
t
,
x
)[
0
]
*
properties
.
GM0
*
properties
.
etaM
/
s_eff
*
sig_i
;
properties
.
etaM
/
s_eff
*
sig_i
;
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
2
*
KelvinVectorSize
,
0
)
2
*
KelvinVectorSize
,
0
)
.
noalias
()
+=
0.5
*
properties
.
GM0
/
.
noalias
()
+=
0.5
*
dt
*
properties
.
GM0
/
(
properties
.
etaM
*
properties
.
etaM
)
*
sig_i
*
(
properties
.
etaM
*
properties
.
etaM
)
*
sig_i
*
dmu_vM
.
transpose
();
dmu_vM
.
transpose
();
}
}
...
@@ -315,7 +313,7 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
...
@@ -315,7 +313,7 @@ void Lubby2<DisplacementDim>::calculateJacobianBurgers(
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
2
*
KelvinVectorSize
,
Jac
.
template
block
<
KelvinVectorSize
,
KelvinVectorSize
>(
2
*
KelvinVectorSize
,
2
*
KelvinVectorSize
)
2
*
KelvinVectorSize
)
.
diagonal
()
.
diagonal
()
.
setConstant
(
1.
/
dt
);
.
setConstant
(
1.
);
}
}
template
class
Lubby2
<
2
>;
template
class
Lubby2
<
2
>;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment