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

cleaning + modifying hardening law (linear // linear + exp)

parent 045dbf7b
No related branches found
No related tags found
1 merge request!36Transfer jl_gurs updates to master
......@@ -159,20 +159,8 @@ IPNonLocalDamageGurson& IPNonLocalDamageGurson::operator=(const IPVariable &sour
}
double IPNonLocalDamageGurson::defoEnergy() const
{
return _elasticEnergy;
}
double IPNonLocalDamageGurson::plasticEnergy() const
{
if(ipvJ2IsotropicHardening != NULL)
return ipvJ2IsotropicHardening->getIntegR();
else
return 0.;
}
void IPNonLocalDamageGurson::restart()
{
......
......@@ -25,9 +25,6 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
IPJ2IsotropicHardening* ipvJ2IsotropicHardening; // Hardening law
std::vector<IPGursonNucleation*> ipvgdnContainer; // Nucleation law vector
// Energies
double _elasticEnergy; // elastic energy stored
// Internal variables
double _eplmatrix; // equivalent plastic strain in the matrix (hatp)
double _fV; // local porosity
......@@ -45,6 +42,13 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
bool _dissipationBlocked;
// Energies
double _elasticEnergy; // elastic energy stored
// plastic energy : stored in hardening law
public:
// Constructor & destructor
IPNonLocalDamageGurson();
......@@ -65,10 +69,7 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
}
}
// General functions
virtual double defoEnergy() const;
virtual double plasticEnergy() const;
virtual void restart();
virtual IPVariable* clone() const {return new IPNonLocalDamageGurson(*this);};
......@@ -80,21 +81,29 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
#endif // HAVE_MPI
// Damage managing
virtual void blockDissipation(const bool fl){_dissipationBlocked = fl;};
virtual bool dissipationIsBlocked() const {return _dissipationBlocked;};
// Access functions - members values
// Access functions - Energy
virtual double &getRefToElasticEnergy() {return _elasticEnergy;};
virtual double defoEnergy() const { return _elasticEnergy;};
virtual double plasticEnergy() const
{
if(ipvJ2IsotropicHardening != NULL) {return ipvJ2IsotropicHardening->getIntegR();}
else {return 0.;}
};
// Those need to be implemented ???
virtual double damageEnergy() const {return 0.;}; // dissipation by damage
virtual double irreversibleEnergy() const {return 0.;} // irreversible energy for path following
virtual double getDamage() const{return getLocalCorrectedPorosity();};
virtual const STensor3& getConstRefToFp() const {return _Fp;}
virtual STensor3& getRefToFp(){return _Fp;}
virtual const STensor3& getConstRefToLogsqrtCe() const{return _logsqrtCe;}
virtual STensor3& getRefToLogsqrtCe(){return _logsqrtCe;}
// Access functions - Internal variables
virtual double getDamage() const{return getLocalCorrectedPorosity();};
virtual double getMatrixPlasticStrain() const { return _eplmatrix;}
virtual double &getRefToMatrixPlasticStrain() { return _eplmatrix;}
......@@ -108,6 +117,15 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
virtual double getNonLocalCorrectedPorosity() const { return _nldfVstar;}
virtual double &getRefToNonLocalCorrectedPorosity() { return _nldfVstar;}
virtual const STensor3& getConstRefToFp() const {return _Fp;}
virtual STensor3& getRefToFp(){return _Fp;}
virtual const STensor3& getConstRefToLogsqrtCe() const{return _logsqrtCe;}
virtual STensor3& getRefToLogsqrtCe(){return _logsqrtCe;}
// Access functions - Derivatives
virtual double &getRefToDLocalCorrectedPorosityDNonLocalCorrectedPorosity(){return _DFvStarDNldfVstar;}
virtual double getDLocalCorrectedPorosityDNonLocalCorrectedPorosity() const{return _DFvStarDNldfVstar;}
......@@ -115,6 +133,7 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
virtual STensor3 & getRefToDLocalCorrectedPorosityDStrain(){return _DFvStarDStrain;}
// Access functions - Included IPVs
virtual const IPJ2IsotropicHardening &getConstRefToIPJ2IsotropicHardening() const
{
......@@ -176,7 +195,6 @@ class IPNonLocalDamageGurson : public IPVariableMechanics
{
return ipvgdnContainer;
}
};
#endif // IPNONLOCALDAMAGEGURSON_H_
......@@ -361,7 +361,7 @@ void LinearFollowedByExponentialJ2IsotropicHardening::hardening(double p, IPJ2Is
dR = _h1;
ddR = 0.;
}
else if (p < _pexp) // Plastic case: linear part
else if (p <= _pexp) // Plastic case: linear part
{
R += _h1*p;
dR = _h1;
......@@ -371,13 +371,12 @@ void LinearFollowedByExponentialJ2IsotropicHardening::hardening(double p, IPJ2Is
else // Plastic case: exponentional (saturation) part
{
double tmp = exp(-(p-_pexp)/_hexp2);
R += _h1*_pexp + _h2*(1.-tmp);
dR = _h2 * tmp /_hexp2;
ddR = - dR /_hexp2;
// ddR = _h2*exp(-(p-_pexp)/_hexp) * (p-_pexp)/_hexp * -(p-_pexp)/_hexp + _h2*exp(-(p-_pexp)/_hexp) * p/_hexp;
R += _h1*p + _h2*(1.-tmp);
dR = _h1 + _h2 * tmp /_hexp2;
ddR = -_h2 * tmp /_hexp2 /_hexp2;
intR = getYield0()*p;
intR += 0.5*_h1*_pexp*_pexp + _h1*_pexp*(p-_pexp);
intR += 0.5*_h1*p*p;
intR += _h2*(p-_pexp) + _h2*(tmp-exp(0.)) *_hexp2;
}
ipv.set(R,dR,ddR,intR);
......
......@@ -155,7 +155,7 @@ class LinearFollowedByExponentialJ2IsotropicHardening : public J2IsotropicHarden
{
// R = yield0 + h1 * p
// Then when p > p_exp
// R = yield0 + h1 * pexp + h2* (1- exp(-hexp2*(p-pexp)))
// R = yield0 + h1 * p + h2* (1- exp(-hexp2*(p-pexp)))
protected :
double _h1, _pexp, _h2, _hexp2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment