Skip to content
Snippets Groups Projects
Commit dbd5bb44 authored by Julien Leclerc's avatar Julien Leclerc
Browse files

replace bool _useOffsetMethod by a integer to identify whoch method is used

parent 84e40b26
Branches
Tags
1 merge request!128Coal jl8
......@@ -18,7 +18,7 @@ mlawNonLocalPorousCoupledLaw::mlawNonLocalPorousCoupledLaw(const int num,const d
const double fVinitial, const double lambda0, const J2IsotropicHardening &j2IH, const CLengthLaw &cLLaw,
const double tol, const bool matrixbyPerturbation, const double pert) :
mlawNonLocalPorosity(num, E, nu, rho, fVinitial, j2IH, cLLaw, tol, matrixbyPerturbation, pert),
_withCrackTransition(false),_useCfTOffset(true)
_withCrackTransition(false),_CfTOffsetMethod(1)
{
_mlawGrowth = new mlawNonLocalDamageGurson(num, E, nu, rho, q1, q2, q3, fVinitial, j2IH, cLLaw, tol, matrixbyPerturbation, pert);
......@@ -34,7 +34,7 @@ mlawNonLocalPorousCoupledLaw::mlawNonLocalPorousCoupledLaw(const int num,const d
const double fVinitial, const double lambda0, const double kappa, const J2IsotropicHardening &j2IH, const CLengthLaw &cLLaw,
const double tol, const bool matrixbyPerturbation, const double pert) :
mlawNonLocalPorosity(num, E, nu, rho, fVinitial, j2IH, cLLaw, tol, matrixbyPerturbation, pert),
_withCrackTransition(false),_useCfTOffset(true)
_withCrackTransition(false),_CfTOffsetMethod(1)
{
_mlawGrowth = new mlawNonLocalDamageGurson(num, E, nu, rho, q1, q2, q3, fVinitial, j2IH, cLLaw, tol, matrixbyPerturbation, pert);
......@@ -49,7 +49,7 @@ mlawNonLocalPorousCoupledLaw::mlawNonLocalPorousCoupledLaw(const int num,const d
mlawNonLocalPorousCoupledLaw::mlawNonLocalPorousCoupledLaw(const mlawNonLocalPorousCoupledLaw &source) :
mlawNonLocalPorosity(source),_withCrackTransition(source._withCrackTransition),
_useCfTOffset(source._useCfTOffset)
_CfTOffsetMethod(source._CfTOffsetMethod)
{
_mlawGrowth = NULL;
if(source._mlawGrowth != NULL) _mlawGrowth = dynamic_cast<mlawNonLocalDamageGurson*>(source._mlawGrowth->clone());
......@@ -121,10 +121,9 @@ void mlawNonLocalPorousCoupledLaw::setOnsetTriaxialityForRoundedYieldSurface(con
_mlawCoales->setOnsetTriaxialityForRoundedYieldSurface(newTc);
};
void mlawNonLocalPorousCoupledLaw::useCfTOffset(const bool fl){
_useCfTOffset = fl;
if (_useCfTOffset) Msg::Info("CfT offset is used");
else Msg::Info("CfT offset is not used");
void mlawNonLocalPorousCoupledLaw::setCfTOffsetMethod(const int MethodNumber){
_CfTOffsetMethod = MethodNumber;
Msg::Info("mlawNonLocalPorousCoupledLaw::useCfTOffset: Offset method %d is used",_CfTOffsetMethod);
};
void mlawNonLocalPorousCoupledLaw::setCrackTransition(const bool fl){
......@@ -401,11 +400,11 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
// leading to offset = (yieldThomason + Cft*R/R0)/(Cft*R/R0) = 1+yieldThomason*R0/(Cft*R)
// Compute Cft Offset
if (_useCfTOffset){
if (_CfTOffsetMethod == 1){
q1Thom->getRefToCrackOffsetOnCft() = 1. + yieldThomason*R0/(Cft*R);
Msg::Info("coalescence occurs for the first time: Offset =%e",q1Thom->getRefToCrackOffsetOnCft());
}
else{
else if (_CfTOffsetMethod == 0){
q1Thom->getRefToCrackOffsetOnCft() = 1.;
}
......@@ -510,11 +509,11 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
if (yieldThomason > _tol){
// update offset
if (_useCfTOffset){
if (_CfTOffsetMethod == 1){
q1Thom->getRefToCrackOffsetOnCft() = 1. + yieldThomason*R0/(Cft*R);
Msg::Info("coalescence occurs, use Thomason yield surface in next step with offset = %e",q1Thom->getCrackOffsetOnCft());
}
else{
else if(_CfTOffsetMethod == 0){
q1Thom->getRefToCrackOffsetOnCft() = 1.;
}
......
......@@ -24,7 +24,7 @@ class mlawNonLocalPorousCoupledLaw : public mlawNonLocalPorosity
mlawNonLocalDamageGurson *_mlawGrowth;
mlawNonLocalPorousThomasonLaw *_mlawCoales;
bool _withCrackTransition;
bool _useCfTOffset;
int _CfTOffsetMethod;
public:
......@@ -50,7 +50,7 @@ class mlawNonLocalPorousCoupledLaw : public mlawNonLocalPorosity
virtual void setBalanceEquationType(const int type);
virtual void setRoundedYieldSurfaceMethod(const int method);
virtual void setOnsetTriaxialityForRoundedYieldSurface(const double newTc);
virtual void useCfTOffset(const bool fl);
virtual void setCfTOffsetMethod(const int MethodNumber);
virtual void setShearPorosityGrowthFactor(const double k);
......
......@@ -1354,8 +1354,8 @@ void NonLocalPorousCoupledDG3DMaterialLaw::setOnsetTriaxialityForRoundedYieldSur
_nlpcoupledlaw->setOnsetTriaxialityForRoundedYieldSurface(newTc);
};
void NonLocalPorousCoupledDG3DMaterialLaw::useCfTOffset(const bool fl){
_nlpcoupledlaw->useCfTOffset(fl);
void NonLocalPorousCoupledDG3DMaterialLaw::setCfTOffsetMethod(const int method){
_nlpcoupledlaw->setCfTOffsetMethod(method);
};
void NonLocalPorousCoupledDG3DMaterialLaw::setSubStepping(const bool fl, const int maxNumStep){
......
......@@ -470,7 +470,7 @@ protected:
void setNonLocalMethod(const int i);
void setRoundedYieldSurfaceMethod(const int method);
void setOnsetTriaxialityForRoundedYieldSurface(const double newTc);
void useCfTOffset(const bool fl);
void setCfTOffsetMethod(const int method);
#ifndef SWIG
NonLocalPorousCoupledDG3DMaterialLaw(const NonLocalPorousCoupledDG3DMaterialLaw &source);
virtual ~NonLocalPorousCoupledDG3DMaterialLaw();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment