Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cm3Libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm3
cm3Libraries
Commits
7c73bf1c
Commit
7c73bf1c
authored
1 year ago
by
Van Dung NGUYEN
Browse files
Options
Downloads
Patches
Plain Diff
correct stress in checking coelascence with Hill
parent
78e2e9c9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp
+291
-1
291 additions, 1 deletion
NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp
NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h
+3
-0
3 additions, 0 deletions
NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h
with
294 additions
and
1 deletion
NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp
+
291
−
1
View file @
7c73bf1c
...
@@ -2370,3 +2370,293 @@ void mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS::I1J2J3_getYieldNormal(STen
...
@@ -2370,3 +2370,293 @@ void mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS::I1J2J3_getYieldNormal(STen
}
}
}
}
};
};
void
mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS
::
checkCoalescence
(
IPNonLocalPorosity
*
q1
,
const
IPNonLocalPorosity
*
q0
,
const
double
*
T
)
const
{
// check condition if check coalescence is carried out
if
(
getNumOfYieldSurfaces
()
>
1
)
{
Msg
::
Error
(
"check coalescenece has not implemented for num yield surface >1"
);
return
;
}
// Get ipvs
const
IPCoalescence
*
q0Thom
=
&
q0
->
getConstRefToIPCoalescence
();
IPCoalescence
*
q1Thom
=
&
q1
->
getRefToIPCoalescence
();
// check active
if
(
q0Thom
->
getCoalescenceOnsetFlag
()
and
q1
->
dissipationIsActive
())
{
q1Thom
->
getRefToCoalescenceActiveFlag
()
=
true
;
}
else
{
q1Thom
->
getRefToCoalescenceActiveFlag
()
=
false
;
}
bool
willUseNormalToCheck
=
false
;
if
(
_checkCoalescenceWithNormal
)
{
if
(
q1
->
getLocation
()
==
IPVariable
::
INTERFACE_MINUS
or
q1
->
getLocation
()
==
IPVariable
::
INTERFACE_PLUS
)
{
willUseNormalToCheck
=
true
;
const
SVector3
&
normal
=
q1
->
getConstRefToCurrentOutwardNormal
();
if
(
normal
.
norm
()
<=
0.
)
{
Msg
::
Error
(
"coalescence cannot check with zero normal!!!"
);
return
;
};
}
else
{
willUseNormalToCheck
=
false
;
if
(
!
_withBothYieldSurfacesInBulk
)
{
return
;
}
}
}
if
(
q0Thom
->
getCoalescenceOnsetFlag
())
{
// if onset already occurs
q1Thom
->
getRefToCoalescenceOnsetFlag
()
=
q0Thom
->
getCoalescenceOnsetFlag
();
q1Thom
->
getRefToCoalescenceMode
()
=
q0Thom
->
getCoalescenceMode
();
// copy data
q1Thom
->
setIPvAtCoalescenceOnset
(
*
q0Thom
->
getIPvAtCoalescenceOnset
());
q1Thom
->
getRefToCrackOffsetOnCft
()
=
q0Thom
->
getCrackOffsetOnCft
();
q1Thom
->
getRefToLodeParameterOffset
()
=
q0Thom
->
getLodeParameterOffset
();
q1Thom
->
getRefToYieldOffset
()
=
q0Thom
->
getYieldOffset
();
}
else
if
(
q1
->
dissipationIsActive
())
{
const
STensor3
&
kCor
=
q1
->
getConstRefToCorotationalKirchhoffStress
();
const
STensor3
&
F
=
q1
->
getConstRefToDeformationGradient
();
const
double
R
=
q1
->
getCurrentViscoplasticYieldStress
();
double
J
=
STensorOperation
::
determinantSTensor3
(
F
);
static
STensor3
corSig
;
corSig
=
kCor
;
if
(
_stressFormulation
==
CORO_CAUCHY
)
{
corSig
*=
(
1.
/
J
);
}
// check at interface
bool
interfaceNeckActive
=
true
;
bool
interfaceShearActive
=
true
;
if
(
willUseNormalToCheck
)
{
double
CftThomason
;
_mlawCoales
->
getCoalescenceLaw
()
->
computeConcentrationFactor
(
q0
,
q1
,
CftThomason
);
double
CftShear
;
_mlawShear
->
getCoalescenceLaw
()
->
computeConcentrationFactor
(
q0
,
q1
,
CftShear
);
SVector3
normal
=
q1
->
getConstRefToCurrentOutwardNormal
();
normal
.
normalize
();
// Compute Sig from Kcor following: Sig = invFeT * sigCor * FeT = Fe*sigCor*invFe
static
STensor3
invFep
,
FeSigCor
,
Fe
,
Sig
;
STensorOperation
::
inverseSTensor3
(
q1
->
getConstRefToFp
(),
invFep
);
STensorOperation
::
multSTensor3
(
F
,
invFep
,
Fe
);
STensorOperation
::
inverseSTensor3
(
Fe
,
invFep
);
STensorOperation
::
multSTensor3
(
Fe
,
corSig
,
FeSigCor
);
STensorOperation
::
multSTensor3SecondTranspose
(
FeSigCor
,
invFep
,
Sig
);
// traction vector
static
SVector3
tractionForce
;
STensorOperation
::
multSTensor3SVector3
(
Sig
,
normal
,
tractionForce
);
double
tauN
=
STensorOperation
::
dot
(
tractionForce
,
normal
);
// Deduce tangent part
double
tauTanSq
=
0.
;
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
double
temp
=
tractionForce
(
i
)
-
tauN
*
normal
(
i
);
tauTanSq
+=
temp
*
temp
;
}
// Compute effective stress
double
tauEff
=
0.
;
if
(
tauN
>
0.
)
{
tauEff
=
sqrt
(
tauN
*
tauN
+
_beta
*
tauTanSq
);
}
else
{
tauEff
=
sqrt
(
_beta
*
tauTanSq
);
}
if
(
tauEff
-
CftThomason
*
R
>
0
)
{
interfaceNeckActive
=
true
;
}
else
{
interfaceNeckActive
=
false
;
}
if
(
sqrt
(
3.
*
tauTanSq
)
-
CftShear
*
R
>
0
)
{
interfaceShearActive
=
true
;
}
else
{
interfaceShearActive
=
false
;
}
}
static
STensor3
sigEff
;
STensorOperation
::
multSTensor43STensor3
(
_aniM
,
corSig
,
sigEff
);
double
Gurson
=
_mlawGrowth
->
I1J2J3_yieldFunction
(
sigEff
,
R
,
q0
,
q1
,
T
);
double
Thomason
=
_mlawCoales
->
I1J2J3_yieldFunction
(
sigEff
,
R
,
q0
,
q1
,
T
);
double
Shear
=
_mlawShear
->
I1J2J3_yieldFunction
(
sigEff
,
R
,
q0
,
q1
,
T
);
// active plasticity
// check coalescence is active
bool
&
CoalesFlag
=
q1Thom
->
getRefToCoalescenceOnsetFlag
();
int
&
CoalesMode
=
q1Thom
->
getRefToCoalescenceMode
();
CoalesFlag
=
false
;
CoalesMode
=
0
;
if
(
_useTwoYieldRegularization
)
{
double
FG
=
Gurson
+
1.
;
double
FT
=
Thomason
+
1.
;
double
FS
=
Shear
+
1.
;
if
(
FG
<
0.
or
FT
<
0.
or
FS
<
0
)
{
Msg
::
Error
(
"FT,FS FG must be all positive but FT=%e, FS = %e, FG=%e"
,
FT
,
FS
,
FG
);
}
// check necking
if
(
std
::
max
(
FT
,
FS
)
>
FG
)
{
double
ratio
=
FG
/
FT
;
if
(
pow
(
ratio
,
_yieldRegExponent
)
<
_coalesTol
&&
interfaceNeckActive
)
{
CoalesFlag
=
true
;
CoalesMode
=
1
;
printf
(
"Necking coalescence at Gurson = %e, Thomason =%e, Shear = %e
\n
"
,
Gurson
,
Thomason
,
Shear
);
}
else
{
ratio
=
FG
/
FS
;
if
(
pow
(
ratio
,
_yieldRegExponent
)
<
_coalesTol
&&
interfaceShearActive
)
{
CoalesFlag
=
true
;
CoalesMode
=
2
;
printf
(
"Shear coalescence at Gurson = %e, Thomason =%e, Shear = %e
\n
"
,
Gurson
,
Thomason
,
Shear
);
}
else
{
CoalesFlag
=
false
;
CoalesMode
=
0
;
}
}
}
}
else
{
if
(
Thomason
>
std
::
max
(
Gurson
,
Shear
)
&&
interfaceNeckActive
)
{
CoalesFlag
=
true
;
CoalesMode
=
1
;
printf
(
"Necking coalescence at Gurson = %e, Thomason =%e, Shear = %e
\n
"
,
Gurson
,
Thomason
,
Shear
);
}
else
if
(
Shear
>
std
::
max
(
Gurson
,
Thomason
)
&&
interfaceShearActive
)
{
CoalesFlag
=
true
;
CoalesMode
=
2
;
printf
(
"Shear coalescence at Gurson = %e, Thomason =%e, Shear = %e
\n
"
,
Gurson
,
Thomason
,
Shear
);
}
else
{
CoalesFlag
=
false
;
CoalesMode
=
0
;
}
}
// if coalesnce occurs
if
(
CoalesFlag
)
{
q1Thom
->
setIPvAtCoalescenceOnset
(
*
q1
);
// if offset is used to satisfy Thomason yield surface at the onset of coalescence
if
(
_useTwoYieldRegularization
)
{
// never offset with yield regulation
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
;
q1Thom
->
getRefToLodeParameterOffset
()
=
1.
;
q1Thom
->
getRefToYieldOffset
()
=
0.
;
}
else
{
if
(
_withCftOffset
)
{
if
(
CoalesMode
==
1
)
{
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
+
Thomason
;
}
else
if
(
CoalesMode
==
2
)
{
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
+
Shear
;
}
q1Thom
->
getRefToLodeParameterOffset
()
=
1.
;
q1Thom
->
getRefToYieldOffset
()
=
0.
;
#ifdef _DEBUG
printf
(
"coalescence ocurrs using Cft offset = %e
\n
"
,
q1Thom
->
getCrackOffsetOnCft
());
#endif //_DEBUG
}
else
if
(
_withLodeOffset
)
{
// Lode offset is not used for material law, because law already accounts for Lode variable
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
;
q1Thom
->
getRefToLodeParameterOffset
()
=
1.
;
q1Thom
->
getRefToYieldOffset
()
=
0.
;
}
else
if
(
_withYieldOffset
)
{
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
;
q1Thom
->
getRefToLodeParameterOffset
()
=
1.
;
if
(
CoalesMode
==
1
)
{
q1Thom
->
getRefToYieldOffset
()
=
Thomason
;
}
else
if
(
CoalesMode
==
2
)
{
q1Thom
->
getRefToYieldOffset
()
=
Shear
;
}
#ifdef _DEBUG
printf
(
"coalescence ocurrs using yield offset = %e
\n
"
,
q1Thom
->
getYieldOffset
());
#endif //_DEBUG
}
else
{
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
;
q1Thom
->
getRefToLodeParameterOffset
()
=
1.
;
q1Thom
->
getRefToYieldOffset
()
=
0.
;
#ifdef _DEBUG
printf
(
"coalescence ocurrs, not offset is used
\n
"
);
#endif //_DEBUG
}
}
}
else
{
q1Thom
->
getRefToCrackOffsetOnCft
()
=
1.
;
q1Thom
->
getRefToLodeParameterOffset
()
=
1.
;
q1Thom
->
getRefToYieldOffset
()
=
0.
;
}
}
};
void
mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS
::
forceCoalescence
(
IPNonLocalPorosity
*
q1
,
const
IPNonLocalPorosity
*
q0
,
const
double
*
T
)
const
{
Msg
::
Error
(
"mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS::forceCoalescence is not implemented!!!"
);
};
bool
mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS
::
checkCrackCriterion
(
IPNonLocalPorosity
*
q1
,
const
IPNonLocalPorosity
*
q0
,
const
STensor3
&
Fcur
,
const
SVector3
&
normal
,
double
delayFactor
,
const
double
*
T
)
const
{
Msg
::
Error
(
"mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS::checkCrackCriterion is not implemented!!!"
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h
+
3
−
0
View file @
7c73bf1c
...
@@ -311,6 +311,9 @@ class mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS : public mlawNonLocalPorou
...
@@ -311,6 +311,9 @@ class mlawNonLocalPorousCoupledHill48LawWithMPSAndMSS : public mlawNonLocalPorou
bool
diff
=
false
,
STensor43
*
DNpDkcor
=
NULL
,
STensor3
*
DNpDR
=
NULL
,
std
::
vector
<
STensor3
>*
DNpDY
=
NULL
,
bool
diff
=
false
,
STensor43
*
DNpDkcor
=
NULL
,
STensor3
*
DNpDR
=
NULL
,
std
::
vector
<
STensor3
>*
DNpDY
=
NULL
,
bool
withThermic
=
false
,
STensor3
*
DNpDT
=
NULL
bool
withThermic
=
false
,
STensor3
*
DNpDT
=
NULL
)
const
;
)
const
;
virtual
void
checkCoalescence
(
IPNonLocalPorosity
*
q1
,
const
IPNonLocalPorosity
*
q0
,
const
double
*
T
)
const
;
virtual
void
forceCoalescence
(
IPNonLocalPorosity
*
q1
,
const
IPNonLocalPorosity
*
q0
,
const
double
*
T
)
const
;
virtual
bool
checkCrackCriterion
(
IPNonLocalPorosity
*
q1
,
const
IPNonLocalPorosity
*
q0
,
const
STensor3
&
Fcur
,
const
SVector3
&
normal
,
double
delayFactor
,
const
double
*
T
)
const
;
};
};
#endif // MLAWNONLOCALPOROUSCOALESCENCE_H_
#endif // MLAWNONLOCALPOROUSCOALESCENCE_H_
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