Skip to content
Snippets Groups Projects
Commit 9ae699d7 authored by Ludovic Noels's avatar Ludovic Noels
Browse files

add slope for p=0

parent e76e1ff7
Branches
Tags
No related merge requests found
......@@ -78,10 +78,11 @@ J2IsotropicHardening * PerfectlyPlasticJ2IsotropicHardening::clone() const
return new PerfectlyPlasticJ2IsotropicHardening(*this);
}
PowerLawJ2IsotropicHardening::PowerLawJ2IsotropicHardening(const int num, double yield0, double h, double hexp, const bool init) :
J2IsotropicHardening(num,yield0,init), _h(h), _hexp(hexp)
PowerLawJ2IsotropicHardening::PowerLawJ2IsotropicHardening(const int num, double yield0, double h, double hexp, double pth, const bool init) :
J2IsotropicHardening(num,yield0,init), _h(h), _hexp(hexp), _pth(pth)
{
if(_h<0 or _hexp<0) Msg::Error("PowerLawJ2IsotropicHardening: negative hardening parameters");
if(_h<0. or _hexp<0. or _pth<0.) Msg::Error("PowerLawJ2IsotropicHardening: negative hardening parameters");
if(_pth<1.e-16) _pth=1.e-16;
}
PowerLawJ2IsotropicHardening::PowerLawJ2IsotropicHardening(const PowerLawJ2IsotropicHardening &source) :
......@@ -89,6 +90,7 @@ PowerLawJ2IsotropicHardening::PowerLawJ2IsotropicHardening(const PowerLawJ2Isotr
{
_h = source._h;
_hexp = source._hexp;
_pth = source._pth;
}
PowerLawJ2IsotropicHardening& PowerLawJ2IsotropicHardening::operator=(const J2IsotropicHardening &source)
......@@ -99,6 +101,7 @@ PowerLawJ2IsotropicHardening& PowerLawJ2IsotropicHardening::operator=(const J2Is
{
_h = src->_h;
_hexp = src->_hexp;
_pth = src->_pth;
}
return *this;
}
......@@ -111,12 +114,12 @@ void PowerLawJ2IsotropicHardening::createIPVariable(IPJ2IsotropicHardening* &ipv
void PowerLawJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &ipv) const
{
double tol=1.e-16;
// double tol=1.e-16;
double dR=0, ddR=0, intR=0;
double R = getYield0();
if(p< tol)
if(p< _pth)
{
R=getYield0();
/* R=getYield0();
if(_h<1.)
{
dR = 1e20;
......@@ -126,7 +129,11 @@ void PowerLawJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &i
{
dR = _h;
ddR = 0.;
}
}*/
R=getYield0()+_h*pow(_pth,_hexp)/_pth*p;
dR=_h*pow(_pth,_hexp)/_pth;
ddR=0.;
intR=getYield0()*p+_h*pow(_pth,_hexp)/_pth*p*p/2.;
}
else
{
......@@ -135,7 +142,7 @@ void PowerLawJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &i
ddR = dR*(_hexp-1.)/p;
intR=getYield0()*p;
if(fabs(_hexp+1.)!=0)
intR+=_h*pow(p,_hexp+1.)/(_hexp+1.);
intR+=_h*pow(_pth,_hexp)/_pth*_pth*_pth/2.+_h*pow(p,_hexp+1.)/(_hexp+1.)-_h*pow(_pth,_hexp+1.)/(_hexp+1.);
}
ipv.set(R,dR,ddR,intR);
}
......
......@@ -65,13 +65,14 @@ class PerfectlyPlasticJ2IsotropicHardening : public J2IsotropicHardening
class PowerLawJ2IsotropicHardening : public J2IsotropicHardening
{
// R = yield0 + h p^hexp
// R = yield0 + h p^hexp if p>pth
// R = yield0 + (h pth^hexp)/pth p if p<=pth
protected :
double _h, _hexp;
double _h, _hexp, _pth;
public:
// constructor
PowerLawJ2IsotropicHardening(const int num, double yield0, double h, double hexp, bool init=true);
PowerLawJ2IsotropicHardening(const int num, double yield0, double h, double hexp, double pth=1.e-16, bool init=true);
#ifndef SWIG
virtual ~PowerLawJ2IsotropicHardening(){}
PowerLawJ2IsotropicHardening(const PowerLawJ2IsotropicHardening &source);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment