diff --git a/NonLinearSolver/internalPoints/CMakeLists.txt b/NonLinearSolver/internalPoints/CMakeLists.txt index 357e3d0ad1991d84ef8c1b39ba5b48172be2c185..097fad93052a2081fef5db93ca63a284e23f5646 100644 --- a/NonLinearSolver/internalPoints/CMakeLists.txt +++ b/NonLinearSolver/internalPoints/CMakeLists.txt @@ -19,6 +19,7 @@ set(SRC ipNucleation.cpp ipCoalescence.cpp ipNonLocalPorosity.cpp + ipNonLocalDamageGursonThermoMechanics.cpp ipTransverseIsotropic.cpp ipTransverseIsoCurvature.cpp ipTransverseIsoYarnB.cpp diff --git a/NonLinearSolver/internalPoints/ipNonLocalDamageGursonThermoMechanics.cpp b/NonLinearSolver/internalPoints/ipNonLocalDamageGursonThermoMechanics.cpp new file mode 100644 index 0000000000000000000000000000000000000000..995cf778daa251d9791d469d0322fe4ccc387ef6 --- /dev/null +++ b/NonLinearSolver/internalPoints/ipNonLocalDamageGursonThermoMechanics.cpp @@ -0,0 +1,51 @@ +// +// Description: storing class for Non Local Damage Gurson Thermo Mechanics +// +// +// Author: <L. Noels>, (C) 2014 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "ipNonLocalDamageGursonThermoMechanics.h" + + +IPNonLocalDamageGursonThermoMechanics::IPNonLocalDamageGursonThermoMechanics() : IPNonLocalPorosity(),_thermalEnergy(0.), _DirreversibleEnergyDT(0.), _ThermoElasticCoupling(0.) +{}; + +IPNonLocalDamageGursonThermoMechanics::IPNonLocalDamageGursonThermoMechanics(const IPNonLocalDamageGursonThermoMechanics &source) : IPNonLocalPorosity(source), _thermalEnergy(source._thermalEnergy), _DirreversibleEnergyDT(0.), _ThermoElasticCoupling(0.) {}; + +IPNonLocalDamageGursonThermoMechanics::IPNonLocalDamageGursonThermoMechanics(double fVinitial, const J2IsotropicHardening *j2IH, const CLengthLaw *cll, + const std::vector<NucleationLaw*> *ipvgdnContainer,const CoalescenceLaw *coaleslaw) :IPNonLocalPorosity(fVinitial,j2IH,cll,ipvgdnContainer,coaleslaw), _thermalEnergy(0.), + _DirreversibleEnergyDT(0.), _ThermoElasticCoupling(0.) {}; + +IPNonLocalDamageGursonThermoMechanics& IPNonLocalDamageGursonThermoMechanics::operator=(const IPVariable &source) +{ + IPNonLocalPorosity::operator=(source); + const IPNonLocalDamageGursonThermoMechanics* src = dynamic_cast<const IPNonLocalDamageGursonThermoMechanics*>(&source); + if(src) + { + _DirreversibleEnergyDT = src->_DirreversibleEnergyDT; + _ThermoElasticCoupling = src->_ThermoElasticCoupling; + _thermalEnergy=src->_thermalEnergy; + } + return *this; +} + +double IPNonLocalDamageGursonThermoMechanics::defoEnergy() const +{ + return IPNonLocalPorosity::defoEnergy(); + +} +double IPNonLocalDamageGursonThermoMechanics::plasticEnergy() const +{ + return IPNonLocalPorosity::plasticEnergy(); +} + + +void IPNonLocalDamageGursonThermoMechanics::restart(){ + IPNonLocalPorosity::restart(); + restartManager::restart(_thermalEnergy); + restartManager::restart(_DirreversibleEnergyDT); + restartManager::restart(_ThermoElasticCoupling); +} diff --git a/NonLinearSolver/internalPoints/ipNonLocalDamageGursonThermoMechanics.h b/NonLinearSolver/internalPoints/ipNonLocalDamageGursonThermoMechanics.h new file mode 100644 index 0000000000000000000000000000000000000000..148e206404b7abfde77748efb801ebb9c80f09c3 --- /dev/null +++ b/NonLinearSolver/internalPoints/ipNonLocalDamageGursonThermoMechanics.h @@ -0,0 +1,44 @@ +// +// Description: storing class for non local damage gurson thermomechanical law +// Author: <L. Noels>, (C) 2014 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#ifndef IPNONLOCALDAMAGEGURSONTHERMOMECHANICS_H_ +#define IPNONLOCALDAMAGEGURSONTHERMOMECHANICS_H_ +#include "ipNonLocalPorosity.h" +#include "STensor3.h" + +class IPNonLocalDamageGursonThermoMechanics : public IPNonLocalPorosity +{ + public: + double _thermalEnergy; // + double _DirreversibleEnergyDT; + double _ThermoElasticCoupling; + + + + public: + IPNonLocalDamageGursonThermoMechanics(); + IPNonLocalDamageGursonThermoMechanics(const IPNonLocalDamageGursonThermoMechanics &source); + IPNonLocalDamageGursonThermoMechanics& operator=(const IPVariable &source); + IPNonLocalDamageGursonThermoMechanics(double fVinitial, const J2IsotropicHardening *j2IH, const CLengthLaw *cll, + const std::vector<NucleationLaw*> *ipvgdnContainer,const CoalescenceLaw *coaleslaw); + virtual const double& getConstRefToDIrreversibleEnergyDT() const{return _DirreversibleEnergyDT;}; + virtual double& getRefToDIrreversibleEnergyDT() {return _DirreversibleEnergyDT;}; + + virtual const double& getConstRefToThermoelasticCoupling() const{return _ThermoElasticCoupling;}; + virtual double& getRefToThermoelasticCoupling() {return _ThermoElasticCoupling;}; + + virtual ~IPNonLocalDamageGursonThermoMechanics(){} + virtual double defoEnergy() const; + virtual double plasticEnergy() const; + virtual double getThermalEnergy() const {return _thermalEnergy;}; + IPNonLocalDamageGursonThermoMechanics& operator=(const IPNonLocalPorosity &source); + virtual IPVariable* clone() const {return new IPNonLocalDamageGursonThermoMechanics(*this);}; + virtual void restart(); +}; + +#endif // IPNONLOCALDAMAGEGURSONTHERMOMECHANICS_H_ diff --git a/NonLinearSolver/internalPoints/ipNonLocalPorosity.cpp b/NonLinearSolver/internalPoints/ipNonLocalPorosity.cpp index c7ce4e11f766a4fa1a18c8375bbe3fa43c102710..778db3dddccc2b7472e650cdcd16590c352bb804 100644 --- a/NonLinearSolver/internalPoints/ipNonLocalPorosity.cpp +++ b/NonLinearSolver/internalPoints/ipNonLocalPorosity.cpp @@ -15,7 +15,7 @@ IPNonLocalPorosity::IPNonLocalPorosity() : IPVariableMechanics(), _elasticEnerg _eplmatrix(0.), _fV(0), _fVstar(0), _fVtilde(0.), _yieldfV(0.), _dissipationBlocked(false),_NonLocalToLocal(false), _Fp(1.), _Ee(0.),_DirreversibleEnergyDF(0.), _DirreversibleEnergyDtildefV(0.), - _currentOutwardNormal(NULL),_referenceOutwardNormal(NULL),_corKir(0.), _yieldStress(0.), + _currentOutwardNormal(NULL),_referenceOutwardNormal(NULL),_corKir(0.), _yieldStress(0.), _failed(false), _hatq(0.),_nonlocalEplmatrix(0.),_nonlocalHatQ(0.), _fVinitial(0.) { ipvJ2IsotropicHardening=NULL; @@ -34,8 +34,8 @@ IPNonLocalPorosity::IPNonLocalPorosity(double fVinitial, const J2IsotropicHarden _fVstar(fVinitial),_fVtilde(fVinitial), _yieldfV(fVinitial), _Fp(1.),_Ee(0.), _DirreversibleEnergyDF(0.), _DirreversibleEnergyDtildefV(0.), _dissipationBlocked(false), _NonLocalToLocal(false), - _currentOutwardNormal(NULL), _referenceOutwardNormal(NULL),_corKir(0.), - _failed(false),_hatq(0.),_nonlocalEplmatrix(0.),_nonlocalHatQ(0.), _fVinitial(fVinitial) + _currentOutwardNormal(NULL), _referenceOutwardNormal(NULL),_corKir(0.), + _failed(false),_hatq(0.),_nonlocalEplmatrix(0.),_nonlocalHatQ(0.), _fVinitial(fVinitial) { ipvJ2IsotropicHardening=NULL; if(j2IH ==NULL) Msg::Error("IPNonLocalPorosity::IPNonLocalPorosity has no j2IH"); @@ -59,7 +59,7 @@ IPNonLocalPorosity::IPNonLocalPorosity(double fVinitial, const J2IsotropicHarden ipvCoal=NULL; if(coaleslaw ==NULL) Msg::Error("IPNonLocalPorosity::IPNonLocalPorosity has no Coalescence law"); coaleslaw->createIPVariable(ipvCoal); - coaleslaw->computeInitialChi(ipvCoal,fVinitial); + if(fVinitial <0. or fVinitial >1.) Msg::Error("IPNonLocalPorosity::IPNonLocalPorosity wrong initial porosity"); }; @@ -226,14 +226,14 @@ void IPNonLocalPorosity::restart() restartManager::restart(_DirreversibleEnergyDF); restartManager::restart(_DirreversibleEnergyDtildefV); restartManager::restart(_corKir); - restartManager::restart(_yieldStress); + restartManager::restart(_yieldStress); restartManager::restart(_failed); restartManager::restart(_hatq); restartManager::restart(_nonlocalEplmatrix); restartManager::restart(_nonlocalHatQ); restartManager::restart(_fVinitial); - _currentOutwardNormal = NULL; - _referenceOutwardNormal = NULL; + _currentOutwardNormal = NULL; + _referenceOutwardNormal = NULL; return; } diff --git a/NonLinearSolver/internalPoints/ipNonLocalPorosity.h b/NonLinearSolver/internalPoints/ipNonLocalPorosity.h index f16dbb659f8c7918c784c1c8fb1df307f8f45130..6749cbc5176a1f3fac4a9db7c7f8405a9dd33438 100644 --- a/NonLinearSolver/internalPoints/ipNonLocalPorosity.h +++ b/NonLinearSolver/internalPoints/ipNonLocalPorosity.h @@ -31,8 +31,8 @@ class IPNonLocalPorosity : public IPVariableMechanics std::vector<IPNucleation*> ipvgdnContainer; // Nucleation law vector IPCoalescence* ipvCoal; // Coalescence law - const SVector3* _currentOutwardNormal; // current normal at Gauss point - const SVector3* _referenceOutwardNormal; // refrence nomral at Gauss point + const SVector3* _currentOutwardNormal; // current normal at Gauss point + const SVector3* _referenceOutwardNormal; // refrence nomral at Gauss point // Internal variables double _fVinitial; // initial porosity @@ -46,11 +46,11 @@ class IPNonLocalPorosity : public IPVariableMechanics double _hatq; // volumetric plastic deformation = tr(Dp) double _nonlocalHatQ; // nonlocal volumetric plastic deformation - double _yieldStress; // current viscoplastic yield stress = initial part + hardening part+ viscoplastic part + double _yieldStress; // current viscoplastic yield stress = initial part + hardening part+ viscoplastic part STensor3 _Fp; // plastic part of the deformation gradient STensor3 _Ee; // elastic natural strain tensor - STensor3 _corKir; // corotational Kirchhoff stress + STensor3 _corKir; // corotational Kirchhoff stress // Damage and transition managing bool _dissipationBlocked; // True if dissipation is blocked at the IPv @@ -63,8 +63,6 @@ class IPNonLocalPorosity : public IPVariableMechanics double _irreversibleEnergy; STensor3 _DirreversibleEnergyDF; double _DirreversibleEnergyDtildefV; - - public: // Constructor & destructor IPNonLocalPorosity(); @@ -139,7 +137,7 @@ class IPNonLocalPorosity : public IPVariableMechanics virtual double damageEnergy() const {return 0.;}; // dissipation by damage virtual double irreversibleEnergy() const {return _irreversibleEnergy;}; - virtual double & getRefToIrreversibleEnergy() {return _irreversibleEnergy;}; + virtual double & getRefToIrreversibleEnergy() {return _irreversibleEnergy;}; virtual const STensor3& getConstRefToDIrreversibleEnergyDF() const{return _DirreversibleEnergyDF;}; virtual STensor3& getRefToDIrreversibleEnergyDF() {return _DirreversibleEnergyDF;}; @@ -147,6 +145,12 @@ class IPNonLocalPorosity : public IPVariableMechanics virtual const double& getConstRefToDIrreversibleEnergyDtildefV() const{return _DirreversibleEnergyDtildefV;}; virtual double& getRefToDIrreversibleEnergyDtildefV() {return _DirreversibleEnergyDtildefV;}; + virtual const double& getConstRefToDIrreversibleEnergyDT() const{ Msg::Fatal("getRefToDIrreversibleEnergyDT only defined in thermoelasticity");};//-------added + virtual double& getRefToDIrreversibleEnergyDT() {Msg::Fatal("getRefToDIrreversibleEnergyDT only defined in thermoelasticity");};//-------added + + virtual const double& getConstRefToThermoelasticCoupling() const{Msg::Fatal("getRefToDIrreversibleEnergyDT only defined in thermoelasticity");};//------added + virtual double& getRefToThermoelasticCoupling() {Msg::Fatal("getRefToDIrreversibleEnergyDT only defined in thermoelasticity");};//------added + // Access functions - Internal variables virtual double getDamage() const{return getNonLocalPorosity();}; @@ -177,8 +181,8 @@ class IPNonLocalPorosity : public IPVariableMechanics virtual double getYieldPorosity() const {return _yieldfV;}; virtual double& getRefToYieldPorosity() {return _yieldfV;}; - virtual double getCurrentViscoplasticYieldStress() const {return _yieldStress;}; - virtual double& getRefToCurrentViscoplasticYieldStress() {return _yieldStress;}; + virtual double getCurrentViscoplasticYieldStress() const {return _yieldStress;}; + virtual double& getRefToCurrentViscoplasticYieldStress() {return _yieldStress;}; virtual const STensor3& getConstRefToFp() const {return _Fp;} virtual STensor3& getRefToFp(){return _Fp;} @@ -196,7 +200,7 @@ class IPNonLocalPorosity : public IPVariableMechanics virtual bool getCoalescenceActiveFlag() const {return ipvCoal->getCoalescenceActiveFlag();}; virtual void setCoalescenceActiveFlag(const bool fl){ipvCoal->getRefToCoalescenceActiveFlag() = fl;}; - virtual const STensor3& getConstRefToCorotationalKirchhoffStress() const {return _corKir;}; + virtual const STensor3& getConstRefToCorotationalKirchhoffStress() const {return _corKir;}; virtual STensor3& getRefToCorotationalKirchhoffStress() {return _corKir;}; // Access functions - Included IPVs diff --git a/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.cpp b/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.cpp index 117d87bebaedca8f00a580cb31f74fec3e34d675..4073a2e7728aef77754c9f5386da894d591672e5 100644 --- a/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.cpp +++ b/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.cpp @@ -12,12 +12,12 @@ #include "restartManager.h" #include "STensorOperations.h" -IPPhenomenologicalSMP::IPPhenomenologicalSMP(double _zg):IPVariableMechanics(),_thermalEnergy(0.) , _eps(0.),_SMPEnergy(0.) +IPPhenomenologicalSMP::IPPhenomenologicalSMP():IPVariableMechanics(),_thermalEnergy(0.) , _eps(0.),_SMPEnergy(0.) { STensorOperation::unity(Fpg); STensorOperation::unity(Fp); STensorOperation::unity(Ff); - zg=_zg; + zg=0.; }; diff --git a/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.h b/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.h index e096c069e505c25066f79c9c5f9173d49432db79..85b6f93172588d4b866e361667d904426a0aefa5 100644 --- a/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.h +++ b/NonLinearSolver/internalPoints/ipPhenomenologicalSMP.h @@ -12,25 +12,25 @@ #include "ipLinearThermoMechanics.h" #include "STensor3.h" #include "ipvariable.h" -//#include "mlawSMP.h" +#include "ipHardening.h" +#include "j2IsotropicHardening.h" class IPPhenomenologicalSMP : public IPVariableMechanics//: public IPLinearThermoMechanics //, public mlawSMP { public: - double _SMPEnergy; + //double _SMPEnergy; protected: + IPJ2IsotropicHardening* ipvJ2IsotropicHardening; STensor3 Fpg,Fp,Ff; double zg; - //double _SMPEnergy; + double _SMPEnergy; double _thermalEnergy; double _eps; // equivalent plastic strain public: - IPPhenomenologicalSMP(double _zg); - - //IPSMP(const materialLaw* l = NULL); + IPPhenomenologicalSMP(); + IPPhenomenologicalSMP(const J2IsotropicHardening *j2IH); IPPhenomenologicalSMP(const IPPhenomenologicalSMP &source); IPPhenomenologicalSMP& operator=(const IPVariable &source); - //virtual double defoEnergy() const ; virtual double defoEnergy() const{return _SMPEnergy;} virtual double getThermalEnergy() const {return _thermalEnergy;}; @@ -47,6 +47,18 @@ protected: virtual double& getRefToEquivalentPlasticDefo() {return _eps;}; virtual const double& getConstRefToEquivalentPlasticDefo() const {return _eps;}; + virtual const IPJ2IsotropicHardening &getConstRefToIPJ2IsotropicHardening() const + { + if(ipvJ2IsotropicHardening==NULL) + Msg::Error("IPJ2linear: ipvJ2IsotropicHardening not initialized"); + return *ipvJ2IsotropicHardening; + } + virtual IPJ2IsotropicHardening &getRefToIPJ2IsotropicHardening() + { + if(ipvJ2IsotropicHardening==NULL) + Msg::Error("IPJ2linear: ipvJ2IsotropicHardening not initialized"); + return *ipvJ2IsotropicHardening; + } protected: diff --git a/NonLinearSolver/materialLaw/CMakeLists.txt b/NonLinearSolver/materialLaw/CMakeLists.txt index 5651734146888ea29df40647568e0b8559df43e4..089b160e23de95970877181ad72c357efe0a1f0e 100644 --- a/NonLinearSolver/materialLaw/CMakeLists.txt +++ b/NonLinearSolver/materialLaw/CMakeLists.txt @@ -68,6 +68,7 @@ set(SRC elasticPotential.cpp cohesiveElasticPotential.cpp mlawAnisotropicStoch.cpp + mlawNonLocalDamageGursonFullyCoupledThermoMechanics.cpp # src/op_eshelby.cpp # Headers without cpp change this ?? ID.h diff --git a/NonLinearSolver/materialLaw/CoalescenceLaw.cpp b/NonLinearSolver/materialLaw/CoalescenceLaw.cpp index f0d46fbcc092e67e951398153d1f68718d1156a6..200fe410df0d60de234792eb5873bb03246be3ec 100644 --- a/NonLinearSolver/materialLaw/CoalescenceLaw.cpp +++ b/NonLinearSolver/materialLaw/CoalescenceLaw.cpp @@ -164,17 +164,9 @@ OriginalThomasonCoalescenceLaw::OriginalThomasonCoalescenceLaw(const OriginalTho void OriginalThomasonCoalescenceLaw::createIPVariable(IPCoalescence* &ipv) const { if(ipv != NULL) delete ipv; - ipv = new IPOriginalThomasonCoalescence(); - -}; - -void OriginalThomasonCoalescenceLaw::computeInitialChi(IPCoalescence* ipvCoal, double fVinitial) const -{ - ipvCoal->getRefToLigamentRatio() = pow(1.5* fVinitial *_initialVoidSpacingRatio,1./3.); }; - void OriginalThomasonCoalescenceLaw::checkCoalescence(const double fV, const IPNonLocalPorosity* ipv, const IPCoalescence* ipvCoalPrev, IPCoalescence* ipvCoal) const{ const IPOriginalThomasonCoalescence* ipThomasonPrev = dynamic_cast<const IPOriginalThomasonCoalescence*>(ipvCoalPrev); IPOriginalThomasonCoalescence* ipThomason = dynamic_cast<IPOriginalThomasonCoalescence*>(ipvCoal); diff --git a/NonLinearSolver/materialLaw/CoalescenceLaw.h b/NonLinearSolver/materialLaw/CoalescenceLaw.h index a5685eca8c40b927daff6d181d26d38f2168d424..45144a0127dcea907fe20c04e5bf52e2664a2f13 100644 --- a/NonLinearSolver/materialLaw/CoalescenceLaw.h +++ b/NonLinearSolver/materialLaw/CoalescenceLaw.h @@ -46,8 +46,6 @@ class CoalescenceLaw virtual void createIPVariable(IPCoalescence* &ipv) const=0; virtual void checkCoalescence(const double fV, const IPNonLocalPorosity* ipv, const IPCoalescence* ipvCoalPrev, IPCoalescence* ipvCoal) const = 0; virtual void forceCoalescence(const IPNonLocalPorosity* ipv, IPCoalescence* ipvCoal) = 0; - virtual void computeInitialChi(IPCoalescence* ipvCoal, double fVinitial) const = 0; - #endif // SWIG }; @@ -74,7 +72,6 @@ class NoCoalescenceLaw : public CoalescenceLaw virtual bool nonLocalCheck() const {return true;}; virtual void checkCoalescence(const double fV, const IPNonLocalPorosity* ipv,const IPCoalescence* ipvCoalPrev, IPCoalescence* ipvCoal) const {}; virtual void forceCoalescence(const IPNonLocalPorosity* ipv, IPCoalescence* ipvCoal) {}; - virtual void computeInitialChi(IPCoalescence* ipvCoal, double fVinitial) const {}; #endif // SWIG }; @@ -105,7 +102,6 @@ class FstarCoalescenceLaw : public CoalescenceLaw virtual bool nonLocalCheck() const {return _nonLocalCheck;}; virtual void checkCoalescence(const double fV, const IPNonLocalPorosity* ipv, const IPCoalescence* ipvCoalPrev, IPCoalescence* ipvCoal) const; virtual void forceCoalescence(const IPNonLocalPorosity* ipv, IPCoalescence* ipvCoal); - virtual void computeInitialChi(IPCoalescence* ipvCoal, double fVinitial) const {}; #endif // SWIG }; @@ -137,7 +133,6 @@ class OriginalThomasonCoalescenceLaw : public CoalescenceLaw{ virtual bool nonLocalCheck() const {return _nonLocalCheck;}; virtual void checkCoalescence(const double fV, const IPNonLocalPorosity* ipv,const IPCoalescence* ipvCoalPrev, IPCoalescence* ipvCoal) const; virtual void forceCoalescence(const IPNonLocalPorosity* ipv, IPCoalescence* ipvCoal); - virtual void computeInitialChi(IPCoalescence* ipvCoal, double fVinitial) const; #endif //SWIG }; diff --git a/NonLinearSolver/materialLaw/j2IsotropicHardening.cpp b/NonLinearSolver/materialLaw/j2IsotropicHardening.cpp index 0ddea714cd771df920bfa1883e3b41681bb7cc8f..9a2dd4d3716ec354c32371ecbbd9cf20564355c9 100644 --- a/NonLinearSolver/materialLaw/j2IsotropicHardening.cpp +++ b/NonLinearSolver/materialLaw/j2IsotropicHardening.cpp @@ -14,11 +14,57 @@ J2IsotropicHardening::J2IsotropicHardening(const int num, double yield0, const bool init): _num(num), _initialized(init), _yield0(yield0) { + _temFunc_Sy0= new constantScalarFunction(1.); + _temFunc_h= new constantScalarFunction(1.); + _temFunc_hexp= new constantScalarFunction(1.); + _temFunc_h1= new constantScalarFunction(1.); + _temFunc_h2= new constantScalarFunction(1.); + _temFunc_pexp= new constantScalarFunction(1.); + _temFunc_hexp2= new constantScalarFunction(1.); + _temFunc_K= new constantScalarFunction(1.); + _temFunc_p0= new constantScalarFunction(1.); + if(_yield0 < 0) Msg::Error("J2IsotropicHardening: negative yield stress"); } J2IsotropicHardening::J2IsotropicHardening(const J2IsotropicHardening &source) { + _temFunc_Sy0 = NULL; + if (source._temFunc_Sy0 != NULL){ + _temFunc_Sy0 = source._temFunc_Sy0->clone(); + } + _temFunc_h = NULL; + if (source._temFunc_h != NULL){ + _temFunc_h = source._temFunc_h->clone(); + } + _temFunc_hexp = NULL; + if (source._temFunc_hexp != NULL){ + _temFunc_hexp = source._temFunc_hexp->clone(); + } + _temFunc_h1 = NULL; + if (source._temFunc_h1 != NULL){ + _temFunc_h1 = source._temFunc_h1->clone(); + } + _temFunc_h2 = NULL; + if (source._temFunc_h2 != NULL){ + _temFunc_h2 = source._temFunc_h2->clone(); + } + _temFunc_pexp = NULL; + if (source._temFunc_pexp != NULL){ + _temFunc_pexp = source._temFunc_pexp->clone(); + } + _temFunc_hexp2 = NULL; + if (source._temFunc_hexp2 != NULL){ + _temFunc_hexp2 = source._temFunc_hexp2->clone(); + } + _temFunc_K = NULL; + if (source._temFunc_K != NULL){ + _temFunc_K = source._temFunc_K->clone(); + } + _temFunc_p0 = NULL; + if (source._temFunc_p0 != NULL){ + _temFunc_p0 = source._temFunc_p0->clone(); + } _num = source._num; _initialized = source._initialized; _yield0 = source._yield0; @@ -26,12 +72,44 @@ J2IsotropicHardening::J2IsotropicHardening(const J2IsotropicHardening &source) J2IsotropicHardening& J2IsotropicHardening::operator=(const J2IsotropicHardening &source) { + _temFunc_Sy0 = NULL; + if (source._temFunc_Sy0 != NULL){ + _temFunc_Sy0 = source._temFunc_Sy0->clone(); + } _num = source._num; _initialized = source._initialized; _yield0 = source._yield0; return *this; } - +//-----------------------added +void J2IsotropicHardening::setTemperatureFunction_Sy0(const scalarFunction& Tfunc){ + if (_temFunc_Sy0 != NULL) delete _temFunc_Sy0; + _temFunc_Sy0 = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_h(const scalarFunction& Tfunc){ + if (_temFunc_h != NULL) delete _temFunc_h; + _temFunc_h = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_hexp(const scalarFunction& Tfunc){ + if (_temFunc_hexp != NULL) delete _temFunc_hexp; + _temFunc_hexp = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_h1(const scalarFunction& Tfunc){ + if (_temFunc_h1 != NULL) delete _temFunc_h1; + _temFunc_h1 = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_h2(const scalarFunction& Tfunc){ + if (_temFunc_h2 != NULL) delete _temFunc_h2; + _temFunc_h2 = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_pexp(const scalarFunction& Tfunc){ + if (_temFunc_pexp != NULL) delete _temFunc_pexp; + _temFunc_pexp = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_hexp2(const scalarFunction& Tfunc){ + if (_temFunc_hexp2 != NULL) delete _temFunc_hexp2; + _temFunc_hexp2 = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_K(const scalarFunction& Tfunc){ + if (_temFunc_K != NULL) delete _temFunc_K; + _temFunc_K = Tfunc.clone();} +void J2IsotropicHardening::setTemperatureFunction_p0(const scalarFunction& Tfunc){ + if (_temFunc_p0 != NULL) delete _temFunc_p0; + _temFunc_p0 = Tfunc.clone();} +//------------------------------------------end PerfectlyPlasticJ2IsotropicHardening::PerfectlyPlasticJ2IsotropicHardening(const int num, double yield0, const bool init) : J2IsotropicHardening(num,yield0,init) { @@ -73,10 +151,31 @@ void PerfectlyPlasticJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHard } ipv.set(R,dR,ddR,intR); } +//-------------------------------------added +void PerfectlyPlasticJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double tol=1.e-15; + double dR=0, ddR=0, intR=0; + double R = getYield0(T); + if(p>0) + { + R=getYield0(T)+tol*p; + dR=tol; + ddR=0; + intR=0.5*tol*p*p+getYield0(T)*p; + } + ipv.set(R,dR,ddR,intR); +} +//-----------------------------------------end J2IsotropicHardening * PerfectlyPlasticJ2IsotropicHardening::clone() const { return new PerfectlyPlasticJ2IsotropicHardening(*this); } +double PerfectlyPlasticJ2IsotropicHardening::DRDT(double p, double T) const +{ + double dRdT=getDYield0DT(T); + return dRdT; +} 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) @@ -119,17 +218,6 @@ void PowerLawJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &i double R = getYield0(); if(p< _pth) { - /* R=getYield0(); - if(_h<1.) - { - dR = 1e20; - ddR = -1e20; - } - else - { - dR = _h; - ddR = 0.; - }*/ R=getYield0()+_h*pow(_pth,_hexp)/_pth*p; dR=_h*pow(_pth,_hexp)/_pth; ddR=0.; @@ -146,11 +234,67 @@ void PowerLawJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &i } ipv.set(R,dR,ddR,intR); } +//--------------------------------------------------added +void PowerLawJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double tol=1.e-16; + double dR=0, ddR=0, intR=0; + double R = getYield0(T); + double hT=_h*_temFunc_h->getVal(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + if(p< tol) + { + R=getYield0(T); + if(hT<1.) + { + dR = 1e20; + ddR = -1e20; + } + else + { + dR = hT; + ddR = 0.; + } + } + else + { + R=getYield0(T)+hT*pow(p,hexpT); + dR = hT*hexpT*pow(p,hexpT)/p; + ddR = dR*(hexpT-1.)/p; + intR=getYield0(T)*p; + if(fabs(hexpT+1.)!=0) + intR+=hT*pow(p,hexpT+1.)/(hexpT+1.); + } + ipv.set(R,dR,ddR,intR); +} +//--------------------------------------------------------------------------end J2IsotropicHardening * PowerLawJ2IsotropicHardening::clone() const { return new PowerLawJ2IsotropicHardening(*this); } - +//--------------------------------added +double PowerLawJ2IsotropicHardening::DRDT(double p, double T) const +{ + double tol=1.e-16; + double dhdT=_h*_temFunc_h->getDiff(T); + double dhexpdT=_hexp*_temFunc_hexp->getDiff(T); + double hT=_h*_temFunc_h->getVal(T); + double hexpT=_hexp*_temFunc_h->getVal(T); + double dRdT; + if(p<tol && dhexpdT != 0) + { + dRdT=-1e20; + } + else if (p<tol && dhexpdT == 0) + { + dRdT=getDYield0DT(T)+dhdT*pow(p,hexpT); + } + else + { + dRdT=getDYield0DT(T)+dhdT*pow(p,hexpT)+hT*dhexpdT*log(p)*pow(p,hexpT); + } +} +//-----------------------------------------end ExponentialJ2IsotropicHardening::ExponentialJ2IsotropicHardening(const int num, double yield0, double h, double hexp, const bool init) : J2IsotropicHardening(num,yield0,init), _h(h), _hexp(hexp) { @@ -203,6 +347,42 @@ void ExponentialJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening } ipv.set(R,dR,ddR,intR); } +//-----------------------------------------------added +void ExponentialJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double tol=1.e-16; + double dR=0, ddR=0, intR=0; + double R = getYield0(T); + double hT=_h*_temFunc_h->getVal(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + if(p< tol) + { + R=getYield0(T); + dR = hT*hexpT; + ddR = -hexpT*(dR); + } + else + { + double tmp = exp(-hexpT*p); + R = getYield0(T)*+hT*(1.-tmp); + dR = hT*hexpT*tmp; + ddR = -hexpT*(dR); + intR=getYield0(T)*p+hT*p; + if(fabs(hexpT)!=0) intR+=hT*(exp(-hexpT*p)-exp(0))/(hexpT); + } + ipv.set(R,dR,ddR,intR); +} + +double ExponentialJ2IsotropicHardening::DRDT(double p, double T) const +{ + double dhdT=_h*_temFunc_h->getDiff(T); + double dhexpdT=_hexp*_temFunc_hexp->getDiff(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + double hT=_h*_temFunc_h->getVal(T); + double dRdT=getDYield0DT(T)+dhdT*(1-exp(-hexpT*p))+hT*(dhexpdT*p*exp(-hexpT*p)); + return dRdT; +} +//----------------------------------------end J2IsotropicHardening * ExponentialJ2IsotropicHardening::clone() const { return new ExponentialJ2IsotropicHardening(*this); @@ -259,11 +439,47 @@ void SwiftJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &ipv) } ipv.set(R,dR,ddR,intR); } +//----------------------added +void SwiftJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double tol=1.e-16; + double dR=0, ddR=0, intR=0; + double R = getYield0(T); + double hT = _h*_temFunc_h->getVal(T); + double hexpT = _hexp*_temFunc_hexp->getVal(T); + if(p< tol) + { + R=getYield0(T); + dR = getYield0(T)*hT*hexpT; + ddR = dR*(hexpT-1.)*hT; + } + else + { + double tmp = 1.+hT*p; + R = getYield0(T)*pow(tmp,hexpT); + dR = getYield0(T)*hT*hexpT*pow(tmp,hexpT)/tmp; + ddR = (dR)*(hexpT-1.)*hT/tmp; + if(fabs(hexpT+1.)!=0 && fabs(hT)!=0.) intR=getYield0(T)*pow(1.+hT*p,hexpT+1.)/(hexpT+1.)/hT; + } + ipv.set(R,dR,ddR,intR); +} + +double SwiftJ2IsotropicHardening::DRDT(double p,double T) const +{ + double dhdT=_h*_temFunc_h->getDiff(T); + double dhexpdT=_hexp*_temFunc_hexp->getDiff(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + double hT=_h*_temFunc_h->getVal(T); + double dRdT=getDYield0DT(T)*pow(1+hT*p,hexpT)+getYield0(T)*(dhdT*hexpT/(1+hT*p)+log(1+hT*p)*dhexpdT)*pow(1+hT*p,hexpT); + return dRdT; +} +//------------------------------end J2IsotropicHardening * SwiftJ2IsotropicHardening::clone() const { return new SwiftJ2IsotropicHardening(*this); } +//--------------------------------------------------------------------------------------------------------end LinearExponentialJ2IsotropicHardening::LinearExponentialJ2IsotropicHardening(const int num, double yield0, double h1, double h2, double hexp, const bool init) : J2IsotropicHardening(num,yield0,init), _h1(h1), _h2(h2), _hexp(hexp) @@ -319,7 +535,44 @@ void LinearExponentialJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHar } ipv.set(R,dR,ddR,intR); } - +//-----------------------------added +void LinearExponentialJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double tol=1.e-16; + double dR=0, ddR=0, intR=0; + double R = getYield0(T); + double h1T=_h1*_temFunc_h1->getVal(T); + double h2T=_h2*_temFunc_h2->getVal(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + if(p< tol) + { + R=getYield0(T); + dR = h1T + h2T*hexpT; + ddR = -h2T*hexpT*hexpT; + } + else + { + double tmp = exp(-hexpT*p); + R = getYield0(T)+h1T*p + h2T*(1.-tmp); + dR = h1T + h2T*hexpT*tmp; + ddR = - h2T*hexpT*hexpT*tmp; + intR=getYield0(T)*p+ h1T*p*p/2.+h2T*p; + if(fabs(hexpT)!=0) intR+=h2T*(exp(-hexpT*p)-exp(0))/(hexpT); + } + ipv.set(R,dR,ddR,intR); +} +double LinearExponentialJ2IsotropicHardening::DRDT(double p,double T) const +{ + double dh1dT=_h1*_temFunc_h1->getDiff(T); + double dhexpdT=_hexp*_temFunc_hexp->getDiff(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + double h1T=_h1*_temFunc_h1->getVal(T); + double dh2dT=_h2*_temFunc_h2->getDiff(T); + double h2T=_h2*_temFunc_h2->getVal(T); + double dRdT=getDYield0DT(T)+dh1dT*p+dh2dT*(1-exp(-hexpT*p))+h2T*(dhexpdT*p*exp(-hexpT*p)); + return dRdT; +} +//----------------------------end J2IsotropicHardening * LinearExponentialJ2IsotropicHardening::clone() const { return new LinearExponentialJ2IsotropicHardening(*this); @@ -394,7 +647,62 @@ void LinearFollowedByExponentialJ2IsotropicHardening::hardening(double p, IPJ2Is } ipv.set(R,dR,ddR,intR); } - +//-----------------------------added +void LinearFollowedByExponentialJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double R = getYield0(T); + double dR(0.), ddR(0.), intR(0.); + double h1T = _h1*_temFunc_h1->getVal(T); + double pexpT = _pexp*_temFunc_pexp->getVal(T); + double h2T = _h2*_temFunc_h2->getVal(T); + double hexp2T = _hexp2*_temFunc_hexp2->getVal(T); + if(p < 1.e-16) // Elastic case + { + dR = h1T; + ddR = 0.; + } + else if (p <= pexpT) // Plastic case: linear part + { + R += h1T*p; + dR = h1T; + ddR = 0.; + intR = getYield0(T)*p + 0.5*h1T*p*p; + } + else // Plastic case: exponentional (saturation) part + { + double tmp = exp(-(p-pexpT)/hexp2T); + R += h1T*p + h2T*(1.-tmp); + dR = h1T + h2T * tmp /hexp2T; + ddR = -h2T * tmp /hexp2T /hexp2T; + + intR = getYield0(T)*p; + intR += 0.5*h1T*p*p; + intR += h2T*(p-pexpT) + h2T*(tmp-exp(0.)) *hexp2T; + } + ipv.set(R,dR,ddR,intR); +} +double LinearFollowedByExponentialJ2IsotropicHardening::DRDT(double p,double T) const +{ + double dh1dT=_h1*_temFunc_h1->getDiff(T); + double dhexp2dT=_hexp2*_temFunc_hexp2->getDiff(T); + double hexp2T=_hexp2*_temFunc_hexp2->getVal(T); + double h1T=_h1*_temFunc_h1->getVal(T); + double dh2dT=_h2*_temFunc_h2->getDiff(T); + double h2T=_h2*_temFunc_h2->getVal(T); + double pexpT=_pexp*_temFunc_pexp->getVal(T); + double dpexpdT=_pexp*_temFunc_pexp->getDiff(T); + double dRdT; + if (p<pexpT) + { + dRdT=getDYield0DT(T)+dh1dT*p; + } + else + { + dRdT=getDYield0DT(T)+dh1dT*p+dh2dT*(1-exp(-hexp2T*(p-pexpT)))+h2T*(dhexp2dT*(p-pexpT)-hexp2T*dpexpdT)*exp(-hexp2T*p); + } + return dRdT; +} +//----------------------------end J2IsotropicHardening* LinearFollowedByExponentialJ2IsotropicHardening::clone() const { return new LinearFollowedByExponentialJ2IsotropicHardening(*this); @@ -479,6 +787,70 @@ void LinearFollowedByPowerLawJ2IsotropicHardening::hardening(double p, IPJ2Isotr } ipv.set(R,dR,ddR,intR); } +//-----------------------------------------------------added +void LinearFollowedByPowerLawJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double tol=1.e-16; + double dR=0., ddR=0., intR=0.; + double R = getYield0(T); + double h1T=_h1*_temFunc_h1->getVal(T); + double pexpT=_pexp*_temFunc_pexp->getVal(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + // elastic case + if(p < tol) + { + // why ???? + if(h1T<1.) + { + dR = 1e20; + ddR = -1e20; + } + else + { + dR = h1T; + ddR = 0.; + } + } + // linear part + else if (p <= pexpT) + { + R = getYield0(T) + h1T*p; + dR = h1T; + ddR = 0.; + intR = getYield0(T)*p + 0.5*h1T*p*p; + } + // power part + else + { + R = (getYield0(T)+h1T*pexpT) * pow(p/pexpT,hexpT); + dR = R*hexpT/p; + ddR = dR*(hexpT-1.)/p; + + intR = getYield0(T)*pexpT + 0.5*h1T*pexpT*pexpT; + intR += R*p /(hexpT+1.) -((getYield0(T)+h1T*pexpT)*pexpT/(hexpT+1.)); + } + ipv.set(R,dR,ddR,intR); +} +double LinearFollowedByPowerLawJ2IsotropicHardening::DRDT(double p,double T) const +{ + double dh1dT=_h1*_temFunc_h1->getDiff(T); + double dhexpdT=_hexp*_temFunc_hexp->getDiff(T); + double hexpT=_hexp*_temFunc_hexp->getVal(T); + double h1T=_h1*_temFunc_h1->getVal(T); + double pexpT=_pexp*_temFunc_pexp->getVal(T); + double dpexpdT=_pexp*_temFunc_pexp->getDiff(T); + double dRdT; + if(p<pexpT) + { + dRdT=getDYield0DT(T)+dh1dT*p; + } + else + { + dRdT=getDYield0DT(T)*(1+h1T*pexpT)*pow(p/pexpT,hexpT)+getYield0(T)*(1+dh1dT*pexpT+h1T*dpexpdT)*pow(p/pexpT,hexpT)+getYield0(T)*(1+h1T*pexpT)*((-dpexpdT/pexpT)*hexpT+log(p/pexpT)*dhexpdT)*pow(p/ pexpT,hexpT); + } + return dRdT; +} +//--------------------------------end J2IsotropicHardening * LinearFollowedByPowerLawJ2IsotropicHardening::clone() const { return new LinearFollowedByPowerLawJ2IsotropicHardening(*this); @@ -586,7 +958,26 @@ void TwoExpJ2IsotropicHaderning::hardening(double p, IPJ2IsotropicHardening &ipv double intR = _yield0*p +_K*(exp(p)+0.5*exp(-2.*p)); ipv.set(R,dR,ddR,intR); } +//-------------------------------added +void TwoExpJ2IsotropicHaderning::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double yield0T=getYield0(T); + double KT=_K*_temFunc_K->getVal(T); + double R =yield0T+ KT*(exp(p)-exp(-2.*p)); + double dR = KT*(exp(p)+2.*exp(-2.*p)); + double ddR = KT*(exp(p)-4.*exp(-2.*p)); + double intR = yield0T*p +KT*(exp(p)+0.5*exp(-2.*p)); + ipv.set(R,dR,ddR,intR); +} +double TwoExpJ2IsotropicHaderning::DRDT(double p,double T) const +{ + double KT=_K*_temFunc_K->getVal(T); + double dKdT=_K*_temFunc_K->getDiff(T); + double dRdT=getDYield0DT(T)+dKdT*(exp(p)-exp(-2.*p)); + return dRdT; +} +//-------------------------------------end J2IsotropicHardening * TwoExpJ2IsotropicHaderning::clone() const { return new TwoExpJ2IsotropicHaderning(*this); @@ -625,7 +1016,30 @@ void TanhJ2IsotropicHardening::hardening(double p, IPJ2IsotropicHardening &ipv) double intR = _yield0*p +_K*_p0*log(cosh(p/_p0)); ipv.set(R,dR,ddR,intR); } - +//------------------------------added +void TanhJ2IsotropicHardening::hardening(double p,double T, IPJ2IsotropicHardening &ipv) const +{ + double p0T=_p0*_temFunc_p0->getVal(T); + double yield0T=getYield0(T); + double KT=_K*_temFunc_K->getVal(T); + double th = tanh(p/p0T); + double R =yield0T+ KT*th; + double dR = KT*(1.-th*th)/p0T; + double ddR = KT*2.*th*(th*th-1.)/(p0T*p0T); + double intR = yield0T*p +KT*p0T*log(cosh(p/p0T)); + ipv.set(R,dR,ddR,intR); +} +double TanhJ2IsotropicHardening::DRDT(double p,double T) const +{ + double KT= _K*_temFunc_K->getVal(T); + double dKdT=_K*_temFunc_K->getDiff(T); + double p0T= _p0*_temFunc_p0->getVal(T); + double dp0dT=_p0*_temFunc_p0->getDiff(T); + double th=tanh(p/p0T); + double dRdT=getDYield0DT(T)+dKdT*tanh(p/p0T)+KT*(1-th*th)*(-p*dp0dT/p0T/p0T); + return dRdT; +} +//------------------------------------------end J2IsotropicHardening * TanhJ2IsotropicHardening::clone() const { return new TanhJ2IsotropicHardening(*this); diff --git a/NonLinearSolver/materialLaw/j2IsotropicHardening.h b/NonLinearSolver/materialLaw/j2IsotropicHardening.h index fffbd08a7588862eddbe995fd4c230dc0288655d..41b8a669478b07662b306346f649172363c317f9 100644 --- a/NonLinearSolver/materialLaw/j2IsotropicHardening.h +++ b/NonLinearSolver/materialLaw/j2IsotropicHardening.h @@ -15,6 +15,7 @@ #include "ipstate.h" #include "MElement.h" #include "ipHardening.h" +#include "scalarFunction.h" #endif class J2IsotropicHardening{ public : @@ -27,6 +28,17 @@ class J2IsotropicHardening{ int _num; // number of law (must be unique !) bool _initialized; // to initialize law double _yield0; +//-----------------------------added + scalarFunction* _temFunc_Sy0; + scalarFunction* _temFunc_h; + scalarFunction* _temFunc_hexp; + scalarFunction* _temFunc_h1; + scalarFunction* _temFunc_h2; + scalarFunction* _temFunc_pexp; + scalarFunction* _temFunc_hexp2; + scalarFunction* _temFunc_K; + scalarFunction* _temFunc_p0; +//-------------------------------end public: // constructor #ifndef SWIG @@ -42,9 +54,21 @@ class J2IsotropicHardening{ virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const=0; virtual double getYield0() const {return _yield0;} virtual J2IsotropicHardening * clone() const=0; + virtual double getYield0(double T) const {return _yield0*_temFunc_Sy0->getVal(T);} + virtual double getDYield0DT(double T) const {return _yield0*_temFunc_Sy0->getDiff(T);} + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const=0; + virtual double DRDT(double p, double T) const=0; + void setTemperatureFunction_Sy0(const scalarFunction& Tfunc); + void setTemperatureFunction_h(const scalarFunction& Tfunc); + void setTemperatureFunction_hexp(const scalarFunction& Tfunc); + void setTemperatureFunction_h1(const scalarFunction& Tfunc); + void setTemperatureFunction_h2(const scalarFunction& Tfunc); + void setTemperatureFunction_pexp(const scalarFunction& Tfunc); + void setTemperatureFunction_hexp2(const scalarFunction& Tfunc); + void setTemperatureFunction_K(const scalarFunction& Tfunc); + void setTemperatureFunction_p0(const scalarFunction& Tfunc); #endif }; - class PerfectlyPlasticJ2IsotropicHardening : public J2IsotropicHardening { public : @@ -58,8 +82,10 @@ class PerfectlyPlasticJ2IsotropicHardening : public J2IsotropicHardening virtual hardeningname getType() const{return J2IsotropicHardening::perfectlyPlasticJ2IsotropicHardening; }; virtual void createIPVariable(IPJ2IsotropicHardening* &ipv) const; virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping - virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; + virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p, double T) const; #endif }; @@ -69,7 +95,6 @@ class PowerLawJ2IsotropicHardening : public J2IsotropicHardening // R = yield0 + (h pth^hexp)/pth p if p<=pth protected : double _h, _hexp, _pth; - public: // constructor PowerLawJ2IsotropicHardening(const int num, double yield0, double h, double hexp, double pth=1.e-16, bool init=true); @@ -83,6 +108,8 @@ class PowerLawJ2IsotropicHardening : public J2IsotropicHardening virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p, double T) const; #endif }; @@ -91,7 +118,6 @@ class ExponentialJ2IsotropicHardening : public J2IsotropicHardening // R = yield0 +h * (1-exp (-hexp *p)) protected : double _h, _hexp; - public: // constructor ExponentialJ2IsotropicHardening(const int num, double yield0, double h, double hexp, bool init=true); @@ -105,6 +131,8 @@ class ExponentialJ2IsotropicHardening : public J2IsotropicHardening virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p, double T) const; #endif }; @@ -113,7 +141,6 @@ class SwiftJ2IsotropicHardening : public J2IsotropicHardening // R = yield0 * (1+ h*p)^hexp protected : double _h, _hexp; - public: // constructor SwiftJ2IsotropicHardening(const int num, double yield0, double h, double hexp, bool init=true); @@ -127,15 +154,16 @@ class SwiftJ2IsotropicHardening : public J2IsotropicHardening virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p,double T) const; #endif }; - +//---------------------------------------------------------------------------end class LinearExponentialJ2IsotropicHardening : public J2IsotropicHardening { // R = yield0 +h1 * p + h2* (1- exp(-hexp*p)) protected : double _h1, _h2, _hexp; - public: // constructor LinearExponentialJ2IsotropicHardening(const int num, double yield0, double h1, double h2, double hexp, bool init=true); @@ -149,6 +177,8 @@ class LinearExponentialJ2IsotropicHardening : public J2IsotropicHardening virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p,double T) const; #endif }; @@ -174,6 +204,8 @@ class LinearFollowedByExponentialJ2IsotropicHardening : public J2IsotropicHarden virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p,double T) const; #endif }; @@ -199,6 +231,8 @@ class LinearFollowedByPowerLawJ2IsotropicHardening : public J2IsotropicHardening virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p,double T) const; #endif }; @@ -223,6 +257,8 @@ class PolynomialJ2IsotropicHardening : public J2IsotropicHardening{ virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const {Msg::Error("temperature dependent hardening is not implemented for PolynomialJ2IsotropicHardening");} ; + virtual double DRDT(double p,double T) const{Msg::Error("DRDT is not implemented for PolynomialJ2IsotropicHardening");}; #endif // SWIG }; @@ -244,6 +280,8 @@ class TwoExpJ2IsotropicHaderning : public J2IsotropicHardening{ virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p,double T) const; #endif // SWIG }; @@ -265,6 +303,8 @@ class TanhJ2IsotropicHardening : public J2IsotropicHardening{ virtual void initLaws(const std::map<int,J2IsotropicHardening*> &maplaw) {}; //nothing now, we will see if we use the mapping virtual void hardening(double p, IPJ2IsotropicHardening &ipv) const; virtual J2IsotropicHardening * clone() const; + virtual void hardening(double p, double T, IPJ2IsotropicHardening &ipv) const; + virtual double DRDT(double p,double T) const; #endif // SWIG }; diff --git a/NonLinearSolver/materialLaw/mlaw.h b/NonLinearSolver/materialLaw/mlaw.h index 710035148a0cc004f266b13526fd7a7bf8be4158..b71f1c1cf3d10a40efd00b9de78af223601ac46e 100644 --- a/NonLinearSolver/materialLaw/mlaw.h +++ b/NonLinearSolver/materialLaw/mlaw.h @@ -30,7 +30,7 @@ class materialLaw{ LinearThermoMechanics,J2ThermoMechanics,SMP,PhenomenologicalSMP,LinearElecTherMech,AnIsotropicElecTherMech, hyperelastic, powerYieldLaw, powerYieldLawWithFailure,nonLocalDamagePowerYieldHyper, localDamagePowerYieldHyperWithFailure,nonLocalDamagePowerYieldHyperWithFailure,ElecSMP, - ThermalConducter,AnIsotropicTherMech, localDamageJ2Hyper,linearElastic}; + ThermalConducter,AnIsotropicTherMech, localDamageJ2Hyper,linearElastic,nonLocalDamageGursonThermoMechanics}; protected : diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.cpp index d8fde858ae321b50e21b6822d9dc35658e91dc07..fab66b037f5e47c2747bbc9dc34f67ebb0d627c0 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.cpp @@ -24,7 +24,12 @@ mlawNonLocalDamageGurson::mlawNonLocalDamageGurson(const int num,const double E, _useSystem(2), _elasticTol(1e-3),_localfVFailure(1), _postBlockedBehavior(1) { // Compute ffstar from Gurson parameters - _fV_failure = (_q1 - sqrt(_q1*_q1 -_q3*_q3))/_q3/_q3; + _fV_failure = (_q1 - sqrt(_q1*_q1 -_q3*_q3))/_q3/_q3; + //---------------------------added + _temFunc_q1 = new constantScalarFunction(1.); + _temFunc_q2 = new constantScalarFunction(1.); + _temFunc_q3 = new constantScalarFunction(1.); + //------------------------------end _correctedRegularizedFunction = new twoVariableExponentialSaturationScalarFunction(0.9*_fV_failure,0.999*_fV_failure); _localRegularizedFunction = new twoVariableExponentialSaturationScalarFunction(0.9*_localfVFailure,0.999*_localfVFailure); }; @@ -43,8 +48,13 @@ mlawNonLocalDamageGurson::mlawNonLocalDamageGurson(const int num,const double E, _fV_failure = (_q1 - sqrt(_q1*_q1 -_q3*_q3))/_q3/_q3; _correctedRegularizedFunction = new twoVariableExponentialSaturationScalarFunction(0.9*_fV_failure,0.999*_fV_failure); _localRegularizedFunction = new twoVariableExponentialSaturationScalarFunction(0.9*_localfVFailure,0.999*_localfVFailure); -}; + //---------------------------added + _temFunc_q1 = new constantScalarFunction(1.); + _temFunc_q2 = new constantScalarFunction(1.); + _temFunc_q3 = new constantScalarFunction(1.); + //------------------------------end +}; mlawNonLocalDamageGurson::mlawNonLocalDamageGurson(const mlawNonLocalDamageGurson &source) : mlawNonLocalPorosity(source), @@ -55,6 +65,23 @@ mlawNonLocalDamageGurson::mlawNonLocalDamageGurson(const mlawNonLocalDamageGurso _localfVFailure(source._localfVFailure), _elasticTol(source._elasticTol), _postBlockedBehavior(source._postBlockedBehavior) { +//-----------------------------added + _temFunc_q1 = NULL; + if (source._temFunc_q1 != NULL){ + _temFunc_q1 = source._temFunc_q1->clone(); + } + + _temFunc_q2 = NULL; + if (source._temFunc_q2!= NULL){ + _temFunc_q2 = source._temFunc_q2->clone(); + } + + _temFunc_q3 = NULL; + if (source._temFunc_q3 != NULL){ + _temFunc_q3 = source._temFunc_q3->clone(); + } + +//------------------------------end _correctedRegularizedFunction = NULL; if (source._correctedRegularizedFunction != NULL){ _correctedRegularizedFunction = source._correctedRegularizedFunction->clone(); @@ -71,6 +98,12 @@ mlawNonLocalDamageGurson::~mlawNonLocalDamageGurson() _correctedRegularizedFunction = NULL; if (_localRegularizedFunction != NULL) delete _localRegularizedFunction; _localRegularizedFunction = NULL; + if(_temFunc_q1 != NULL) delete _temFunc_q1; + _temFunc_q1 = NULL; + if(_temFunc_q2 != NULL) delete _temFunc_q2; + _temFunc_q2 = NULL; + if(_temFunc_q3 != NULL) delete _temFunc_q3; + _temFunc_q3 = NULL; } void mlawNonLocalDamageGurson::setPredictorCorrectorParameters(const int InitialGuessMethod, const int maxite, const double theta, const int sys) @@ -86,6 +119,7 @@ void mlawNonLocalDamageGurson::setPredictorCorrectorParameters(const int Initial if (_useSystem == 1) Msg::Info("use system 4x4"); else if (_useSystem == 2) Msg::Info("use system 3x3"); else Msg::Fatal("_useSystem is not correctly defined mlawNonLocalDamageGurson::setPredictorCorrectorParameters"); + }; void mlawNonLocalDamageGurson::setFailureTolerance(const double tol, const double elTol, const double localFailedPoro){ @@ -144,25 +178,82 @@ void mlawNonLocalDamageGurson::createIPVariable(IPNonLocalPorosity* &ipv, const } - -bool mlawNonLocalDamageGurson::yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar) const +//---------------------------------------------------------------------------added +bool mlawNonLocalDamageGurson::yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar,double T) const { + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + if(isThermomechanicallyCoupled()){ + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + } double yield = q0->getConstRefToIPJ2IsotropicHardening().getR(); /* Compute yield function value */ - double f = tau_eq*tau_eq/yield/yield+2.*tildefVstar*_q1*cosh(3.*_q2*p/2./yield)-_q3*_q3*tildefVstar*tildefVstar-1.; + double f = tau_eq*tau_eq/yield/yield+2.*tildefVstar*q1T*cosh(3.*q2T*p/2./yield)-q3T*q3T*tildefVstar*tildefVstar-1.; return (f > _tol); } +/* +bool mlawNonLocalDamageGurson::plasticCorrector(const STensor3& F1, const double& tildefVstar, + const STensor3& tau_prDev, const double& p_pr,const STensor3& Epr, + const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, + STensor3& tau_cor, STensor3& Fp1, double& fV1, + STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, + const bool stiff, + STensor43& DKcorDEpr, STensor3& DKcorDtildefVstar, STensor3& DKcorDT, + STensor43& DFpDEpr, STensor3& DFpDtildefVstar, STensor3& DFpDT, + STensor3& DfVDEpr, double& DfVDtildefVstar,double& DfVDT, const double T//----------added + ) const{ + const double yield0 = _j2IH->getYield0(T); // for scaling----------------------added + //------------------------added + double KT=bulkModulus(T); + double alpT=ThermalExpansion(T); + double muT=shearModulus(T); + double dKdT=bulkModulusDerivative(T); + double dmudT=shearModulusDerivative(T); + double dalpdT=ThermalExpansionDerivative(T); + double q1T=getq1T(T); + double q2T=getq2T(T); + double q3T=getq3T(T); + double dq1dT=getq1Der(T); + double dq2dT=getq2Der(T); + double dq3dT=getq3Der(T); + //---------------------------end + // Jacobian for predictor-corrector variables + static fullMatrix<double> Jinv(4,4); + Jinv.setAll(0.); + static fullMatrix<double> J(4,4); + J.setAll(0.); +*/ + void mlawNonLocalDamageGurson::updatePlastic(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV, double yield, - const STensor3& F1, const STensor3& tau_prDev, const double& p_pr, + const STensor3& F1, const STensor3& tau_prDev, const double& p_pr,//-------added const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, - STensor3& Np, STensor3& NpDev, double& trNp, STensor43& Dexp) const{ + STensor3& Np, STensor3& NpDev, double& trNp, STensor43& Dexp,const double T) const{ static STensor3 DGNp; + double KT=_K; + double alpT=_alp; + double muT= _mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + } + //------------------------end + //change yield, _mu etc trNp = Deps/DeltaGamma; NpDev = tau_prDev; - NpDev*= (3./(yield*yield+6.*_mu*DeltaGamma)); + NpDev*= (3./(yield*yield+6.*muT*DeltaGamma));//-----modified Np=NpDev; Np(0,0) +=trNp/3.; Np(1,1) +=trNp/3.; @@ -173,11 +264,11 @@ void mlawNonLocalDamageGurson::updatePlastic(double DeltaGamma,double DeltaHatP, // corrotational Kirchhoff stress // we use the expression used to derive the stiffness as the log is not exact tau_cor = NpDev; - tau_cor *= (-2.*_mu*DeltaGamma); + tau_cor *= (-2.*muT*DeltaGamma); tau_cor += tau_prDev; - tau_cor(0,0) += p_pr - _K*DeltaGamma*trNp; - tau_cor(1,1) += p_pr - _K*DeltaGamma*trNp; - tau_cor(2,2) += p_pr - _K*DeltaGamma*trNp; + tau_cor(0,0) += p_pr - KT*DeltaGamma*trNp; + tau_cor(1,1) += p_pr - KT*DeltaGamma*trNp; + tau_cor(2,2) += p_pr - KT*DeltaGamma*trNp; double fV0 = q0->getLocalPorosity(); double hatP0 = q0->getMatrixPlasticStrain(); @@ -226,9 +317,25 @@ void mlawNonLocalDamageGurson::computePlasticTangentLocal(double DeltaGamma,doub double yield, double h, const STensor3& tau_prDev, const double& p_pr, const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& ENp, const IPNonLocalPorosity* q0, IPNonLocalPorosity* q1, - STensor43& DKcorDEpr, STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* Epr,const double& dRdT,const double& dDeltaHatPdT,const double& dDeltaGammadT, + const double& DDepsDT,double T,STensor3* DKcorDT, STensor3* DFpDT//-----added ) const{ - + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + if(isThermomechanicallyCoupled()){ + + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + } + // compute traceNP double invDeltaGamma = 1./DeltaGamma; static STensor3 dtrNpdEpr; @@ -237,10 +344,10 @@ void mlawNonLocalDamageGurson::computePlasticTangentLocal(double DeltaGamma,doub dtrNpdEpr.daxpy(dDepsdEpr,invDeltaGamma); static STensor43 dNpDevdEpr; - double rat_den1 = (yield*yield+6.*_mu*DeltaGamma); - double rat1 = 3.*2.*_mu/rat_den1; + double rat_den1 = (yield*yield+6.*muT*DeltaGamma); + double rat1 = 3.*2.*muT/rat_den1; double rat2 = -6.*h*yield/rat_den1/rat_den1; - double rat3 = -18.*_mu/rat_den1/rat_den1; + double rat3 = -18.*muT/rat_den1/rat_den1; dNpDevdEpr = _Idev; dNpDevdEpr *= rat1; @@ -259,9 +366,9 @@ void mlawNonLocalDamageGurson::computePlasticTangentLocal(double DeltaGamma,doub for(int k=0; k<3; k++){ for(int l=0; l<3; l++) { - DKcorDEpr(i,j,k,l) = _K*_I(i,j)*_I(k,l) + 2.*_mu*_Idev(i,j,k,l) - -_I(i,j)*_K*DeltaGamma*dtrNpdEpr(k,l)-_I(i,j)*_K*trNp*dDeltaGammadEpr(k,l) - -2.*_mu* NpDev(i,j)*dDeltaGammadEpr(k,l)-2.*_mu*DeltaGamma*dNpDevdEpr(i,j,k,l); + DKcorDEpr(i,j,k,l) = KT*_I(i,j)*_I(k,l) + 2.*muT*_Idev(i,j,k,l) + -_I(i,j)*KT*DeltaGamma*dtrNpdEpr(k,l)-_I(i,j)*KT*trNp*dDeltaGammadEpr(k,l) //-------modified + -2.*muT* NpDev(i,j)*dDeltaGammadEpr(k,l)-2.*muT*DeltaGamma*dNpDevdEpr(i,j,k,l); } } } @@ -276,13 +383,12 @@ void mlawNonLocalDamageGurson::computePlasticTangentLocal(double DeltaGamma,doub for(int k=0; k<3; k++){ for(int l=0; l<3; l++) { - dGammaNpdEpr(i,j,k,l) = Np(i,j)*dDeltaGammadEpr(k,l) + DeltaGamma*dNpDevdEpr(i,j,k,l) + dGammaNpdEpr(i,j,k,l) = Np(i,j)*dDeltaGammadEpr(k,l) + DeltaGamma*dNpDevdEpr(i,j,k,l)//-----modified + DeltaGamma/3.*_I(i,j)*dtrNpdEpr(k,l); } } } - } - + } // Compute dFp/dC from dGammaNpdC static STensor43 EdGammaNpdEpr; @@ -308,6 +414,66 @@ void mlawNonLocalDamageGurson::computePlasticTangentLocal(double DeltaGamma,doub DFpDEpr(j,i,k,l) += Fp0(m,i)*EdGammaNpdEpr(m,j,k,l); } + if(isThermomechanicallyCoupled()){ + double dtrNpdT = -Deps*invDeltaGamma*invDeltaGamma*dDeltaGammadT + invDeltaGamma*DDepsDT; + //-------------------------------compute dnpdevdt,dkcordt,dgammanpdt,dfpdt + double Np1=-3.*(2.*yield*(h*dDeltaHatPdT+dRdT)+6.*dmudT*DeltaGamma+6.*muT*dDeltaGammadT)/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma); + double Np2=6.*dmudT/(yield*yield+6.*muT*DeltaGamma); + STensor3 lnsqrtCeprDev; + double trEepr; + STensor3 dNpDevdT; + STensorOperation::zero(dNpDevdT);//------add + STensor3 dGammaNpdT; + STensorOperation::zero(dGammaNpdT); + STensor3 EprN = *Epr; + STensor3 DKcorDTN; + STensorOperation::decomposeDevTr(EprN,lnsqrtCeprDev,trEepr); + for(int i=0;i<3;i++){ + for(int j=0;j<3;j++){ + dNpDevdT(i,j)=Np1*tau_prDev(i,j)+Np2*lnsqrtCeprDev(i,j); + } + } + for (int i=0;i<3;i++) + for(int j=0;j<3;j++){ + DKcorDTN(i,j)=2.*dmudT*lnsqrtCeprDev(i,j)-2.*dmudT*DeltaGamma*NpDev(i,j)-2.*muT*dDeltaGammadT*NpDev(i,j)-2.*muT*DeltaGamma*dNpDevdT(i,j); + if(i==j){ + DKcorDTN(i,j)+=dKdT*trEepr-dKdT*DeltaGamma*trNp-KT*dDeltaGammadT*trNp-KT*DeltaGamma*dtrNpdT-3.*dKdT*alpT*(T-_referenceT)-3.*KT*dalpdT*(T-_referenceT)-3.*KT*alpT; + } + } + *DKcorDT=DKcorDTN; + for(int i=0;i<3;i++) + for(int j=0;j<3;j++){ + dGammaNpdT(i,j)=Np(i,j)*dDeltaGammadT+DeltaGamma*dNpDevdT(i,j)+1/3.*DeltaGamma*dtrNpdT*_I(i,j); + } + //compute dFp/dT from dGammaNpdT + static STensor3 EdGammaNpdT; + STensor3 DFpDTN; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + EdGammaNpdT(i,j)=0; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdT(i,j) += ENp(i,j,m,n)*dGammaNpdT(m,n); + } + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + DFpDTN(j,i) = 0.; + for(int m=0; m<3; m++) + DFpDTN(j,i) += Fp0(m,i)*EdGammaNpdT(m,j); + } + *DFpDT=DFpDTN; + } + + /*else{ + STensor3 DFpDTN; + STensor3 DKcorDTN; + STensorOperation::zero(DKcorDTN); + STensorOperation::zero(DFpDTN); + *DKcorDT=DKcorDTN; + *DFpDT=DFpDTN; + }*/ if (this->getMacroSolver()->withPathFollowing()){ // will convert to DF after @@ -325,29 +491,46 @@ void mlawNonLocalDamageGurson::computePlasticTangentLocal(double DeltaGamma,doub }; -void mlawNonLocalDamageGurson::computePlasticTangentNonLocal(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV, +void mlawNonLocalDamageGurson::computePlasticTangentNonLocal(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV,//-------added for temperature const STensor3& dDeltaGammadEpr, const STensor3& dDeltaHatPdEpr, const STensor3& dDepsdEpr, const STensor3& DDeltafVDEpr, double dDeltaGammadtildefV,double dDeltaHatPdtildefV, double DDepsDtildefV, double DDeltafVDtildefV, - double yield, double h, const STensor3& tau_prDev, const double& p_pr, + double yield, double h, const STensor3& tau_prDev, const double& p_pr,//------------added for temperature const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& ENp, const IPNonLocalPorosity* q0, IPNonLocalPorosity* q1, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV + STensor43& DKcorDEpr, STensor3& DKcorDtildefV,//------added for temperature + STensor43& DFpDEpr, STensor3& DFpDtildefV,STensor3* Epr,const double& dRdT,const double& dDeltaHatPdT,const double& dDeltaGammadT, + const double& DDepsDT,double T, STensor3* DKcorDT, STensor3* DFpDT//----------added for temperature ) const{ - computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DDeltafVDEpr, - yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr); - + computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DDeltafVDEpr,yield,h,tau_prDev,p_pr,Np, + NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr,Epr,dRdT,dDeltaHatPdT,dDeltaGammadT,DDepsDT,T,DKcorDT,DFpDT);//-----mod + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + if(isThermomechanicallyCoupled()){ + + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + } + // compute traceNP double invDeltaGamma = 1./DeltaGamma; double dtrNpdtildefV = -Deps*invDeltaGamma*invDeltaGamma*dDeltaGammadtildefV + invDeltaGamma*DDepsDtildefV; static STensor3 dNpDevdtildefV; - double rat_den1 = (yield*yield+6.*_mu*DeltaGamma); + double rat_den1 = (yield*yield+6.*muT*DeltaGamma);//-----mod double rat2 = -6.*h*yield/rat_den1/rat_den1; - double rat3 = -18.*_mu/rat_den1/rat_den1; + double rat3 = -18.*muT/rat_den1/rat_den1;//-----mod dNpDevdtildefV = tau_prDev; @@ -356,9 +539,9 @@ void mlawNonLocalDamageGurson::computePlasticTangentNonLocal(double DeltaGamma,d for( int i=0; i<3; i++){ for( int j=0; j<3; j++){ - DKcorDtildefV(i,j) = _I(i,j)*(-_K*DeltaGamma*dtrNpdtildefV-_K*trNp*dDeltaGammadtildefV); - DKcorDtildefV(i,j) += NpDev(i,j)*(-2.*_mu*dDeltaGammadtildefV); - DKcorDtildefV(i,j) += dNpDevdtildefV(i,j)*(-2.*_mu*DeltaGamma); + DKcorDtildefV(i,j) = _I(i,j)*(-KT*DeltaGamma*dtrNpdtildefV-KT*trNp*dDeltaGammadtildefV);//----mod + DKcorDtildefV(i,j) += NpDev(i,j)*(-2.*muT*dDeltaGammadtildefV);//------mod + DKcorDtildefV(i,j) += dNpDevdtildefV(i,j)*(-2.*muT*DeltaGamma);//-------mod } } @@ -402,16 +585,64 @@ void mlawNonLocalDamageGurson::computePlasticTangentNonLocal(double DeltaGamma,d }; -bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const double& tildefVstar, const double & DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, + +/*const STensor3& F1, const double& tildefVstar,const double& DtildefVstarDtildefV, const double & DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr,//-------------modified + const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, + STensor3& tau_cor, STensor3& Fp1, double& fV1, + STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, + const bool stiff, + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, //--------------modified + STensor43& DFpDEpr, STensor3& DFpDtildefV, //-----------------------modified + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr = NULL,double T = 0., + STensor3* DKcorDT = NULL,STensor3* DFpDT = NULL,double* DfVDT = NULL//----------------modified*/ + + + + + + +bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const double& tildefVstar,const double& DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV + STensor43& DFpDEpr, STensor3& DFpDtildefV, + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr,double T, + STensor3* DKcorDT,STensor3* DFpDT,double* DfVDT ) const{ + + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + // Matrix plastic strain const double hatP0 = q0->getMatrixPlasticStrain(); double& hatP1 = q1->getRefToMatrixPlasticStrain(); @@ -422,7 +653,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou fV1 = fV0; // Yield stress - _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0, T, q1->getRefToIPJ2IsotropicHardening());//------------mod + } + else{ + _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); + } double& yield = q1->getRefToCurrentViscoplasticYieldStress(); yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); double h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -450,10 +686,15 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou static fullMatrix<double> J(4,4); static fullMatrix<double> Jinv(4,4); - computeResidual(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); - + if(isThermomechanicallyCoupled()){ + computeResidual(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0,T); + } + else{ + computeResidual(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); + } // Poundarated residu norm double f = res.norm(); + // Start iterations while(fabs(f) > _tol or ite <1) { @@ -491,8 +732,8 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou else DeltaHatP -= sol(1); - double pcor = p_pr-_K*(Deps-sol(2)); // check if argument of cosh and of sinh is too big - double csfact = 1.5*_q2*pcor/yield; + double pcor = p_pr-KT*(Deps-sol(2)); // check if argument of cosh and of sinh is too big + double csfact = 1.5*q2T*pcor/yield;//--------mod if (csfact > 10.){ Deps *= 0.5; } @@ -521,8 +762,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou { DeltafV -= sol(3); } - - _j2IH->hardening(hatP0+DeltaHatP*_theta, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0+DeltaHatP*_theta,T, q1->getRefToIPJ2IsotropicHardening()); + } + else{ + _j2IH->hardening(hatP0+DeltaHatP*_theta, q1->getRefToIPJ2IsotropicHardening()); + } yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -535,10 +780,14 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou yield += R; h += dR/delta_t; } - - computeResidual(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); + if(isThermomechanicallyCoupled()){ + computeResidual(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0,T);//-------to modify + } + else{ + computeResidual(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); + } f = res.norm(); - + //printf("f=%f",f); ite++; if(ite > _maxite or (STensorOperation::isnan(f))) { @@ -550,7 +799,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou static STensor3 Np, NpDev; double trNp; static STensor43 ENp; - updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); + if(isThermomechanicallyCoupled()){ + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp,T);//----mod + } + else{ + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); + } /* Stiffness computation*/ if(stiff) @@ -559,10 +813,19 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou static STensor3 dres0dEpr, dres1dEpr, dres2dEpr, dres3dEpr; double dres0dtildefV, dres1dtildefV, dres2dtildefV, dres3dtildefV; static STensor3 dDeltaGammadEpr, dDeltaHatPdEpr, dDepsdEpr; - - computeDResidual(dres0dEpr,dres1dEpr,dres2dEpr,dres3dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres3dtildefV, - tildefVstar,DtildefVstarDtildefV,0.,yield,h,SQkcorprEq,tau_prDev,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV); - + double dres0dT,dres1dT,dres2dT,dres3dT;//-------------------------------------------added + double dRdT=_j2IH->DRDT(hatP0+DeltaHatP*_theta,T);//-------------------------------------------------added + double lnJe= Ee.trace(); + if(isThermomechanicallyCoupled()){ + computeDResidual(dres0dEpr,dres1dEpr,dres2dEpr,dres3dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres3dtildefV, + dres0dT,dres1dT,dres2dT,dres3dT, + tildefVstar,DtildefVstarDtildefV,0.,yield,h,SQkcorprEq,tau_prDev,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,T, dRdT,lnJe);//---------mod + } + else{ + computeDResidual(dres0dEpr,dres1dEpr,dres2dEpr,dres3dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres3dtildefV, + dres0dT,dres1dT,dres2dT,dres3dT, + tildefVstar,DtildefVstarDtildefV,0.,yield,h,SQkcorprEq,tau_prDev,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV);//---------mod + } static fullMatrix<double> Jinv(4,4); //J.invert(Jinv); @@ -605,25 +868,270 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4(const STensor3& F1, const dou double dDeltaGammadtildefV = sol(0); double dDeltaHatPdtildefV = sol(1); double DDepsDtildefV = sol(2); - DfVDtildefV = sol(3); + DfVDtildefV = sol(3); + + //*DfVDT = 0.;//------added + double dDeltaGammadT = 0.;//-----added + double dDeltaHatPdT = 0.;//-------added + double DDepsDT = 0.;//------added + if( isThermomechanicallyCoupled()) + { + // dTemperature + residual(0) = -dres0dT; + residual(1) = -dres1dT; + residual(2) = -dres2dT; + residual(3) = -dres3dT; + for(int k=0; k<4; k++) + { + sol(k)=0.; + for(int l=0; l<4; l++) + sol(k) += Jinv(k,l)*residual(l); + } + dDeltaGammadT = sol(0); + dDeltaHatPdT = sol(1); + DDepsDT = sol(2); + *DfVDT = sol(3); + } + + /* + + double dDeltaGammadtildefVstar = sol(0)*yield0; + double dDeltaHatPdtildefVstar = sol(1); + double dtrNpdtildefVstar = sol(2)/yield0; + DfVDtildefVstar = sol(3); + static STensor43 dNpDevdEpr; + static STensor3 dNpDevdtildefVstar; + static STensor3 dNpDevdT;//-----------------------added + double rat_den1 = (yield*yield+6.*muT*DeltaGamma);//-----------modified + double rat1 = 3.*2.*muT/rat_den1;//---------------modified + double rat2 = -6.*h*yield/rat_den1/rat_den1; + double rat3 = -18.*muT/rat_den1/rat_den1;//----------------modified + dNpDevdEpr = _Idev; + dNpDevdEpr *= rat1; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + dNpDevdEpr(i,j,k,l) +=tau_prDev(i,j)*dDeltaHatPdEpr(k,l)*rat2+tau_prDev(i,j)*dDeltaGammadEpr(k,l)*rat3; + } + + dNpDevdtildefVstar = tau_prDev; + dNpDevdtildefVstar*= rat2*dDeltaHatPdtildefVstar+rat3*dDeltaGammadtildefVstar; + for(int i=0; i<3; i++){ + for(int j=0; j<3; j++){ + for(int k=0; k<3; k++){ + for(int l=0; l<3; l++) + { + DKcorDEpr(i,j,k,l) = KT*_I(i,j)*_I(k,l) + 2.*muT*_Idev(i,j,k,l)//---------------modified + -_I(i,j)*KT*DeltaGamma*dtrNpdEpr(k,l)-_I(i,j)*KT*trNp*dDeltaGammadEpr(k,l) //---------------------modified + -2.*muT* NpDev(i,j)*dDeltaGammadEpr(k,l)-2.*muT*DeltaGamma*dNpDevdEpr(i,j,k,l);//---------------------modified + } + } + } + } + + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++){ + DKcorDtildefVstar(i,j) = _I(i,j)*(-KT*DeltaGamma*dtrNpdtildefVstar-KT*trNp*dDeltaGammadtildefVstar);//-------------modified + DKcorDtildefVstar(i,j) += NpDev(i,j)*(-2.*muT*dDeltaGammadtildefVstar);//-----------------modified + DKcorDtildefVstar(i,j) += dNpDevdtildefVstar(i,j)*(-2.*muT*DeltaGamma);//-----------------modified + } + } + static STensor43 dGammaNpdEpr; + static STensor3 dGammaNpdftildeVstar; + static STensor3 dGammaNpdT; + for(int i=0; i<3; i++){ + for(int j=0; j<3; j++){ + for(int k=0; k<3; k++){ + for(int l=0; l<3; l++) + { + dGammaNpdEpr(i,j,k,l) = Np(i,j)*dDeltaGammadEpr(k,l) + DeltaGamma*dNpDevdEpr(i,j,k,l) + + DeltaGamma/3.*_I(i,j)*dtrNpdEpr(k,l); + } + } + } + } + // Compute dFp/dC from dGammaNpdC + static STensor43 EdGammaNpdEpr; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + EdGammaNpdEpr(i,j,k,l)=0.; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdEpr(i,j,k,l)+= ENp(i,j,m,n)*dGammaNpdEpr(m,n,k,l); + } + + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + DFpDEpr(j,i,k,l) = 0.; + for(int m=0; m<3; m++) + DFpDEpr(j,i,k,l) += Fp0(m,i)*EdGammaNpdEpr(m,j,k,l); + } + + + // Compute dFp/dftildeVstar from dGammaNpdftildeVstar + static STensor3 EdGammaNpdftildeVstar; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + EdGammaNpdftildeVstar(i,j) = 0.; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdftildeVstar(i,j) += ENp(i,j,m,n)*dGammaNpdftildeVstar(m,n); + } + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + DFpDtildefVstar(j,i) = 0.; + for(int m=0; m<3; m++) + DFpDtildefVstar(j,i) += Fp0(m,i)*EdGammaNpdftildeVstar(m,j); + } - computePlasticTangentNonLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + + + + if( isThermomechanicallyCoupled()) + { + // dTemperature + residual(0) = -dres0dT; + residual(1) = -dres1dT; + residual(2) = -dres2dT; + residual(3) = -dres3dT; + for(int k=0; k<4; k++) + { + sol(k)=0.; + for(int l=0; l<4; l++) + sol(k) += Jinv(k,l)*residual(l); + } + double dDeltaGammadT = sol(0)*yield0;//------*yield0?? + double dDeltaHatPdT = sol(1); + double dtrNpdT = sol(2)/yield0;//-------/yield0?? + DfVDT = sol(3); + double Np1=-3.*(2.*yield*(h*dDeltaHatPdT+dRdT)+6.*dmudT*DeltaGamma+6.*muT*dDeltaGammadT)/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma); + double Np2=6.*dmudT/(yield*yield+6.*muT*DeltaGamma); + STensor3 lnsqrtCeprDev; + double trEepr; + STensorOperation::decomposeDevTr(Epr,lnsqrtCeprDev,trEepr); + for(int i=0;i<3;i++){ + for(int j=0;j<3;j++){ + dNpDevdT(i,j)=Np1*tau_prDev(i,j)+Np2*lnsqrtCeprDev(i,j); + } + } + for (int i=0;i<3;i++) + for(int j=0;j<3;j++){ + DKcorDT(i,j)=2.*dmudT*lnsqrtCeprDev(i,j)-2.*dmudT*DeltaGamma*NpDev(i,j)-2.*muT*dDeltaGammadT*NpDev(i,j)-2.*muT*DeltaGamma*dNpDevdT(i,j); + if(i==j){ + DKcorDT(i,j)+=dKdT*trEepr-dKdT*DeltaGamma*trNp-KT*dDeltaGammadT*trNp-KT*DeltaGamma*dtrNpdT-3.*dKdT*alpT*(T-_referenceT)-3.*KT*dalpdT*(T-_referenceT)-3.*KT*alpT; + } + } + + for(int i=0;i<3;i++) + for(int j=0;j<3;j++){ + dGammaNpdT(i,j)=Np(i,j)*dDeltaGammadT+DeltaGamma*dNpDevdT(i,j)+1/3.*DeltaGamma*dtrNpdT*_I(i,j); + } + //compute dFp/dT from dGammaNpdT + static STensor3 EdGammaNpdT; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + EdGammaNpdT(i,j)=0; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdT(i,j) += ENp(i,j,m,n)*dGammaNpdT(m,n); + } + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + DFpDT(j,i) = 0.; + for(int m=0; m<3; m++) + DFpDT(j,i) += Fp0(m,i)*EdGammaNpdT(m,j); + } + double& DplEnergyDT = q1->getRefToDIrreversibleEnergyDT();//added + //double fact1 = (1.-fV1)*(h*DeltaHatP+yield); + //double fact2 = -yield*DeltaHatP; + double DyieldDT=h*dDeltaHatPdT+dRdT; + DplEnergyDT = DfVDT*yield*DeltaHatP+(1.-fV1)*DyieldDT*DeltaHatP+(1.-fV1)*yield*dDeltaHatPdT;//fact1*dDeltaHatPdT+ fact2*DfVDT;//-------------------added--------------?? + + + } + if (this->getMacroSolver()->withPathFollowing() or isThermomechanicallyCoupled()){ + // will convert to DF after + STensor3& DplEnergyDEpr = q1->getRefToDIrreversibleEnergyDF(); + double& DplEnergyDtildefVstar = q1->getRefToDIrreversibleEnergyDtildefVstar(); + + + double fact1 = (1.-fV1)*(h*DeltaHatP+yield); + double fact2 = -yield*DeltaHatP; + + DplEnergyDEpr = dDeltaHatPdEpr; + DplEnergyDEpr *= fact1; + DplEnergyDEpr.daxpy(DfVDEpr,fact2); + + DplEnergyDtildefVstar = fact1*dDeltaHatPdtildefVstar+ fact2*DfVDtildefVstar; + + + } +*/ + + if(isThermomechanicallyCoupled()){ + computePlasticTangentNonLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + dDeltaGammadtildefV,dDeltaHatPdtildefV,DDepsDtildefV,DfVDtildefV, + yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV,Epr,dRdT,dDeltaHatPdT,dDeltaGammadT,DDepsDT,T,DKcorDT,DFpDT);//-------mod + } + else{ + computePlasticTangentNonLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, dDeltaGammadtildefV,dDeltaHatPdtildefV,DDepsDtildefV,DfVDtildefV, - yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV); + yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV);//-------mod + } } return true; // full pass }; bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, + const STensor3& tau_prDev, const double& p_pr,//---------added const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* Epr,double T,STensor3* DKcorDT, STensor3* DFpDT//----mod ) const{ + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + const double hatP0 = q0->getMatrixPlasticStrain(); double& hatP1 = q1->getRefToMatrixPlasticStrain(); hatP1 = hatP0; @@ -633,7 +1141,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons fV1 = fV0; // Yield stress - _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0,T, q1->getRefToIPJ2IsotropicHardening()); + } + else{ + _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); + } double& yield = q1->getRefToCurrentViscoplasticYieldStress(); yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); double h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -667,8 +1180,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons yieldfV = _correctedRegularizedFunction->getVal(tildefVstar); double DyieldfVDDeltafV = _correctedRegularizedFunction->getDiff(tildefVstar)*DtildefVstarDDeltafV; - computeResidual(q0,q1,res,true,J,tildefVstar,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); - + if(isThermomechanicallyCoupled()){ + computeResidual(q0,q1,res,true,J,tildefVstar,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0,T); + } + else{ + computeResidual(q0,q1,res,true,J,tildefVstar,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); + } // Poundarated residu norm double f = res.norm(); @@ -709,8 +1226,8 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons else DeltaHatP -= sol(1); - double pcor = p_pr-_K*(Deps-sol(2)); // check if argument of cosh and of sinh is too big - double csfact = 1.5*_q2*pcor/yield; + double pcor = p_pr-KT*(Deps-sol(2)); // check if argument of cosh and of sinh is too big + double csfact = 1.5*q2T*pcor/yield;//---------mod if (csfact > 10.){ Deps *= 0.5; } @@ -740,8 +1257,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons { DeltafV -= sol(3); } - - _j2IH->hardening(hatP0+DeltaHatP*_theta, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0+DeltaHatP*_theta,T, q1->getRefToIPJ2IsotropicHardening()); + } + else{ + _j2IH->hardening(hatP0+DeltaHatP*_theta, q1->getRefToIPJ2IsotropicHardening()); + } yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -760,7 +1281,7 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons yieldfV = _correctedRegularizedFunction->getVal(tildefVstar); DyieldfVDDeltafV = _correctedRegularizedFunction->getDiff(tildefVstar)*DtildefVstarDDeltafV; - computeResidual(q0,q1,res,true,J,yieldfV,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0); + computeResidual(q0,q1,res,true,J,yieldfV,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,A0,B0,T);//--------to modify f = res.norm(); ite++; @@ -774,18 +1295,42 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons static STensor3 Np, NpDev; double trNp; static STensor43 ENp; - updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); - + if(isThermomechanicallyCoupled()){ + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp,T); + } + else{ + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); + } if (stiff){ /* Stiffness computation*/ /* Compute internal variables derivatives from residual derivatives */ static STensor3 dres0dEpr, dres1dEpr, dres2dEpr, dres3dEpr; double dres0dtildefV, dres1dtildefV, dres2dtildefV, dres3dtildefV; + double dres0dT, dres1dT, dres2dT, dres3dT; //---------added for temperature static STensor3 dDeltaGammadEpr, dDeltaHatPdEpr, dDepsdEpr, DfVDEpr; + double dRdT = _j2IH->DRDT(hatP0+DeltaHatP*_theta,T);//-------added + double lnJe=Ee.trace(); + +/* +STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, STensor3& dres3dEpr, + double &dres0dtildefV, double &dres1dtildefV, double &dres2dtildefV, double& dres3dtildefV, + double &dres0dT, double &dres1dT, double &dres2dT, double& dres3dT,//---------added + double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, + double R, double H, + double kirEqSq, const STensor3& kprDev, double ppr, double fVn, + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV,double dRdT,double T,double lnJe +*/ - computeDResidual(dres0dEpr,dres1dEpr,dres2dEpr,dres3dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres3dtildefV, - yieldfV,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,tau_prDev,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV); + + if(isThermomechanicallyCoupled()){ + computeDResidual(dres0dEpr,dres1dEpr,dres2dEpr,dres3dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres3dtildefV,dres0dT, dres1dT, dres2dT, dres3dT, + yieldfV,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,tau_prDev,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV,dRdT,T,lnJe); + } + else{ + computeDResidual(dres0dEpr,dres1dEpr,dres2dEpr,dres3dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres3dtildefV,dres0dT, dres1dT, dres2dT, dres3dT, + yieldfV,0,DyieldfVDDeltafV,yield,h,SQkcorprEq,tau_prDev,p_pr,fV0,DeltaGamma,DeltaHatP,Deps,DeltafV); + } static fullMatrix<double> Jinv(4,4); //J.invert(Jinv); @@ -813,67 +1358,107 @@ bool mlawNonLocalDamageGurson::plasticCorrector4x4Local(const STensor3& F1, cons DfVDEpr(i,j) = sol(3); } } - computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, - yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr); + + + double dDeltaGammadT = 0.; + double dDeltaHatPdT = 0.; + double DDepsDT = 0.; + double DfVDT = 0.; + + if( isThermomechanicallyCoupled()) + { + // dTemperature + residual(0) = -dres0dT; + residual(1) = -dres1dT; + residual(2) = -dres2dT; + residual(3) = -dres3dT; + for(int k=0; k<4; k++) + { + sol(k)=0.; + for(int l=0; l<4; l++) + sol(k) += Jinv(k,l)*residual(l); + } + dDeltaGammadT = sol(0); + dDeltaHatPdT = sol(1); + DDepsDT = sol(2); + DfVDT = sol(3); + } + + + + if(isThermomechanicallyCoupled()){ + computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr,Epr,dRdT,dDeltaHatPdT,dDeltaGammadT,DDepsDT,T,DKcorDT,DFpDT);//-------------to modify + } + else{ + computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + yield,h,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr);//-------------to modify + } } return true; // full pass }; -bool mlawNonLocalDamageGurson::plasticCorrector(const STensor3& F1, const double& tildefVstar, const double& DtildefVstarDtildefV, - const STensor3& kcorprDev, const double& ppr, +bool mlawNonLocalDamageGurson::plasticCorrector(const STensor3& F1, const double& tildefVstar,const double& DtildefVstarDtildefV, + const STensor3& kcorprDev, const double& ppr, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr,double T, + STensor3* DKcorDT,STensor3* DFpDT,double* DfVDT//----------------modified ) const{ - bool correctorOK = false; - if (_useSystem == 1){ + //plasticCorrector(F1,tildefVstar,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe,Ce,Ee,Le,dLe,stiff,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV,DfVDEpr,DfVDtildefV); + bool correctorOK = false; + if (_useSystem == 1){ correctorOK = plasticCorrector4x4(F1,tildefVstar,DtildefVstarDtildefV,kcorprDev,ppr,q0,q1, tau_cor, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DKcorDEpr, DKcorDtildefV, - DFpDEpr,DFpDtildefV, - DfVDEpr, DfVDtildefV); + stiff, DKcorDEpr, DKcorDtildefV, + DFpDEpr,DFpDtildefV, + DfVDEpr, DfVDtildefV,Epr,T,DKcorDT,DFpDT,DfVDT);//------mod } + else if (_useSystem == 2){ correctorOK = plasticCorrector3x3(F1,tildefVstar,DtildefVstarDtildefV,kcorprDev,ppr,q0,q1, tau_cor, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DKcorDEpr, DKcorDtildefV, - DFpDEpr,DFpDtildefV, - DfVDEpr, DfVDtildefV); + stiff, DKcorDEpr, DKcorDtildefV, + DFpDEpr,DFpDtildefV, + DfVDEpr, DfVDtildefV,Epr,T,DKcorDT,DFpDT,DfVDT);//------mod } else{ Msg::Fatal("system = %d has not been implemented mlawNonLocalDamageGurson::predictorCorrector",_useSystem); } return correctorOK; }; + + + -bool mlawNonLocalDamageGurson::plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, +bool mlawNonLocalDamageGurson::plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV,//----add + const STensor3& tau_prDev, const double& p_pr,//----add const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3*Epr ,double T, STensor3* DKcorDT, STensor3* DFpDT//-----add ) const{ bool correctorOK = false; if (_useSystem == 1){ correctorOK = plasticCorrector4x4Local(F1,tildefVstarPrev,DtildefVstarDDeltafV, tau_prDev,p_pr,q0,q1, tau_cor, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DKcorDEpr,DFpDEpr); + stiff, DKcorDEpr,DFpDEpr,Epr,T,DKcorDT,DFpDT);//------mod } else if (_useSystem == 2){ correctorOK = plasticCorrector3x3Local(F1,tildefVstarPrev,DtildefVstarDDeltafV, tau_prDev,p_pr,q0,q1, tau_cor, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DKcorDEpr,DFpDEpr); + stiff, DKcorDEpr,DFpDEpr,Epr,T,DKcorDT,DFpDT);//------mod } else{ Msg::Fatal("system = %d has not been implemented mlawNonLocalDamageGurson::predictorCorrector",_useSystem); @@ -882,6 +1467,11 @@ bool mlawNonLocalDamageGurson::plasticCorrectorLocal(const STensor3& F1, const d }; + + + + + void mlawNonLocalDamageGurson::predictorCorrector( const STensor3& F0, // initial deformation gradient (input @ time n) const STensor3& F1, // updated deformation gradient (input @ time n+1) @@ -892,9 +1482,41 @@ void mlawNonLocalDamageGurson::predictorCorrector( STensor3 &dLocaldPorosityDStrain, STensor3 &dStressDNonLocalPorosity, double &dLocalPorosityDNonLocalPorosity, - const bool stiff // if true compute the tangents + const bool stiff, // if true compute the tangents + STensor3* dStressDT ,//------added + double* dLocalPorosityDT,//-----added + const double T0,const double T //temperatures @ time n and @ time n+1 ) const -{ +{ + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + //F1.print("F1"); + //Cel.print("Cel"); // Porosity ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); // Fp @@ -911,7 +1533,12 @@ void mlawNonLocalDamageGurson::predictorCorrector( _cLLaw->computeCL(ipvprev->getNonLocalPorosity(), ipvcur->getRefToIPCLength()); /* Hardening law if elastic loading*/ - _j2IH->hardening(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(ipvprev->getMatrixPlasticStrain(),T, ipvcur->getRefToIPJ2IsotropicHardening());//------------modified + } + else{ + _j2IH->hardening(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPJ2IsotropicHardening());//------------modified + } ipvcur->getRefToCurrentViscoplasticYieldStress() = ipvcur->getRefToIPJ2IsotropicHardening().getR(); const STensor3* Fp0 = &(ipvprev->getConstRefToFp()); @@ -929,9 +1556,13 @@ void mlawNonLocalDamageGurson::predictorCorrector( static STensor3 corKirpr; static STensor43 DcorKirprDEpr,DcorKirDEpr, DFpDEpr; - static STensor3 DcorKirDtildefV, DFpDtildefV, DfVDEpr; - static double DfVDtildefV; - + static STensor3 DcorKirDtildefV, DFpDtildefV, DfVDEpr;//-----mod + static STensor3 DcorKirDT; + static STensor3 DFpDT; + static double DfVDtildefV;//-------------modified + static double DfVDT; + //STensorOperation::zero(DcorKirDT); + const IPCoalescence* ipCoalPrev = &(ipvprev->getConstRefToIPCoalescence()); IPCoalescence* ipvCoalCur = &(ipvcur->getRefToIPCoalescence()); @@ -944,9 +1575,17 @@ void mlawNonLocalDamageGurson::predictorCorrector( bool plastic = false; // elastic predictor - elasticPredictor(_K,_mu, F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); - double kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); + elasticPredictor(F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff,&T);//----mod + //printf("ppr = %f\n",ppr); + + //Cepr.print("cepr"); + //Epr.print("Epr"); + //Lepr.print("Lepr"); + + double kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); + //static STensor3 EprN; + //EprN = Epr; //Msg::Info("nolocal to local prev= %d cur = %d",ipvprev->getNonLocalToLocal(),ipvcur->getNonLocalToLocal()); if (ipvprev->getNonLocalToLocal()){ @@ -956,14 +1595,27 @@ void mlawNonLocalDamageGurson::predictorCorrector( // check with previous value double yieldfVprev = ipvprev->getYieldPorosity(); - plastic = yieldFunction(kCorPrEq,ppr,ipvprev,yieldfVprev); + if(isThermomechanicallyCoupled()){ + plastic = yieldFunction(kCorPrEq,ppr,ipvprev,yieldfVprev,T); + } + else{ + plastic = yieldFunction(kCorPrEq,ppr,ipvprev,yieldfVprev); + } + //printf("plastic=%d\n",plastic); if (plastic){ //Msg::Info("plastic occurs"); - - correctorOK = plasticCorrectorLocal(F1,fVtildeStarPrev,DfVtildeStarDtildefVPrev, + if(isThermomechanicallyCoupled()){ + correctorOK = plasticCorrectorLocal(F1,fVtildeStarPrev,DfVtildeStarDtildefVPrev, kcorprDev,ppr,ipvprev,ipvcur, corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DcorKirDEpr,DFpDEpr); + stiff, DcorKirDEpr,DFpDEpr,&Epr,T,&DcorKirDT,&DFpDT);//------mod + } + else{ + correctorOK = plasticCorrectorLocal(F1,fVtildeStarPrev,DfVtildeStarDtildefVPrev, + kcorprDev,ppr,ipvprev,ipvcur, + corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, + stiff, DcorKirDEpr,DFpDEpr);//------mod + } if (!correctorOK and _withSubstepping){ @@ -975,7 +1627,8 @@ void mlawNonLocalDamageGurson::predictorCorrector( dF = F1; dF -= F0; static IPNonLocalPorosity ipvTemp(*ipvprev); - + double dT,Tcur;//----temperature for substepping + dT = T-T0;//--------added to substep the temperature while (true){ bool success = true; int iter = 0; @@ -993,20 +1646,40 @@ void mlawNonLocalDamageGurson::predictorCorrector( // Fcur = F0; Fcur.daxpy(dF,fact); + Tcur = T0+ fact*dT;//--------substepping the temperature //elastic predictor Fp0 = &ipvTemp.getConstRefToFp(); - elasticPredictor(_K,_mu, Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); + if(isThermomechanicallyCoupled()){ + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff,&Tcur);//----mod + //EprN=Epr; + } + else{ + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff);//----mod + + } //check yield condition kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); - - plastic = yieldFunction(kCorPrEq,ppr,&ipvTemp,ipvTemp.getCorrectedPorosity()); + if(isThermomechanicallyCoupled()){ + plastic = yieldFunction(kCorPrEq,ppr,&ipvTemp,ipvTemp.getCorrectedPorosity(),Tcur);//------mod + } + else{ + plastic = yieldFunction(kCorPrEq,ppr,&ipvTemp,ipvTemp.getCorrectedPorosity());//------mod + } if (plastic){ //Msg::Info("plastic occurs"); - correctorOK = plasticCorrectorLocal(Fcur,ipvTemp.getCorrectedPorosity(),DfVtildeStarDtildefVPrev, + if(isThermomechanicallyCoupled()){ + correctorOK = plasticCorrectorLocal(Fcur,ipvTemp.getCorrectedPorosity(),DfVtildeStarDtildefVPrev, kcorprDev,ppr,&ipvTemp,ipvcur, corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - estimateStiff, DcorKirDEpr,DFpDEpr); + estimateStiff, DcorKirDEpr,DFpDEpr,&Epr,Tcur,&DcorKirDT,&DFpDT);//-----mod + } + else{ + correctorOK = plasticCorrectorLocal(Fcur,ipvTemp.getCorrectedPorosity(),DfVtildeStarDtildefVPrev, + kcorprDev,ppr,&ipvTemp,ipvcur, + corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, + estimateStiff, DcorKirDEpr,DFpDEpr);//-----mod + } } if (correctorOK and plastic){ @@ -1056,6 +1729,7 @@ void mlawNonLocalDamageGurson::predictorCorrector( } } } + //Non local else{ if (ipvprev->dissipationIsBlocked()){ ipvcur->blockDissipation(true); @@ -1074,16 +1748,35 @@ void mlawNonLocalDamageGurson::predictorCorrector( double DyieldfVDDtildefV = _correctedRegularizedFunction->getDiff(fVtildeStar)*DfVtildeStarDtildefVPrev; //Msg::Info("yieldfV = %e",yieldfV); + //printf("kCorPrEq = %f , ppr = %f , yieldfv = %f\n",kCorPrEq,ppr,yieldfV); // check plastic - plastic = yieldFunction(kCorPrEq,ppr,ipvprev,yieldfV); + if(isThermomechanicallyCoupled()){ + plastic = yieldFunction(kCorPrEq,ppr,ipvprev,yieldfV,T);//-----mod + } + else{ + plastic = yieldFunction(kCorPrEq,ppr,ipvprev,yieldfV);//-----mod + } + double yieldTest = ipvprev->getConstRefToIPJ2IsotropicHardening().getR(); + double testporosity = ipvprev->getCorrectedPorosity(); + //printf("yield = %f , plastic = %d , porosity = %f\n",yieldTest,plastic,testporosity); + if (plastic){ //Msg::Info("plastic occurs"); - correctorOK = plasticCorrector(F1,yieldfV,DyieldfVDDtildefV,kcorprDev,ppr,ipvprev,ipvcur, + if(isThermomechanicallyCoupled()){ + correctorOK = plasticCorrector(F1,yieldfV,DyieldfVDDtildefV,kcorprDev,ppr,ipvprev,ipvcur, corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, stiff, DcorKirDEpr, DcorKirDtildefV, DFpDEpr,DFpDtildefV, - DfVDEpr, DfVDtildefV); + DfVDEpr, DfVDtildefV,&Epr,T,&DcorKirDT,&DFpDT, &DfVDT);//-----mod + } + else{ + correctorOK = plasticCorrector(F1,yieldfV,DyieldfVDDtildefV,kcorprDev,ppr,ipvprev,ipvcur, + corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, + stiff, DcorKirDEpr, DcorKirDtildefV, + DFpDEpr,DFpDtildefV, + DfVDEpr, DfVDtildefV);//-----mod + } if (!correctorOK and _withSubstepping){ Msg::Info("start substepping"); @@ -1095,7 +1788,8 @@ void mlawNonLocalDamageGurson::predictorCorrector( dF -= F0; double dNonlocalVar = ipvcur->getNonLocalPorosity() - ipvprev->getNonLocalPorosity(); static IPNonLocalPorosity ipvTemp(*ipvprev); - + double dT,Tcur;//---------added for substepping temperature + dT = T - T0; while (true){ bool success = true; int iter = 0; @@ -1114,10 +1808,16 @@ void mlawNonLocalDamageGurson::predictorCorrector( Fcur = F0; Fcur.daxpy(dF,fact); ipvcur->getRefToNonLocalPorosity() = ipvprev->getNonLocalPorosity()+ fact*dNonlocalVar; + Tcur = T0 + fact*dT;//------for temperature substepping //elastic predictor Fp0 = &ipvTemp.getConstRefToFp(); - elasticPredictor(_K,_mu, Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); + if(isThermomechanicallyCoupled()){ + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff,&Tcur); + } + else{ + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); + } //check yield condition kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); tildefV = ipvcur->getNonLocalPorosity(); @@ -1125,15 +1825,27 @@ void mlawNonLocalDamageGurson::predictorCorrector( // update true yield oprosity yieldfV = _correctedRegularizedFunction->getVal(fVtildeStar); DyieldfVDDtildefV = _correctedRegularizedFunction->getDiff(fVtildeStar)*DfVtildeStarDtildefVPrev; - - plastic = yieldFunction(kCorPrEq,ppr,&ipvTemp,yieldfV); + if(isThermomechanicallyCoupled()){ + plastic = yieldFunction(kCorPrEq,ppr,&ipvTemp,yieldfV,Tcur);//-----mod + } + else{ + plastic = yieldFunction(kCorPrEq,ppr,&ipvTemp,yieldfV);//-----mod + } if (plastic){ - - correctorOK = plasticCorrector(Fcur,yieldfV,DyieldfVDDtildefV,kcorprDev,ppr,&ipvTemp,ipvcur, + if(isThermomechanicallyCoupled()){ + correctorOK = plasticCorrector(Fcur,yieldfV,DyieldfVDDtildefV,kcorprDev,ppr,&ipvTemp,ipvcur, + corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, + estimateStiff, DcorKirDEpr, DcorKirDtildefV, + DFpDEpr,DFpDtildefV, + DfVDEpr, DfVDtildefV,&Epr,Tcur,&DcorKirDT,&DFpDT,&DfVDT);//--------mod + } + else{ + correctorOK = plasticCorrector(Fcur,yieldfV,DyieldfVDDtildefV,kcorprDev,ppr,&ipvTemp,ipvcur, corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - estimateStiff, DcorKirDEpr, DcorKirDtildefV, + estimateStiff, DcorKirDEpr, DcorKirDtildefV, DFpDEpr,DFpDtildefV, - DfVDEpr, DfVDtildefV); + DfVDEpr, DfVDtildefV);//--------mod + } } if (correctorOK and plastic){ @@ -1196,7 +1908,10 @@ void mlawNonLocalDamageGurson::predictorCorrector( STensorOperation::zero(DcorKirDtildefV); STensorOperation::zero(DFpDtildefV); STensorOperation::zero(DfVDEpr); - DfVDtildefV = 0.; + STensorOperation::zero(DFpDT);//--------added + STensorOperation::zero(DcorKirDT);//-----added + DfVDtildefV = 0.; + DfVDT = 0.;//---------------------------added DcorKirDEpr = DcorKirprDEpr; } @@ -1222,9 +1937,25 @@ void mlawNonLocalDamageGurson::predictorCorrector( STensorOperation::multSTensor3STensor43(corKir,Le,S); STensorOperation::multSTensor3(Fe,S,FeS); STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); - + //printf("p=%f plastic=%d\n",P(0,0),plastic); + //STensor3 DcorKirDTN; + //DcorKirDTN = *DcorKirDT; + //STensor3 DFpDTN; + //DFpDTN = *DFpDT; + //double DfVDTN = *DfVDT; + STensor3 dStressDTN; + double dLocalPorosityDTN; + if(isThermomechanicallyCoupled()) + { + //static STensor3 DEe; + //DEe=ipvcur->getConstRefToElasticDeformation(); + //DEe -=ipvprev->getConstRefToElasticDeformation(); + //double& thermoelastic=ipvcur->getRefToThermoelasticCoupling(); + + //thermoelastic=STensorOperation::doubledot(DcorKirDT,DEe)*T; + } // elastic energy - ipvcur->getRefToElasticEnergy()= this->deformationEnergy(_K,_mu,Ce); + ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce,&T); if (this->getMacroSolver()->withPathFollowing()){ // irreversible energy if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ @@ -1260,10 +1991,18 @@ void mlawNonLocalDamageGurson::predictorCorrector( } if (ipvprev->getNonLocalToLocal()){ - tangentComputationLocal(Tangent, plastic,F1,corKir, S, Fepr, *Fp0, Lepr, + if(!isThermomechanicallyCoupled()){ + tangentComputationLocal(Tangent, plastic,F1,corKir, S, Fepr, *Fp0, Lepr, Fe,Fp1,Le, dLe, DcorKirDEpr, DFpDEpr, EprToF, invFp); - + } + else { + + tangentComputationLocalWithTemperature(Tangent,dStressDTN, plastic,F1,corKir, S, Fepr, *Fp0, Lepr, + Fe,Fp1,Le, dLe, + DcorKirDEpr,DcorKirDT, DFpDEpr,DFpDT, EprToF, invFp); //-----------added + if(dStressDT != NULL) *dStressDT = dStressDTN; + } if (this->getMacroSolver()->withPathFollowing()){ static STensor3 DplEnergyDEpr; DplEnergyDEpr = ipvcur->getConstRefToDIrreversibleEnergyDF(); @@ -1272,12 +2011,30 @@ void mlawNonLocalDamageGurson::predictorCorrector( } } else{ - tangentComputation(Tangent,dStressDNonLocalPorosity, dLocaldPorosityDStrain, dLocalPorosityDNonLocalPorosity, - plastic,F1,corKir, S, Fepr, *Fp0, Lepr, - Fe,Fp1,Le, dLe, - DcorKirDEpr, DcorKirDtildefV,DFpDEpr, DFpDtildefV, DfVDEpr,DfVDtildefV, - EprToF, invFp); - if (this->getMacroSolver()->withPathFollowing()){ + if(isThermomechanicallyCoupled()){ + tangentComputationWithTemperature(Tangent,dStressDNonLocalPorosity,dStressDTN, dLocaldPorosityDStrain, dLocalPorosityDNonLocalPorosity,dLocalPorosityDTN, + plastic,F1,corKir, S, Fepr, *Fp0, Lepr, + Fe,Fp1,Le, dLe, + DcorKirDEpr, DcorKirDtildefV,DcorKirDT,DFpDEpr, DFpDtildefV,DFpDT, DfVDEpr,DfVDtildefV,DfVDT, + EprToF, invFp);//--------------------added + if(dStressDT != NULL) *dStressDT = dStressDTN; + if(dLocalPorosityDT !=NULL ) *dLocalPorosityDT = dLocalPorosityDTN; + } + else{ + tangentComputation(Tangent,dStressDNonLocalPorosity, dLocaldPorosityDStrain, dLocalPorosityDNonLocalPorosity, + plastic,F1,corKir, S, Fepr, *Fp0, Lepr, + Fe,Fp1,Le, dLe, + DcorKirDEpr, DcorKirDtildefV,DFpDEpr, DFpDtildefV, DfVDEpr,DfVDtildefV, + EprToF, invFp); + } + // update due to correct void for yielding + //dStressDNonLocalPorosity *= DfVtildeStarDtildefV; + //dLocalPorosityDNonLocalPorosity *= DfVtildeStarDtildefV; + //DfVDT /= DfVtildeStarDtildefV;//-----------added???? + + + + if (this->getMacroSolver()->withPathFollowing() or isThermomechanicallyCoupled()){ static STensor3 DplEnergyDEpr; DplEnergyDEpr = ipvcur->getConstRefToDIrreversibleEnergyDF(); STensor3& DirreEnergyDF = ipvcur->getRefToDIrreversibleEnergyDF(); @@ -1287,6 +2044,10 @@ void mlawNonLocalDamageGurson::predictorCorrector( } } + + + + void mlawNonLocalDamageGurson::predictorCorrector_NonLocalEqPlastic(const STensor3& F0, // initial deformation gradient (input @ time n) const STensor3& F1, // updated deformation gradient (input @ time n+1) STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) @@ -1297,8 +2058,8 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalEqPlastic(const STenso STensor3 &dEqPlasticDStrain, STensor3 &dStressDNonLocalEqPlastic, double &dEqPlasticDNonLocalEqPlastic, - const bool stiff // if true compute the tangents - ) const + const bool stiff // if true compute the tangents + ) const { // Porosity ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); @@ -1334,10 +2095,9 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalEqPlastic(const STenso bool correctorOK = false; bool plastic = false; - // elastic predictor - this->elasticPredictor(_K,_mu,F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); + this->elasticPredictor(F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff);//----mod if (ipvprev->dissipationIsBlocked()){ ipvcur->blockDissipation(true); @@ -1393,7 +2153,7 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalEqPlastic(const STenso //elastic predictor Fp0 = &ipvTemp.getConstRefToFp(); - elasticPredictor(_K,_mu, Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff);//------mod //check yield condition kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); @@ -1488,7 +2248,7 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalEqPlastic(const STenso STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); // elastic energy - ipvcur->getRefToElasticEnergy()= this->deformationEnergy(_K,_mu,Ce); + ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce);//-------mod if (this->getMacroSolver()->withPathFollowing()){ // irreversible energy if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ @@ -1601,7 +2361,7 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalVolumetricPlastic(cons // elastic predictor - this->elasticPredictor(_K,_mu,F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); + this->elasticPredictor(F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); if (ipvprev->dissipationIsBlocked()){ ipvcur->blockDissipation(true); @@ -1657,7 +2417,7 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalVolumetricPlastic(cons //elastic predictor Fp0 = &ipvTemp.getConstRefToFp(); - elasticPredictor(_K,_mu, Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff);//-----mod //check yield condition kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); @@ -1752,7 +2512,7 @@ void mlawNonLocalDamageGurson::predictorCorrector_NonLocalVolumetricPlastic(cons STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); // elastic energy - ipvcur->getRefToElasticEnergy()= this->deformationEnergy(_K,_mu,Ce); + ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce);//-------mod if (this->getMacroSolver()->withPathFollowing()){ // irreversible energy if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ @@ -1867,6 +2627,7 @@ void mlawNonLocalDamageGurson::constitutive( } else{ + //F1.print("F1"); predictorCorrector(F0,F1,P,ipvprev,ipvcur,Tangent,dLocaldPorosityDStrain,dStressDNonLocalPorosity,dLocalPorosityDNonLocalPorosity,stiff); } }; @@ -2019,19 +2780,51 @@ void mlawNonLocalDamageGurson::constitutive( }; -bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, - double tildefVstar, double DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, + + +bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1,const double& tildefVstar,const double& DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr,//---mod const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, + STensor43& DFpDEpr, STensor3& DFpDtildefV, + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr,double T, + STensor3* DKcorDT,STensor3* DFpDT,double* DfVDT ) const{ + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + + /* get and initialize terms */ - + // Matrix plastic strain const double hatP0 = q0->getMatrixPlasticStrain(); double& hatP1 = q1->getRefToMatrixPlasticStrain(); @@ -2042,8 +2835,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, fV1 = fV0; // Yield stress - _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); - + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0,T, q1->getRefToIPJ2IsotropicHardening());//-----mod + } + else{ + _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening());//-----mod + } double & yield = q1->getRefToCurrentViscoplasticYieldStress(); yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); double H = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -2068,11 +2865,25 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, // update local porosity localPorosityGrowth(DeltaGamma, DeltaHatP, Deps, q0,q1, DeltafV,DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps); - - computeResidual3x3(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0., + if(isThermomechanicallyCoupled()){ + computeResidual3x3(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0., yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, - DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps); + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps,T);//------to modify + } + else{ + computeResidual3x3(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0., + yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps);//------to modify + } + // to put in compute residual + /* res(0)=DeltaGamma*(3.*yield/(yield*yield+6.*shearModulus(T)*DeltaGamma)/(yield*yield+6.*shearModulus(T)*DeltaGamma)*kprDev.dotprod()+//--------------------modified + (ppr-bulkModulus(T)*DeltaGamma*trNp)/yield*trNp)-(1.-fVn-DeltafV*_theta)*DeltaHatP; + res(1)=3.*yield*yield/2./(yield*yield+6.*shearModulus(T)*DeltaGamma)/(yield*yield+6.*shearModulus(T)*DeltaGamma)*kprDev.dotprod()+ + 2.*tildefVstar*getq1T(T)*cosh(3.*getq2T(T)*(ppr-bulkModulus(T)*DeltaGamma*trNp)/2./yield)-getq3T(T)*getq3T(T)*tildefVstar*tildefVstar-1.;//--------------modified + + res(2)=(3.*tildefVstar*getq1T(T)*getq2T(T)/yield*sinh(3.*getq2T(T)*(ppr-bulkModulus(T)*DeltaGamma*trNp)/2./yield))-trNp;//----------------------modified +*/ double f = res.norm(); // Start iterations //Msg::Info("plastic corrector"); @@ -2093,15 +2904,20 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, else DeltaHatP -= sol(1); - double pcor = p_pr-_K*(Deps-sol(2)); // check if argument of cosh and of sinh is too big - double csfact = 1.5*_q2*pcor/yield; + double pcor = p_pr-KT*(Deps-sol(2)); // check if argument of cosh and of sinh is too big + double csfact = 1.5*q2T*pcor/yield;//--------mod if (csfact > 10.){ Deps *= 0.5; } else Deps -= sol(2); - - _j2IH->hardening(hatP0+DeltaHatP, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0+DeltaHatP,T, q1->getRefToIPJ2IsotropicHardening()); + } + else{ + _j2IH->hardening(hatP0+DeltaHatP, q1->getRefToIPJ2IsotropicHardening()); + } + yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); H = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -2117,10 +2933,16 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, localPorosityGrowth(DeltaGamma, DeltaHatP, Deps, q0,q1, DeltafV,DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps); - - computeResidual3x3(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0., + if(isThermomechanicallyCoupled()){ + computeResidual3x3(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0., + yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps,T); + } + else{ + computeResidual3x3(q0,q1,res,true,J,tildefVstar,DtildefVstarDtildefV,0., yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps); + } f = res.norm(); //Msg::Info("iter= %d Residu = %e, DeltaGamma = %e ,DeltaHatP = %e, DeltafV = %e",ite, f, DeltaGamma, DeltaHatP, DeltafV); @@ -2141,23 +2963,42 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, static STensor3 Np, NpDev; double trNp; static STensor43 ENp; - updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); - + if(isThermomechanicallyCoupled()){ + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp,T); + } + else{ + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); + } + double dRdT=_j2IH->DRDT(hatP0+DeltaHatP,T);//------mod /* Stiffness computation*/ if(stiff) { /* Compute internal variables derivatives from residual derivatives */ static STensor3 dres0dEpr, dres1dEpr, dres2dEpr; double dres0dtildefV, dres1dtildefV, dres2dtildefV; + double dres0dT, dres1dT,dres2dT;//------add + double lnJe=Ee.trace();//-------add static STensor3 dDeltaGammadEpr, dDeltaHatPdEpr, dDepsdEpr; - - - computeDResidual3x3(dres0dEpr,dres1dEpr,dres2dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV, +/*STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, + double &dres0dtildefV, double &dres1dtildefV, double &dres2dtildefV, + double &dres0dT, double &dres1dT, double &dres2dT,//---------added + double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, + double R, double H, + double kirEqSq, const STensor3& kprDev, double ppr, double fVn, + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV,double dRdT, double T,double lnJe*/ + if(isThermomechanicallyCoupled()){ + computeDResidual3x3(dres0dEpr,dres1dEpr,dres2dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres0dT, dres1dT,dres2dT,//-----mod tildefVstar,DtildefVstarDtildefV,0., yield,H,SQkcorprEq,tau_prDev,p_pr,fV0, - DeltaGamma,DeltaHatP,Deps,DeltafV); - + DeltaGamma,DeltaHatP,Deps,DeltafV,dRdT,T,lnJe);//-----mod + } + else{ + computeDResidual3x3(dres0dEpr,dres1dEpr,dres2dEpr,dres0dtildefV,dres1dtildefV,dres2dtildefV,dres0dT, dres1dT,dres2dT,//-----mod + tildefVstar,DtildefVstarDtildefV,0., + yield,H,SQkcorprEq,tau_prDev,p_pr,fV0, + DeltaGamma,DeltaHatP,Deps,DeltafV);//-----mod + } STensorOperation::inverseSTensor3(J,invJ); // inverse last tengent operator for(int i=0; i<3; i++) @@ -2183,6 +3024,21 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, double dDeltaHatPdtildefV = sol(1); double DDepsDtildefV = sol(2); + + double dDeltaGammadT = 0.;//-----add + double dDeltaHatPdT = 0.;//-----add + double DDepsDT = 0.;//--------add + + if(isThermomechanicallyCoupled()){ + res(0) = -dres0dT;//----add + res(1) = -dres1dT;//----add + res(2) = -dres2dT;//-----add + STensorOperation::multSTensor3SVector3(invJ,res,sol);//----add + dDeltaGammadT = sol(0);//-----add + dDeltaHatPdT = sol(1);//-----add + DDepsDT = sol(2);//--------add + *DfVDT = DDeltafVDDeltaGamma*dDeltaGammadT+DDeltafVDDeltaHatP*dDeltaHatPdT+DDeltafVDDeps*DDepsDT;//-------add + } // compute DfVDEpr DfVDEpr = dDeltaGammadEpr; DfVDEpr *= DDeltafVDDeltaGamma; @@ -2191,25 +3047,79 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3(const STensor3& F1, // compute DfVDtildefV DfVDtildefV = DDeltafVDDeltaGamma*dDeltaGammadtildefV+DDeltafVDDeltaHatP*dDeltaHatPdtildefV+DDeltafVDDeps*DDepsDtildefV; - - computePlasticTangentNonLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + + //compute DfVDT + + + + +/*double DeltaGamma,double DeltaHatP, double Deps, double DeltafV,const STensor3& Epr,const double& dRdT,//-------added for temperature + const STensor3& dDeltaGammadEpr, const STensor3& dDeltaHatPdEpr, const STensor3& dDepsdEpr, const STensor3& DDeltafVDEpr, + double dDeltaGammadtildefV,double dDeltaHatPdtildefV, double DDepsDtildefV, double DDeltafVDtildefV, + const double& dDeltaHatPdT,const double& dDeltaGammadT,//--------added for temperature + double yield, double h, const STensor3& tau_prDev, const double& p_pr,const double T,//------------added for temperature + const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& ENp, + const IPNonLocalPorosity* q0, IPNonLocalPorosity* q1, + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, STensor3& DKcorDT,//------added for temperature + STensor43& DFpDEpr, STensor3& DFpDtildefV, STensor3& DFpDT//----------added for temperature*/ + + + + if(isThermomechanicallyCoupled()){ + computePlasticTangentNonLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + dDeltaGammadtildefV,dDeltaHatPdtildefV,DDepsDtildefV,DfVDtildefV, + yield,H,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV,Epr,dRdT,dDeltaHatPdT,dDeltaGammadT,DDepsDT,T,DKcorDT,DFpDT);//--------mod + } + else{ + computePlasticTangentNonLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, dDeltaGammadtildefV,dDeltaHatPdtildefV,DDepsDtildefV,DfVDtildefV, - yield,H,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV); + yield,H,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DKcorDtildefV,DFpDEpr,DFpDtildefV);//--------mod + } } return true; }; -bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, - const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, + + +bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1,const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, const STensor3& tau_prDev, const double& p_pr, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, - STensor43& DFpDEpr + STensor43& DKcorDEpr,STensor43& DFpDEpr, + STensor3* Epr,double T,STensor3* DKcorDT,STensor3* DFpDT ) const{ + + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } /* get and initialize terms */ // Matrix plastic strain @@ -2222,7 +3132,12 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, fV1 = fV0; // Yield stress - _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0,T, q1->getRefToIPJ2IsotropicHardening());//-----mod + } + else{ + _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening());//-----mod + } double & yield = q1->getRefToCurrentViscoplasticYieldStress(); yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); double H = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -2256,10 +3171,16 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, yieldfV = _correctedRegularizedFunction->getVal(tildefVstar); double DyieldfVDDeltafV = _correctedRegularizedFunction->getDiff(tildefVstar)*DtildefVstarDDeltafV; - computeResidual3x3(q0,q1,res,true,J,yieldfV,0.,DyieldfVDDeltafV, + if(isThermomechanicallyCoupled()){ + computeResidual3x3(q0,q1,res,true,J,yieldfV,0.,DyieldfVDDeltafV, yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, - DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps); - + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps,T);//------mod + } + else{ + computeResidual3x3(q0,q1,res,true,J,yieldfV,0.,DyieldfVDDeltafV, + yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps);//------mod + } double f = res.norm(); // Start iterations //Msg::Info("plastic corrector"); @@ -2281,15 +3202,19 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, else DeltaHatP -= sol(1); - double pcor = p_pr-_K*(Deps-sol(2)); // check if argument of cosh and of sinh is too big - double csfact = 1.5*_q2*pcor/yield; + double pcor = p_pr-KT*(Deps-sol(2)); // check if argument of cosh and of sinh is too big + double csfact = 1.5*q2T*pcor/yield;//------mod if (csfact > 10.){ Deps *= 0.5; } else Deps -= sol(2); - - _j2IH->hardening(hatP0+DeltaHatP, q1->getRefToIPJ2IsotropicHardening()); + if(isThermomechanicallyCoupled()){ + _j2IH->hardening(hatP0+DeltaHatP,T, q1->getRefToIPJ2IsotropicHardening());//-------mod + } + else{ + _j2IH->hardening(hatP0+DeltaHatP, q1->getRefToIPJ2IsotropicHardening());//-------mod + } yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); H = q1->getConstRefToIPJ2IsotropicHardening().getDR(); @@ -2310,10 +3235,16 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, tildefVstar = tildefVstarPrev + DtildefVstarDDeltafV*DeltafV; yieldfV = _correctedRegularizedFunction->getVal(tildefVstar); DyieldfVDDeltafV = _correctedRegularizedFunction->getDiff(tildefVstar)*DtildefVstarDDeltafV; - - computeResidual3x3(q0,q1,res,true,J,yieldfV,0.,DyieldfVDDeltafV, + if(isThermomechanicallyCoupled()){ + computeResidual3x3(q0,q1,res,true,J,yieldfV,0.,DyieldfVDDeltafV, + yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps,T);//------mod + } + else{ + computeResidual3x3(q0,q1,res,true,J,yieldfV,0.,DyieldfVDDeltafV, yield,H,SQkcorprEq,p_pr,fV0, DeltaGamma,DeltaHatP,Deps,DeltafV, - DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps); + DDeltafVDDeltaGamma,DDeltafVDDeltaHatP,DDeltafVDDeps);//------mod + } f = res.norm(); //Msg::Info("iter= %d Residu = %e, DeltaGamma = %e ,DeltaHatP = %e, DeltafV = %e",ite, f, DeltaGamma, DeltaHatP, DeltafV); @@ -2329,20 +3260,40 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, static STensor3 Np, NpDev; double trNp; static STensor43 ENp; - updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp); - + updatePlastic(DeltaGamma,DeltaHatP,Deps,DeltafV,yield,F1,tau_prDev,p_pr,q0,q1,tau_cor,Fp1,fV1,Fe1,Ce,Ee,Le,dLe,Np,NpDev,trNp,ENp,T);//-----mod + double lnJe=Ee.trace();//------add + double dRdT = _j2IH->DRDT(hatP0+DeltaHatP,T);//-------add /* Stiffness computation*/ if(stiff) { /* Compute internal variables derivatives from residual derivatives */ static STensor3 dres0dEpr, dres1dEpr, dres2dEpr; static STensor3 dDeltaGammadEpr, dDeltaHatPdEpr, dDepsdEpr; + double dres0dT,dres1dT,dres2dT;//-----add + + + + +/*STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, + double &dres0dT, double &dres1dT, double &dres2dT,//---------added + double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, + double R, double H, + double kirEqSq, const STensor3& kprDev, double ppr, double fVn, + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV,double dRdT, double T,double lnJe +*/ - computeDResidual3x3(dres0dEpr,dres1dEpr,dres2dEpr, + if(isThermomechanicallyCoupled()){ + computeDResidual3x3(dres0dEpr,dres1dEpr,dres2dEpr,dres0dT,dres1dT,dres2dT, yieldfV,0.,DyieldfVDDeltafV, yield,H,SQkcorprEq,tau_prDev,p_pr,fV0, - DeltaGamma,DeltaHatP,Deps,DeltafV); - + DeltaGamma,DeltaHatP,Deps,DeltafV,dRdT,T,lnJe);//-----mod + } + else{ + computeDResidual3x3(dres0dEpr,dres1dEpr,dres2dEpr,dres0dT,dres1dT,dres2dT, + yieldfV,0.,DyieldfVDDeltafV, + yield,H,SQkcorprEq,tau_prDev,p_pr,fV0, + DeltaGamma,DeltaHatP,Deps,DeltafV);//-----mod + } STensorOperation::inverseSTensor3(J,invJ); // inverse last tengent operator for(int i=0; i<3; i++) { @@ -2358,14 +3309,41 @@ bool mlawNonLocalDamageGurson::plasticCorrector3x3Local(const STensor3& F1, } } + + res(0) = -dres0dT; + res(1) = -dres1dT; + res(2) = -dres2dT; + STensorOperation::multSTensor3SVector3(invJ,res,sol); + double dDeltaGammadT= sol(0); + double dDeltaHatPdT = sol(1); + double DDepsDT = sol(2); + + + static STensor3 DfVDEpr; DfVDEpr = dDeltaGammadEpr; DfVDEpr *= DDeltafVDDeltaGamma; DfVDEpr.daxpy(dDeltaHatPdEpr,DDeltafVDDeltaHatP); DfVDEpr.daxpy(dDepsdEpr,DDeltafVDDeps); - + //STensor3* EprP; + //*EprP = Epr; + + +/*double DeltaGamma,double DeltaHatP, double Deps, double DeltafV,STensor3* Epr,const double& dRdT,//-------added for temperature + const STensor3& dDeltaGammadEpr, const STensor3& dDeltaHatPdEpr, const STensor3& dDepsdEpr, const STensor3& DDeltafVDEpr, + const double& dDeltaHatPdT,const double& dDeltaGammadT,const double& DDepsDT,//--------added for temperature + double yield, double h, const STensor3& tau_prDev, const double& p_pr,double T,//--------------added + const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& ENp, + const IPNonLocalPorosity* q0, IPNonLocalPorosity* q1, + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* DKcorDT, STensor3* DFpDT//-----added*/ + if(isThermomechanicallyCoupled()){ + computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, + yield,H,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr,Epr,dRdT,dDeltaHatPdT,dDeltaGammadT,DDepsDT,T,DKcorDT,DFpDT);//----add + } + else{ computePlasticTangentLocal(DeltaGamma,DeltaHatP,Deps,DeltafV,dDeltaGammadEpr,dDeltaHatPdEpr,dDepsdEpr,DfVDEpr, - yield,H,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr); + yield,H,tau_prDev,p_pr,Np,NpDev,trNp,ENp,q0,q1,DKcorDEpr,DFpDEpr);//----add + } } return true; }; @@ -2413,9 +3391,50 @@ void mlawNonLocalDamageGurson::predictorCorrectorLocal( bool correctorOK = false; bool plastic = false; - + + //double KT=bulkModulus(T); + //double muT=shearModulus(T); + /*double q1T=getq1T(T); + double q2T=getq2T(T); + double q3T=getq3T(T); + if(J.size1()!=4) Msg::Error("mlawNonLocalDamageGurson::computeResidual: wrong size"); + if(J.size2()!=4) Msg::Error("mlawNonLocalDamageGurson::computeResidual: wrong size"); + + J(0,0) = (3.*yield/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)*kprDev.dotprod()+ + (ppr-KT*DeltaGamma*trNp)/yield*trNp); + J(0,0) += DeltaGamma*(-36.*muT*yield/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)/ + (yield*yield+6.*muT*DeltaGamma)*kprDev.dotprod()-KT*trNp*trNp/yield); + J(0,1) = DeltaGamma*((3.*h*(yield*yield+6.*muT*DeltaGamma)-12.*h*yield*yield)/ + (yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)* + kprDev.dotprod()-h*(ppr-KT*DeltaGamma*trNp)/yield/yield*trNp)- (1-fVn-DeltafV*_theta); + J(0,2) = DeltaGamma*(ppr-2.*KT*DeltaGamma*trNp)/yield; + J(0,3) = DeltaHatP*_theta; + + J(1,0) = -18.*muT*yield*yield/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)* + kprDev.dotprod()-3.*tildefVstar*q1T*q2T*KT*trNp/yield*sinh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield); + J(1,1) = (2.*h*yield*(yield*yield+6.*muT*DeltaGamma)-4.*h*yield*yield*yield)/ + (yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)/(yield*yield+6.*muT*DeltaGamma)* + 3./2.*kprDev.dotprod() - 3.*h*q2T*tildefVstar*q1T*(ppr-KT*DeltaGamma*trNp)/yield/yield* + sinh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield); + J(1,2) = -3.*q2T*tildefVstar*q1T*KT*DeltaGamma/yield*sinh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield); + J(1,3) = 0.; + + + J(2,0) = -9.*KT*trNp*tildefVstar*q1T*q2T*q2T/2./yield/yield*cosh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield); + J(2,1) = -3.*tildefVstar*q1T*q2T*h/yield/yield*sinh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield) - + 9.*h*tildefVstar*q1T*q2T*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield/yield/yield* + cosh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield); + J(2,2) = -9.*KT*tildefVstar*q1T*q2T*q2T*DeltaGamma/2./yield/yield*cosh(3.*q2T*(ppr-KT*DeltaGamma*trNp)/2./yield)-1.; + J(2,3) = 0.; + + J(2,0) *=yield0; + J(2,1) *=yield0; + J(2,2) *=yield0; + J(2,3) *=yield0; + */ // elastic predictor - this->elasticPredictor(_K,_mu,F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); + this->elasticPredictor(F1,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); + if (ipvprev->dissipationIsBlocked()){ ipvcur->blockDissipation(true); @@ -2471,7 +3490,7 @@ void mlawNonLocalDamageGurson::predictorCorrectorLocal( //elastic predictor Fp0 = &ipvTemp.getConstRefToFp(); - elasticPredictor(_K,_mu, Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); + elasticPredictor(Fcur,*Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); //check yield condition kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); @@ -2560,7 +3579,7 @@ void mlawNonLocalDamageGurson::predictorCorrectorLocal( STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); // elastic energy - ipvcur->getRefToElasticEnergy()= this->deformationEnergy(_K,_mu,Ce); + ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce); if (this->getMacroSolver()->withPathFollowing()){ // irreversible energy if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ @@ -2608,37 +3627,148 @@ void mlawNonLocalDamageGurson::predictorCorrectorLocal( } }; +/* +void mlawNonLocalDamageGurson::computeDResidual(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, STensor3 &dres3dEpr, + double &dres0dtildefVstar, double &dres1dtildefVstar, double &dres2dtildefVstar, double &dres3dtildefVstar, + double &dres0dT,double &dres1dT,double &dres2dT,double &dres3dT, + const double tildefVstar, const STensor3 &kprDev, const double ppr, + const double yield, const double yield0, const double DeltaGamma, const double trNp, const double T, const double dRdT, const double lnJe) const +{ + //Compute residual derivatives on strains Epr + static STensor3 kprDevIdev; + STensorOperation::multSTensor3STensor43(kprDev,_Idev,kprDevIdev); + + double yeildSqP6muDeltaGamma = yield*yield+6*shearModulus(T)*DeltaGamma; + double rat1= 6.*DeltaGamma*yield*2.*shearModulus(T)/(yeildSqP6muDeltaGamma*yeildSqP6muDeltaGamma); + double rat2= trNp*DeltaGamma*bulkModulus(T)/yield; + dres0dEpr = kprDevIdev; + dres0dEpr *= rat1; + dres0dEpr(0,0) += rat2; + dres0dEpr(1,1) += rat2; + dres0dEpr(2,2) += rat2; + + + double rat3= 3.*yield*yield*2.*shearModulus(T)/(yeildSqP6muDeltaGamma*yeildSqP6muDeltaGamma); + double paramSinh = 3.*getq2T(T)*(ppr-bulkModulus(T)*DeltaGamma*trNp)/2./yield; + double rat4= 3.*tildefVstar*getq1T(T)*getq2T(T)*bulkModulus(T)/yield*sinh(paramSinh); + dres1dEpr = kprDevIdev; + dres1dEpr *= rat3; + dres1dEpr(0,0) += rat4; + dres1dEpr(1,1) += rat4; + dres1dEpr(2,2) += rat4; + + double rat5= 9.*tildefVstar*getq1T(T)*getq2T(T)*getq2T(T)*bulkModulus(T)/2./yield/yield*cosh(paramSinh); + dres2dEpr*= 0.; + dres2dEpr(0,0) = rat5; + dres2dEpr(1,1) = rat5; + dres2dEpr(2,2) = rat5; + dres2dEpr *= yield0; //normalize + + dres3dEpr *=0.; + + + + // Compute dres / dtilde_fv + dres0dtildefVstar =0; + dres1dtildefVstar =2.*getq1T(T)*cosh(paramSinh)-2*getq3T(T)*getq3T(T)*tildefVstar; + dres2dtildefVstar =3.*getq1T(T)*getq2T(T)/yield*sinh(paramSinh); + dres2dtildefVstar *=yield0; //normalize + dres3dtildefVstar =0.; + + dres0dT=0; + dres1dT=0; + dres2dT=0; + dres3dT=0; + + if( isThermomechanicallyCoupled()) + { + // compute dres / dTemperature + double L; + L=(3.*dRdT*kprDev.dotprod()+6.*yield*(shearModulusDerivative(T)/shearModulus(T))*kprDev.dotprod())*(yield*yield+6.*shearModulus(T)*DeltaGamma)*(yield*yield+6.*shearModulus(T)*DeltaGamma); + L=L-2.*(yield*yield+6.*shearModulus(T)*DeltaGamma)*(2.*yield*dRdT+6.*shearModulusDerivative(T)*DeltaGamma)*(3.*yield*kprDev.dotprod()); + L=L/(yield*yield+6.*shearModulus(T)*DeltaGamma)/(yield*yield+6.*shearModulus(T)*DeltaGamma)/(yield*yield+6.*shearModulus(T)*DeltaGamma)/(yield*yield+6.*shearModulus(T)*DeltaGamma); + double H; + H=bulkModulusDerivative(T)*lnJe-3.*bulkModulusDerivative(T)*ThermalExpansion(T)*(T-_referenceT)-3*bulkModulus(T)*ThermalExpansionDerivative(T)*(T-_referenceT)-3.*bulkModulus(T)*ThermalExpansion(T); + H=H-bulkModulusDerivative(T)*DeltaGamma*trNp; + H=H*yield; + H=H-dRdT*(ppr-bulkModulus(T)*DeltaGamma*trNp); + H=H/yield/yield; + double M=ppr-bulkModulus(T)*DeltaGamma*trNp; + M=M/yield; + dres0dT=DeltaGamma*L+trNp*DeltaGamma*H; + dres1dT=0.5*((3.*dRdT*yield*kprDev.dotprod())/(yield*yield+6.*shearModulus(T)*DeltaGamma)/(yield*yield+6.*shearModulus(T)*DeltaGamma)+yield*L)+2.*tildefVstar*getq1Der(T)*cosh(1.5*getq2T(T)*M); + dres1dT+=2*tildefVstar*getq1T(T)*(1.5*getq2T(T)*H+1.5*getq2Der(T)*M)*sinh(1.5*getq2T(T)*M)-2.*getq3Der(T)*getq3T(T)*tildefVstar*tildefVstar; + dres2dT=3.*tildefVstar*((getq1Der(T)*getq2T(T)+getq1T(T)*getq2Der(T))*yield-dRdT*getq1T(T)*getq2T(T))/yield/yield*sinh(1.5*getq2T(T)*M); + dres2dT+=3.*tildefVstar*getq1T(T)*getq2T(T)/yield*(1.5*getq2T(T)*H+1.5*getq2Der(T)*M)*cosh(1.5*getq2T(T)*M); + dres3dT=0; + + + } + + +}; +*/ void mlawNonLocalDamageGurson::computeResidual(const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, fullVector<double> &res, bool stiff, fullMatrix<double>& J, double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, double R, double H, double kirEqSq, double ppr, double fVn, double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, - double An, double Bn) const + double An, double Bn,double T) const { + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + + double f0 = q0->getInitialPorosity(); - double pcor = (ppr-_K*Deps); - double csfact = 1.5*_q2*pcor/R; + double pcor = (ppr-KT*Deps); + double csfact = 1.5*q2T*pcor/R; double coshcsfact = cosh(csfact); double sinhcsfact = sinh(csfact); double invR = 1./R; double RR = R*R; double invRR = 1./RR; - double RRPlu6GDG = RR+6.*_mu*DeltaGamma; + double RRPlu6GDG = RR+6.*muT*DeltaGamma; double invRRPlu6GDG = 1./RRPlu6GDG; double invSqRRPlu6GDG = invRRPlu6GDG*invRRPlu6GDG; res(0) = DeltaGamma*2.*R*kirEqSq*invSqRRPlu6GDG + pcor*Deps*invR - (1.-f0)*DeltaHatP; - res(1) = RR*kirEqSq*invSqRRPlu6GDG + 2.*tildefVstar*_q1*coshcsfact - _q3*_q3*tildefVstar*tildefVstar-1.; - res(2) = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*sinhcsfact-Deps; + res(1) = RR*kirEqSq*invSqRRPlu6GDG + 2.*tildefVstar*q1T*coshcsfact - q3T*q3T*tildefVstar*tildefVstar-1.; + res(2) = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*sinhcsfact-Deps; double DeltafVComputed = (1.-fVn-DeltafV)*Deps + An*DeltaHatP + Bn*(fVn+DeltafV)*DeltaGamma; double fV1Computed = _localRegularizedFunction->getVal(fVn+DeltafVComputed); res(3) = fV1Computed - fVn - DeltafV; if (stiff){ - double DcsfactDDeps= -1.5*_q2*_K/R; - double DcsfactDR= -1.5*_q2*pcor/RR; + double DcsfactDDeps= -1.5*q2T*KT/R; + double DcsfactDR= -1.5*q2T*pcor/RR; double DcoshcsfactDDeltaHatP = sinhcsfact*DcsfactDR*H; double DcoshcsfactDDeps = sinhcsfact*DcsfactDDeps; @@ -2646,34 +3776,34 @@ void mlawNonLocalDamageGurson::computeResidual(const IPNonLocalPorosity *q0, IPN double DsinhcsfactDDeltaHatP = coshcsfact*DcsfactDR*H; double DsinhcsfactDDeps = coshcsfact*DcsfactDDeps; - double Dres1DtildefStar = 2.*_q1*coshcsfact - _q3*_q3*2.*tildefVstar; - double Dres2DtildefStar = DeltaGamma*3.*_q1*_q2*invR*sinhcsfact; + double Dres1DtildefStar = 2.*q1T*coshcsfact - q3T*q3T*2.*tildefVstar; + double Dres2DtildefStar = DeltaGamma*3.*q1T*q2T*invR*sinhcsfact; //Dres0DDeltaGamma - J(0,0) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.- 12.*_mu*DeltaGamma*invRRPlu6GDG); + J(0,0) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.- 12.*muT*DeltaGamma*invRRPlu6GDG); //Dres0DDeltaHatP J(0,1) = (2.*DeltaGamma*kirEqSq*invSqRRPlu6GDG*(1.- 4.*RR*invRRPlu6GDG) - pcor*invRR*Deps)*H - (1.-f0); //Dres0DDeps - J(0,2) = (pcor- _K*Deps)*invR; + J(0,2) = (pcor- KT*Deps)*invR; //Dres0DDeltafV J(0,3) = 0.; //Dres1DDeltaGamma - J(1,0) = -RR*kirEqSq*12.*_mu*invSqRRPlu6GDG*invRRPlu6GDG; + J(1,0) = -RR*kirEqSq*12.*muT*invSqRRPlu6GDG*invRRPlu6GDG; //Dres1DDeltaHatP - J(1,1) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.-2.*RR*invRRPlu6GDG)*H + 2.*tildefVstar*_q1*DcoshcsfactDDeltaHatP; + J(1,1) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.-2.*RR*invRRPlu6GDG)*H + 2.*tildefVstar*q1T*DcoshcsfactDDeltaHatP; //Dres1DDeps - J(1,2) = 2.*tildefVstar*_q1*DcoshcsfactDDeps; + J(1,2) = 2.*tildefVstar*q1T*DcoshcsfactDDeps; //Dres1DDeltafV J(1,3) = Dres1DtildefStar*DtildefVstarDfV; //Dres2DDeltaGamma - J(2,0) = 3.*tildefVstar*_q1*_q2*invR*sinhcsfact; + J(2,0) = 3.*tildefVstar*q1T*q2T*invR*sinhcsfact; //Dres2DDeltaHatP - J(2,1) = DeltaGamma*3.*tildefVstar*_q1*_q2*(-H*invRR*sinhcsfact + invR*DsinhcsfactDDeltaHatP); + J(2,1) = DeltaGamma*3.*tildefVstar*q1T*q2T*(-H*invRR*sinhcsfact + invR*DsinhcsfactDDeltaHatP); // Dres2DDeltaDeps - J(2,2) = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*DsinhcsfactDDeps - 1.; + J(2,2) = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*DsinhcsfactDDeps - 1.; // Dres2DDeltaDeltafV J(2,3) = Dres2DtildefStar*DtildefVstarDfV; @@ -2692,18 +3822,51 @@ void mlawNonLocalDamageGurson::computeResidual(const IPNonLocalPorosity *q0, IPN void mlawNonLocalDamageGurson::computeDResidual(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, STensor3& dres3dEpr, double &dres0dtildefV, double &dres1dtildefV, double &dres2dtildefV, double& dres3dtildefV, + double &dres0dT, double &dres1dT, double &dres2dT, double& dres3dT,//---------added double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, double R, double H, double kirEqSq, const STensor3& kprDev, double ppr, double fVn, - double DeltaGamma, double DeltaHatP, double Deps , double DeltafV) const{ + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, + + double dRdT, double T,double lnJe) const{ + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + + double trNp=Deps/DeltaGamma; STensor3 DkirEqSqDEpr; STensorOperation::multSTensor3STensor43(kprDev,_Idev,DkirEqSqDEpr); - DkirEqSqDEpr *= (6.*_mu); + DkirEqSqDEpr *= (6.*muT); - STensor3 DpprDEepr(_K); + STensor3 DpprDEepr(KT); double RR = R*R; - double RRPlu6GDG = RR+6.*_mu*DeltaGamma; + double RRPlu6GDG = RR+6.*muT*DeltaGamma; double invRRPlu6GDG = 1./RRPlu6GDG; double invSqRRPlu6GDG = invRRPlu6GDG*invRRPlu6GDG; double invR = 1./R; @@ -2715,30 +3878,59 @@ void mlawNonLocalDamageGurson::computeDResidual(STensor3 &dres0dEpr, STensor3 &d dres0dEpr *= fact1; dres0dEpr.daxpy(DpprDEepr,fact2); - double pcor = (ppr-_K*Deps); - double csfact = 1.5*_q2*pcor*invR; + double pcor = (ppr-KT*Deps); + double csfact = 1.5*q2T*pcor*invR; double coshcsfact = cosh(csfact); double sinhcsfact = sinh(csfact); - double DcoshcsfactDppr = sinhcsfact*1.5*_q2*invR; + double DcoshcsfactDppr = sinhcsfact*1.5*q2T*invR; double fact3 = RR*invSqRRPlu6GDG; - double fact4 = 2.*tildefVstar*_q1*DcoshcsfactDppr; + double fact4 = 2.*tildefVstar*q1T*DcoshcsfactDppr; dres1dEpr = DkirEqSqDEpr; dres1dEpr *= fact3; dres1dEpr.daxpy(DpprDEepr,fact4); - double DsinhcsfactDppr = coshcsfact*1.5*_q2*invR; - double fact5 = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*DsinhcsfactDppr; + double DsinhcsfactDppr = coshcsfact*1.5*q2T*invR; + double fact5 = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*DsinhcsfactDppr; dres2dEpr = DpprDEepr; dres2dEpr *= fact5; STensorOperation::zero(dres3dEpr); dres0dtildefV = 0.; - dres1dtildefV = (2.*_q1*coshcsfact - _q3*_q3*2.*tildefVstar)*DtildefVstarDtildefV; - dres2dtildefV = DeltaGamma*3.*_q1*_q2*invR*sinhcsfact*DtildefVstarDtildefV; + dres1dtildefV = (2.*q1T*coshcsfact - q3T*q3T*2.*tildefVstar)*DtildefVstarDtildefV; + dres2dtildefV = DeltaGamma*3.*q1T*q2T*invR*sinhcsfact*DtildefVstarDtildefV; dres3dtildefV = 0.; + //yield=R + //H=h + dres0dT=0.; + dres1dT=0.; + dres2dT=0.; + dres3dT=0.; + if( isThermomechanicallyCoupled()) + { + // compute dres / dTemperature + double L; + L=(3.*dRdT*kprDev.dotprod()+6.*R*(dmudT/muT)*kprDev.dotprod())*(RR+6.*muT*DeltaGamma)*(RR+6.*muT*DeltaGamma); + L=L-2.*(RR+6.*muT*DeltaGamma)*(2.*R*dRdT+6.*dmudT*DeltaGamma)*(3.*R*kprDev.dotprod()); + L=L/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma); + double h; + h=dKdT*lnJe-3.*dKdT*alpT*(T-_referenceT)-3*KT*dalpdT*(T-_referenceT)-3.*KT*alpT; + h=h-KT*DeltaGamma*trNp; + h=h*R; + h=h-dRdT*(ppr-KT*DeltaGamma*trNp); + h=h/RR; + double M=ppr-KT*DeltaGamma*trNp; + M=M/R; + dres0dT=DeltaGamma*L+trNp*DeltaGamma*h; + dres1dT=0.5*((3.*dRdT*R*kprDev.dotprod())/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)+R*L)+2.*tildefVstar*dq1dT*cosh(1.5*q2T*M); + dres1dT+=2*tildefVstar*q1T*(1.5*q2T*h+1.5*dq2dT*M)*sinh(1.5*q2T*M)-2.*dq3dT*q3T*tildefVstar*tildefVstar; + dres2dT=3.*tildefVstar*((dq1dT*q2T+q1T*dq2dT)*R-dRdT*dq1dT*q2T)/RR*sinh(1.5*q2T*M); + dres2dT+=3.*tildefVstar*q1T*q2T/R*(1.5*q2T*h+1.5*dq2dT*M)*cosh(1.5*q2T*M); + dres3dT=0.; + } + }; @@ -2774,28 +3966,57 @@ void mlawNonLocalDamageGurson::computeResidual3x3(const IPNonLocalPorosity *q0, double R, double H, double kirEqSq, double ppr, double fVn, double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, - double DDeltafVDDeltaGamma, double DDeltafVDDeltaHatP, double DDeltafVDDeps) const + double DDeltafVDDeltaGamma, double DDeltafVDDeltaHatP, double DDeltafVDDeps, double T) const { + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + double f0 = q0->getInitialPorosity(); - double pcor = (ppr-_K*Deps); - double csfact = 1.5*_q2*pcor/R; + double pcor = (ppr-KT*Deps);//-----mod + double csfact = 1.5*q2T*pcor/R;//-----mod double coshcsfact = cosh(csfact); double sinhcsfact = sinh(csfact); double invR = 1./R; double RR = R*R; double invRR = 1./RR; - double RRPlu6GDG = RR+6.*_mu*DeltaGamma; + double RRPlu6GDG = RR+6.*muT*DeltaGamma;//-----mod double invRRPlu6GDG = 1./RRPlu6GDG; double invSqRRPlu6GDG = invRRPlu6GDG*invRRPlu6GDG; res(0) = DeltaGamma*2.*R*kirEqSq*invSqRRPlu6GDG + pcor*Deps*invR - (1.-f0)*DeltaHatP; - res(1) = RR*kirEqSq*invSqRRPlu6GDG + 2.*tildefVstar*_q1*coshcsfact - _q3*_q3*tildefVstar*tildefVstar-1.; - res(2) = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*sinhcsfact-Deps; + res(1) = RR*kirEqSq*invSqRRPlu6GDG + 2.*tildefVstar*q1T*coshcsfact - q3T*q3T*tildefVstar*tildefVstar-1.;//------mod + res(2) = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*sinhcsfact-Deps;//-----mod if (stiff){ - double DcsfactDDeps= -1.5*_q2*_K/R; - double DcsfactDR= -1.5*_q2*pcor/RR; + double DcsfactDDeps= -1.5*q2T*KT/R;//-----mod + double DcsfactDR= -1.5*q2T*pcor/RR;//----mod double DcoshcsfactDDeltaHatP = sinhcsfact*DcsfactDR*H; double DcoshcsfactDDeps = sinhcsfact*DcsfactDDeps; @@ -2803,47 +4024,76 @@ void mlawNonLocalDamageGurson::computeResidual3x3(const IPNonLocalPorosity *q0, double DsinhcsfactDDeltaHatP = coshcsfact*DcsfactDR*H; double DsinhcsfactDDeps = coshcsfact*DcsfactDDeps; - double Dres1DtildefStar = 2.*_q1*coshcsfact - _q3*_q3*2.*tildefVstar; - double Dres2DtildefStar = DeltaGamma*3.*_q1*_q2*invR*sinhcsfact; + double Dres1DtildefStar = 2.*q1T*coshcsfact - q3T*q3T*2.*tildefVstar;//------mod + double Dres2DtildefStar = DeltaGamma*3.*q1T*q2T*invR*sinhcsfact;//------mod //Dres0DDeltaGamma - J(0,0) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.- 12.*_mu*DeltaGamma*invRRPlu6GDG); + J(0,0) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.- 12.*muT*DeltaGamma*invRRPlu6GDG);//----mod //Dres0DDeltaHatP J(0,1) = (2.*DeltaGamma*kirEqSq*invSqRRPlu6GDG*(1.- 4.*RR*invRRPlu6GDG) - pcor*invRR*Deps)*H - (1.-f0); //Dres0DDeps - J(0,2) = (pcor- _K*Deps)*invR; + J(0,2) = (pcor- KT*Deps)*invR;//-----mod //Dres1DDeltaGamma - J(1,0) = -RR*kirEqSq*12.*_mu*invSqRRPlu6GDG*invRRPlu6GDG + DtildefVstarDfV*Dres1DtildefStar*DDeltafVDDeltaGamma; + J(1,0) = -RR*kirEqSq*12.*muT*invSqRRPlu6GDG*invRRPlu6GDG + DtildefVstarDfV*Dres1DtildefStar*DDeltafVDDeltaGamma;//-----mod //Dres1DDeltaHatP - J(1,1) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.-2.*RR*invRRPlu6GDG)*H + 2.*tildefVstar*_q1*DcoshcsfactDDeltaHatP + DtildefVstarDfV*Dres1DtildefStar*DDeltafVDDeltaHatP ; + J(1,1) = 2.*R*kirEqSq*invSqRRPlu6GDG*(1.-2.*RR*invRRPlu6GDG)*H + 2.*tildefVstar*q1T*DcoshcsfactDDeltaHatP + DtildefVstarDfV*Dres1DtildefStar*DDeltafVDDeltaHatP ;//----mod //Dres1DDeltafV - J(1,2) = 2.*tildefVstar*_q1*DcoshcsfactDDeps + DtildefVstarDfV*Dres1DtildefStar*DDeltafVDDeps; + J(1,2) = 2.*tildefVstar*q1T*DcoshcsfactDDeps + DtildefVstarDfV*Dres1DtildefStar*DDeltafVDDeps;//-------mod //Dres2DDeltaGamma - J(2,0) = 3.*tildefVstar*_q1*_q2*invR*sinhcsfact + DtildefVstarDfV*Dres2DtildefStar*DDeltafVDDeltaGamma; + J(2,0) = 3.*tildefVstar*q1T*q2T*invR*sinhcsfact + DtildefVstarDfV*Dres2DtildefStar*DDeltafVDDeltaGamma;//----mod //Dres2DDeltaHatP - J(2,1) = DeltaGamma*3.*tildefVstar*_q1*_q2*(-H*invRR*sinhcsfact + invR*DsinhcsfactDDeltaHatP) + DtildefVstarDfV*Dres2DtildefStar*DDeltafVDDeltaHatP; + J(2,1) = DeltaGamma*3.*tildefVstar*q1T*q2T*(-H*invRR*sinhcsfact + invR*DsinhcsfactDDeltaHatP) + DtildefVstarDfV*Dres2DtildefStar*DDeltafVDDeltaHatP;//-----mod // Dres2DDeltaDeltafV - J(2,2) = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*DsinhcsfactDDeps + DtildefVstarDfV*Dres2DtildefStar*DDeltafVDDeps - 1.; + J(2,2) = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*DsinhcsfactDDeps + DtildefVstarDfV*Dres2DtildefStar*DDeltafVDDeps - 1.;//-----mod } }; void mlawNonLocalDamageGurson::computeDResidual3x3(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, double &dres0dtildefV, double &dres1dtildefV, double &dres2dtildefV, + double &dres0dT, double &dres1dT, double &dres2dT,//---------added double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, double R, double H, double kirEqSq, const STensor3& kprDev, double ppr, double fVn, - double DeltaGamma, double DeltaHatP, double Deps , double DeltafV) const{ + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV,double dRdT, double T,double lnJe) const{ + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + double trNp=Deps/DeltaGamma; STensor3 DkirEqSqDEpr; STensorOperation::multSTensor3STensor43(kprDev,_Idev,DkirEqSqDEpr); - DkirEqSqDEpr *= (6.*_mu); + DkirEqSqDEpr *= (6.*muT);//----mod - STensor3 DpprDEepr(_K); + STensor3 DpprDEepr(KT); double RR = R*R; - double RRPlu6GDG = RR+6.*_mu*DeltaGamma; + double RRPlu6GDG = RR+6.*muT*DeltaGamma;//---mod double invRRPlu6GDG = 1./RRPlu6GDG; double invSqRRPlu6GDG = invRRPlu6GDG*invRRPlu6GDG; double invR = 1./R; @@ -2855,43 +4105,102 @@ void mlawNonLocalDamageGurson::computeDResidual3x3(STensor3 &dres0dEpr, STensor3 dres0dEpr *= fact1; dres0dEpr.daxpy(DpprDEepr,fact2); - double pcor = (ppr-_K*Deps); - double csfact = 1.5*_q2*pcor*invR; + double pcor = (ppr-KT*Deps);//-----mod + double csfact = 1.5*q2T*pcor*invR;//----mod double coshcsfact = cosh(csfact); double sinhcsfact = sinh(csfact); - double DcoshcsfactDppr = sinhcsfact*1.5*_q2*invR; + double DcoshcsfactDppr = sinhcsfact*1.5*q2T*invR;//----mod double fact3 = RR*invSqRRPlu6GDG; - double fact4 = 2.*tildefVstar*_q1*DcoshcsfactDppr; + double fact4 = 2.*tildefVstar*q1T*DcoshcsfactDppr;//----mod dres1dEpr = DkirEqSqDEpr; dres1dEpr *= fact3; dres1dEpr.daxpy(DpprDEepr,fact4); - double DsinhcsfactDppr = coshcsfact*1.5*_q2*invR; - double fact5 = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*DsinhcsfactDppr; + double DsinhcsfactDppr = coshcsfact*1.5*q2T*invR;//-----mod + double fact5 = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*DsinhcsfactDppr;//-----mod dres2dEpr = DpprDEepr; dres2dEpr *= fact5; dres0dtildefV = 0.; - dres1dtildefV = (2.*_q1*coshcsfact - _q3*_q3*2.*tildefVstar)*DtildefVstarDtildefV; - dres2dtildefV = DeltaGamma*3.*_q1*_q2*invR*sinhcsfact*DtildefVstarDtildefV; + dres1dtildefV = (2.*q1T*coshcsfact - q3T*q3T*2.*tildefVstar)*DtildefVstarDtildefV;//------mod + dres2dtildefV = DeltaGamma*3.*q1T*q2T*invR*sinhcsfact*DtildefVstarDtildefV;//------mod + + + + dres0dT=0.; + dres1dT=0.; + dres2dT=0.; + + if( isThermomechanicallyCoupled()) + { + // compute dres / dTemperature + double L; + L=(3.*dRdT*kprDev.dotprod()+6.*R*(dmudT/muT)*kprDev.dotprod())*(RR+6.*muT*DeltaGamma)*(RR+6.*muT*DeltaGamma); + L=L-2.*(RR+6.*muT*DeltaGamma)*(2.*R*dRdT+6.*dmudT*DeltaGamma)*(3.*R*kprDev.dotprod()); + L=L/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma); + double h; + h=dKdT*lnJe-3.*dKdT*alpT*(T-_referenceT)-3*KT*dalpdT*(T-_referenceT)-3.*KT*alpT; + h=h-KT*DeltaGamma*trNp; + h=h*R; + h=h-dRdT*(ppr-KT*DeltaGamma*trNp); + h=h/RR; + double M=ppr-KT*DeltaGamma*trNp; + M=M/R; + dres0dT=DeltaGamma*L+trNp*DeltaGamma*h; + dres1dT=0.5*((3.*dRdT*R*kprDev.dotprod())/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)+R*L)+2.*tildefVstar*dq1dT*cosh(1.5*q2T*M); + dres1dT+=2*tildefVstar*q1T*(1.5*q2T*h+1.5*dq2dT*M)*sinh(1.5*q2T*M)-2.*dq3dT*q3T*tildefVstar*tildefVstar; + dres2dT=3.*tildefVstar*((dq1dT*q2T+q1T*dq2dT)*R-dRdT*dq1dT*q2T)/RR*sinh(1.5*q2T*M); + dres2dT+=3.*tildefVstar*q1T*q2T/R*(1.5*q2T*h+1.5*dq2dT*M)*cosh(1.5*q2T*M); + dres2dT*=DeltaGamma; + } }; void mlawNonLocalDamageGurson::computeDResidual3x3(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, + double &dres0dT, double &dres1dT, double &dres2dT,//---------added double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, double R, double H, double kirEqSq, const STensor3& kprDev, double ppr, double fVn, - double DeltaGamma, double DeltaHatP, double Deps , double DeltafV) const{ + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV,double dRdT, double T,double lnJe) const{ + + double KT=_K; + double alpT=_alp; + double muT=_mu; + double dKdT=0.; + double dmudT=0.; + double dalpdT=0.; + double q1T=_q1; + double q2T=_q2; + double q3T=_q3; + double dq1dT=0.; + double dq2dT=0.; + double dq3dT=0.; + + if(isThermomechanicallyCoupled()){ + KT=bulkModulus(T); + alpT=ThermalExpansion(T); + muT=shearModulus(T); + dKdT=bulkModulusDerivative(T); + dmudT=shearModulusDerivative(T); + dalpdT=ThermalExpansionDerivative(T); + q1T=getq1T(T); + q2T=getq2T(T); + q3T=getq3T(T); + dq1dT=getq1Der(T); + dq2dT=getq2Der(T); + dq3dT=getq3Der(T); + } + double trNp=Deps/DeltaGamma; STensor3 DkirEqSqDEpr; STensorOperation::multSTensor3STensor43(kprDev,_Idev,DkirEqSqDEpr); - DkirEqSqDEpr *= (6.*_mu); + DkirEqSqDEpr *= (6.*muT);//-----mod - STensor3 DpprDEepr(_K); + STensor3 DpprDEepr(KT);//------mod double RR = R*R; - double RRPlu6GDG = RR+6.*_mu*DeltaGamma; + double RRPlu6GDG = RR+6.*muT*DeltaGamma;//-----mod double invRRPlu6GDG = 1./RRPlu6GDG; double invSqRRPlu6GDG = invRRPlu6GDG*invRRPlu6GDG; double invR = 1./R; @@ -2903,23 +4212,49 @@ void mlawNonLocalDamageGurson::computeDResidual3x3(STensor3 &dres0dEpr, STensor3 dres0dEpr *= fact1; dres0dEpr.daxpy(DpprDEepr,fact2); - double pcor = (ppr-_K*Deps); - double csfact = 1.5*_q2*pcor*invR; + double pcor = (ppr-KT*Deps);//------mod + double csfact = 1.5*q2T*pcor*invR;//------mod double coshcsfact = cosh(csfact); double sinhcsfact = sinh(csfact); - double DcoshcsfactDppr = sinhcsfact*1.5*_q2*invR; + double DcoshcsfactDppr = sinhcsfact*1.5*q2T*invR;//-----mod double fact3 = RR*invSqRRPlu6GDG; - double fact4 = 2.*tildefVstar*_q1*DcoshcsfactDppr; + double fact4 = 2.*tildefVstar*q1T*DcoshcsfactDppr;//------mod dres1dEpr = DkirEqSqDEpr; dres1dEpr *= fact3; dres1dEpr.daxpy(DpprDEepr,fact4); - double DsinhcsfactDppr = coshcsfact*1.5*_q2*invR; - double fact5 = DeltaGamma*3.*tildefVstar*_q1*_q2*invR*DsinhcsfactDppr; + double DsinhcsfactDppr = coshcsfact*1.5*q2T*invR;//-------mod + double fact5 = DeltaGamma*3.*tildefVstar*q1T*q2T*invR*DsinhcsfactDppr;//-------mod dres2dEpr = DpprDEepr; dres2dEpr *= fact5; + dres0dT=0.; + dres1dT=0.; + dres2dT=0.; + + if( isThermomechanicallyCoupled()) + { + // compute dres / dTemperature + double L; + L=(3.*dRdT*kprDev.dotprod()+6.*R*(dmudT/muT)*kprDev.dotprod())*(RR+6.*muT*DeltaGamma)*(RR+6.*muT*DeltaGamma); + L=L-2.*(RR+6.*muT*DeltaGamma)*(2.*R*dRdT+6.*dmudT*DeltaGamma)*(3.*R*kprDev.dotprod()); + L=L/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma); + double h; + h=dKdT*lnJe-3.*dKdT*alpT*(T-_referenceT)-3*KT*dalpdT*(T-_referenceT)-3.*KT*alpT; + h=h-KT*DeltaGamma*trNp; + h=h*R; + h=h-dRdT*(ppr-KT*DeltaGamma*trNp); + h=h/RR; + double M=ppr-KT*DeltaGamma*trNp; + M=M/R; + dres0dT=DeltaGamma*L+trNp*DeltaGamma*h; + dres1dT=0.5*((3.*dRdT*R*kprDev.dotprod())/(RR+6.*muT*DeltaGamma)/(RR+6.*muT*DeltaGamma)+R*L)+2.*tildefVstar*dq1dT*cosh(1.5*q2T*M); + dres1dT+=2*tildefVstar*q1T*(1.5*q2T*h+1.5*dq2dT*M)*sinh(1.5*q2T*M)-2.*dq3dT*q3T*tildefVstar*tildefVstar; + dres2dT=3.*tildefVstar*((dq1dT*q2T+q1T*dq2dT)*R-dRdT*dq1dT*q2T)/RR*sinh(1.5*q2T*M); + dres2dT+=3.*tildefVstar*q1T*q2T/R*(1.5*q2T*h+1.5*dq2dT*M)*cosh(1.5*q2T*M); + dres2dT*=DeltaGamma; + } }; @@ -2927,6 +4262,40 @@ void mlawNonLocalDamageGurson::localPorosityGrowth_NonLocalEqPlastic(double Delt const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, double& DeltafV, double& DDeltafVDDeltaGamma,double& DDeltafVDDeltaHatP, double& DDeltafVDDeps, double & DDeltafVDtildeHatP) const{ + /* + // Compute dFp/dftildeVstar from dGammaNpdftildeVstar + static STensor3 EdGammaNpdftildeVstar; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + EdGammaNpdftildeVstar(i,j) = 0.; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdftildeVstar(i,j) += ENp(i,j,m,n)*dGammaNpdftildeVstar(m,n); + } + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + DFpDtildefVstar(j,i) = 0.; + for(int m=0; m<3; m++) + DFpDtildefVstar(j,i) += Fp0(m,i)*EdGammaNpdftildeVstar(m,j); + } + + if (this->getMacroSolver()->withPathFollowing() or isThermomechanicallyCoupled()){ + // will convert to DF after + STensor3& DplEnergyDEpr = q1->getRefToDIrreversibleEnergyDF(); + double& DplEnergyDtildefVstar = q1->getRefToDIrreversibleEnergyDtildefVstar(); + + double fact1 = (1.-fV1)*(H*DeltaHatP+yield); + double fact2 = -yield*DeltaHatP; + + DplEnergyDEpr = dDeltaHatPdEpr; + DplEnergyDEpr *= fact1; + DplEnergyDEpr.daxpy(DfVDEpr,fact2); + + DplEnergyDtildefVstar = fact1*dDeltaHatPdtildefVstar+ fact2*DfVDtildefVstar; + } + */ double An = 0.; double Bn = 0.; double fVn = q0->getLocalPorosity(); @@ -3239,6 +4608,42 @@ bool mlawNonLocalDamageGurson::plasticCorrector_NonLocalEqPlastic(const STensor3 DfVDEpr.daxpy(DHatPDEpr,DDeltafVDDeltaHatP); DfVDEpr.daxpy(dDepsdEpr,DDeltafVDDeps); + /* + // Compute dFp/dC from dGammaNpdC + static STensor43 EdGammaNpdEpr; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + EdGammaNpdEpr(i,j,k,l)=0.; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdEpr(i,j,k,l)+= ENp(i,j,m,n)*dGammaNpdEpr(m,n,k,l); + } + + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + DFpDEpr(j,i,k,l) = 0.; + for(int m=0; m<3; m++) + DFpDEpr(j,i,k,l) += Fp0(m,i)*EdGammaNpdEpr(m,j,k,l); + } + + + if (this->getMacroSolver()->withPathFollowing() or isThermomechanicallyCoupled()){ + // will convert to DF after + STensor3& DplEnergyDEpr = q1->getRefToDIrreversibleEnergyDF(); + double fact1 = (1.-fV1)*(H*DeltaHatP+yield); + double fact2 = -yield*DeltaHatP; + + DplEnergyDEpr = dDeltaHatPdEpr; + DplEnergyDEpr *= fact1; + DplEnergyDEpr.daxpy(DfVDEpr,fact2); + } + */ // compute DfVDtildefV double DfVDtildeHatp = DDeltafVDDeltaGamma*dDeltaGammaDtildeHatP+DDeltafVDDeltaHatP*DHatDtildeHatP+DDeltafVDDeps*DDepsDtildeHatP; @@ -3390,7 +4795,6 @@ void mlawNonLocalDamageGurson::computeDResidual3x3_NonLocalVolumetricPlastic(STe dres2DtildeHatQ = DeltaGamma*3.*_q1*_q2*invR*sinhcsfact*DtildefVstarDfV*DDeltafVDtildeHatQ; }; - bool mlawNonLocalDamageGurson::plasticCorrector_NonLocalVolumetricPlastic(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, const STensor3& tau_prDev, const double& p_pr, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, @@ -3575,4 +4979,4 @@ bool mlawNonLocalDamageGurson::plasticCorrector_NonLocalVolumetricPlastic(const } return true; -}; \ No newline at end of file +}; diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.h b/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.h index 3c029208bc0082eb03b0177ca4aac9b6659093d8..846c55402c6ecc05df3787174669ef38c55cbf86 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageGurson.h @@ -12,7 +12,6 @@ #define MLAWNONLOCALDAMAGEGURSON_H_ #include "mlawNonLocalPorous.h" #include "scalarFunction.h" - class mlawNonLocalDamageGurson : public mlawNonLocalPorosity { #ifndef SWIG @@ -30,6 +29,13 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity int _maxite; // max number of iterations double _theta; // integration parameters (for mid-point method): 0=Euler explicit, 1=Euler Implicit(default) int _useSystem; // 1 - use 4x4, 2- use 3x3 + + //adding temFunc for Gurson parameters----------------added + scalarFunction* _temFunc_q1; + scalarFunction* _temFunc_q2; + scalarFunction* _temFunc_q3; + //end of temFuncs---------------------------------------end + int _postBlockedBehavior; // when considering nonloca-local transition @@ -39,6 +45,7 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity scalarFunction* _correctedRegularizedFunction; scalarFunction* _localRegularizedFunction; + #endif //SWIG public: @@ -46,12 +53,34 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity mlawNonLocalDamageGurson(const int num,const double E,const double nu, const double rho, const double q1, const double q2, const double q3, const double fVinitial, const J2IsotropicHardening &j2IH, - const double tol, const bool matrixbyPerturbation, const double pert ); + const double tol, const bool matrixbyPerturbation, const double pert); mlawNonLocalDamageGurson(const int num,const double E,const double nu, const double rho, const double q1, const double q2, const double q3, const double fVinitial, const J2IsotropicHardening &j2IH, const CLengthLaw &cLLaw, - const double tol, const bool matrixbyPerturbation, const double pert ); + const double tol, const bool matrixbyPerturbation, const double pert); + + //set for temperature functions--------------------added + void setTemperatureFunction_q1(const scalarFunction& Tfunc){ + if (_temFunc_q1 != NULL) delete _temFunc_q1; + _temFunc_q1 = Tfunc.clone(); + }; + void setTemperatureFunction_q2(const scalarFunction& Tfunc){ + if (_temFunc_q2 != NULL) delete _temFunc_q2; + _temFunc_q2 = Tfunc.clone(); + }; + void setTemperatureFunction_q3(const scalarFunction& Tfunc){ + if (_temFunc_q3 != NULL) delete _temFunc_q3; + _temFunc_q3 = Tfunc.clone(); + }; + + virtual double getq1T (double T) const{return _q1*_temFunc_q1->getVal(T);}; + virtual double getq2T (double T) const{return _q2*_temFunc_q2->getVal(T);}; + virtual double getq3T (double T) const{return _q3*_temFunc_q3->getVal(T);}; + virtual double getq1Der (double T)const{return _q1*_temFunc_q1->getDiff(T);}; + virtual double getq2Der (double T)const{return _q2*_temFunc_q2->getDiff(T);}; + virtual double getq3Der (double T)const{return _q3*_temFunc_q3->getDiff(T);}; + //end of get functions for parameters-----------------------end /* Option settings */ void setPredictorCorrectorParameters(const int InitialGuessMethod, const int maxite=20, const double theta=1., const int sys=1); void setFailureTolerance(const double tol, const double elTol, const double localFailedPoro); @@ -74,7 +103,7 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity // Specific functions public: - virtual void constitutive( + /*virtual void constitutive( const STensor3& F0, // initial deformation gradient (input @ time n) const STensor3& Fn, // updated deformation gradient (input @ time n+1) STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) @@ -86,7 +115,27 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity STensor3 &dStressDNonLocalPorosity, double &dLocalPorosityDNonLocalPorosity, const bool stiff // if true compute the tangents - ) const; + ) const + { + STensor3 dStressDT; + double DLocalPorosityDT; + constitutive(F0,Fn,P,q0,q1,Tangent,dLocalPorosityDStrain,dStressDNonLocalPorosity,dLocalPorosityDNonLocalPorosity,dStressDT,DLocalPorosityDT, stiff, _referenceT); + }*/ + virtual void constitutive( + const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& Fn, // updated deformation gradient (input @ time n+1) + STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) + // contains the initial values on input + const IPNonLocalPorosity *q0, // array of initial internal variable + IPNonLocalPorosity *q1, // updated array of internal variable (in ipvcur on output), + STensor43 &Tangent, // constitutive tangents (output) + STensor3 &dLocalPorosityDStrain, + STensor3 &dStressDNonLocalPorosity, + double &dLocalPorosityDNonLocalPorosity, + // STensor3 &dStressDT, + // double &DLocalPorosityDT, + const bool stiff//,const double T // if true compute the tangents + ) const; virtual void constitutive_NonLocalEqPlastic( const STensor3& F0, // initial deformation gradient (input @ time n) @@ -123,37 +172,40 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity const IPNonLocalPorosity *q0, // array of initial internal variable IPNonLocalPorosity *q1, // updated array of internal variable (in ipvcur on output), STensor43 &Tangent, // constitutive tangents (output) - const bool stiff // if true compute the tangents + const bool stiff // if true compute the tangents ) const; - virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar) const; - virtual bool plasticCorrector(const STensor3& F1, const double& tildefVstar, const double & DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, + virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar,double T = 0.) const; + + virtual bool plasticCorrector(const STensor3& F1, const double& tildefVstar,const double& DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr,//-------------modified const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, //--------------modified + STensor43& DFpDEpr, STensor3& DFpDtildefV, //-----------------------modified + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr = NULL,double T = 0., + STensor3* DKcorDT = NULL,STensor3* DFpDT = NULL,double* DfVDT = NULL//----------------modified ) const; - virtual bool plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, + virtual bool plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV,//----add + const STensor3& tau_prDev,const double& p_pr, //----add const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* Epr = NULL,double T=0.,STensor3* DKcorDT = NULL, STensor3* DFpDT = NULL//-----add ) const; - private: + protected: + //---------------------------------------end void predictorCorrector(const STensor3& F0, // initial deformation gradient (input @ time n) const STensor3& Fn, // updated deformation gradient (input @ time n+1) STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) @@ -164,7 +216,10 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity STensor3 &dLocalPorosityDStrain, STensor3 &dStressDNonLocalPorosity, double &dLocalPorosityDNonLocalPorosity, - const bool stiff // if true compute the tangents + const bool stiff, // if true compute the tangents + STensor3* dStressDT = NULL, + double* dLocalPorosityDT = NULL, + const double T0 = 0.,const double T = 0. ) const; void predictorCorrector_NonLocalEqPlastic(const STensor3& F0, // initial deformation gradient (input @ time n) @@ -200,87 +255,150 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity const IPNonLocalPorosity *q0, // array of initial internal variable IPNonLocalPorosity *q1, // updated array of internal variable (in ipvcur on output), STensor43 &Tangent, // constitutive tangents (output) - const bool stiff // if true compute the tangents + const bool stiff // if true compute the tangents ) const; + + /* void yieldNormal(STensor3 &Npdev, double &trNp, const STensor3 &kDev, const double p, const double yield, + const double tildefVstar,const double T) const; +//--------------------------------------------------------added + void yieldNormal(STensor3 &Npdev, double &trNp, const STensor3 &kDev, const double p, const double yield, + const double tildefVstar) const + { + yieldNormal(Npdev,trNp,kDev,p,yield, tildefVstar,_referenceT); + }; +//-----------------------------------------------------------end + /* + * nonlocal version for system 4x4 + * + + void computeResidual(fullVector<double> &res, + double tildefVstar, const STensor3 &kprDev, double ppr, + double yield, double yield0, double DeltaHatP, + double DeltaGamma, double trNp, + double fVn, double DeltafV, double _A, + double _B,const double T) const; + + +//------------------------------added + void computeResidual(fullVector<double> &res, + double tildefVstar, const STensor3 &kprDev, double ppr, + double yield, double yield0, double DeltaHatP, + double DeltaGamma, double trNp, + double fVn, double DeltafV, double _A, + double _B) const + { + computeResidual(res, tildefVstar,kprDev,ppr,yield,yield0,DeltaHatP, DeltaGamma,trNp, fVn,DeltafV,_A,_B,_referenceT); + }; +//---------------------------------------end + void computeJacobian(fullMatrix<double> &J, + double tildefVstar, const STensor3 &kprDev, double ppr, + double yield, double yield0, double h, double DeltaHatP, + double DeltaGamma, double trNp, + double fVn, double DeltafV, double _A, + double _B,const double T) const; + +//----------------------------------added +void computeJacobian(fullMatrix<double> &J, + double tildefVstar, const STensor3 &kprDev, double ppr, + double yield, double yield0, double h, double DeltaHatP, + double DeltaGamma, double trNp, + double fVn, double DeltafV, double _A, + double _B) const +{ + computeJacobian(J, tildefVstar,kprDev,ppr,yield,yield0,h,DeltaHatP, DeltaGamma,trNp, fVn,DeltafV, _A, _B,_referenceT); +} +//------------------------------------end + + + /*virtual void computeDResidual(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, STensor3 &dres3dEpr, + double &dres0dtildefVstar, double &dres1dtildefVstar, double &dres2dtildefVstar, double &dres3dtildefVstar, + double &dres0dT,double &dres1dT,double &dres2dT,double &dres3dT,//------added + const double tildefVstar, const STensor3 &kprDev, const double ppr, + const double yield, const double yield0, const double DeltaGamma, const double trNp,const double T, const double dRdT, const double lnJe) const;*/ void updatePlastic(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV, double yield, - const STensor3& F1, const STensor3& tau_prDev, const double& p_pr, + const STensor3& F1, const STensor3& tau_prDev, const double& p_pr,//------------added const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, - STensor3& Np, STensor3& NpDev, double& trNp, STensor43& Dexp) const; + STensor3& Np, STensor3& NpDev, double& trNp, STensor43& Dexp,const double T=0.) const; - void computePlasticTangentLocal(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV, + + + + void computePlasticTangentLocal(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV,//-------added for temperature const STensor3& dDeltaGammadEpr, const STensor3& dDeltaHatPdEpr, const STensor3& dDepsdEpr, const STensor3& DDeltafVDEpr, - double yield, double h, - const STensor3& tau_prDev, const double& p_pr, - const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& Dexp, + double yield, double h, const STensor3& tau_prDev, const double& p_pr,//--------------added + const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& ENp, const IPNonLocalPorosity* q0, IPNonLocalPorosity* q1, - STensor43& DKcorDEpr, STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* Epr=NULL,const double& dRdT=0.,const double& dDeltaHatPdT=0.,const double& dDeltaGammadT=0., + const double& DDepsDT=0.,double T=0.,STensor3* DKcorDT=NULL, STensor3* DFpDT=NULL//-----added ) const; - void computePlasticTangentNonLocal(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV, + void computePlasticTangentNonLocal(double DeltaGamma,double DeltaHatP, double Deps, double DeltafV,//-------added for temperature const STensor3& dDeltaGammadEpr, const STensor3& dDeltaHatPdEpr, const STensor3& dDepsdEpr, const STensor3& DDeltafVDEpr, double dDeltaGammadtildefV,double dDeltaHatPdtildefV, double DDepsDtildefV, double DDeltafVDtildefV, - double yield, double h, - const STensor3& tau_prDev, const double& p_pr, - const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& Dexp, + double yield, double h, const STensor3& tau_prDev, const double& p_pr,//------------added for temperature + const STensor3& Np, const STensor3& NpDev, double trNp, const STensor43& ENp, const IPNonLocalPorosity* q0, IPNonLocalPorosity* q1, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV + STensor43& DKcorDEpr, STensor3& DKcorDtildefV,//------added for temperature + STensor43& DFpDEpr, STensor3& DFpDtildefV,STensor3* Epr=NULL,const double& dRdT=0.,const double& dDeltaHatPdT=0.,const double& dDeltaGammadT=0., + const double& DDepsDT=0.,double T=0., STensor3* DKcorDT=NULL, STensor3* DFpDT=NULL//----------added for temperature ) const; /* * nonlocal version for system 4x4 * */ - bool plasticCorrector4x4(const STensor3& F1, const double& tildefVstar, const double& DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, + bool plasticCorrector4x4(const STensor3& F1, const double& tildefVstar,const double& DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr,//-------------modified const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, //--------------modified + STensor43& DFpDEpr, STensor3& DFpDtildefV, //-----------------------modified + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr = NULL,double T = 0., + STensor3* DKcorDT = NULL,STensor3* DFpDT = NULL,double* DfVDT = NULL//----------------modified ) const; /* * local version for system 4x4 * */ bool plasticCorrector4x4Local(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, + const STensor3& tau_prDev, const double& p_pr,//---------added const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, - STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, + STensor3& Fe1, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* Epr = NULL,double T = 0.,STensor3* DKcorDT = NULL, STensor3* DFpDT = NULL//----mod ) const; /* * nonlocal version for system 3x3 * */ - bool plasticCorrector3x3(const STensor3& F1, double tildefVstar, double DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, + bool plasticCorrector3x3(const STensor3& F1, const double& tildefVstar,const double& DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr,//-------------modified const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV - ) const; + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, //--------------modified + STensor43& DFpDEpr, STensor3& DFpDtildefV, //-----------------------modified + STensor3& DfVDEpr, double& DfVDtildefV,STensor3* Epr = NULL,double T = 0., + STensor3* DKcorDT = NULL,STensor3* DFpDT = NULL,double* DfVDT = NULL//----------------modified + ) const; /* * local version for system 3x3 * */ - bool plasticCorrector3x3Local(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, + bool plasticCorrector3x3Local(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV,//----add + const STensor3& tau_prDev, const double& p_pr, //----add const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, - STensor43& DFpDEpr + STensor43& DKcorDEpr, STensor43& DFpDEpr,STensor3* Epr = NULL,double T=0.,STensor3* DKcorDT = NULL, STensor3* DFpDT = NULL//-----add + ) const; @@ -289,16 +407,21 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity double R, double H, double kirEqSq, double ppr, double fVn, double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, - double An, double Bn) const; + double An, double Bn, double T=0.) const;//-------added void computeDResidual(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, STensor3& dres3dEpr, double &dres0dtildefV, double &dres1dtildefV, double &dres2dtildefV, double& dres3dtildefV, + double &dres0dT, double &dres1dT, double &dres2dT, double& dres3dT,//---------added double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, double R, double H, double kirEqSq, const STensor3& kprDev, double ppr, double fVn, - double DeltaGamma, double DeltaHatP, double Deps , double DeltafV) const; + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, + double dRdT=0.,double T=0.,double lnJe=0.) const; + + virtual bool isThermomechanicallyCoupled() const {return false;} + // local porosity growth by decritzing the local growth function void localPorosityGrowth(double DeltaGamma, double DeltaHatP, double Deps, @@ -313,22 +436,26 @@ class mlawNonLocalDamageGurson : public mlawNonLocalPorosity double R, double H, double kirEqSq, double ppr, double fVn, double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, - double DDeltafVDDeltaGamma, double DDeltafVDDeltaHatP, double DDeltafVDDeps) const; + double DDeltafVDDeltaGamma, double DDeltafVDDeltaHatP, double DDeltafVDDeps, double T=0.) const;//-------mod // full version void computeDResidual3x3(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, - double &dres0dtildefV, double &dres1dtildef, double &dres2dtildefV, + double &dres0dtildefV, double &dres1dtildefV, double &dres2dtildefV, + double &dres0dT, double &dres1dT, double &dres2dT,//---------mod double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, - double R, double H, + double R, double H, double kirEqSq, const STensor3& kprDev, double ppr, double fVn, - double DeltaGamma, double DeltaHatP, double Deps , double DeltafV) const; + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, + double dRdT=0., double T=0., double lnJe=0.) const; // purely local version void computeDResidual3x3(STensor3 &dres0dEpr, STensor3 &dres1dEpr, STensor3 &dres2dEpr, + double &dres0dT, double &dres1dT, double &dres2dT,//---------mod double tildefVstar, double DtildefVstarDtildefV, double DtildefVstarDfV, - double R, double H, + double R, double H, double kirEqSq, const STensor3& kprDev, double ppr, double fVn, - double DeltaGamma, double DeltaHatP, double Deps , double DeltafV) const; + double DeltaGamma, double DeltaHatP, double Deps , double DeltafV, + double dRdT=0., double T=0.,double lnJe=0.) const; void localPorosityGrowth_NonLocalEqPlastic(double DeltaGamma, double DeltaHatP, double Deps, diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageGursonFullyCoupledThermoMechanics.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamageGursonFullyCoupledThermoMechanics.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e5bacaf46772bea04503dde9de59a1d21ac0cd92 --- /dev/null +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageGursonFullyCoupledThermoMechanics.cpp @@ -0,0 +1,784 @@ +// +// C++ Interface: material law +// +// Description: nonlocal damage Gurson thermo elasto-plastic law + +// Author: <Philippe Harik>, (C) 2017 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "mlawNonLocalDamageGursonFullyCoupledThermoMechanics.h" +#include "STensorOperations.h" + +using namespace STensorOperation; + + +mlawNonLocalDamageGursonFullyCoupledThermoMechanics::mlawNonLocalDamageGursonFullyCoupledThermoMechanics(const int num,const double E,const double nu, const double rho, + const double q1, const double q2, const double q3,const double fVinitial, + const J2IsotropicHardening &j2IH,const CLengthLaw &cLLaw, + const double tol, const bool matrixbyPerturbation, const double pert): + mlawNonLocalDamageGurson(num,E,nu,rho, q1, q2, q3, fVinitial,j2IH, cLLaw, tol, matrixbyPerturbation, pert), + _TaylorQuineyFactor(0.9), + _thermalEstimationPreviousConfig(true) +{ + _ThermalConductivity = 0.; + _cp = 0.; + + // by default, no temperature dependent + _temFunc_ThermalConductivity = new constantScalarFunction(1.); + _temFunc_cp = new constantScalarFunction(1.); + // _tempFunc_alp = new constantScalarFunction(1.); + +}; + +mlawNonLocalDamageGursonFullyCoupledThermoMechanics::mlawNonLocalDamageGursonFullyCoupledThermoMechanics(const mlawNonLocalDamageGursonFullyCoupledThermoMechanics& src): mlawNonLocalDamageGurson(src){ + + + _temFunc_ThermalConductivity = NULL; + if (src._temFunc_ThermalConductivity!= NULL){ + _temFunc_ThermalConductivity = src._temFunc_ThermalConductivity->clone(); + } + + _temFunc_cp = NULL; + if (src._temFunc_cp != NULL){ + _temFunc_cp = src._temFunc_cp->clone(); + } + + _TaylorQuineyFactor = src._TaylorQuineyFactor; + _ThermalConductivity = src._ThermalConductivity; + _cp = src._cp; + + + _thermalEstimationPreviousConfig = src._thermalEstimationPreviousConfig; +}; + +mlawNonLocalDamageGursonFullyCoupledThermoMechanics::~mlawNonLocalDamageGursonFullyCoupledThermoMechanics(){ + if (_temFunc_ThermalConductivity!= NULL){ + delete _temFunc_ThermalConductivity; + } + + if (_temFunc_cp != NULL){ + delete _temFunc_cp; + } +}; +/* +void mlawNonLocalDamageGursonFullyCoupledThermoMechanics::createIPState(IPStateBase* &ips,const bool* state_,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const +{ + Msg::Error("this function is not used; IPVariable is not constructed by this law"); +} + +/*void mlawNonLocalDamageGursonFullyCoupledThermoMechanics::constitutive(const STensor3& F0, // previous deformation gradient (input @ time n) + const STensor3& F1, // current deformation gradient (input @ time n+1) + STensor3 &P1, // current 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of previous internal variables + IPNonLocalDamageGursonThermoMechanics *q1, // current array of internal variable (in ipvcur on output), + STensor43 &Tangent, // tangents (output) + const bool stiff // if true compute the tangents + ) const{ + static SVector3 gradT, temp2; + static STensor3 temp3; + static STensor33 temp33; + static double tempVal; + static STensor43 dFpdF; + //predictorCorector(F0,F1,P1,q0,q1,Tangent,dFpdF,_Tref,_Tref,gradT,gradT,temp2,temp3,temp3,temp2,temp33,tempVal, + // tempVal,temp3,tempVal,tempVal,temp3,stiff); + + +};*/ +void mlawNonLocalDamageGursonFullyCoupledThermoMechanics::constitutive(const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F, // updated deformation gradient (input @ time n+1) + STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of initial internal variable + IPNonLocalDamageGursonThermoMechanics *q, // updated array of internal variable (in ipvcur on output), + STensor43& Tangent, // mechanical tangents (output) + // STensor3 &dLocalCorrectedPorosityDStrain, + //STensor3 &dStressDNonLocalCorrectedPorosity, + //double &dLocalCorrectedPorosityDNonLocalCorrectedPorosity, + const double& T0, // previous temperature + const double& T, // temperature + const SVector3 &gradT0, // previous temeprature gradient + const SVector3 &gradT, // temeprature gradient + SVector3 &fluxT, // temperature flux + STensor3 &dPdT, // mechanical-thermal coupling + STensor3 &dfluxTdgradT, // thermal tengent + SVector3 &dfluxTdT, + STensor33 &dfluxTdF, // thermal-mechanical coupling + double &thermalSource, // - cp*dTdt + double &dthermalSourcedT, // thermal source + double &dthermalSourcedtildefVstar,//-----added + STensor3 &dthermalSourcedF, + double& mechanicalSource, // mechanical source--> convert to heat + double & dmechanicalSourcedT, + double & dmechanicalSourcedtildefVstar,//----added + STensor3 & dmechanicalSourceF, + STensor3 &dLocalPorosityDStrain, + STensor3 &dStressDNonLocalPorosity, + double &dLocalPorosityDNonLocalPorosity, + double &dLocalPorosityDT, + const bool stiff + ) const{ + if (!_tangentByPerturbation){ + static STensor43 dFpdF; + predictorCorector(F0,F,P,q0,q,Tangent, + dFpdF,T0,T,gradT0,gradT,fluxT,dPdT,dfluxTdgradT,dfluxTdT,dfluxTdF,thermalSource,dthermalSourcedT,dthermalSourcedtildefVstar, + dthermalSourcedF,mechanicalSource,dmechanicalSourcedT,dmechanicalSourcedtildefVstar, + dmechanicalSourceF,dLocalPorosityDStrain,dStressDNonLocalPorosity,dLocalPorosityDNonLocalPorosity, + dLocalPorosityDT,stiff); + + } + else{ + predictorCorector(F0,F,P,q0,q,T0,T,gradT0,gradT,fluxT,thermalSource, mechanicalSource); + + static STensor3 Fplus, Pplus; + //static IPNonLocalDamageGursonThermoMechanics qPlus(*q); + static SVector3 fluxTPlus, gradTplus; + static double thermalSourcePlus; + static double mechanicalSourcePlus; + /* static IPNonLocalDamageGursonThermoMechanics qPlus(*q0); + + //AJOUTER PERTURBATION SUR ftilde + + // perturbe F + qPlus.getRefToNonLocalPorosity() = q->getRefToNonLocalPorosity(); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + Fplus = (F); + Fplus(i,j) += _perturbationfactor; + predictorCorector(F0,Fplus,Pplus,q0,&qPlus,T0,T,gradT0,gradT,fluxTPlus,thermalSourcePlus, mechanicalSourcePlus); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + Tangent(k,l,i,j) = (Pplus(k,l) - P(k,l))/(_perturbationfactor); + } + dfluxTdF(k,i,j) = (fluxTPlus(k) - fluxT(k))/_perturbationfactor; + } + dthermalSourcedF(i,j) = (thermalSourcePlus - thermalSource)/_perturbationfactor; + dmechanicalSourceF(i,j) = (mechanicalSourcePlus - mechanicalSource)/_perturbationfactor; + dLocalPorosityDStrain(i,j) = (qPlus.getLocalPorosity() - q->getLocalPorosity())/_perturbationfactor;//-----added + //if (this->getMacroSolver()->withPathFollowing()){//------added + // q->getRefToDIrreversibleEnergyDF()(i,j) = (qPlus.plasticEnergy() - q->plasticEnergy())/_perturbationfactor;//-------added + //} + } + } + + // perturbe gradT + + double gradTpert = _perturbationfactor*T0/1e-3; + for (int i=0; i<3; i++){ + gradTplus = (gradT); + gradTplus(i) += (gradTpert); + predictorCorector(F0,F,Pplus,q0,&qPlus,T0,T,gradT0,gradTplus,fluxTPlus,thermalSourcePlus, mechanicalSourcePlus); + for (int k=0; k<3; k++){ + dfluxTdgradT(k,i) = (fluxTPlus(k) - fluxT(k))/gradTpert; + } + } + + // perturb on T + double Tplus = T+ _perturbationfactor*T0; + predictorCorector(F0,F,Pplus,q0,&qPlus,T0,Tplus,gradT0,gradT,fluxTPlus,thermalSourcePlus, mechanicalSourcePlus); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + dPdT(k,l) = (Pplus(k,l) - P(k,l))/(_perturbationfactor*T0); + } + dfluxTdT(k) = (fluxTPlus(k) - fluxT(k))/(_perturbationfactor*T0); + } + dthermalSourcedT = (thermalSourcePlus - thermalSource)/(_perturbationfactor*T0); + dmechanicalSourcedT = (mechanicalSourcePlus - mechanicalSource)/(_perturbationfactor*T0); + dLocalPorosityDT = (qPlus.getLocalPorosity() - q->getLocalPorosity())/(_perturbationfactor*T0);//-----added + + + //perturbe on non local porosity + qPlus.getRefToNonLocalPorosity() = q->getNonLocalPorosity()+_perturbationfactor*_fV_failure; + predictorCorector(F0,F,Pplus,q0,&qPlus,T0,T,gradT0,gradT,fluxTPlus,thermalSourcePlus, mechanicalSourcePlus); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + dStressDNonLocalPorosity(k,l) = (Pplus(k,l) - P(k,l))/(_perturbationfactor*_fV_failure); + } + } + dLocalPorosityDNonLocalPorosity = (qPlus.getLocalPorosity() - q->getLocalPorosity())/(_perturbationfactor*_fV_failure); + dthermalSourcedtildefVstar = (thermalSourcePlus - thermalSource)/(_perturbationfactor*_fV_failure); + dmechanicalSourcedtildefVstar = (mechanicalSourcePlus - mechanicalSource)/(_perturbationfactor*_fV_failure); + dLocalPorosityDNonLocalPorosity = (qPlus.getLocalPorosity() - q->getLocalPorosity())/(_perturbationfactor*_fV_failure); + //if (this->getMacroSolver()->withPathFollowing()){ + // ipvcur->getRefToDIrreversibleEnergyDtildefVstar() = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor*_fV_failure); + //}*/ + + } + //Tangent.print("Tangent"); +}; + +double mlawNonLocalDamageGursonFullyCoupledThermoMechanics::deformationEnergy(const STensor3& C, const double& T) const{ + double Jac= sqrt((C(0,0) * (C(1,1) * C(2,2) - C(1,2) * C(2,1)) - + C(0,1) * (C(1,0) * C(2,2) - C(1,2) * C(2,0)) + + C(0,2) * (C(1,0) * C(2,1) - C(1,1) * C(2,0)))); + double lnJ = log(Jac); + static STensor3 logCdev; + logSTensor3(C,_orderlogexp,logCdev); + double trace = logCdev.trace(); + logCdev(0,0)-=trace/3.; + logCdev(1,1)-=trace/3.; + logCdev(2,2)-=trace/3.; + + + //double KT = _K*_temFunc_K->getVal(T); + //double muT = _mu*_temFunc_mu->getVal(T); + + //lnJ -= 3.*_alp*_tempFunc_alp->getVal(T)*(T-Tr); + double Psy = bulkModulus(T)*0.5*lnJ*lnJ+shearModulus(T)*0.25*dot(logCdev,logCdev)-3.*bulkModulus(T)*ThermalExpansion(T)*(T-_referenceT)*lnJ; + return Psy; +}; + + +void mlawNonLocalDamageGursonFullyCoupledThermoMechanics::predictorCorector(const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F, // updated deformation gradient (input @ time n+1) + STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of initial internal variable + IPNonLocalDamageGursonThermoMechanics *q, // updated array of internal variable (in ipvcur on output), + const double& T0, // previous temperature + const double& T, // temperature + const SVector3 &gradT0, // previous temeprature gradient + const SVector3 &gradT, // temeprature gradient + SVector3 &fluxT, // temperature flux) + double &thermalSource, + double& mechanicalSource + ) const{ + // temp variables + static STensor43 Tangent, dFpdF; + static STensor3 dPdT, dfluxTdgradT, dthermalSourcedF, dmechanicalSourceF,dLocalPorosityDStrain,dStressDNonLocalPorosity; + static STensor33 dfluxTdF; + static SVector3 dfluxTdT; + static double dthermalSourcedT, dmechanicalSourcedT,dthermalSourcedtildefVstar,dmechanicalSourcedtildefVstar,dLocalPorosityDNonLocalPorosity,dLocalPorosityDT; + predictorCorector(F0,F,P,q0,q,Tangent,dFpdF,T0,T,gradT0,gradT,fluxT,dPdT,dfluxTdgradT,dfluxTdT,dfluxTdF, + thermalSource,dthermalSourcedT,dthermalSourcedtildefVstar,dthermalSourcedF, + mechanicalSource,dmechanicalSourcedT,dmechanicalSourcedtildefVstar,dmechanicalSourceF,dLocalPorosityDStrain,dStressDNonLocalPorosity, + dLocalPorosityDNonLocalPorosity,dLocalPorosityDT,false); +} + + +void mlawNonLocalDamageGursonFullyCoupledThermoMechanics::predictorCorector(const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F, // updated deformation gradient (input @ time n+1) + STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of initial internal variable + IPNonLocalDamageGursonThermoMechanics *q, // updated array of internal variable (in ipvcur on output), + STensor43& Tangent, // mechanical tangents (output) + //STensor3 &dLocalCorrectedPorosityDStrain, + //STensor3 &dStressDNonLocalCorrectedPorosity, + //double &dLocalCorrectedPorosityDNonLocalCorrectedPorosity, + STensor43& dFpdF, // plastic tangent + const double& T0, // previous temperature + const double& T, // temperature + const SVector3 &gradT0, // previous temeprature gradient + const SVector3 &gradT, // temeprature gradient + SVector3 &fluxT, // temperature flux + STensor3 &dPdT, // mechanical-thermal coupling + STensor3 &dfluxTdgradT, // thermal tengent + SVector3 &dfluxTdT, + STensor33 &dfluxTdF, // thermal-mechanical coupling + double &thermalSource, // - cp*dTdt + double &dthermalSourcedT, // thermal source + double &dthermalSourcedtildefVstar,//-----added + STensor3 &dthermalSourcedF, + double& mechanicalSource, // mechanical source--> convert to heat + double & dmechanicalSourcedT, + double & dmechanicalSourcedtildefVstar,//----added + STensor3 & dmechanicalSourceF, + STensor3 &dLocalPorosityDStrain,//---added + STensor3 &dStressDNonLocalPorosity,//----added + double &dLocalPorosityDNonLocalPorosity,//----added + double &dLocalPorosityDT,//-----added + const bool stiff + ) const { + + //mechanical, thermal and porosity + STensor3* dPdTP; + double* dLocalPorosityDTP; + mlawNonLocalDamageGurson::predictorCorrector(F0,F,P,q0,q,Tangent,dLocalPorosityDStrain,dStressDNonLocalPorosity, + dLocalPorosityDNonLocalPorosity,stiff,dPdTP,dLocalPorosityDTP,T0,T); + dPdT = *dPdTP; + dLocalPorosityDT = *dLocalPorosityDTP; + + + + //energy + double PlasticPower; + STensor3& Fp = q->getRefToFp(); + static STensor3 Fpinv, Fe, Ce; + inverseSTensor3(Fp,Fpinv); + multSTensor3(F,Fpinv,Fe); + multSTensor3FirstTranspose(Fe,Fe,Ce); + q->getRefToElasticEnergy()= this->deformationEnergy(Ce,T); + // plastic power (Wp1- Wp0)/dt + if (this->getTimeStep() > 0){ + // q->getRefToPlasticPower() = Deps*Sy/this->getTimeStep(); + PlasticPower = (q->plasticEnergy()-q0->plasticEnergy())/this->getTimeStep(); + } + else{ + PlasticPower = 0.; + //q->getRefToPlasticPower() = 0.; + #ifdef _DEBUG + Msg::Warning("Time step is zero in mlawJ2FullyCoupledThermoMechanics::predictorCorector"); + #endif //_DEBUG + } + // thermal energy + double KT = bulkModulus(T); + double muT = shearModulus(T); + double alpT = ThermalExpansion(T); + double conductT = _ThermalConductivity*_temFunc_ThermalConductivity->getVal(T); + double cpT = _cp*_temFunc_cp->getVal(T0); // predious --> derivatives 0 + q->_thermalEnergy = cpT*T; + + double J = 1.; + STensor3 Finv(0.); + if (_thermalEstimationPreviousConfig){ + inverseSTensor3(F0,Finv); + J = determinantSTensor3(F0); + } + else{ + inverseSTensor3(F,Finv); + J = determinantSTensor3(F); + } + static STensor3 Cinv; + multSTensor3SecondTranspose(Finv,Finv,Cinv); + multSTensor3SVector3(Cinv,gradT,fluxT); + fluxT *= (-conductT*J); + + if (this->getTimeStep() > 0.){ + thermalSource = -cpT*(T-T0)/this->getTimeStep(); + } + else { + thermalSource = 0.; + } + + mechanicalSource = 0.; + // thermoelastic heat + double DKDT = bulkModulusDerivative(T); + double DmuDT = shearModulusDerivative(T); + double DalpDT = ThermalExpansionDerivative(T); + double DconductDT = _ThermalConductivity*_temFunc_ThermalConductivity->getDiff(T); + double DcpdT = 0.; + //double HT = _j2IH->getYield0()*_temFunc_Sy0->getDiff(T) + (q->getConstRefToIPJ2IsotropicHardening().getR() - _j2IH->getYield0())*_temFunc_H->getDiff(T); + // + + // previous elastic deformation + //static STensor3 DEe; + //DEe = Ee; + //DEe -= q0->getConstRefToElasticDeformationTensor(); + // static STensor3 DFe; + if (this->getTimeStep() > 0){ + mechanicalSource += (q->getConstRefToThermoelasticCoupling()/this->getTimeStep()); + // mechanicalSource += (doubledot(DcorKirDT,DEe)*T/this->getTimeStep()); + } + + + // thermoplastic heat + mechanicalSource += _TaylorQuineyFactor*PlasticPower; + //mechanicalSource += _TaylorQuineyFactor*q->getRefToPlasticPower(); + static STensor3 dPlasticPowerDF; + static double dPlasticPowerDT; + static double dPlasticPowerDtildefVstar; + zero(dPlasticPowerDF); + zero(dPlasticPowerDT); + zero(dPlasticPowerDtildefVstar); + if (stiff){ + if (this->getTimeStep() > 0.){ + //dPlasticPowerDT = (DgammaDT*Sy + Deps*HT)/this->getTimeStep(); + dPlasticPowerDT=q->getConstRefToDIrreversibleEnergyDT()/this->getTimeStep(); + } + else{ + dPlasticPowerDT = 0.; + } + } + + dPlasticPowerDF=q->getConstRefToDIrreversibleEnergyDF(); + for(int i=0;i<3;i++){ + for(int j=0;j<3;j++){ + + dPlasticPowerDF(i,j)/=this->getTimeStep(); + } + } + dPlasticPowerDtildefVstar=q->getConstRefToDIrreversibleEnergyDtildefV()/this->getTimeStep(); + + // fluxT + dfluxTdT = fluxT; + dfluxTdT *= (DconductDT/conductT); + dfluxTdgradT = Cinv; + dfluxTdgradT *= (-conductT*J); + dfluxTdF *= 0.; + + if (!_thermalEstimationPreviousConfig){ + static const STensor43 I4(1.,1.); + static STensor3 DJDF; + static STensor43 DCinvDF; + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + DJDF(i,j) = J*Finv(j,i); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + DCinvDF(i,j,k,l) = 0.; + for (int p=0; p<3; p++){ + for (int a=0; a<3; a++){ + for (int b=0; b<3; b++){ + DCinvDF(i,j,k,l) -= 2.*F(k,p)*Cinv(i,a)*Cinv(j,b)*I4(a,b,p,l); + } + } + } + } + } + } + } + + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + dfluxTdF(i,j,k) += (DJDF(j,k)*fluxT(i)/J); + for (int l=0; l<3; l++){ + dfluxTdF(i,j,k) -= (J*DCinvDF(i,l,j,k)*gradT(l)*conductT); + } + } + }; + } + } + + + // thermal source + if (this->getTimeStep() > 0){ + dthermalSourcedT =-cpT/this->getTimeStep()-DcpdT*(T-T0)/this->getTimeStep(); + } + else{ + dthermalSourcedT = 0.; + } + dthermalSourcedF *= 0.; + dthermalSourcedtildefVstar *= 0.; + // mechanical source + dmechanicalSourcedT = _TaylorQuineyFactor*dPlasticPowerDT; + dmechanicalSourcedtildefVstar = _TaylorQuineyFactor*dPlasticPowerDtildefVstar; + dmechanicalSourceF = dPlasticPowerDF; + dmechanicalSourceF*=_TaylorQuineyFactor; + + + + + + + + /*STensor3& Fp = q->getRefToFp(); + double& eps = q->getRefToEquivalentPlasticStrain(); + + // elastic predictor + q->getRefToIPJ2IsotropicHardening() = q0->getConstRefToIPJ2IsotropicHardening(); + Fp = q0->getConstRefToFp(); + eps = q0->getConstRefToEquivalentPlasticStrain(); + + static STensor3 Fpinv, Fe, Ce; + inverseSTensor3(Fp,Fpinv); + multSTensor3(F,Fpinv,Fe); + multSTensor3FirstTranspose(Fe,Fe,Ce); + // strain + static STensor43 Lpr; + static STensor63 dLDCe; + // Compute equivalent stress + static STensor3 Eepr; + logSTensor3(Ce,_order,Eepr,&Lpr,&dLDCe); + Eepr *= 0.5; + + static STensor43 L; + L = Lpr; + STensor3& Ee = q->getRefToElasticDeformationTensor(); + Ee = Eepr; + + static STensor43 DexpA; // use for compute tangent later + + // temperature dependent material properties + double KT = _K*_temFunc_K->getVal(T); + double muT = _mu*_temFunc_mu->getVal(T); + double alpT = _alp*_tempFunc_alp->getVal(T); + double conductT = _ThermalConductivity*_temFunc_ThermalConductivity->getVal(T); + double cpT = _cp*_temFunc_cp->getVal(T0); // predious --> derivatives 0 + + // compute corotational Kirchhoff stress + static double p; + static STensor3 corKirDev; + this->stress(Ee,KT,muT,alpT,_Tref,T,p,corKirDev); + + // equivalent stress + double Seqpr = sqrt(1.5*corKirDev.dotprod()); + // plastic normal-> based on trial value + static STensor3 devEepr; + devEepr = Eepr.dev(); + double EeprEq = sqrt(devEepr.dotprod()/1.5); + static STensor3 N; + N = (devEepr); + N *= (1./EeprEq); + double Deps = 0.; + + // Test plasticity + _j2IH->hardening(eps, q->getRefToIPJ2IsotropicHardening()); + double Sy0T = _j2IH->getYield0()*_temFunc_Sy0->getVal(T); + double Sy = Sy0T + (q->getConstRefToIPJ2IsotropicHardening().getR() - _j2IH->getYield0())*_temFunc_H->getVal(T); + double H = q->getConstRefToIPJ2IsotropicHardening().getDR()*_temFunc_H->getVal(T); + + double VMcriterion = Seqpr - Sy; + if(VMcriterion >0.) + { + + int ite = 0, maxite = 1000; + while(fabs(VMcriterion)/Sy0T > _tol) + { + double coef = muT*3.+H; + double deps = VMcriterion/coef; + // + eps += deps; + // update elastic strain + Ee.daxpy(N,-deps); + this->stress(Ee,KT,muT,alpT,_Tref,T,p,corKirDev); + double Seq = sqrt(1.5*corKirDev.dotprod()); + _j2IH->hardening(eps, q->getRefToIPJ2IsotropicHardening()); + Sy = Sy0T + (q->getConstRefToIPJ2IsotropicHardening().getR() - _j2IH->getYield0())*_temFunc_H->getVal(T); + H = q->getConstRefToIPJ2IsotropicHardening().getDR()*_temFunc_H->getVal(T); + + VMcriterion = Seq-Sy; + ite++; + if(ite > maxite) + { + Msg::Fatal("No convergence for plastic correction in j2linear !!"); + break; + } + } + // update plastic strain + Deps = eps-q0->getConstRefToEquivalentPlasticStrain(); + static STensor3 DepsN; + DepsN = (N); + DepsN *= Deps; + static STensor3 expDepsN; + expSTensor3(DepsN,_order,expDepsN,&DexpA); + multSTensor3(expDepsN,q0->getConstRefToFp(),Fp); + + // update elastic strain + inverseSTensor3(Fp,Fpinv); + multSTensor3(F,Fpinv,Fe); + multSTensor3FirstTranspose(Fe,Fe,Ce); + logSTensor3(Ce,_order,Ee,&L,&dLDCe); + Ee *= 0.5; + }; + + // estimation of PK stress + static STensor3 corKir; + diag(corKir,p); + corKir += corKirDev; + static STensor3 S; + multSTensor3STensor43(corKir,L,S); + static STensor3 tempTensor23; + multSTensor3(Fe,S,tempTensor23); + multSTensor3SecondTranspose(tempTensor23,Fpinv,P);*/ + + // elastic energy + + + /*static STensor43 DcorKirDEepr; + HookeTensor(KT,muT,DcorKirDEepr); + //material properties on temperature + + static STensor3 dPlasticPowerDEepr; + static double dPlasticPowerDT; + static STensor3 dFpDT; + static STensor43 dFpDEepr; + + zero(dPlasticPowerDEepr); + zero(dPlasticPowerDT); + zero(dFpDT); + zero(dFpDEepr); + + if (Deps > 0){ + static STensor3 DgammaDEepr; + DgammaDEepr = (N); + DgammaDEepr *= (2.*muT/(3.*muT+H)); + double DgammaDT = (Seqpr/muT*DmuDT - HT-3.*DmuDT*Deps)/(3.*muT+H); + + static STensor43 BE; + tensprod(N,N,BE); + BE *= (2.*muT/(3.*muT+H)- 2.*Deps/3./EeprEq); + double val=Deps/EeprEq; + BE.axpy(val,_I4dev); + + static STensor3 BT; + BT = (N); + BT*= DgammaDT; + + // update with plasticity corKir + DcorKirDEepr.axpy(-2.*muT,BE); + DcorKirDT.daxpy(BT,-2.*muT); + + const STensor3& Fp0 = q0->getConstRefToFp(); + static STensor43 DexpABE; + multSTensor43(DexpA,BE,DexpABE); + // update with plasticity Fp + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + for (int p=0; p<3; p++){ + dFpDEepr(i,j,k,l) += DexpABE(i,p,k,l)*Fp0(p,j); + } + } + } + } + } + static STensor3 DexpABT; + multSTensor43STensor3(DexpA,BT,DexpABT); + multSTensor3Add(DexpABT,Fp0,dFpDT); + + double DPlasticPowerDgamma = 0.; + if (this->getTimeStep() > 0.){ + DPlasticPowerDgamma = (Sy + Deps*H)/this->getTimeStep(); + } + dPlasticPowerDEepr.daxpy(DgammaDEepr,DPlasticPowerDgamma);*/ + + + /*const STensor3& Fp0 = q0->getConstRefToFp(); + static STensor3 invFp0; + inverseSTensor3(Fp0,invFp0); + static STensor3 Fepr; + multSTensor3(F,invFp0,Fepr); + static STensor43 EprToF; + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + EprToF(i,j,k,l) = 0.; + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + EprToF(i,j,k,l) += Lpr(i,j,p,q)*Fepr(k,p)*invFp0(l,q); + } + } + } + } + } + }*/ + + /*static STensor43 DcorKirDF; + multSTensor43(DcorKirDEepr,EprToF,DcorKirDF);*/ + //static STensor3 dPlasticPowerDF; + //static double dPlasticPowerDtildefVstar; + /*if (Deps>0.){ + multSTensor43(dFpDEepr,EprToF,dFpdF); + multSTensor3STensor43(dPlasticPowerDEepr,EprToF,dPlasticPowerDF); + } + else{ + zero(dFpdF); + zero(dPlasticPowerDF); + }*/ + + // done DcorKirDF, DcorKirDT, DFpDF, DFpDT + + /*static STensor43 DinvFpdF; + static STensor3 DinvFpdT; + zero(DinvFpdF); + zero(DinvFpdT); + if (Deps >0){ + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + DinvFpdT(i,j) -= Fpinv(i,p)*dFpDT(p,q)*Fpinv(q,j); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + DinvFpdF(i,j,k,l) -= Fpinv(i,p)*dFpdF(p,q,k,l)*Fpinv(q,j); + } + } + } + } + } + } + } + + static STensor43 dFedF; + static STensor3 dFedT; + zero(dFedF); + zero(dFedT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + dFedF(i,j,i,k) += Fpinv(k,j); + dFedT(i,j) += F(i,k)*DinvFpdT(k,j); + if (Deps> 0){ + for (int l=0; l<3; l++){ + for (int p=0; p<3; p++){ + dFedF(i,j,k,l) += F(i,p)*DinvFpdF(p,j,k,l); + } + } + } + } + } + } + static STensor63 DLDF; + static STensor43 DLDT; + zero(DLDF); + zero(DLDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + for (int r=0; r<3; r++){ + for (int s=0; s<3; s++){ + for (int a=0; a<3; a++){ + DLDT(i,j,k,l) += dLDCe(i,j,k,l,r,s)*2.*Fe(a,r)*dFedT(a,s); + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + DLDF(i,j,k,l,p,q) += dLDCe(i,j,k,l,r,s)*2.*Fe(a,r)*dFedF(a,s,p,q); + } + } + } + } + } + } + } + } + } + // + + static STensor43 DSDF; // S = corKir:L + static STensor3 DSDT; + zero(DSDF); + zero(DSDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int r=0; r<3; r++){ + for (int s=0; s<3; s++){ + DSDT(i,j) += DcorKirDT(r,s)*L(r,s,i,j) + corKir(r,s)*DLDT(r,s,i,j); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + DSDF(i,j,k,l) += DcorKirDF(r,s,k,l)*L(r,s,i,j) + corKir(r,s)*DLDF(r,s,i,j,k,l); + } + } + } + } + } + } + + + // compute mechanical tengent + zero(Tangent); + zero(dPdT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + dPdT(i,j) += (dFedT(i,k)*S(k,l)*Fpinv(j,l) + Fe(i,k)*DSDT(k,l)*Fpinv(j,l)+Fe(i,k)*S(k,l)*DinvFpdT(j,l)); + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + Tangent(i,j,p,q) += (dFedF(i,k,p,q)*S(k,l)*Fpinv(j,l) + Fe(i,k)*DSDF(k,l,p,q)*Fpinv(j,l)+Fe(i,k)*S(k,l)*DinvFpdF(j,l,p,q)); + } + } + } + } + } + } + // + + + +*/ +}; + + diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageGursonFullyCoupledThermoMechanics.h b/NonLinearSolver/materialLaw/mlawNonLocalDamageGursonFullyCoupledThermoMechanics.h new file mode 100644 index 0000000000000000000000000000000000000000..e978232089808027d8208a7cff4c1cfecfba45ad --- /dev/null +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageGursonFullyCoupledThermoMechanics.h @@ -0,0 +1,192 @@ +// +// C++ Interface: material law +// +// Description: j2 thermo elasto-plastic Gurson law + +// Author: <P. Harik>, (C) 2017 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef MLAWNONLOCALGURSONFULLYCOUPLEDTHERMOMECHANICS_H_ +#define MLAWNONLOCALGURSONFULLYCOUPLEDTHERMOMECHANICS_H_ + +#include "mlawNonLocalDamageGurson.h" +#include "scalarFunction.h" +#include "ipNonLocalDamageGursonThermoMechanics.h" + +class mlawNonLocalDamageGursonFullyCoupledThermoMechanics : public mlawNonLocalDamageGurson +{ + #ifndef SWIG + + protected: + + + double _TaylorQuineyFactor; // for heat conversion + + double _ThermalConductivity; + double _cp; // heat capacity per unit field + scalarFunction* _temFunc_ThermalConductivity; + scalarFunction* _temFunc_cp; + + bool _thermalEstimationPreviousConfig; + //double _Tref; + STensor3 linearK; + STensor3 Stiff_alphaDilatation; + #endif //SWIG + + public: + mlawNonLocalDamageGursonFullyCoupledThermoMechanics(const int num,const double E,const double nu, const double rho, + const double q1, const double q2, const double q3, const double fVinitial, + const J2IsotropicHardening &j2IH,const CLengthLaw &cLLaw, + const double tol=1.e-8, const bool matrixbyPerturbation = false, const double pert = 1e-8); + + mlawNonLocalDamageGursonFullyCoupledThermoMechanics(const mlawNonLocalDamageGursonFullyCoupledThermoMechanics& src); + virtual ~mlawNonLocalDamageGursonFullyCoupledThermoMechanics(); + + virtual materialLaw* clone() const {return new mlawNonLocalDamageGursonFullyCoupledThermoMechanics(*this);}; + virtual bool withEnergyDissipation() const {return true;}; + + const STensor3& getConductivityTensor() const {return linearK;}; + const STensor3& getStiff_alphaDilatation() const {return Stiff_alphaDilatation;}; + + //void setReferenceTemperature(const double Tr){_Tref = Tr;}; + + void setReferenceThermalExpansionCoefficient(const double al){ + _alp = al; + Stiff_alphaDilatation*= 0.; + Stiff_alphaDilatation(0,0) = al; + Stiff_alphaDilatation(1,1) = al; + Stiff_alphaDilatation(2,2) = al; + }; + + + void setReferenceThermalConductivity(const double KK){ + _ThermalConductivity = KK; + linearK*= 0.; + linearK(0,0) = KK; + linearK(1,1) = KK; + linearK(2,2) = KK; + }; + void setTemperatureFunction_ThermalConductivity(const scalarFunction& Tfunc){ + if (_temFunc_ThermalConductivity != NULL) delete _temFunc_ThermalConductivity; + _temFunc_ThermalConductivity = Tfunc.clone(); + } + + void setReferenceCp(const double Cp) {_cp = Cp;}; + void setTemperatureFunction_Cp(const scalarFunction& Tfunc){ + if (_temFunc_cp != NULL) delete _temFunc_cp; + _temFunc_cp = Tfunc.clone(); + } + + void setThermalEstimationPreviousConfig(const bool flag){ + _thermalEstimationPreviousConfig = flag; + } + + void setTaylorQuineyFactor(const double f){_TaylorQuineyFactor = f;}; + + virtual matname getType() const{return materialLaw::nonLocalDamageGursonThermoMechanics;} + //virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const; + virtual void initLaws(const std::map<int,materialLaw*> &maplaw){}; + + virtual double getInitialExtraDofStoredEnergyPerUnitField() const {return _cp;}; + virtual double getExtraDofStoredEnergyPerUnitField(double T) const {return _cp*_temFunc_cp->getVal(T);}; + + // predictor-corrector estimation + /*virtual void constitutive(const STensor3& F0, // previous deformation gradient (input @ time n) + const STensor3& Fn, // current deformation gradient (input @ time n+1) + STensor3 &P, // current 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics*q0, // array of previous internal variables + IPNonLocalDamageGursonThermoMechanics *q1, // current array of internal variable (in ipvcur on output), + STensor43 &Tangent, // tangents (output) + const bool stiff // if true compute the tangents + ) const;*/ + virtual void constitutive(const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F1, // updated deformation gradient (input @ time n+1) + STensor3 &P1, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of initial internal variable + IPNonLocalDamageGursonThermoMechanics *q1, // updated array of internal variable (in ipvcur on output), + STensor43 &Tangent, // mechanical tangents (output) + //STensor3 &dLocalCorrectedPorosityDStrain, + //STensor3 &dStressDNonLocalCorrectedPorosity, + //double &dLocalCorrectedPorosityDNonLocalCorrectedPorosity, + const double& T0, // previous temperature + const double& T, // temperature + const SVector3 &gradT0, // previoustemeprature gradient + const SVector3 &gradT, // temeprature gradient + SVector3 &fluxT, // temperature flux + STensor3 &dPdT, // mechanical-thermal coupling + STensor3 &dfluxTdgradT, // thermal tengent + SVector3 &dfluxTdT, + STensor33 &dfluxTdF, // thermal-mechanical coupling + double &thermalSource, // - cp*dTdt + double &dthermalSourcedT, // thermal source + double &dthermalSourcedtildefVstar,//-----added + STensor3 &dthermalSourcedF, + double& mechanicalSource, // mechanical source--> convert to heat + double & dmechanicalSourcedT, + double & dmechanicalSourcedtildefVstar,//----added + STensor3 & dmechanicalSourceF, + STensor3 &dLocalPorosityDStrain, + STensor3 &dStressDNonLocalPorosity, + double &dLocalPorosityDNonLocalPorosity, + double &dLocalPorosityDT, + const bool stiff + ) const; + + protected: + double deformationEnergy(const STensor3& Ce, const double& T) const; + //unifromiser avec Gurson-> ajouter ce qui est relatif a ftilde + void predictorCorector(const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F, // updated deformation gradient (input @ time n+1) + STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of initial internal variable + IPNonLocalDamageGursonThermoMechanics *q, // updated array of internal variable (in ipvcur on output), + const double& T0, // previous temperature + const double& T, // temperature + const SVector3 &gradT0, // previous temeprature gradient + const SVector3 &gradT, // temeprature gradient + SVector3 &fluxT, // temperature flux) + double &thermalSource, + double& mechanicalSource + ) const; + + void predictorCorector(const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F1, // updated deformation gradient (input @ time n+1) + STensor3 &P1, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalDamageGursonThermoMechanics *q0, // array of initial internal variable + IPNonLocalDamageGursonThermoMechanics *q1, // updated array of internal variable (in ipvcur on output), + STensor43 &Tangent, // mechanical tangents (output) + // STensor3 &dLocalCorrectedPorosityDStrain, + //STensor3 &dStressDNonLocalCorrectedPorosity, + //double &dLocalCorrectedPorosityDNonLocalCorrectedPorosity, + STensor43 &dFpdF, // plastic tangent + const double& T0, // previous temperature + const double& T, // temperature + const SVector3 &gradT0, // previoustemeprature gradient + const SVector3 &gradT, // temeprature gradient + SVector3 &fluxT, // temperature flux + STensor3 &dPdT, // mechanical-thermal coupling + STensor3 &dfluxTdgradT, // thermal tengent + SVector3 &dfluxTdT, + STensor33 &dfluxTdF, // thermal-mechanical coupling + double &thermalSource, // - cp*dTdt + double &dthermalSourcedT, // thermal source + double &dthermalSourcedtildefVstar,//-----added + STensor3 &dthermalSourcedF, + double& mechanicalSource, // mechanical source--> convert to heat + double & dmechanicalSourcedT, + double & dmechanicalSourcedtildefVstar,//----added + STensor3 & dmechanicalSourceF, + STensor3 &dLocalPorosityDStrain, + STensor3 &dStressDNonLocalPorosity, + double &dLocalPorosityDNonLocalPorosity, + double &dLocalPorosityDT, + const bool stiff + ) const; // tangent is used by pointer, if NULL->no compute + + virtual bool isThermomechanicallyCoupled() const {return true;} + +}; + +#endif // MLAWNONLOCALDAMGEGURSONFULLYCOUPLEDTHERMOMECHANICS_H_ diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp b/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp index 32e967d9419b52914f8477bcf5513554109c8e80..531a526080182310db7da3489a5a76e4d560740b 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp @@ -24,7 +24,7 @@ mlawNonLocalPorosity::mlawNonLocalPorosity(const int num,const double E,const do _perturbationfactor(pert), _tangentByPerturbation(matrixbyPerturbation ), _fVinitial(fVinitial), _randMaxbound(1.), _randMinbound(1.), - _I4(1.,1.), _I(1.),_withSubstepping(false),_maxAttemptSubstepping(1) + _I4(1.,1.), _I(1.), _referenceT(298.), _alp(0.),_withSubstepping(false),_maxAttemptSubstepping(1) { // Internal laws _j2IH = j2IH.clone(); @@ -66,6 +66,12 @@ mlawNonLocalPorosity::mlawNonLocalPorosity(const int num,const double E,const do STensor43 mIIon3; tensprod(_I,mIon3, mIIon3); _Idev += mIIon3; + //---------------------------added + _temFunc_rho = new constantScalarFunction(1.); + _temFunc_E = new constantScalarFunction(1.); + _temFunc_nu = new constantScalarFunction(1.); + _temFunc_alp = new constantScalarFunction(1.); + //------------------------------end } @@ -82,7 +88,7 @@ mlawNonLocalPorosity::mlawNonLocalPorosity(const int num,const double E,const do _perturbationfactor(pert), _tangentByPerturbation(matrixbyPerturbation ), _fVinitial(fVinitial), _randMaxbound(1.), _randMinbound(1.), - _I4(1.,1.), _I(1.),_withSubstepping(false),_maxAttemptSubstepping(1) + _I4(1.,1.), _I(1.), _referenceT(298.), _alp(0.),_withSubstepping(false),_maxAttemptSubstepping(1) { // Internal laws _j2IH = j2IH.clone(); @@ -124,6 +130,12 @@ mlawNonLocalPorosity::mlawNonLocalPorosity(const int num,const double E,const do STensor43 mIIon3; tensprod(_I,mIon3, mIIon3); _Idev += mIIon3; + //------------------------added + _temFunc_rho = new constantScalarFunction(1.);// modified + _temFunc_E = new constantScalarFunction(1.); + _temFunc_nu = new constantScalarFunction(1.); + _temFunc_alp =new constantScalarFunction(1.); + //---------------------------end } mlawNonLocalPorosity::mlawNonLocalPorosity(const mlawNonLocalPorosity &source) : @@ -138,11 +150,9 @@ mlawNonLocalPorosity::mlawNonLocalPorosity(const mlawNonLocalPorosity &source) : _tangentByPerturbation(source._tangentByPerturbation), _fVinitial(source._fVinitial), _randMaxbound(source._randMaxbound), _randMinbound(source._randMinbound), - Cel(source.Cel), _I4(source._I4), _I(source._I), _Idev(source._Idev), + Cel(source.Cel), _I4(source._I4), _I(source._I), _Idev(source._Idev), _referenceT (source._referenceT),_alp(source._alp), //modified _withSubstepping(source._withSubstepping), _maxAttemptSubstepping(source._maxAttemptSubstepping) - - { // Internal laws // Isotropic hardening @@ -163,6 +173,26 @@ mlawNonLocalPorosity::mlawNonLocalPorosity(const mlawNonLocalPorosity &source) : // Coalescence law _coalescenceLaw = NULL; if(source._coalescenceLaw != NULL) _coalescenceLaw=source._coalescenceLaw->clone(); + //------------------------added + _temFunc_E = NULL; + if (source._temFunc_E != NULL){ + _temFunc_E = source._temFunc_E->clone(); + } + + _temFunc_rho = NULL; + if (source._temFunc_rho!= NULL){ + _temFunc_rho = source._temFunc_rho->clone(); + } + + _temFunc_nu = NULL; + if (source._temFunc_nu != NULL){ + _temFunc_nu = source._temFunc_nu->clone(); + } + _temFunc_alp = NULL; + if (source._temFunc_alp != NULL){ + _temFunc_alp = source._temFunc_alp->clone(); + } + //-----------------------------end } mlawNonLocalPorosity::~mlawNonLocalPorosity() @@ -179,6 +209,12 @@ mlawNonLocalPorosity::~mlawNonLocalPorosity() } if(_coalescenceLaw != NULL) delete _coalescenceLaw; + //---------------------added + if(_temFunc_rho != NULL) delete _temFunc_rho; _temFunc_rho = NULL; + if(_temFunc_E != NULL) delete _temFunc_E; _temFunc_E = NULL; + if(_temFunc_nu != NULL) delete _temFunc_nu; _temFunc_nu = NULL; + if(_temFunc_alp != NULL) delete _temFunc_alp; _temFunc_alp = NULL; + //-----------------------end } @@ -216,13 +252,92 @@ void mlawNonLocalPorosity::setCoalescenceLaw(const CoalescenceLaw& added_coalsLa _coalescenceLaw = added_coalsLaw.clone(); }; + +//-------------------------------added +void mlawNonLocalPorosity::setReferenceT(const double referenceT) +{ + _referenceT=referenceT; +}; + +void mlawNonLocalPorosity::setThermalExpansion(const double alp) +{ + _alp=alp; +}; +double mlawNonLocalPorosity::density(double T) const {return _rho*_temFunc_rho->getVal(T);}; +double mlawNonLocalPorosity::young(double T) const {return _E*_temFunc_E->getVal(T);}; +double mlawNonLocalPorosity::poisson(double T) const {return _nu*_temFunc_nu->getVal(T);}; +double mlawNonLocalPorosity::youngDerivative(double T) const{return _E*_temFunc_E->getDiff(T);}; +double mlawNonLocalPorosity::poissonDerivative(double T) const{return _nu*_temFunc_nu->getDiff(T);}; +double mlawNonLocalPorosity::ThermalExpansion(double T) const {return _alp*_temFunc_alp->getVal(T);}; +double mlawNonLocalPorosity::ThermalExpansionDerivative(double T) const {return _alp*_temFunc_alp->getDiff(T);}; +double mlawNonLocalPorosity::bulkModulus(double T) const +{ + double K; + K=0.5*young(T)/(1+poisson(T)); + return K; +}; +double mlawNonLocalPorosity::bulkModulusDerivative (double T) const +{ + double K_diff; + K_diff=(3.*youngDerivative(T)*(1.-2.*poisson(T))+6.*young(T)*poissonDerivative(T))/(3.*(1.-2.*poisson(T)))/(3.*(1.-2.*poisson(T))); + return K_diff; +} +; +double mlawNonLocalPorosity::shearModulus(double T) const +{ + double G; + G=young(T)/(3.*(1.-2.*poisson(T))); + return G; +}; +double mlawNonLocalPorosity::shearModulusDerivative (double T) const +{ + double G_diff; + G_diff=(0.5*youngDerivative(T)*(1.+poisson(T))-0.5*young(T)*poissonDerivative(T))/(1.+poisson(T))/(1.+poisson(T)); + return G_diff; +}; +double mlawNonLocalPorosity::lambda (double T) const +{ + double lambda; + lambda=(young(T)*poisson(T))/(1.+poisson(T))/(1.-2.*poisson(T)); + return lambda; +} +void mlawNonLocalPorosity::elasticTensor(double T) +{ + + Cel=0.; + Cel(0,0,0,0) = lambda(T) + 2.*shearModulus(T); + Cel(1,1,0,0) = lambda(T); + Cel(2,2,0,0) = lambda(T); + Cel(0,0,1,1) = lambda(T); + Cel(1,1,1,1) = lambda(T) + 2.*shearModulus(T); + Cel(2,2,1,1) = lambda(T); + Cel(0,0,2,2) = lambda(T); + Cel(1,1,2,2) = lambda(T); + Cel(2,2,2,2) = lambda(T) + 2.*shearModulus(T); + + Cel(1,0,1,0) = shearModulus(T); + Cel(2,0,2,0) = shearModulus(T); + Cel(0,1,0,1) = shearModulus(T); + Cel(2,1,2,1) = shearModulus(T); + Cel(0,2,0,2) = shearModulus(T); + Cel(1,2,1,2) = shearModulus(T); + + Cel(0,1,1,0) = shearModulus(T); + Cel(0,2,2,0) = shearModulus(T); + Cel(1,0,0,1) = shearModulus(T); + Cel(1,2,2,1) = shearModulus(T); + Cel(2,0,0,2) = shearModulus(T); + Cel(2,1,1,2) = shearModulus(T); + +} double mlawNonLocalPorosity::soundSpeed() const { double factornu = (1.-_nu)/((1.+_nu)*(1.-2.*_nu)); + //return bulkModulus(298.); return sqrt(_E*factornu/_rho); -} - +} +//----------------------------------------------------------end double mlawNonLocalPorosity::frand(const double a,const double b){ return (rand()/(double)RAND_MAX) * (b-a) + a; } @@ -235,7 +350,7 @@ void mlawNonLocalPorosity::setSubStepping(const bool fl, const int maxNumStep){ } }; -double mlawNonLocalPorosity::deformationEnergy(const double K, const double G, const STensor3 &C) const +/*double mlawNonLocalPorosity::deformationEnergy(const double K, const double G, const STensor3 &C) const { double Jac= sqrt((C(0,0) * (C(1,1) * C(2,2) - C(1,2) * C(2,1)) - C(0,1) * (C(1,0) * C(2,2) - C(1,2) * C(2,0)) + @@ -247,16 +362,57 @@ double mlawNonLocalPorosity::deformationEnergy(const double K, const double G, c logCdev(0,0)-=trace/3.; logCdev(1,1)-=trace/3.; logCdev(2,2)-=trace/3.; + //double Psy=0; + double Psy = _K*0.5*lnJ*lnJ+_mu*0.25*dot(logCdev,logCdev); + return Psy; + double Psy=deformationEnergy(C,_referenceT); + return Psy; +}*/ +//-------------------------------------------------------added +double mlawNonLocalPorosity::deformationEnergy(const STensor3 &C,const double* T) const +{ - double Psy = K*0.5*lnJ*lnJ+G*0.25*dot(logCdev,logCdev); + double Jac= sqrt((C(0,0) * (C(1,1) * C(2,2) - C(1,2) * C(2,1)) - + C(0,1) * (C(1,0) * C(2,2) - C(1,2) * C(2,0)) + + C(0,2) * (C(1,0) * C(2,1) - C(1,1) * C(2,0)))); + double lnJ = log(Jac); + static STensor3 logCdev; + STensorOperation::logSTensor3(C,_orderlogexp,logCdev); + double trace = logCdev.trace(); + logCdev(0,0)-=trace/3.; + logCdev(1,1)-=trace/3.; + logCdev(2,2)-=trace/3.; + double Psy; + if(T != NULL){ + double KT=bulkModulus(*T); + double muT=shearModulus(*T); + double alpT=ThermalExpansion(*T); + Psy = KT*0.5*lnJ*lnJ+muT*0.25*dot(logCdev,logCdev)-3.*KT*alpT*(*T-_referenceT)*lnJ; + } + else{ + Psy = _K*0.5*lnJ*lnJ+_mu*0.25*dot(logCdev,logCdev); + } return Psy; } +//--------------------------------------------------------end + -void mlawNonLocalPorosity::elasticPredictor(const double K, const double G, const STensor3& F1, const STensor3& Fppr, +//--------------------------------------------------------------added +void mlawNonLocalPorosity::elasticPredictor( const STensor3& F1, const STensor3& Fppr, STensor3& kCor, STensor3& kcorDev, double& ppr, STensor43 &dKCordEe, STensor3& Fepr, STensor3& Cepr, STensor3& Eepr, - STensor43 &Le, STensor63 &dLe, const bool stiff + STensor43 &Le, STensor63 &dLe, const bool stiff,const double* T ) const{ + double KT = _K; + double muT = _mu; + double alpT = _alp; + if(*T != 0.){ + KT=bulkModulus(*T); + muT=shearModulus(*T); + alpT=ThermalExpansion(*T); + } + //Fppr.print("F0="); + //F1.print("F1="); static STensor3 invFp0; STensorOperation::inverseSTensor3(Fppr,invFp0); STensorOperation::multSTensor3(F1,invFp0,Fepr); @@ -264,7 +420,7 @@ void mlawNonLocalPorosity::elasticPredictor(const double K, const double G, cons STensorOperation::logSTensor3(Cepr,_orderlogexp,Eepr,&Le,&dLe); Eepr *= 0.5; - corKirchhoffStress(K,G,kcorDev, ppr, Eepr); + corKirchhoffStress(kcorDev, ppr, Eepr, T); kCor = kcorDev; kCor(0,0) += ppr; kCor(1,1) += ppr; @@ -275,17 +431,17 @@ void mlawNonLocalPorosity::elasticPredictor(const double K, const double G, cons for (int j=0; j<3; j++){ for (int k=0; k<3; k++){ for (int l=0; l<3; l++){ - dKCordEe(i,j,k,l) = K*_I(i,j)*_I(k,l) + 2.*G*_Idev(i,j,k,l); + dKCordEe(i,j,k,l) = KT*_I(i,j)*_I(k,l) + 2.*muT*_Idev(i,j,k,l); } } } } } }; - -void mlawNonLocalPorosity::corKirchhoffStress(const double K, const double G, STensor3 &KirDev_, double &p, const STensor3 &E_) const +//-------------------------------------------------------------------end +/*void mlawNonLocalPorosity::corKirchhoffStress(const double K, const double G, STensor3 &KirDev_, double &p, const STensor3 &E_) const { - /* Compute Kirchoff stress for natural strain tensor */ + Compute Kirchoff stress for natural strain tensor // Pressure part double trace = E_.trace(); double val = (2.*G)*trace/3.; @@ -296,8 +452,39 @@ void mlawNonLocalPorosity::corKirchhoffStress(const double K, const double G, ST KirDev_(0,0)-=val; KirDev_(1,1)-=val; KirDev_(2,2)-=val; -}; - + corKirchhoffStress(K,G,0.,KirDev_,p,E_,_referenceT); +};*/ +//------------------------------------------------------added +void mlawNonLocalPorosity::corKirchhoffStress(STensor3 &KirDev_, double &p, const STensor3 &E_, const double* T) const +{ + /* Compute Kirchoff stress for natural strain tensor */ + // Pressure part + //--------------------added + double KT = _K; + double muT = _mu; + double alpT = _alp; + if(*T != 0.){ + KT=bulkModulus(*T); + muT=shearModulus(*T); + alpT=ThermalExpansion(*T); + } + //--------------------end + + double trace = E_.trace(); + //printf("trace = %f\n",trace); + + double val = (2.*muT)*trace/3.; + p = KT*trace-3.*alpT*KT*(*T-_referenceT); + //printf("bulk = %f,trace =%f,p=%f\n",KT,trace,p); + //printf("alpT = %f,ppr=%f\n",alpT,p); + // Deviatoric part + KirDev_ = E_; + KirDev_*= (2.*muT); + KirDev_(0,0)-=val; + KirDev_(1,1)-=val; + KirDev_(2,2)-=val; +} +//-------------------------------------------------------end void mlawNonLocalPorosity::tangentComputationLocal(STensor43& dStressDF, const bool plastic, const STensor3& F, // current F @@ -416,6 +603,105 @@ void mlawNonLocalPorosity::tangentComputationLocal(STensor43& dStressDF, } } +//-------------------------------------------------------------------------------------added +void mlawNonLocalPorosity::tangentComputationLocalWithTemperature(STensor43& dStressDF,STensor3& dStressDT, + const bool plastic, + const STensor3& F, // current F + const STensor3& corKir, // cor Kir + const STensor3& S, // second PK + const STensor3& Fepr, const STensor3& Fppr, // predictor + const STensor43& Lpr, + const STensor3& Fe, const STensor3& Fp, // corrector + const STensor43& L, const STensor63& dL, // corrector value + const STensor43& DcorKirDEepr, const STensor3& DcorKirDT, // small strain tangents + const STensor43& dFpDEepr, const STensor3& DFpDT, + const STensor43& EprToF, const STensor3& Fpinv + ) const +{ + // P = Fe. (Kcor:Le) . invFp + // need to compute dFedF, dKcordF, dinvFpdF, dLedF + //DfVstarDT = DfVDT; + static STensor3 DinvFpDT; + STensorOperation::zero(DinvFpDT);//---added + + if(plastic){ + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + DinvFpDT(i,j) -= Fpinv(i,p)*DFpDT(p,q)*Fpinv(q,j); + } + } + } + } + } + + static STensor3 dFeDT; + STensorOperation::zero(dFeDT); + + + if(plastic){ + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + dFeDT(i,j) += F(i,k)*DinvFpDT(k,j); + } + } + } + } + + static STensor43 DLDT; + STensorOperation::zero(DLDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + for (int r=0; r<3; r++){ + for (int s=0; s<3; s++){ + for (int a=0; a<3; a++){ + DLDT(i,j,k,l) += dL(i,j,k,l,r,s)*2.*Fe(a,r)*dFeDT(a,s); + } + } + } + } + } + } + } + + static STensor3 DSDT; + STensorOperation::zero(DSDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + for (int r=0; r<3; r++){ + for (int s=0; s<3; s++){ + for (int a=0; a<3; a++){ + DSDT(i,j) += DcorKirDT(r,s)*L(r,s,i,j) + corKir(r,s)*DLDT(r,s,i,j); + } + } + } + } + } + } + } + + STensorOperation::zero(dStressDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + dStressDT(i,j) += (dFeDT(i,k)*S(k,l)*Fpinv(j,l) + Fe(i,k)*DSDT(k,l)*Fpinv(j,l)+Fe(i,k)*S(k,l)*DinvFpDT(j,l)); + } + } + } + } + + tangentComputationLocal(dStressDF,plastic,F,corKir,S,Fepr,Fppr,Lpr,Fe,Fp,L,dL,DcorKirDEepr,dFpDEepr,EprToF,Fpinv); + + +} +//-------------------------------------------------------------------------------------------end void mlawNonLocalPorosity::tangentComputation(STensor43& dStressDF, STensor3& dStressDtildefV, STensor3& DfVdF, double& dfVDNonLocalPorosity, const bool plastic, @@ -552,3 +838,105 @@ void mlawNonLocalPorosity::tangentComputation(STensor43& dStressDF, STensor3& dS } } }; +//-------------------------added +void mlawNonLocalPorosity::tangentComputationWithTemperature(STensor43& dStressDF, STensor3& dStressDtildefVstar,STensor3& dStressDT, STensor3& DfVdF, double& dfVDNonLocalPorosity,double& DfVstarDT, + const bool plastic, + const STensor3& F, // current F + const STensor3& corKir, // cor Kir + const STensor3& S, // second PK + const STensor3& Fepr, const STensor3& Fppr, // predictor + const STensor43& Lpr, + const STensor3& Fe, const STensor3& Fp, // corrector + const STensor43& L, const STensor63& dL, // corrector value + const STensor43& DcorKirDEepr, const STensor3& DcorKirDtildefVstar, const STensor3& DcorKirDT, // small strain tangents + const STensor43& dFpDEepr, const STensor3& DFpDtildefVstar, const STensor3& DFpDT, + const STensor3& DfVDEpr, const double& DfVDtildefVstar,const double& DfVDT, + const STensor43& EprToF, const STensor3& Fpinv + ) const +{ + // P = Fe. (Kcor:Le) . invFp + // need to compute dFedF, dKcordF, dinvFpdF, dLedF + DfVstarDT = DfVDT; + static STensor3 DinvFpDT; + STensorOperation::zero(DinvFpDT);//---added + + if(plastic){ + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + DinvFpDT(i,j) -= Fpinv(i,p)*DFpDT(p,q)*Fpinv(q,j); + } + } + } + } + } + + static STensor3 dFeDT; + STensorOperation::zero(dFeDT); + + + if(plastic){ + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + dFeDT(i,j) += F(i,k)*DinvFpDT(k,j); + } + } + } + } + + static STensor43 DLDT; + STensorOperation::zero(DLDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + for (int r=0; r<3; r++){ + for (int s=0; s<3; s++){ + for (int a=0; a<3; a++){ + DLDT(i,j,k,l) += dL(i,j,k,l,r,s)*2.*Fe(a,r)*dFeDT(a,s); + } + } + } + } + } + } + } + + static STensor3 DSDT; + STensorOperation::zero(DSDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + for (int r=0; r<3; r++){ + for (int s=0; s<3; s++){ + for (int a=0; a<3; a++){ + DSDT(i,j) += DcorKirDT(r,s)*L(r,s,i,j) + corKir(r,s)*DLDT(r,s,i,j); + } + } + } + } + } + } + } + + STensorOperation::zero(dStressDT); + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + dStressDT(i,j) += (dFeDT(i,k)*S(k,l)*Fpinv(j,l) + Fe(i,k)*DSDT(k,l)*Fpinv(j,l)+Fe(i,k)*S(k,l)*DinvFpDT(j,l)); + } + } + } + } + + tangentComputation(dStressDF,dStressDtildefVstar,DfVdF,dfVDNonLocalPorosity,plastic,F,corKir, + S,Fepr,Fppr,Lpr,Fe,Fp,L,dL,DcorKirDEepr,DcorKirDtildefVstar,dFpDEepr, + DFpDtildefVstar,DfVDEpr,DfVDtildefVstar,EprToF,Fpinv); + + +} +//-------------------------end diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorous.h b/NonLinearSolver/materialLaw/mlawNonLocalPorous.h index 20e6752feee4d117e2e30b8a9a0be47834463a4e..503a5e4af44da943eb3c2264861cfc0dcb94702e 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorous.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorous.h @@ -18,7 +18,7 @@ #include "viscosityLaw.h" #include "STensor43.h" #include "STensor63.h" - +#include "scalarFunction.h" class mlawNonLocalPorosity: public materialLaw { @@ -41,13 +41,23 @@ class mlawNonLocalPorosity: public materialLaw double _rho; // density double _E; // young modulus double _nu; // Poisson ratio +//---------------------------------------------added + scalarFunction* _temFunc_rho; // density; + scalarFunction* _temFunc_E; // bulk modulus; + scalarFunction* _temFunc_nu; // shear modulus; +//----------------------------------------------end double _lambda; // 1st lame parameter double _mu; // 2nd lame parameter (=G) double _K; // bulk modulus double _K3; // 3*bulk modulus double _mu3; // 3*_mu = 3*G double _mu2; // 2*_mu = 2*G - +//-------------------------------------------------added + double _alp; // thermal expansion parameter + scalarFunction* _temFunc_alp; // temperature dependent + double _referenceT; +//-------------------------------------------------end + // Elastic tensor STensor43 Cel; // elastic Hook tensor @@ -80,8 +90,28 @@ class mlawNonLocalPorosity: public materialLaw virtual void setNucleationLaw(const NucleationLaw& added_gdnLaw); virtual void setScatterredInitialPorosity(double f0min, double f0max); virtual void setCoalescenceLaw(const CoalescenceLaw& added_coalsLaw); +//-------------------added + virtual void setReferenceT(const double referenceT); + virtual void setThermalExpansion(const double alp); virtual void setSubStepping(const bool fl, const int maxNumStep); + void setTemperatureFunction_rho(const scalarFunction& Tfunc){ + if (_temFunc_rho != NULL) delete _temFunc_rho; + _temFunc_rho = Tfunc.clone(); + }; + void setTemperatureFunction_E(const scalarFunction& Tfunc){ + if (_temFunc_E != NULL) delete _temFunc_E; + _temFunc_E = Tfunc.clone(); + }; + void setTemperatureFunction_nu(const scalarFunction& Tfunc){ + if (_temFunc_nu != NULL) delete _temFunc_nu; + _temFunc_nu = Tfunc.clone(); + }; + void setTemperatureFunction_alp(const scalarFunction& Tfunc){ + if (_temFunc_alp != NULL) delete _temFunc_alp; + _temFunc_alp = Tfunc.clone(); + }; +//---------------------end #ifndef SWIG static double frand(const double a,const double b); mlawNonLocalPorosity(const int num,const double E,const double nu, const double rho, @@ -91,7 +121,6 @@ class mlawNonLocalPorosity: public materialLaw mlawNonLocalPorosity(const int num,const double E,const double nu, const double rho, const double fVinitial, const J2IsotropicHardening &j2IH, const CLengthLaw &cLLaw, const double tol=1.e-8, const bool matrixbyPerturbation = false, const double pert = 1e-8); - mlawNonLocalPorosity(const mlawNonLocalPorosity &source); virtual ~mlawNonLocalPorosity(); @@ -101,8 +130,16 @@ class mlawNonLocalPorosity: public materialLaw virtual matname getType() const = 0; virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const = 0; virtual void initLaws(const std::map<int,materialLaw*> &maplaw) = 0; +//--------------------------------------------------added + virtual double density(double T) const; + virtual double young(double T) const; + virtual double poisson(double T) const; + virtual double youngDerivative(double T) const; + virtual double poissonDerivative(double T) const; + virtual double ThermalExpansion(double T) const; + virtual double ThermalExpansionDerivative(double T) const; +//---------------------------------------------------end virtual double soundSpeed() const; // default but you can redefine it for your case - virtual double density()const{return _rho;} virtual bool withEnergyDissipation() const {return true;}; virtual double scaleFactor() const { return _mu;}; @@ -112,16 +149,21 @@ class mlawNonLocalPorosity: public materialLaw const std::vector<NucleationLaw*> * getGursonDamageNucleationContainer() const {return &_gdnLawContainer;}; const viscosityLaw * getViscoplasticLaw() const {return _viscoplastlaw;}; const CoalescenceLaw* getCoalescenceLaw() const {return _coalescenceLaw;}; - - double bulkModulus() const{return _K;} - double shearModulus() const{return _mu;} +//----------------------------------------------------added + virtual double bulkModulus(double T) const; + virtual double bulkModulusDerivative (double T) const; + virtual double shearModulus(double T) const; + virtual double shearModulusDerivative (double T) const; + virtual double lambda(double T) const; + virtual void elasticTensor(double T) ; +//-----------------------------------------------------end double poissonRatio() const{return _nu;} double getInitialPorosity() const {return _fVinitial*frand(_randMinbound,_randMaxbound);} // for Ipv creation only! // Specific functions public: - virtual void constitutive( + /* virtual void constitutive( const STensor3& F0, // initial deformation gradient (input @ time n) const STensor3& Fn, // updated deformation gradient (input @ time n+1) STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) @@ -144,40 +186,40 @@ class mlawNonLocalPorosity: public materialLaw const bool stiff // if true compute the tangents ) const = 0; // loca version - + */ // depending on plastic surface, true if plastic, false otherwise - virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar) const = 0; + virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar, double T = 0.) const =0; // should return true if plasticCorrector passes successfully - virtual bool plasticCorrector(const STensor3& F1, const double& tildefVstar, const double & DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, + /*virtual bool plasticCorrector(const STensor3& F1, const double& tildefVstar, const double & DtildefVstarDtildefV, + const STensor3& tau_prDev,const STensor3& Epr, const double& p_pr, const double T, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor3& DKcorDtildefV, - STensor43& DFpDEpr, STensor3& DFpDtildefV, - STensor3& DfVDEpr, double& DfVDtildefV + STensor43& DKcorDEpr, STensor3& DKcorDtildefV, STensor3& DKcorDT, + STensor43& DFpDEpr, STensor3& DFpDtildefV, STensor3& DFpDT, + STensor3& DfVDEpr, double& DfVDtildefV,double& DfVDT ) const = 0; - - virtual bool plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, + + virtual bool plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, + const STensor3& tau_prDev,const STensor3& Epr, const double& p_pr, const double T, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& DKcorDEpr, STensor43& DFpDEpr - ) const = 0; - + STensor43& DKcorDEpr, STensor43& DFpDEpr, STensor3& DKcorDT, double& DFpDT + ) const =0; + */ // for calling - virtual double deformationEnergy(const double K, const double G, const STensor3 &C) const ; - virtual void corKirchhoffStress(const double K, const double G, STensor3 &KirDev_, double &p, const STensor3 &E_) const; - virtual void elasticPredictor(const double K, const double G, const STensor3& F1, const STensor3& Fppr, + virtual double deformationEnergy(const STensor3 &C,const double* T = NULL) const ; + virtual void corKirchhoffStress(STensor3 &KirDev_, double &p, const STensor3 &E_, const double* T) const; + virtual void elasticPredictor(const STensor3& F1, const STensor3& Fppr, STensor3& kCor, STensor3& kcorDev, double& ppr, STensor43 &dKCordEe, STensor3& Fepr, STensor3& Cepr, STensor3& Eepr, - STensor43 &Le, STensor63 &dLe, const bool stiff + STensor43 &Le, STensor63 &dLe, const bool stiff, const double* T = NULL ) const; - + virtual void tangentComputationLocal(STensor43& dStressDF, const bool plastic, @@ -192,6 +234,22 @@ class mlawNonLocalPorosity: public materialLaw const STensor43& dFpDEepr, const STensor43& EprToF, const STensor3& Fpinv ) const; + //----------------------added + virtual void tangentComputationLocalWithTemperature(STensor43& dStressDF,STensor3& dStressDT, + const bool plastic, + const STensor3& F, // current F + const STensor3& corKir, // cor Kir + const STensor3& S, // second PK + const STensor3& Fepr, const STensor3& Fppr, // predictor + const STensor43& Lpr, + const STensor3& Fe, const STensor3& Fp, // corrector + const STensor43& L, const STensor63& dL, // corrector value + const STensor43& DcorKirDEepr, const STensor3& DcorKirDT, // small strain tangents + const STensor43& dFpDEepr, const STensor3& DFpDT, + const STensor43& EprToF, const STensor3& Fpinv + ) const; + + //----------------------end virtual void tangentComputation(STensor43& dStressDF, STensor3& dStressDtildefV, @@ -209,8 +267,24 @@ class mlawNonLocalPorosity: public materialLaw const STensor3& DfVDEpr, const double& DfVDtildefV, const STensor43& EprToF, const STensor3& Fpinv ) const; +//---------------------------------------------------------------------------------------------------------added + virtual void tangentComputationWithTemperature(STensor43& dStressDF, STensor3& dStressDtildefVstar, STensor3& dStressDT, + STensor3& DLocalPorositydF, double& dLocalPorosityDtildefVstar,double& dLocalPorosityDT, + const bool plastic, + const STensor3& F, // current F + const STensor3& corKir, // cor Kir + const STensor3& S, // second PK + const STensor3& Fepr, const STensor3& Fppr, // predictor + const STensor43& Lpr, + const STensor3& Fe, const STensor3& Fp, // corrector + const STensor43& L, const STensor63& dL, // corrector value + const STensor43& DcorKirDEepr, const STensor3& DcorKirDtildefVstar, const STensor3& DcorKirDT, // small strain tangents + const STensor43& dFpDEepr, const STensor3& DFpDtildefVstar, const STensor3& DFpDT, + const STensor3& DfVDEpr, const double& DfVDtildefVstar,const double& DfVDT, + const STensor43& EprToF, const STensor3& Fpinv + ) const; - +//-----------------------------------------------------------------------------------------------------------------end #endif // SWIG }; diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.cpp b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.cpp index 7dad6c1bbcbe3105044827d0a17dec5fe190b8a3..7db4d061a0e4fc5c95c3e062dfa5f922bff040a1 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.cpp @@ -19,9 +19,8 @@ mlawNonLocalPorousThomasonLaw::mlawNonLocalPorousThomasonLaw(const int num,const 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), - _lambda0(lambda0), _n(10.), - _chi_switch(0.99), _chi_saturated(0.9995), _chi_decay(_chi_saturated-_chi_switch), _fV_Failure(0.95), - _initialGuessMethod(0), _maxite(20), _theta(1.), _kappa(1.) + _lambda0(lambda0), + _initialGuessMethod(0), _maxite(100), _theta(1.) { // modify _coalescenceLaw from default type created by mlawNonLocalPorosity::mlawNonLocalPorosity to adapted one if (_coalescenceLaw != NULL) delete _coalescenceLaw; @@ -34,10 +33,9 @@ mlawNonLocalPorousThomasonLaw::mlawNonLocalPorousThomasonLaw(const int num,const mlawNonLocalPorousThomasonLaw::mlawNonLocalPorousThomasonLaw(const mlawNonLocalPorousThomasonLaw &source) : mlawNonLocalPorosity(source), - _lambda0(source._lambda0), _n(source._n), - _chi_switch(source._chi_switch), _chi_saturated(source._chi_saturated), _chi_decay(source._chi_decay), _fV_Failure(source._fV_Failure), + _lambda0(source._lambda0), _initialGuessMethod(source._initialGuessMethod), _maxite(source._maxite), - _theta(source._theta), _kappa(source._kappa) + _theta(source._theta) { }; @@ -60,11 +58,6 @@ void mlawNonLocalPorousThomasonLaw::setCoalescenceLaw(const CoalescenceLaw& adde mlawNonLocalPorosity::setCoalescenceLaw(added_coalsLaw); }; -void mlawNonLocalPorousThomasonLaw::setYieldSurfaceExponent(const double newN) -{ - _n = newN; -}; - @@ -83,28 +76,49 @@ void mlawNonLocalPorousThomasonLaw::createIPState(IPStateBase* &ips,const bool* }; - -void mlawNonLocalPorousThomasonLaw::computeLigamentRatio(const double hatP, const double tildefV, double& chi, double& dChidhatP, double& dChidtildefV) const +double mlawNonLocalPorousThomasonLaw::computeLigamentRatio(const double hatP, const double fVstar) const { - double Chi_prime = pow(1.5*tildefV*_lambda0 , 1./3.)*exp( hatP/3.*_kappa); - dChidhatP = Chi_prime*_kappa/3.; - dChidtildefV = Chi_prime/tildefV/_kappa/3.; + double Chi = pow(1.5*fVstar*_lambda0 , 1./3.) * exp(hatP/3.); - if(Chi_prime <= _chi_switch) + if (Chi > 1.-1.e-8) { - chi = Chi_prime; + return 1.-1.e-8; + } + else if (Chi < 1.e-8) + { + return 1.e-8; } else { - double expfactor = exp((_chi_switch-Chi_prime)/_chi_decay); - chi = _chi_saturated - _chi_decay*expfactor; - dChidhatP *= expfactor; - dChidtildefV *= expfactor; + return Chi; } }; -void mlawNonLocalPorousThomasonLaw::computeConcentrationFactor(const double Chi, double& Cft, double& dCftDChi) const + +bool mlawNonLocalPorousThomasonLaw::yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *ipv, const double fVstar, double T) const +{ + // Check yield criterion + // Chi + const double hatP = ipv->getMatrixPlasticStrain(); + //const double chi = q0->getConstRefToIPCoalescence().getLigamentRatio(); + const double chi = computeLigamentRatio(hatP, fVstar); + + // Cft + double Cft = 0.; + double dc = 0.; + computeConcentrationFactor(Cft, dc, chi); + + // Yield + double yield = ipv->getConstRefToIPJ2IsotropicHardening().getR(); + + double f = (2./3.*tau_eq + p - Cft* yield ) / _j2IH->getYield0(); + return (f > _tol); +}; + + + +void mlawNonLocalPorousThomasonLaw::computeConcentrationFactor(double& Cft, double& dCftDChi, const double Chi) const { // Compute ConcentrationFactor and its derivatives double alpha = 0.1; @@ -114,970 +128,410 @@ void mlawNonLocalPorousThomasonLaw::computeConcentrationFactor(const double Chi, double ChiBis = 1.e-8; double Cft_1 = (1.-ChiBis*ChiBis); double Cft_2 = alpha*(1./ChiBis - 1.)*(1./ChiBis - 1.) + beta*pow(ChiBis,-0.5); - Cft = Cft_1*Cft_2; - + Cft = 1.5*Cft_1*Cft_2; + dCftDChi = (-2.)*ChiBis*Cft_2 + Cft_1*(2.*alpha*(1./ChiBis - 1.)*(-1./ChiBis/ChiBis) - 0.5*beta*pow(ChiBis,-1.5)); - + dCftDChi *= 1.5; } else { double Cft_1 = (1.-Chi*Chi); double Cft_2 = alpha*(1./Chi - 1.)*(1./Chi - 1.) + beta*pow(Chi,-0.5); - Cft = Cft_1*Cft_2; - + Cft = 1.5*Cft_1*Cft_2; + dCftDChi = (-2.)*Chi*Cft_2 + Cft_1*(2.*alpha*(1./Chi - 1.)*(-1./Chi/Chi) - 0.5*beta*pow(Chi,-1.5)); + dCftDChi *= 1.5; } }; -bool mlawNonLocalPorousThomasonLaw::yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *ipv, const double fVtilde) const +void mlawNonLocalPorousThomasonLaw::computeResidual(fullVector<double> &res, double& res_norm, + const double DeltaGamma, const double DeltaHatP, const double DeltafV, const double DeltaChi, + const double tpr_eq, const double p_pr, const double Cft, const double yield, + const double Chin, const double fVn, const double An, const double Bn, + const double tildefV, const double K, const double G, const double Hatpn, + const double theta, const double yield0) const { - double dChidhatP; - double dChidtildefV; - - // Check yield criterion - // Chi - const double hatP = ipv->getMatrixPlasticStrain(); - double chi = ipv->getConstRefToIPCoalescence().getLigamentRatio(); - computeLigamentRatio(hatP, fVtilde, chi, dChidhatP, dChidtildefV); - - - // Cft - double Cft = 0.; - double dc = 0.; - computeConcentrationFactor(chi, Cft, dc); - - // Yield - double yield = ipv->getConstRefToIPJ2IsotropicHardening().getR(); - - double tau_p = 2./3.*tau_eq + p; - double tau_m = 2./3.*tau_eq - p; - - double f = ( pow( pow(tau_p,_n)+pow(tau_m,_n) ,1./_n) - Cft* yield ) / _j2IH->getYield0(); - return (f > _tol); -}; + if(res.size()!=4) Msg::Error("mlawNonLocalPorousThomasonCoalescenceLaw::computeResidual: wrong size"); + + // Compute trNp + double sign_ppr = 1.; double trNp = 1.; -void mlawNonLocalPorousThomasonLaw::computeResidual(fullVector<double> &res, double& res_norm, fullMatrix<double> &J, const bool stiff, - const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, - const double Delta_d, const double Delta_q, - const double DeltaHatP, double& DeltafV, double& DeltaChi, - const double tpr_eq, const double p_pr, - const double Chin, const double fVn, - const double tildefV, const double Hatpn, - const double yield0, double& dChidtildefV, - double& dfVdDeltaD, double& dfVdDeltaQ, double& dfVdDeltaHatP) const -{ - double G = _mu; - double K = _K; - - if(res.size()!=3) Msg::Error("mlawNonLocalPorousThomasonCoalescenceLaw::computeResidual: res wrong size"); - if(J.size1()!=3) Msg::Error("mlawNonLocalPorousThomasonCoalescenceLaw::computeResidual: J wrong size"); - if(J.size2()!=3) Msg::Error("mlawNonLocalPorousThomasonCoalescenceLaw::computeResidual: J wrong size"); - - - // Compute yield - _j2IH->hardening(Hatpn+DeltaHatP, q1->getRefToIPJ2IsotropicHardening()); // this computation should be removed later as it will be done earlier - double yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); - double h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); - h *= _theta; - + // Compute NR residues + res(0) = 2./3.*(tpr_eq-G*2.*DeltaGamma) + (p_pr-K*DeltaGamma*trNp)*sign_ppr - Cft*yield; + res(1) = 2./3.*DeltaGamma*(tpr_eq-G*2.*DeltaGamma) + DeltaGamma*trNp*(p_pr-K*DeltaGamma) - (1.-fVn-DeltafV*theta)*yield*DeltaHatP; + res(2) = (1-fVn-DeltafV*theta)*DeltaGamma*trNp + An*DeltaHatP + Bn*(fVn+DeltafV*theta)*DeltaGamma - DeltafV; + res(3) = computeLigamentRatio(Hatpn+DeltaHatP,tildefV)- Chin - DeltaChi; + + res(0) /= yield0; // scaling + res(1) /= yield0; // scaling - // Compute nucleation values - double An = 0.; - double Bn = 0.; - for(int i=0; i < _gdnLawContainer.size(); i++) + res_norm = sqrt(res(0)*res(0) + res(1)*res(1) + res(2)*res(2) + res(3)*res(3)); + + // Check for errors + if ((tpr_eq-2*G*DeltaGamma) <= 0.) { - _gdnLawContainer.operator[](i)->rate(Hatpn,Hatpn+DeltaHatP,fVn,q1->getRefToIPNucleation(i)); - An += (q1->getRefToIPNucleation(i)).getDFdot(); - Bn += (q0->getConstRefToIPNucleation(i)).getExtensionGrowth(); + Msg::Error("Thomason::PlasticCorrector corrected tau_eq negative !!!! "); } - - - // Compute DeltaChi and Cft - double Chi1, dChidDeltaHatP; - computeLigamentRatio(Hatpn+DeltaHatP, tildefV, Chi1, dChidDeltaHatP, dChidtildefV); - double Cft, dCftdChi; - computeConcentrationFactor(Chi1, Cft, dCftdChi); - DeltaChi = Chi1-Chin; - /* - double Chi_prime = pow(1.5*tildefV*_lambda0 , 1./3.)*exp( (Hatpn+DeltaHatP)/3.*_kappa); - double dChidDeltaHatP = pow(1.5*tildefV*_lambda0 , 1./3.) * exp( (Hatpn+DeltaHatP)/3.*_kappa) /3.*_kappa; - double Chi1 = Chi_prime; - if(Chi_prime < _chi_failure) + if (p_pr-K*DeltaGamma <= 0.) { - Chi1 = Chi_prime; - dChidChiPrime = 1.; + Msg::Error("Thomason::PlasticCorrector p negative !!!! "); } - else + if (p_pr <= 0.) { - Chi1 = _chi_saturated + (_chi_failure-_chi_saturated)*exp(-(Chi_prime-_chi_failure)/_chi_decay); - dChidChiPrime = (_chi_saturated-_chi_failure)*exp(-(Chi_prime-_chi_failure)/_chi_decay)/_chi_decay; + Msg::Error("Thomason::PlasticCorrector p_pr negative !!!! "); } - dChidDeltaHatP *= dChidChiPrime; - +}; + + +void mlawNonLocalPorousThomasonLaw::computeJacobian(fullMatrix<double> &J, + const double DeltaGamma, const double DeltaHatP, const double DeltafV, const double DeltaChi, + const double tpr_eq, const double p_pr, const double Cft, const double yield, + const double Chin, const double fVn, const double An, const double Bn, + const double tildefV, const double K, const double G, const double Hatpn, + const double theta, const double dCftdChi, const double h, const double yield0) const +{ + if(J.size1()!=4) Msg::Error("mlawNonLocalPorousThomasonCoalescenceLaw::computeJacobian: wrong size"); + if(J.size2()!=4) Msg::Error("mlawNonLocalPorousThomasonCoalescenceLaw::computeJacobian: wrong size"); + + // Compute trNp + double sign_ppr = 1.; double trNp = 1.; + + // Compute NR Jacobian + J(0,0) = -4./3.*G - K*trNp*sign_ppr; + J(0,1) = - h * Cft; + J(0,2) = 0.; + J(0,3) = -yield * theta * dCftdChi; + + J(1,0) = 2./3.*(tpr_eq - 4.*G*DeltaGamma) + p_pr*trNp - 2*K*DeltaGamma*trNp; + J(1,1) = -(1.-fVn-theta*DeltafV)*(yield+h*DeltaHatP); + J(1,2) = yield*DeltaHatP*theta; + J(1,3) = 0.; + + J(2,0) = (1.-fVn-theta*DeltafV)*trNp + Bn*(fVn+theta*DeltafV); + J(2,1) = An; + J(2,2) = -DeltaGamma*theta+theta*Bn*DeltaGamma-1.; + J(2,3) = 0.; + + J(3,0) = 0.; + J(3,1) = pow( (1.5*tildefV*_lambda0), 1./3. ) /3. * exp((Hatpn+DeltaHatP)/3.); + J(3,2) = 0.; + J(3,3) = -1.;//-1.; + + J(0,0) /= yield0; // scaling + J(0,1) /= yield0; // scaling + J(0,2) /= yield0; // scaling + J(0,3) /= yield0; // scaling + + J(1,0) /= yield0; // scaling + J(1,1) /= yield0; // scaling + J(1,2) /= yield0; // scaling + J(1,3) /= yield0; // scaling +}; + + + + +void mlawNonLocalPorousThomasonLaw::constitutive( + const STensor3& F0, // initial deformation gradient (input @ time n) + const STensor3& F1, // updated deformation gradient (input @ time n+1) + STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) + const IPNonLocalPorosity *ipvprev, // array of initial internal variable + IPNonLocalPorosity *ipvcur, // updated array of internal variable (in ipvcur on output), + STensor43 &Tangent, // constitutive tangents (output) + STensor3 &dLocaldPorosityDStrain, + STensor3 &dStressDNonLocalPorosity, + double &dLocalPorosityDNonLocalPorosity, + const bool stiff // if true compute the tangents + ) const +{ - double Cft, dCftdChi; -*/ + // Get and set ipv cur to prev values + ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); + ipvcur->getRefToFp() = ipvprev->getConstRefToFp(); + ipvcur->getRefToMatrixPlasticStrain() = ipvprev->getMatrixPlasticStrain(); + ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy(); - // Compute DeltafV - DeltafV = ( (1-fVn)*Delta_q + An*DeltaHatP + Bn*fVn*Delta_d ) / (1.+_theta*(Delta_q-Bn*Delta_d) ); - dfVdDeltaD = (Bn*fVn)/(1.+_theta*(Delta_q-Bn*Delta_d)) - +_theta*Bn*((1-fVn)*Delta_q+An*DeltaHatP+Bn*fVn*Delta_d)/(1.+_theta*(Delta_q-Bn*Delta_d))/(1.+_theta*(Delta_q-Bn*Delta_d)); - dfVdDeltaQ = (1-fVn)/(1.+_theta*(Delta_q-Bn*Delta_d)) - -_theta*((1-fVn)*Delta_q+An*DeltaHatP+Bn*fVn*Delta_d)/(1.+_theta*(Delta_q-Bn*Delta_d))/(1.+_theta*(Delta_q-Bn*Delta_d)); - dfVdDeltaHatP = An*DeltaHatP / (1.+_theta*(Delta_q-Bn*Delta_d)); - // Control fV growth - if (fVn+DeltafV > _fV_Failure) - { - double fv_saturated = 0.999; - double fv_decay = fv_saturated-_fV_Failure; - double fvnew = fv_saturated + (_fV_Failure-fv_saturated)*exp(-(fVn+DeltafV-_fV_Failure)/fv_decay); - double ratdfV = (fv_saturated-_fV_Failure)/fv_decay*exp(-(fVn+DeltafV-_fV_Failure)/fv_decay); - DeltafV = fvnew-fVn; - dfVdDeltaD *= ratdfV; - dfVdDeltaQ *= ratdfV; - dfVdDeltaHatP *= ratdfV; - Msg::Info("fV corr 1"); - } - else if(fVn+DeltafV < 1.e-6) - { - double fv_saturated = 0.; - double fv_decay = -(fv_saturated-1.e-6); - double fvnew = fv_saturated + (1.e-6-fv_saturated)*exp((fVn+DeltafV-1.e-6)/fv_decay); - double ratdfV = (1.e-6-fv_saturated)/fv_decay*exp((fVn+DeltafV-1.e-6)/fv_decay); - DeltafV = fvnew-fVn; - dfVdDeltaD *= ratdfV; - dfVdDeltaQ *= ratdfV; - dfVdDeltaHatP *= ratdfV; - Msg::Info("fV corr 2"); - } + // Non-local length law + _cLLaw->computeCL(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPCLength()); + + + // Hardening law => yield shoud just be copy-pasted if elastic loading and not recomputed each step + _j2IH->hardening(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPJ2IsotropicHardening()); - // Compute NR residues - double tau_p = ( 2./3.*(tpr_eq-G*2.*Delta_d) + p_pr - K*Delta_q )/yield0; - double tau_m = ( 2./3.*(tpr_eq-G*2.*Delta_d) - p_pr + K*Delta_q )/yield0; - double tau_pN = pow(tau_p,_n); - double tau_mN = pow(tau_m,_n); - - res(0) = pow(tau_pN+tau_mN, 1./_n) - Cft*yield/yield0; - res(1) = tau_pN/tau_p *(Delta_d-Delta_q) - tau_mN/tau_m *(Delta_d+Delta_q); - res(2) = 2./3.*Delta_d*(tpr_eq-G*2.*Delta_d) + Delta_q*(p_pr-K*Delta_q) - (1.-_fVinitial)*yield*DeltaHatP; - res(2) /= yield0; // scaling - // Norm - res_norm = sqrt(res(0)*res(0) + res(1)*res(1) + res(2)*res(2)); - - - - // Compute Jacobian - J(0,0) = pow( tau_pN+tau_mN, 1./_n-1.)*(tau_pN/tau_p + tau_mN/tau_m)*(-4./3.*G)/yield0; - J(0,1) = pow( tau_pN+tau_mN, 1./_n-1.)*(tau_pN/tau_p - tau_mN/tau_m)*(-K)/yield0; - J(0,2) = -h*Cft/yield0 - yield*_theta*dCftdChi*dChidDeltaHatP/yield0; - - J(1,0) = tau_pN/tau_p-tau_mN/tau_m -4./3.*G/yield0*(_n-1)*(tau_pN/tau_p/tau_p*(Delta_d-Delta_q) - tau_mN/tau_m/tau_m*(Delta_d+Delta_q) ) ; - J(1,1) = -tau_pN/tau_p-tau_mN/tau_m -K/yield0*(_n-1)*(tau_pN/tau_p/tau_p*(Delta_d-Delta_q) + tau_mN/tau_m/tau_m*(Delta_d+Delta_q) ) ; - J(1,2) = 0.; - - J(2,0) = 2./3.*(tpr_eq - 4.*G*Delta_d); - J(2,1) = p_pr - 2*K*Delta_q; - J(2,2) = yield*_theta*DeltaHatP*dfVdDeltaHatP-(1.-_fVinitial)*(yield+h*DeltaHatP); - J(2,0) /= yield0; // scaling - J(2,1) /= yield0; // scaling - J(2,2) /= yield0; // scaling -}; - - -bool mlawNonLocalPorousThomasonLaw::plasticCorrector(const STensor3& F1, const double& fVtilde, const double & DtildefVstarDtildefV, - const STensor3& tau_prDev, const double& p_pr, - const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, - STensor3& tau_cor, STensor3& Fp1, double& fV1, - STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, - const bool stiff, - STensor43& Dtau_DEpr, STensor3& Dtau_DfVtilde, - STensor43& DFp_DEpr, STensor3& DFp_DfVtilde, - STensor3& DfV_DEpr, double& DfV_DfVtilde - ) const -{ - double yield0 = _j2IH->getYield0(); // for scaling - double tau_preq = sqrt(1.5*tau_prDev.dotprod()); - double _G = _mu; + // Initialise variables + const STensor3& Fp0 = ipvprev->getConstRefToFp(); + STensor3& Fp1 = ipvcur->getRefToFp(); + double& fV1 = ipvcur->getRefToLocalPorosity(); + STensor3& Ee = ipvcur->getRefToElasticDeformation(); + + static STensor3 kcorprDev, Fe, Fepr, Ce, Cepr, Epr; + static double ppr; + static STensor43 Lepr, Le; + static STensor63 dLepr, dLe; + + static STensor3 corKir, corKirpr; + static STensor43 DcorKirprDEpr,DcorKirDEpr, DFpDEpr; + static STensor3 DcorKirDtildefVstar, DFpDtildefVstar, DfVDEpr; + static double DfVDtildefVstar; + double T = 0.;//------added + + // Elastic predictor + this->elasticPredictor(F1,Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff);//-----mod - // unknows to compute - double Delta_d = 0.; - double Delta_q = 0.; - double DeltaHatP = 0.; + double yield = ipvcur->getRefToIPJ2IsotropicHardening().getR(); + double kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); - // others variables - double DeltaGamma = 0.; - double DeltafV = 0.; - double DeltaChi = 0.; + double tildefV = ipvcur->getNonLocalPorosity(); + double tildefVPrev = ipvprev->getNonLocalPorosity(); - // derivatives - double dChidtildefV = 1.; - double dfVdDeltaD = 0.; - double dfVdDeltaQ = 0.; - double dfVdDeltaHatP = 0.; + double fVtildeStarPrev = ipvprev->getCorrectedPorosity(); + double& fVtildeStar = ipvcur->getRefToCorrectedPorosity(); + fVtildeStar = tildefV; - // get internal variables and IPVs - // IPCoalescence - //const IPThomasonCoalescence* q0Coal = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); - //IPThomasonCoalescence* q1Coal = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); - //if (q0Coal == NULL){Msg::Fatal("ThomasonCoalescenceLaw::PlasticCorrector - problem in ipv coalescence conversion");}; - //if (q1Coal == NULL){Msg::Fatal("ThomasonCoalescenceLaw::PlasticCorrector - problem in ipv coalescence conversion");}; - // hat p - const double hatP0 = q0->getMatrixPlasticStrain(); - double& hatP1 = q1->getRefToMatrixPlasticStrain(); - hatP1 = hatP0; - // porosity - const double fV0 = q0->getLocalPorosity(); - fV1 = fV0; - // chi - double Chi0; - double dChidHatP; - computeLigamentRatio(hatP0,fVtilde,Chi0,dChidHatP,dChidtildefV); // should be moved somewhere else before in yield testing - double& Chi1 = q1->getRefToIPCoalescence().getRefToLigamentRatio(); - Chi1 = Chi0; - // Initial guess - if (_initialGuessMethod == 0) - { - DeltaGamma = 0.; - Delta_d = 0.; - Delta_q = 0.; - DeltaHatP = 0.; - } - else if (_initialGuessMethod == 1) - { - /*computeConcentrationFactor(Cft, dCftdChi, Chi0); - DeltaGamma = (2/3*tau_preq+p_pr-Cft*yield)/(4/3*_mu+_K); - DeltaHatP = DeltaGamma/(1-fV0); - DeltafV = (1-fV0)*DeltaGamma; - DeltaChi = (exp(DeltaHatP/3)-1)*Chi0;*/ - } - else if (_initialGuessMethod == 2) - { - DeltaGamma = 0.; - Delta_d = 0.; - Delta_q = 0.; - DeltaHatP = 0.; - } - else - { - Msg::Fatal("ThomasonCoalescenceLaw::_initialGuessMethod = %d not implemented !", _initialGuessMethod); - } - - // First residues - int ite = 0; // counter of iteration - // Residual vector - static fullVector<double> res(3); // vector - double res_norm = 0.; // norm - // Jacobian for predictor-corrector variables - static fullMatrix<double> J(3,3); J.setAll(0.); - // Compute residues - computeResidual(res, res_norm, J, stiff, q0, q1, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - tau_preq, p_pr, Chi0, fV0, fVtilde, hatP0, yield0, dChidtildefV, - dfVdDeltaD, dfVdDeltaQ, dfVdDeltaHatP); + // Coalesence + double& Chi = ipvcur->getRefToLigamentRatio(); + Chi = computeLigamentRatio(ipvprev->getMatrixPlasticStrain(), tildefV); + ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = false; - // Iterative NR procedure - while( res_norm > _tol or ite <1) - { - // Solving - static fullVector<double> sol(3); sol.setAll(0.); - bool solvelu = J.luSolve(res, sol); - if (!solvelu) {Msg::Fatal("ThomasonCoalescenceLaw::corrector No solution from J !!");}; - // Correction - // - Delta d correction - if (Delta_d-sol(0) <= 0.) // avoid negative values - { - Msg::Info("corr sol(0) - cas1"); - Delta_d *= 0.1; - } - else if (Delta_d-sol(0) >= tau_preq/2./_G) - { - Msg::Info("corr sol(0) - cas2"); - Delta_d = tau_preq/2./_G; - } - else if (sol(0) < -0.1) // avoid too large variation - { - Msg::Info("corr sol(0) - cas3"); - Delta_d += 0.1; - } - else - { - Delta_d -= sol(0); - } + // Plastic correction if needed + bool plastic = yieldFunction(kCorPrEq,ppr,ipvprev,fVtildeStar); + bool correctorOK = false; + + + if (plastic){ /* - // - Delta q correction - if( p_pr >= 0.) - { - if ( p_pr - _K*(Delta_q-sol(1)) <= 0. ) - { - Msg::Info("corr sol(1) - cas1+"); - Delta_q = p_pr/_K; - } - else if (Delta_q-sol(1) < 0.) // avoid negative values - { - Msg::Info("corr sol(1) - cas2+"); - Delta_q = 0.; - } - else if (sol(1) < -0.1) // avoid too large variation - { - Msg::Info("corr sol(1) - cas3+"); - Delta_q += 0.1; - } - else - { - Delta_q -= sol(1); - } - - } - else - { - if ( p_pr - _K*(Delta_q-sol(1)) >= 0. ) - { - Msg::Info("corr sol(1) - cas1-"); - Delta_q = p_pr/_K; - } - else if (Delta_q-sol(1) > 0.) // avoid negative values - { - Msg::Info("corr sol(1) - cas2-"); - Delta_q = 0.; - } - else - { - Delta_q -= sol(1); - } - }*/ + double pert = 1.e-8; + STensor3 tau_pert = kcorprDev; + //tau_pert(1,0) += pert*_mu; + tau_pert(0,0) += 2/3*pert*_mu; + tau_pert(1,1) -= 1/3*pert*_mu; + tau_pert(2,2) -= 1/3*pert*_mu; + plasticCorrector(F1,fVtildeStar,1.,tau_pert,ppr+pert*_K,ipvprev,ipvcur, + //plasticCorrector(F1,fVtildeStar,1.,tau_pert,ppr,ipvprev,ipvcur, + corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, + stiff, DKcorDEpr, DKcorDtildefVstar, + DFpDEpr,DFpDtildefVstar, + DfVDEpr, DfVDtildefVstar); + + double data_pert = corKir(1,0); double data_pert2 = corKir(0,0); + */ + ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = true; + correctorOK = plasticCorrector(F1,fVtildeStar,1.,kcorprDev,ppr,ipvprev,ipvcur, + corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, + stiff, DcorKirDEpr, DcorKirDtildefVstar, + DFpDEpr,DFpDtildefVstar, + DfVDEpr, DfVDtildefVstar);//-------mod + /* + double derivee = DKcorDEpr(1,0,0,0); double derivee2 = DKcorDEpr(0,0,0,0); + double data = corKir(1,0); double data2 = corKir(0,0); + + if (stiff){ + Msg::Info("DfVDEpr num = %e and analy = %e ",(data_pert-data)/pert , derivee); + Msg::Info("2 DfVDEpr num = %e and analy = %e ",(data_pert2-data2)/pert , derivee2); + } + */ + } + else{ + STensorOperation::zero(DFpDEpr); + STensorOperation::zero(DcorKirDtildefVstar); + STensorOperation::zero(DFpDtildefVstar); + STensorOperation::zero(DfVDEpr); + DfVDtildefVstar = 0.; - if (sol(1) > 0.1) // avoid negative values - { - Msg::Info("corr sol(1) - cas2"); - Delta_q -= 0.1; - } - else if (sol(1) < -0.1) // avoid too large variation - { - Msg::Info("corr sol(1) - cas3"); - Delta_q += 0.1; - } - else - { - Delta_q -= sol(1); - } - - - // - DeltaHatP correction - if (DeltaHatP-sol(2) <= 0.) // avoid negative values - { - Msg::Info("corr sol(2) - cas1"); - DeltaHatP *= 0.1; - } - else if (sol(2) <= -0.3) - { - Msg::Info("corr sol(2) - cas2"); - DeltaHatP += 0.3; - } - else - { - DeltaHatP -= sol(2); - } - - - // Recompute residues before checking for convergence - computeResidual(res, res_norm, J, stiff, q0, q1, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - tau_preq, p_pr, Chi0, fV0, fVtilde, hatP0, yield0, dChidtildefV, - dfVdDeltaD, dfVdDeltaQ, dfVdDeltaHatP); - - // Control of iteration number - ite ++; - if(ite > _maxite) - { - Msg::Error(" Final residu = %e, %e, %e, n %e", res(0), res(1), res(2), res_norm); - //Msg::Error(" Initial residu = %e, %e, %e", resinit(0), resinit(1), resinit(2)); - Msg::Error(" Deltad = %e ,Deltaq = %e ,DeltaHatP = %e ,DeltafV = %e ,DeltaChi = %e", Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi); - double Cft, dCftdChi; - computeConcentrationFactor(Chi1, Cft, dCftdChi); - Msg::Error(" tau_preq = %e ,p_pr = %e ,chi0 = %e ,fV0 = %e, Cft = %e", tau_preq/yield0, p_pr/yield0, Chi0, fV0, Cft); - Msg::Error("No convergence for plastic correction in coalescence !!"); - return false; - } -/* - // Debug - //Msg::Info(" Residu at ite %d = %e , %e , %e , %e , %e norm %e", ite, res(0), res(1), res(2), res(3), res(4), res_norm); - computeResidual(res, res_norm, J, stiff, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - tau_preq, p_pr, yield, Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, h, yield0, ratdfV, ratdChi); - static fullVector<double> res_pert(3); - double pert = 1e-8; - _j2IH->hardening(hatP0+DeltaHatP+pert, q1->getRefToIPJ2IsotropicHardening()); // this computation should be removed later as it will be done earlier - yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); - h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); - computeResidual(res_pert, res_norm, J, stiff, Delta_d, Delta_q, DeltaHatP+pert, DeltafV, DeltaChi, - tau_preq, p_pr, yield, Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, h, yield0, ratdfV, ratdChi); - _j2IH->hardening(hatP0+DeltaHatP, q1->getRefToIPJ2IsotropicHardening()); // this computation should be removed later as it will be done earlier - yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); - h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); - computeResidual(res, res_norm, J, stiff, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - tau_preq, p_pr, yield, Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, h, yield0, ratdfV, ratdChi); - Msg::Info("Analytic J1= %e, J2 = %e, J3= %e", J(0,2), J(1,2), J(2,2)); - Msg::Info("Num J1= %e, J2 = %e, J3= %e", (res_pert(0)-res(0))/pert , (res_pert(1)-res(1))/pert, (res_pert(2)-res(2))/pert); -*/ - - } - - - // Apply increment on internal variables - hatP1 += DeltaHatP; - fV1 += DeltafV; - Chi1 += DeltaChi; - - // dissipation energy - double& plasticEnergy = q1->getRefToPlasticEnergy(); - double yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); - plasticEnergy += (1-fV1)*yield*DeltaHatP; - - - // Compute plastic correction - double tau_p = (2./3.*(tau_preq-_mu*2.*Delta_d) + p_pr - _K*Delta_q)/yield0; - double tau_m = (2./3.*(tau_preq-_mu*2.*Delta_d) - p_pr + _K*Delta_q)/yield0; - double tau_pN = pow(tau_p,_n); - double tau_mN = pow(tau_m,_n); - double tau_n = pow( tau_pN+tau_mN,1./_n-1.)*(tau_pN/tau_p+tau_mN/tau_m); - DeltaGamma = Delta_d / tau_n; - double trNp = Delta_q / DeltaGamma; - - static STensor3 Np, Npdev,DGNp, DGNpdev; - Np *=0; - Npdev *= 0.; - - DGNpdev = tau_prDev; - DGNpdev *= Delta_d/tau_preq; - DGNp = DGNpdev; - DGNp(0,0) += Delta_q/3.; - DGNp(1,1) += Delta_q/3.; - DGNp(2,2) += Delta_q/3.; - + Le = Lepr; + Fe = Fepr; + }; - // Compute stress - tau_cor = DGNpdev; - tau_cor *= (-2.*_G); - tau_cor += tau_prDev; - tau_cor(0,0) += p_pr - _K*Delta_q; - tau_cor(1,1) += p_pr - _K*Delta_q; - tau_cor(2,2) += p_pr - _K*Delta_q; + //Msg::Info("State %d : hatP prev %e %e, tildefV prev %e %e, Chi prev %e %e", plastic,ipvprev->getMatrixPlasticStrain(), ipvcur->getMatrixPlasticStrain(), + //tildefVPrev, tildefV, computeLigamentRatio(ipvprev->getMatrixPlasticStrain(),tildefVPrev), computeLigamentRatio(ipvcur->getMatrixPlasticStrain(),tildefV) ); - //q1->getRefToLocalCorrectedPorosity() = fV1; - //compute here the extended damage growth to be used at next time step - // this is an approximation to facilitate the convergence - for(int i=0; i < _gdnLawContainer.size(); i++) - { - _gdnLawContainer[i]->rate(hatP1,hatP0,fV0,q1->getRefToIPNucleation(i)); - _gdnLawContainer[i]->extensionGrowth(tau_cor, DGNpdev, q1->getRefToIPNucleation(i)); - } + // In case of corrector error: + if (!correctorOK){ + if (plastic){ + // reset variables to prev + ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); + ipvcur->getRefToFp() = ipvprev->getConstRefToFp(); + ipvcur->getRefToMatrixPlasticStrain() = ipvprev->getMatrixPlasticStrain(); + ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy(); + } + + if (stiff){ + STensorOperation::zero(DFpDEpr); + STensorOperation::zero(DcorKirDtildefVstar); + STensorOperation::zero(DFpDtildefVstar); + STensorOperation::zero(DfVDEpr); + DfVDtildefVstar = 0.; + DcorKirDEpr = DcorKirprDEpr; + } + + // elastic only + corKir = corKirpr; + Fe = Fepr; + Ce = Cepr; + Ee = Epr; + Le = Lepr; + dLe = dLepr; + }; - // Plastic increment - static STensor3 dFp; - static STensor43 ENp; - // dFp = exp(DeltaGamma*Np) - STensorOperation::expSTensor3(DGNp,_orderlogexp,dFp, &ENp); - // Fp1 = dFp * Fp0 - const STensor3& Fp0 = q0->getConstRefToFp(); - STensorOperation::multSTensor3(dFp,Fp0,Fp1); - // Fe1 = F1 * Fp1^-T - static STensor3 Fp1_inv; - STensorOperation::inverseSTensor3(Fp1, Fp1_inv); - STensorOperation::multSTensor3(F1,Fp1_inv,Fe); - // Ce = Fe1^T * Fe1 - STensorOperation::multSTensor3FirstTranspose(Fe,Fe,Ce); - // Ee = ln(sqrt(Ce)) - STensorOperation::logSTensor3(Ce,_orderlogexp,Ee,&Le,&dLe); - Ee *= 0.5; + // update first PK stress + static STensor3 S, FeS, invFp; + STensorOperation::inverseSTensor3(Fp1,invFp); + STensorOperation::multSTensor3STensor43(corKir,Le,S); + STensorOperation::multSTensor3(Fe,S,FeS); + STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); - /* Stiffness computation */ - if (stiff) - { - computeResidual(res, res_norm, J, stiff, q0, q1, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - tau_preq, p_pr, Chi0, fV0, fVtilde, hatP0, yield0, dChidtildefV, - dfVdDeltaD, dfVdDeltaQ, dfVdDeltaHatP); - - // Compute internal variables derivatives from residual derivatives - static fullMatrix<double> Jinv(3,3); Jinv.setAll(0.); - bool solve = J.invert(Jinv); - if (solve == false){Msg::Fatal("ThomasonCoalescenceLaw::PlasticCorrector: no inversion of J in stiff !!");}; - - // Compute residual derivatives - static STensor3 dres0dEpr, dres1dEpr, dres2dEpr; + if (stiff){ - double fac0p = pow( tau_pN+tau_mN, 1./_n-1.)*( tau_pN/tau_p + tau_mN/tau_m )/yield0; - double fac0m = pow( tau_pN+tau_mN, 1./_n-1.)*( tau_pN/tau_p - tau_mN/tau_m )/yield0; - double fac1m = (_n-1.)*( tau_pN/tau_p/tau_p*(Delta_d-Delta_q) - tau_mN/tau_m/tau_m*(Delta_d+Delta_q) )/yield0; - double fac1p = (_n-1.)*( tau_pN/tau_p/tau_p*(Delta_d-Delta_q) + tau_mN/tau_m/tau_m*(Delta_d+Delta_q) )/yield0; - for( int i=0; i<3; i++){ - for( int j=0; j<3; j++) - { - dres0dEpr(i,j) = 0.; - dres1dEpr(i,j) = 0.; - dres2dEpr(i,j) = 0.; - - dres0dEpr(i,j) += fac0m * _K * _I(i,j); - dres1dEpr(i,j) += fac1p * _K * _I(i,j); - dres2dEpr(i,j) += _K * Delta_q * _I(i,j); - - for( int k=0; k<3; k++){ - for( int l=0; l<3; l++) - { - dres0dEpr(i,j) += fac0p* 2.*_G/tau_preq * tau_prDev(k,l)* _Idev(k,l,i,j); - dres1dEpr(i,j) += fac1m* 2.*_G/tau_preq * tau_prDev(k,l)* _Idev(k,l,i,j); - dres2dEpr(i,j) += 2.*_G/tau_preq * Delta_d * tau_prDev(k,l)* _Idev(k,l,i,j); + static STensor3 invFp0; + STensorOperation::inverseSTensor3(Fp0,invFp0); + static STensor43 EprToF; + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + EprToF(i,j,k,l) = 0.; + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + EprToF(i,j,k,l) += Lepr(i,j,p,q)*Fepr(k,p)*invFp0(l,q); + } + } } } } } - double Cft, dCftdChi; - computeConcentrationFactor(Chi1, Cft, dCftdChi); - double dres0dfVtilde = -yield/yield0*dCftdChi*dChidtildefV; - double dres1dfVtilde = 0.; - double dres2dfVtilde = 0.; - - /* - double pert = 1.e-8; - STensor3 tau_pert = tau_prDev; - tau_pert(0,0) += 2/3*pert*_G*2.; - tau_pert(1,1) -= 1/3*pert*_G*2.; - tau_pert(2,2) -= 1/3*pert*_G*2.; - //tau_pert(2,1) += pert*2*_G; - static fullVector<double> res_pert(3); - computeResidual(res_pert, res_norm, J, stiff, q0, q1, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - sqrt(1.5*tau_pert.dotprod()), p_pr+_K*pert, Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, yield0, ratdChi, - dfVdDeltaD, dfVdDeltaQ, dfVdDeltaHatP); - computeResidual(res, res_norm, J, stiff, q0, q1, Delta_d, Delta_q, DeltaHatP, DeltafV, DeltaChi, - tau_preq, p_pr, Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, yield0, ratdChi, - dfVdDeltaD, dfVdDeltaQ, dfVdDeltaHatP); - - Msg::Info("Analytic J1= %e, J2 = %e, J3= %e", dres0dEpr(0,0), dres1dEpr(0,0), dres2dEpr(0,0)/yield0); - Msg::Info("Num J1= %e, J2 = %e, J3= %e", (res_pert(0)-res(0))/pert, (res_pert(1)-res(1))/pert, (res_pert(2)-res(2))/pert); - - //Msg::Info("Analytic J1= %e, J2 = %e, J3= %e", dres0dfVtilde, dres1dfVtilde, dres2dfVtilde/yield0); - //Msg::Info("Num J1= %e, J2 = %e, J3= %e", (res_pert(0)-res(0))/pert, (res_pert(1)-res(1))/pert, (res_pert(2)-res(2))/pert); - */ - - - - // Compute internal variables derivatives with C - STensor3 dDeltaDdEpr, dDeltaQdEpr, dDeltaHatPdEpr; - double dDeltaDdfVtilde, dDeltaQdfVtilde,dDeltaHatPdfVtilde; - - static fullVector<double> residual(3); - static fullVector<double> sol(3); - for(int i=0; i<3; i++) + tangentComputation(Tangent,dStressDNonLocalPorosity, dLocaldPorosityDStrain, dLocalPorosityDNonLocalPorosity, + plastic,F1,corKir, S, Fepr, Fp0, Lepr, + Fe,Fp1,Le, dLe, + DcorKirDEpr, DcorKirDtildefVstar,DFpDEpr, DFpDtildefVstar, DfVDEpr,DfVDtildefVstar, + EprToF,invFp); + + if (this->getMacroSolver()->withPathFollowing()) { - for(int j=0; j<3; j++) - { - residual(0) = -dres0dEpr(i,j); - residual(1) = -dres1dEpr(i,j); - residual(2) = -dres2dEpr(i,j)/yield0; - for(int k=0; k<3; k++) - { - sol(k)=0.; - for(int l=0; l<3; l++) - { - sol(k) += Jinv(k,l)*residual(l); - } - } - dDeltaDdEpr(i,j) = sol(0); - dDeltaQdEpr(i,j) = sol(1); - dDeltaHatPdEpr(i,j) = sol(2); - } + static STensor3 DplEnergyDEpr; + DplEnergyDEpr = ipvcur->getConstRefToDIrreversibleEnergyDF(); + STensor3& DirreEnergyDF = ipvcur->getRefToDIrreversibleEnergyDF(); + STensorOperation::multSTensor3STensor43(DplEnergyDEpr,EprToF,DirreEnergyDF); } - - // Compute internal variables derivatives with fVtilde - residual(0) = -dres0dfVtilde; - residual(1) = -dres1dfVtilde; - residual(2) = -dres2dfVtilde/yield0; - for(int k=0; k<3; k++) + } + + + if(stiff) + { + if(_tangentByPerturbation) { - sol(k)=0.; - for(int l=0; l<3; l++) - { - sol(k) += Jinv(k,l)*residual(l); - } - } - dDeltaDdfVtilde = sol(0); - dDeltaQdfVtilde = sol(1); - dDeltaHatPdfVtilde = sol(2); - - - // Compute dfV on inputs - for(int i=0; i<3; i++){ - for(int j=0; j<3; j++){ - DfV_DEpr(i,j) = dfVdDeltaD*dDeltaDdEpr(i,j) + dfVdDeltaQ*dDeltaQdEpr(i,j) + dfVdDeltaHatP*dDeltaHatPdEpr(i,j); - } - } - DfV_DfVtilde = dfVdDeltaD*dDeltaDdfVtilde + dfVdDeltaQ*dDeltaQdfVtilde + dfVdDeltaHatP*dDeltaHatPdfVtilde; - - - // Derivatives of plastic correction - static STensor43 dGammaNpdEpr, dGammaNpDevdEpr; - static STensor3 dGammaNpdfVtilde, dGammaNpDevdfVtilde; - for( int i=0; i<3; i++){ - for( int j=0; j<3; j++){ - for( int k=0; k<3; k++){ - for( int l=0; l<3; l++) - { - dGammaNpDevdEpr(i,j,k,l) = Delta_d/tau_preq*2*_G*_Idev(i,j,k,l)+tau_prDev(i,j)*dDeltaDdEpr(k,l)/tau_preq; - for( int m=0; m<3; m++){ - for( int n=0; n<3; n++) - { - dGammaNpDevdEpr(i,j,k,l) -= Delta_d/tau_preq*(3*_G/tau_preq/tau_preq*tau_prDev(i,j)*tau_prDev(m,n)*_Idev(m,n,k,l)); - } + + //predictorCorrector(F0,F1,P,ipvprev,ipvcur); + static STensor3 Fplus, Pplus; + // perturbe F + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + IPNonLocalPorosity ipvcurPlus(*ipvprev); + ipvcurPlus.getRefToNonLocalPorosity() = ipvcur->getRefToNonLocalPorosity(); + Fplus = (F1); + Fplus(i,j) += _perturbationfactor; + predictorCorrector(F0,Fplus,Pplus,ipvprev,&ipvcurPlus); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + Tangent(k,l,i,j) = (Pplus(k,l) - P(k,l))/(_perturbationfactor); } } + dLocaldPorosityDStrain(i,j) = (ipvcurPlus.getLocalPorosity() - ipvcur->getLocalPorosity())/_perturbationfactor; } } - } - - dGammaNpdEpr = dGammaNpDevdEpr; - for( int i=0; i<3; i++){ - for( int j=0; j<3; j++){ - for( int k=0; k<3; k++){ - for( int l=0; l<3; l++) - dGammaNpdEpr(i,j,k,l) += dDeltaQdEpr(k,l)*_I(i,j); + // perturb on nonlocal var + IPNonLocalPorosity ipvcurPlus(*ipvprev); + ipvcurPlus.getRefToNonLocalPorosity() = ipvcur->getNonLocalPorosity()+_perturbationfactor; + predictorCorrector(F0,F1,Pplus,ipvprev,&ipvcurPlus); + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + dStressDNonLocalPorosity(k,l) = (Pplus(k,l) - P(k,l))/(_perturbationfactor); } } + dLocalPorosityDNonLocalPorosity = (ipvcurPlus.getLocalPorosity() - ipvcur->getLocalPorosity())/(_perturbationfactor); + } - for( int i=0; i<3; i++){ - for( int j=0; j<3; j++) - { - dGammaNpDevdfVtilde(i,j) = dDeltaDdfVtilde * tau_prDev(i,j) / tau_preq; - dGammaNpdfVtilde(i,j) = dDeltaQdfVtilde/3.*_I(i,j) + dGammaNpDevdfVtilde(i,j); - } - } - + } - - static STensor43 EdGammaNpdEpr; - for(int i=0; i<3; i++) - for(int j=0; j<3; j++) - for(int k=0; k<3; k++) - for(int l=0; l<3; l++) - { - EdGammaNpdEpr(i,j,k,l)=0.; - for(int m=0; m<3; m++) - for(int n=0; n<3; n++) - EdGammaNpdEpr(i,j,k,l)+= ENp(i,j,m,n)*dGammaNpdEpr(m,n,k,l); - } - - for(int i=0; i<3; i++) - for(int j=0; j<3; j++) - for(int k=0; k<3; k++) - for(int l=0; l<3; l++) - { - DFp_DEpr(j,i,k,l) = 0.; - for(int m=0; m<3; m++) - DFp_DEpr(j,i,k,l) += Fp0(m,i)*EdGammaNpdEpr(m,j,k,l); - } - - - // Compute dFp/dftildeVstar from dGammaNpdftildeVstar - static STensor3 EdGammaNpdfVtilde; - for(int i=0; i<3; i++) - for(int j=0; j<3; j++) - { - EdGammaNpdfVtilde(i,j) = 0.; - for(int m=0; m<3; m++) - for(int n=0; n<3; n++) - EdGammaNpdfVtilde(i,j) += ENp(i,j,m,n)*dGammaNpdfVtilde(m,n); - } - - for(int i=0; i<3; i++){ - for(int j=0; j<3; j++) - { - DFp_DfVtilde(j,i) = 0.; - for(int m=0; m<3; m++) - { - DFp_DfVtilde(j,i) += Fp0(m,i)*EdGammaNpdfVtilde(m,j); - } - } - } - - // Derivatives of Kirchoff stress - for( int i=0; i<3; i++){ - for( int j=0; j<3; j++){ - for( int k=0; k<3; k++){ - for( int l=0; l<3; l++) - { - Dtau_DEpr(i,j,k,l) = 2. * _G*_Idev(i,j,k,l) + _K*_I(i,j)*_I(k,l) - -_I(i,j)*_K*dDeltaQdEpr(k,l) - - 2*_G*dGammaNpDevdEpr(i,j,k,l); - } - } - } - } - - for( int i=0; i<3; i++){ - for( int j=0; j<3; j++) - { - Dtau_DfVtilde(i,j) = -_I(i,j)*_K*dDeltaQdfVtilde-2*_G*dGammaNpDevdfVtilde(i,j); - } - } - - - - - if (this->getMacroSolver()->withPathFollowing()) - { - // will convert to DF after - STensor3& DplEnergyDEpr = q1->getRefToDIrreversibleEnergyDF(); - double& DplEnergyDtildefVstar = q1->getRefToDIrreversibleEnergyDtildefV(); - double h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); - double fact1 = (1.-_fVinitial)*(h*DeltaHatP+yield); - - DplEnergyDEpr = dDeltaHatPdEpr; - DplEnergyDEpr *= fact1; - - DplEnergyDtildefVstar = fact1*dDeltaHatPdfVtilde; - } - - } - return true; + }; - - -void mlawNonLocalPorousThomasonLaw::constitutive( - const STensor3& F0, // initial deformation gradient (input @ time n) - const STensor3& F1, // updated deformation gradient (input @ time n+1) - STensor3 &P, // updated 1st Piola-Kirchhoff stress tensor (output) - const IPNonLocalPorosity *ipvprev, // array of initial internal variable - IPNonLocalPorosity *ipvcur, // updated array of internal variable (in ipvcur on output), - STensor43 &Tangent, // constitutive tangents (output) - STensor3 &dLocaldPorosityDStrain, - STensor3 &dStressDNonLocalPorosity, - double &dLocalPorosityDNonLocalPorosity, - const bool stiff // if true compute the tangents - ) const +void mlawNonLocalPorousThomasonLaw::predictorCorrector(const STensor3& F0,const STensor3& F1,STensor3 &P, + const IPNonLocalPorosity *ipvprev, IPNonLocalPorosity *ipvcur) const { - - - // Get and set ipv cur to prev values + // Porosity ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); + // Fp ipvcur->getRefToFp() = ipvprev->getConstRefToFp(); ipvcur->getRefToMatrixPlasticStrain() = ipvprev->getMatrixPlasticStrain(); - ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy(); - // Non-local length law + /* Non-local length law */ _cLLaw->computeCL(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPCLength()); - // Hardening law => yield shoud just be copy-pasted if elastic loading and not recomputed each step + /* Hardening law => yield shoud just be copy-pasted if elastic loading and not recomputed each step */ _j2IH->hardening(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPJ2IsotropicHardening()); - - // Initialise variables const STensor3& Fp0 = ipvprev->getConstRefToFp(); STensor3& Fp1 = ipvcur->getRefToFp(); double& fV1 = ipvcur->getRefToLocalPorosity(); STensor3& Ee = ipvcur->getRefToElasticDeformation(); - static STensor3 kcorprDev, Fe, Fepr, Ce, Cepr, Epr; + // elastic predictor + static STensor3 kcorprDev, Fe, Fepr, Ce, Cepr; static double ppr; static STensor43 Lepr, Le; - static STensor63 dLepr, dLe; + static STensor63 dLe; - static STensor3 corKir, corKirpr; - static STensor43 DcorKirprDEpr,DcorKirDEpr, DFpDEpr; - static STensor3 DcorKirDtildefVstar, DFpDtildefVstar, DfVDEpr; + + static STensor3 corKir; + static STensor43 DKcorDEpr, DFpDEpr; + static STensor3 DKcorDtildefVstar, DFpDtildefVstar, DfVDEpr; static double DfVDtildefVstar; + // elastic predictor + elasticPredictor(F1,Fp0,corKir,kcorprDev,ppr,DKcorDEpr,Fepr,Cepr,Ee,Lepr,dLe,false);//------mod - // Elastic predictor - this->elasticPredictor(_K,_mu,F1,Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); - double yield = ipvcur->getRefToIPJ2IsotropicHardening().getR(); double kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); double tildefV = ipvcur->getNonLocalPorosity(); - double tildefVPrev = ipvprev->getNonLocalPorosity(); - - double fVtildeStarPrev = ipvprev->getCorrectedPorosity(); double& fVtildeStar = ipvcur->getRefToCorrectedPorosity(); fVtildeStar = tildefV; + double T=0.;//-------add + bool plastic = yieldFunction(kCorPrEq,ppr,ipvprev,fVtildeStar);//------mod - - // Coalesence - double& Chi = ipvcur->getRefToLigamentRatio(); - double dChidHatP, dChidtildefV; - computeLigamentRatio(ipvprev->getMatrixPlasticStrain(), tildefV, Chi, dChidHatP, dChidtildefV); - ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = false; - - - // Plastic correction if needed - bool plastic = yieldFunction(kCorPrEq,ppr,ipvprev,fVtildeStar); - bool correctorOK = false; - - - if (plastic) - { - ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = true; - correctorOK = plasticCorrector(F1,fVtildeStar,1.,kcorprDev,ppr,ipvprev,ipvcur, + if (plastic){ + //Msg::Info("plastic occurs"); + plasticCorrector(F1,fVtildeStar,1.,kcorprDev,ppr,ipvprev,ipvcur, corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DcorKirDEpr, DcorKirDtildefVstar, - DFpDEpr,DFpDtildefVstar, - DfVDEpr, DfVDtildefVstar); - - // If substeps are needed - if (!correctorOK and _withSubstepping) - { - Msg::Info("Substepping is active at one GP"); - int n_substeps = 2; - int numAttempt = 0; - - // Intermediar data's init - static IPNonLocalPorosity ipvTmp(*ipvprev); - static STensor3 delta_F, FTmp, Fp0Tmp; - double delta_NonlocalVar, nlVarTmp; - - // Set buffer data to previous values - ipvTmp.operator =(*dynamic_cast<const IPVariable*>(ipvprev)); - delta_F = F1; - delta_F -= F0; - delta_NonlocalVar = ipvcur->getNonLocalPorosity() - ipvprev->getNonLocalPorosity(); - - - while(numAttempt < _maxAttemptSubstepping) - { - int iter = 0; - bool success = true; - while (iter < n_substeps) - { - iter++; - // Set state at the begining of the substep - double fract = ((double)iter)/(double)n_substeps; - for (int i=0; i<3; i++){ - for (int j=0; j<3; j++){ - FTmp(i,j) = F0(i,j) + fract * delta_F(i,j); - } - } - nlVarTmp = ipvprev->getNonLocalPorosity()+fract *delta_NonlocalVar; - - Fp0Tmp = ipvTmp.getConstRefToFp(); - bool estimateStiff = false; - if (iter == n_substeps){ - estimateStiff = stiff; - } - - // Elastic predictor - elasticPredictor(_K,_mu, FTmp,Fp0Tmp,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,estimateStiff); - - // Check yield condition - kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); - plastic = yieldFunction(kCorPrEq,ppr,&ipvTmp,ipvTmp.getCorrectedPorosity()); - - // PLastic correction - if (plastic) - { - correctorOK = plasticCorrector(FTmp,nlVarTmp,1.,kcorprDev,ppr,&ipvTmp,ipvcur, - corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DcorKirDEpr, DcorKirDtildefVstar, - DFpDEpr,DFpDtildefVstar, - DfVDEpr, DfVDtildefVstar); - } - if (correctorOK and plastic){ - // next step - if (iter < n_substeps){ - ipvTmp.operator =(*dynamic_cast<const IPVariable*>(ipvcur)); - } - } - else{ - success = false; - break; - } - - } - - // In case of failed substepping - if (!success) - { - n_substeps *= 2; - numAttempt++; - Msg::Warning("Substeping is not converged, increase number of substep"); - } - else - { - Msg::Info("Substeping succeed !"); - break; - } - - if (numAttempt > _maxAttemptSubstepping) - { - Msg::Warning("Maximal attemp substepping is reached"); - correctorOK = false; - plastic = true; - break; - } - - } - - } - + false, DKcorDEpr, DKcorDtildefVstar, + DFpDEpr,DFpDtildefVstar, + DfVDEpr, DfVDtildefVstar);//-------mod } - else - { - STensorOperation::zero(DFpDEpr); - STensorOperation::zero(DcorKirDtildefVstar); - STensorOperation::zero(DFpDtildefVstar); - STensorOperation::zero(DfVDEpr); - DfVDtildefVstar = 0.; - + else{ Le = Lepr; Fe = Fepr; - }; - - - // In case of elastic behaviour: - if (!plastic) - { - // elastic only - corKir = corKirpr; - Fe = Fepr; Ce = Cepr; - Ee = Epr; - Le = Lepr; - dLe = dLepr; - if (stiff) - { - STensorOperation::zero(DFpDEpr); - STensorOperation::zero(DcorKirDtildefVstar); - STensorOperation::zero(DFpDtildefVstar); - STensorOperation::zero(DfVDEpr); - DfVDtildefVstar = 0.; - DcorKirDEpr = DcorKirprDEpr; - } - } - else - { - // In case of plastic bahviour and corrector error : - // send back an imaginary number to exit NR and restart with a smaller step - if(!correctorOK) - { - Tangent(0,0,0,0) = sqrt(-1.); - return; - } - } - + }; // update first PK stress @@ -1087,163 +541,585 @@ void mlawNonLocalPorousThomasonLaw::constitutive( STensorOperation::multSTensor3(Fe,S,FeS); STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); - if (stiff){ - - static STensor3 invFp0; - STensorOperation::inverseSTensor3(Fp0,invFp0); - static STensor43 EprToF; - for (int i=0; i<3; i++){ - for (int j=0; j<3; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - EprToF(i,j,k,l) = 0.; - for (int p=0; p<3; p++){ - for (int q=0; q<3; q++){ - EprToF(i,j,k,l) += Lepr(i,j,p,q)*Fepr(k,p)*invFp0(l,q); - } - } - } - } - } - } - - tangentComputation(Tangent,dStressDNonLocalPorosity, dLocaldPorosityDStrain, dLocalPorosityDNonLocalPorosity, - plastic,F1,corKir, S, Fepr, Fp0, Lepr, - Fe,Fp1,Le, dLe, - DcorKirDEpr, DcorKirDtildefVstar,DFpDEpr, DFpDtildefVstar, DfVDEpr,DfVDtildefVstar, - EprToF,invFp); - - if (this->getMacroSolver()->withPathFollowing()) - { - static STensor3 DplEnergyDEpr; - DplEnergyDEpr = ipvcur->getConstRefToDIrreversibleEnergyDF(); - STensor3& DirreEnergyDF = ipvcur->getRefToDIrreversibleEnergyDF(); - STensorOperation::multSTensor3STensor43(DplEnergyDEpr,EprToF,DirreEnergyDF); - } - - } - - if(stiff) - { - if(_tangentByPerturbation) - { - - //predictorCorrector(F0,F1,P,ipvprev,ipvcur); - static STensor3 Fplus, Pplus; - // perturbe F - for (int i=0; i<3; i++){ - for (int j=0; j<3; j++){ - IPNonLocalPorosity ipvcurPlus(*ipvprev); - ipvcurPlus.getRefToNonLocalPorosity() = ipvcur->getRefToNonLocalPorosity(); - Fplus = (F1); - Fplus(i,j) += _perturbationfactor; - predictorCorrector(F0,Fplus,Pplus,ipvprev,&ipvcurPlus); - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - Tangent(k,l,i,j) = (Pplus(k,l) - P(k,l))/(_perturbationfactor); - } - } - dLocaldPorosityDStrain(i,j) = (ipvcurPlus.getLocalPorosity() - ipvcur->getLocalPorosity())/_perturbationfactor; - - if (this->getMacroSolver()->withPathFollowing()) - { - ipvcur->getRefToDIrreversibleEnergyDF()(i,j) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/_perturbationfactor; - } - } - } +}; - // perturb on nonlocal var - IPNonLocalPorosity ipvcurPlus(*ipvprev); - ipvcurPlus.getRefToNonLocalPorosity() = ipvcur->getNonLocalPorosity()+_perturbationfactor; - predictorCorrector(F0,F1,Pplus,ipvprev,&ipvcurPlus); - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - dStressDNonLocalPorosity(k,l) = (Pplus(k,l) - P(k,l))/(_perturbationfactor); - } - } - dLocalPorosityDNonLocalPorosity = (ipvcurPlus.getLocalPorosity() - ipvcur->getLocalPorosity())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()) - { - ipvcur->getRefToDIrreversibleEnergyDtildefV() = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); - } - - } - } - -}; -void mlawNonLocalPorousThomasonLaw::predictorCorrector(const STensor3& F0,const STensor3& F1,STensor3 &P, - const IPNonLocalPorosity *ipvprev, IPNonLocalPorosity *ipvcur) const -{ - // Porosity - ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); - // Fp - ipvcur->getRefToFp() = ipvprev->getConstRefToFp(); - ipvcur->getRefToMatrixPlasticStrain() = ipvprev->getMatrixPlasticStrain(); + +bool mlawNonLocalPorousThomasonLaw::plasticCorrector(const STensor3& F1, const double& fVtilde, const double & DtildefVstarDtildefV, + const STensor3& tau_prDev, const double& p_pr, + const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, + STensor3& tau_cor, STensor3& Fp1, double& fV1, + STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, + const bool stiff, + STensor43& Dtau_DEpr, STensor3& Dtau_DfVtilde, + STensor43& DFp_DEpr, STensor3& DFp_DfVtilde, + STensor3& DfV_DEpr, double& DfV_DfVtilde + ) const//--------mod +{ + double tau_preq = sqrt(1.5*tau_prDev.dotprod()); + double _G = _mu; - /* Non-local length law */ - _cLLaw->computeCL(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPCLength()); + // unknows to compute + double DeltaGamma = 0.; + double DeltaHatP = 0.; + double DeltafV = 0.; + double DeltaChi = 0.; - /* Hardening law => yield shoud just be copy-pasted if elastic loading and not recomputed each step */ - _j2IH->hardening(ipvprev->getMatrixPlasticStrain(), ipvcur->getRefToIPJ2IsotropicHardening()); - const STensor3& Fp0 = ipvprev->getConstRefToFp(); - STensor3& Fp1 = ipvcur->getRefToFp(); - double& fV1 = ipvcur->getRefToLocalPorosity(); - STensor3& Ee = ipvcur->getRefToElasticDeformation(); + // get internal variables and IPVs + // IPCoalescence + //const IPThomasonCoalescence* q0Coal = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); + //IPThomasonCoalescence* q1Coal = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); + //if (q0Coal == NULL){Msg::Fatal("ThomasonCoalescenceLaw::PlasticCorrector - problem in ipv coalescence conversion");}; + //if (q1Coal == NULL){Msg::Fatal("ThomasonCoalescenceLaw::PlasticCorrector - problem in ipv coalescence conversion");}; - // elastic predictor - static STensor3 kcorprDev, Fe, Fepr, Ce, Cepr; - static double ppr; - static STensor43 Lepr, Le; - static STensor63 dLe; + // hat p + const double hatP0 = q0->getMatrixPlasticStrain(); + double& hatP1 = q1->getRefToMatrixPlasticStrain(); + hatP1 = hatP0; + // porosity + const double fV0 = q0->getLocalPorosity(); + fV1 = fV0; + // chi + const double Chi0 = computeLigamentRatio(hatP0,fVtilde); // should be moved somewhere else before in yield testing + double& Chi1 = q1->getRefToIPCoalescence().getRefToLigamentRatio(); + Chi1 = Chi0; - static STensor3 corKir; - static STensor43 DKcorDEpr, DFpDEpr; - static STensor3 DKcorDtildefVstar, DFpDtildefVstar, DfVDEpr; - static double DfVDtildefVstar; + // get hardening values and derivatives + _j2IH->hardening(hatP0, q1->getRefToIPJ2IsotropicHardening()); // this computation should be removed later as it will be done earlier + double yield0 = _j2IH->getYield0(); // for scaling + double yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); + double h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); + h *= _theta; - // elastic predictor - elasticPredictor(_K,_mu,F1,Fp0,corKir,kcorprDev,ppr,DKcorDEpr,Fepr,Cepr,Ee,Lepr,dLe,false); + // get nucleation values + double A0 = 0.; + double B0 = 0.; - double yield = ipvcur->getRefToIPJ2IsotropicHardening().getR(); - double kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); + /* + for(int i=0; i < _gdnLawContainer.size(); i++) + { + _gdnLawContainer.operator[](i)->rate(hatP0,hatP0,fV0,q1->getRefToIPNucleation(i)); + A0 += (q1->getRefToIPNucleation(i)).getDFdot(); + B0 += (q0->getConstRefToIPNucleation(i)).getExtensionGrowth(); + }*/ - double tildefV = ipvcur->getNonLocalPorosity(); - double& fVtildeStar = ipvcur->getRefToCorrectedPorosity(); - fVtildeStar = tildefV; + double Cft = 0.; + double dCftdChi = 0.; + computeConcentrationFactor(Cft, dCftdChi, Chi0); - bool plastic = yieldFunction(kCorPrEq,ppr,ipvprev,fVtildeStar); - if (plastic){ - plasticCorrector(F1,fVtildeStar,1.,kcorprDev,ppr,ipvprev,ipvcur, - corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - false, DKcorDEpr, DKcorDtildefVstar, - DFpDEpr,DFpDtildefVstar, - DfVDEpr, DfVDtildefVstar); + // Initial guess + if (_initialGuessMethod == 0) + { + DeltaGamma = 0.; + DeltaHatP = 0.; + DeltafV = 0.; + DeltaChi = 0.; } - else{ - Le = Lepr; - Fe = Fepr; - Ce = Cepr; - }; + else if (_initialGuessMethod == 1) + { + computeConcentrationFactor(Cft, dCftdChi, Chi0); + DeltaGamma = (2/3*tau_preq+p_pr-Cft*yield)/(4/3*_mu+_K); + DeltaHatP = DeltaGamma/(1-fV0); + DeltafV = (1-fV0)*DeltaGamma; + DeltaChi = (exp(DeltaHatP/3)-1)*Chi0; + } + else if (_initialGuessMethod == 2) + { + DeltaGamma = 0.; + DeltaHatP = 0.; + DeltafV = 0.; + DeltaChi = 0.; + } + else + { + Msg::Fatal("ThomasonCoalescenceLaw::_initialGuessMethod = %d not implemented !", _initialGuessMethod); + } + - // update first PK stress - static STensor3 S, FeS, invFp; - STensorOperation::inverseSTensor3(Fp1,invFp); - STensorOperation::multSTensor3STensor43(corKir,Le,S); - STensorOperation::multSTensor3(Fe,S,FeS); - STensorOperation::multSTensor3SecondTranspose(FeS,invFp,P); + // First residues + int ite = 0; // counter of iteration + // Residual vector + static fullVector<double> res(4); // vector + double res_norm = 0.; // norm + // Jacobian for predictor-corrector variables + static fullMatrix<double> J(4,4); J.setAll(0.); + // Compute residues + computeResidual(res, res_norm, DeltaGamma,DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0,B0, fVtilde, _K, _G, hatP0, _theta, yield0); + + // Debug + //Msg::Info(" Residu at ite %d = %e , %e , %e , %e norm %e", ite, res(0), res(1), res(2), res(3), res_norm); + //Msg::Info(" DeltaGamma=%e, DeltaHatP=%e, DeltafV=%e, DeltaChi=%e", DeltaGamma, DeltaHatP, DeltafV, DeltaChi); -}; + // Iterative NR procedure + while( res_norm > _tol or ite <1) + { + // Compute Jacobian + computeJacobian(J, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, dCftdChi, h, yield0); + + + + + // Solving + static fullVector<double> sol(4); sol.setAll(0.); + bool solvelu = J.luSolve(res, sol); + if (!solvelu) {Msg::Fatal("ThomasonCoalescenceLaw::corrector No solution from J !!");}; + + // Correction + // - DeltaGamma correction + if (DeltaGamma-sol(0) <= 0.) // avoid negative values + { + Msg::Info("corr sol(0) - cas1"); + DeltaGamma *= 0.1; + } + else if (sol(0) < -0.1) // avoid too large variation + { + Msg::Info("corr sol(0) - cas2"); + DeltaGamma += 0.1; + } + else + { + DeltaGamma -= sol(0); + } + + // - DeltaGamma correction + if (DeltaHatP-sol(1) <= 0.) // avoid negative values + { + Msg::Info("corr sol(1) - cas1"); + DeltaHatP *= 0.1; + } + else if (sol(1) <= -0.1) + { + Msg::Info("corr sol(1) - cas2"); + DeltaHatP += 0.1; + } + else + { + DeltaHatP -= sol(1); + } + + // - Delta fV correction + if(fV0+DeltafV-sol(2) <= 0.) // avoid negatives values + { + Msg::Info("corr sol(2) - cas1"); + DeltafV = -fV0; + } + else if (fV0+DeltafV-sol(2) > 1.-1.e-8) // avoid values larger than 1 + { + Msg::Info("corr sol(2) - cas2"); + DeltafV = 1.-1.e-8-fV0; + } + else + { + DeltafV -= sol(2); + } + + // - Delta Chi correction + if(Chi0+DeltaChi-sol(3) <= 0.) // avoid negatives values + { + Msg::Info("corr sol(3) - cas1"); + DeltaChi = -Chi0; + } + else if (Chi0+DeltaChi-sol(3) >= 1.-1.e-8) // avoid values larger than 1 + { + Msg::Info("corr sol(3) - cas2"); + DeltaChi = 1.-1.e-8-Chi0; + } + else + { + DeltaChi -= sol(3); + } + + + // Recompute residues before checking for convergence + // get hardening values and derivatives + _j2IH->hardening(hatP0+DeltaHatP, q1->getRefToIPJ2IsotropicHardening()); // this computation should be removed later as it will be done earlier + yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); + h = q1->getConstRefToIPJ2IsotropicHardening().getDR(); + h *= _theta; + + // get concentration factor + computeConcentrationFactor(Cft, dCftdChi, Chi0+DeltaChi); + computeResidual(res, res_norm, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, yield0); + + // Control of iteration number + ite ++; + if(ite > _maxite) + { + Msg::Error(" Final residu = %e , %e , %e , %e, n %e", res(0), res(1), res(2), res(3), res_norm); + Msg::Error(" DeltaGamma = %e ,DeltaHatP = %e ,DeltafV = %e ,DeltaChi = %e", DeltaGamma, DeltaHatP, DeltafV, DeltaChi); + Msg::Error(" tau_preq = %e ,p_pr = %e ,chi0 = %e ,fV0 = %e", tau_preq/yield0, p_pr/yield0, Chi0, fV0); + Msg::Fatal("No convergence for plastic correction in coalescence !!"); + return false; + } + + // Debug + //Msg::Info(" Residu at ite %d = %e , %e , %e , %e norm %e", ite, res(0), res(1), res(2), res(3), res_norm); + + } + /* + computeResidual(res, res_norm, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, yield0); + static fullVector<double> res_pert(4); double Cftpert = 0.; + double pert = 1e-8; + //_j2IH->hardening(hatP0+DeltaHatP+pert, q1->getRefToIPJ2IsotropicHardening()); // this computation should be removed later as it will be done earlier + //yield = q1->getConstRefToIPJ2IsotropicHardening().getR(); + computeConcentrationFactor(Cftpert, dCftdChi, Chi0+DeltaChi+pert); + computeResidual(res_pert, res_norm, DeltaGamma, DeltaHatP, DeltafV, DeltaChi+pert, tau_preq, p_pr, Cftpert, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, yield0); + computeJacobian(J, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, dCftdChi, h, yield0); + + Msg::Info("Analytic J1= %e, J2 = %e, J3= %e, J4= %e", J(0,3), J(1,3), J(2,3), J(3,3)); + Msg::Info("Num J1= %e, J2 = %e, J3= %e, J4= %e", (res_pert(0)-res(0))/pert , (res_pert(1)-res(1))/pert, (res_pert(2)-res(2))/pert, (res_pert(3)-res(3))/pert); + Msg::Info("dCftdChi num %e vs analyti = %e", dCftdChi, (Cftpert-Cft)/pert); + */ + + // Apply increment on internal variables + hatP1 += DeltaHatP; + fV1 += DeltafV; + Chi1 += DeltaChi; + + // dissipation energy + double& plasticEnergy = q1->getRefToPlasticEnergy(); + plasticEnergy += (1-fV1)*yield*DeltaHatP; + + + // Compute plastic correction + // Compute trNp + double trNp = 1.; + /* + if (p_pr < 0.) + { + trNp = -1.; + }*/ + static STensor3 Np, Npdev,DGNp; + Npdev = tau_prDev; + Npdev *= 1./tau_preq; + Np = Npdev; + Np(0,0) += trNp/3.; + Np(1,1) += trNp/3.; + Np(2,2) += trNp/3.; + DGNp = Np; + DGNp *= DeltaGamma; + + // Compute stress + tau_cor = Npdev; + tau_cor *= (-2.*_G*DeltaGamma); + tau_cor += tau_prDev; + tau_cor(0,0) += p_pr - _K*DeltaGamma*trNp; + tau_cor(1,1) += p_pr - _K*DeltaGamma*trNp; + tau_cor(2,2) += p_pr - _K*DeltaGamma*trNp; + + //q1->getRefToLocalCorrectedPorosity() = fV1; + + + //compute here the extended damage growth to be used at next time step + // this is an approximation to facilitate the convergence + for(int i=0; i < _gdnLawContainer.size(); i++) + { + _gdnLawContainer[i]->rate(hatP1,hatP0,fV0,q1->getRefToIPNucleation(i)); + _gdnLawContainer[i]->extensionGrowth(tau_cor, Npdev*0., q1->getRefToIPNucleation(i)); + } + + // Plastic increment + static STensor3 dFp; + static STensor43 ENp; + // dFp = exp(DeltaGamma*Np) + STensorOperation::expSTensor3(DGNp,_orderlogexp,dFp, &ENp); + // Fp1 = dFp * Fp0 + const STensor3& Fp0 = q0->getConstRefToFp(); + STensorOperation::multSTensor3(dFp,Fp0,Fp1); + // Fe1 = F1 * Fp1^-T + static STensor3 Fp1_inv; + STensorOperation::inverseSTensor3(Fp1, Fp1_inv); + STensorOperation::multSTensor3(F1,Fp1_inv,Fe); + // Ce = Fe1^T * Fe1 + STensorOperation::multSTensor3FirstTranspose(Fe,Fe,Ce); + // Ee = ln(sqrt(Ce)) + STensorOperation::logSTensor3(Ce,_orderlogexp,Ee,&Le,&dLe); + Ee *= 0.5; + + + + /* Stiffness computation */ + if (stiff) + { + // Compute internal variables derivatives from residual derivatives + computeConcentrationFactor(Cft, dCftdChi, Chi0+DeltaChi); + computeJacobian(J, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, dCftdChi, h, yield0); + + static fullMatrix<double> Jinv(4,4); Jinv.setAll(0.); + bool solve = J.invert(Jinv); + if (solve == false){Msg::Fatal("ThomasonCoalescenceLaw::PlasticCorrector: no inversion of J in stiff !!");}; + + + // Compute residual derivatives + static STensor3 dres0dEpr, dres1dEpr, dres2dEpr, dres3dEpr; + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++) + { + dres0dEpr(i,j) = 0.; + dres1dEpr(i,j) = 0.; + dres2dEpr(i,j) = 0.; + dres3dEpr(i,j) = 0.; + + dres0dEpr(i,j) += _K * _I(i,j); + dres1dEpr(i,j) += _K * DeltaGamma * _I(i,j) * trNp; + for( int k=0; k<3; k++){ + for( int l=0; l<3; l++) + { + dres0dEpr(i,j) += 2.*_G/tau_preq * tau_prDev(k,l)* _Idev(k,l,i,j); + + dres1dEpr(i,j) += 2.*_G/tau_preq * DeltaGamma * tau_prDev(k,l)* _Idev(k,l,i,j); + } + } + } + } + + /* + double pert = 1.e-8; + STensor3 tau_pert = tau_prDev; + //tau_pert(0,0) += 2/3*pert*_G; + //tau_pert(1,1) -= 1/3*pert*_G; + //tau_pert(2,2) -= 1/3*pert*_G; + tau_pert(1,0) += pert*2*_G; + static fullVector<double> res_pert(4); + computeResidual(res_pert, res_norm, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, sqrt(1.5*tau_pert.dotprod()), p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, yield0); + computeResidual(res, res_norm, DeltaGamma, DeltaHatP, DeltafV, DeltaChi, tau_preq, p_pr, Cft, yield, + Chi0, fV0, A0, B0, fVtilde, _K, _G, hatP0, _theta, yield0); + + Msg::Info("Analytic J1= %e, J2 = %e, J3= %e, J4= %e", dres0dEpr(1,0)/yield0, dres1dEpr(1,0)/yield0, dres2dEpr(1,0), dres3dEpr(1,0)); + Msg::Info("Num J1= %e, J2 = %e, J3= %e, J4= %e", (res_pert(0)-res(0))/pert, (res_pert(1)-res(1))/pert, (res_pert(2)-res(2))/pert, (res_pert(3)-res(3))/pert); + */ + + + + + double dres0dfVtilde = 0.; + double dres1dfVtilde = 0.; + double dres2dfVtilde = 0.; + double dres3dfVtilde = Chi1/3./fVtilde; + + + + // Compute internal variables derivatives with C + STensor3 dDeltaGammadEpr,dDeltaHatPdEpr; + double dDeltaGammadfVtilde,dDeltaHatPdfVtilde; + + static fullVector<double> residual(4); + static fullVector<double> sol(4); + for(int i=0; i<3; i++) + { + for(int j=0; j<3; j++) + { + residual(0) = -dres0dEpr(i,j)/yield0; + residual(1) = -dres1dEpr(i,j)/yield0; + residual(2) = -dres2dEpr(i,j); + residual(3) = -dres3dEpr(i,j); + for(int k=0; k<4; k++) + { + sol(k)=0.; + for(int l=0; l<4; l++) + { + sol(k) += Jinv(k,l)*residual(l); + } + } + dDeltaGammadEpr(i,j) = sol(0); + dDeltaHatPdEpr(i,j) = sol(1); + DfV_DEpr(i,j) = sol(2); + //dDeltaChidC(i,j) = sol(3); // not needed + } + } + + + // Compute internal variables derivatives with fVtilde + residual(0) = -dres0dfVtilde/yield0; + residual(1) = -dres1dfVtilde/yield0; + residual(2) = -dres2dfVtilde; + residual(3) = -dres3dfVtilde; + for(int k=0; k<4; k++) + { + sol(k)=0.; + for(int l=0; l<4; l++) + { + sol(k) += Jinv(k,l)*residual(l); + } + } + dDeltaGammadfVtilde = sol(0); + dDeltaHatPdfVtilde = sol(1); // not needed + DfV_DfVtilde = sol(2); + //dDeltaChidfVtilde = sol(3); // not needed + + // Derivatives of the normal + static STensor43 dNpdevdEpr; + static STensor3 dNpdevdfVtilde; + + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++){ + for( int k=0; k<3; k++){ + for( int l=0; l<3; l++) + { + dNpdevdEpr(i,j,k,l) = 2. / tau_preq * _G*_Idev(i,j,k,l); + for( int m=0; m<3; m++){ + for( int n=0; n<3; n++) + { + dNpdevdEpr(i,j,k,l) -= Npdev(i,j)*Npdev(m,n)*3.*_G*_Idev(m,n,k,l)/ tau_preq; + } + } + } + } + } + } + + dNpdevdfVtilde *= 0.; + + // Derivatives of plastic correction + static STensor43 dGammaNpdEpr; + static STensor3 dGammaNpdfVtilde; + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++){ + for( int k=0; k<3; k++){ + for( int l=0; l<3; l++) + { + dGammaNpdEpr(i,j,k,l) = Np(i,j)*dDeltaGammadEpr(k,l)+DeltaGamma*dNpdevdEpr(i,j,k,l); + } + } + } + } + + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++) + { + dGammaNpdfVtilde(i,j) = Np(i,j)*dDeltaGammadfVtilde + DeltaGamma*dNpdevdfVtilde(i,j); + } + } + + + + + static STensor43 EdGammaNpdEpr; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + EdGammaNpdEpr(i,j,k,l)=0.; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdEpr(i,j,k,l)+= ENp(i,j,m,n)*dGammaNpdEpr(m,n,k,l); + } + + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + for(int k=0; k<3; k++) + for(int l=0; l<3; l++) + { + DFp_DEpr(j,i,k,l) = 0.; + for(int m=0; m<3; m++) + DFp_DEpr(j,i,k,l) += Fp0(m,i)*EdGammaNpdEpr(m,j,k,l); + } + + + // Compute dFp/dftildeVstar from dGammaNpdftildeVstar + static STensor3 EdGammaNpdfVtilde; + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + { + EdGammaNpdfVtilde(i,j) = 0.; + for(int m=0; m<3; m++) + for(int n=0; n<3; n++) + EdGammaNpdfVtilde(i,j) += ENp(i,j,m,n)*dGammaNpdfVtilde(m,n); + } + + //DFp_DfVtilde = dGammaNpdfVtilde; + //Dtau_DfVtilde = DGNp; + + for(int i=0; i<3; i++){ + for(int j=0; j<3; j++) + { + DFp_DfVtilde(j,i) = 0.; + for(int m=0; m<3; m++) + { + DFp_DfVtilde(j,i) += Fp0(m,i)*EdGammaNpdfVtilde(m,j); + } + } + } + + //DFp_DfVtilde = dGammaNpdfVtilde; + //Dtau_DfVtilde = DGNp; + //Dtau_DfVtilde = Npdev; + //Dtau_DfVtilde *= DeltaGamma; + + + + + + + + // Derivatives of Kirchoff stress + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++){ + for( int k=0; k<3; k++){ + for( int l=0; l<3; l++) + { + Dtau_DEpr(i,j,k,l) = 2. * _G*_Idev(i,j,k,l) + _K*_I(i,j)*_I(k,l) + -_I(i,j)*_K*trNp*dDeltaGammadEpr(k,l) + - 2*_G*(Npdev(i,j)*dDeltaGammadEpr(k,l)+dNpdevdEpr(i,j,k,l)*DeltaGamma); + } + } + } + } + + for( int i=0; i<3; i++){ + for( int j=0; j<3; j++) + { + Dtau_DfVtilde(i,j) = -_I(i,j)*_K*trNp*dDeltaGammadfVtilde -2*_G*(Npdev(i,j)*dDeltaGammadfVtilde); + } + } + + + + + if (this->getMacroSolver()->withPathFollowing()) + { + // will convert to DF after + STensor3& DplEnergyDEpr = q1->getRefToDIrreversibleEnergyDF(); + double& DplEnergyDtildefVstar = q1->getRefToDIrreversibleEnergyDtildefV(); + + double fact1 = (1.-fV1)*(h*DeltaHatP+yield); + double fact2 = -yield*DeltaHatP; + + DplEnergyDEpr = dDeltaHatPdEpr; + DplEnergyDEpr *= fact1; + DplEnergyDEpr.daxpy(DfV_DEpr,fact2); + + DplEnergyDtildefVstar = fact1*dDeltaHatPdfVtilde+ fact2*DfV_DfVtilde; + } + + + + + + + + } + return true; +}; diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.h b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.h index 230f82c234b4d73301bdcffdb8f68ef99f2cd46f..cdbfdd44fc8c70f97de7c25930fe1d08b398659f 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoalescence.h @@ -22,18 +22,10 @@ protected: double _lambda0; // Void space arrangement ratio // Numerical parameters - double _n; // interpolation exponent - double _chi_switch; // maximal value of chi before onset of saturated regime - double _chi_saturated; // maximal value of chi allowed asymptotically - double _chi_decay; // rate of saturation (= characteristic lenght of exp. decay) - double _fV_Failure; // maximal value of fV allowed before total failure - int _initialGuessMethod; // choice of initial approx for radial return // (0 default) = all guess null, 1 = exp, 2 = pure plastic increment) int _maxite; // max number of iterations double _theta; // integration parameters (for mid-point method): 0=Euler explicit, 1=Euler Implicit(default) - - double _kappa; @@ -47,7 +39,6 @@ public: // Option settings void setPredictorCorrectorParameters(const int InitialGuessMethod, const int maxite=20, const double theta=1.); void setCoalescenceLaw(const CoalescenceLaw& added_coalsLaw); - void setYieldSurfaceExponent(const double newN); #ifndef SWIG // Constructors & destructor @@ -97,24 +88,28 @@ public: }; // local version - virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *ipv, const double tildefVstar) const; + virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *ipv, const double tildefVstar, double T = 0.) const; virtual void predictorCorrector(const STensor3& F0, const STensor3& F1, STensor3 &P, const IPNonLocalPorosity *ipvcur, IPNonLocalPorosity *ipvprev) const; + + + virtual bool plasticCorrector(const STensor3& F1, const double& fVtilde, const double & DtildefVstarDtildefV, const STensor3& tau_prDev, const double& p_pr, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, const bool stiff, - STensor43& Dtau_DEpr, STensor3& Dtau_DfVtilde, - STensor43& DFp_DEpr, STensor3& DFp_DfVtilde, + STensor43& Dtau_DEpr, STensor3& Dtau_DfVtilde, + STensor43& DFp_DEpr, STensor3& DFp_DfVtilde, STensor3& DfV_DEpr, double& DfV_DfVtilde ) const; + virtual bool plasticCorrectorLocal(const STensor3& F1, const double& tildefVstarPrev, const double& DtildefVstarDDeltafV, - const STensor3& tau_prDev, const double& p_pr, + const STensor3& tau_prDev,const double& p_pr, const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, STensor3& tau_cor, STensor3& Fp1, double& fV1, STensor3& Fe, STensor3& Ce, STensor3& Ee, STensor43& Le, STensor63& dLe, @@ -125,20 +120,25 @@ public: }; // Specific functions to this material law - virtual void computeLigamentRatio(const double hatP, const double tildefV, double& chi, double& dChidhatP, double& dChidtildefV) const; // need to be public + virtual double computeLigamentRatio(const double hatP, const double fVstar) const; // need to be public protected: - inline virtual void computeConcentrationFactor(const double Chi, double& Cft, double& dCftDChi) const; - - inline virtual void computeResidual(fullVector<double> &res, double& res_norm, fullMatrix<double> &J, const bool stiff, - const IPNonLocalPorosity *q0, IPNonLocalPorosity *q1, - const double Delta_d, const double Delta_q, - const double DeltaHatP, double& DeltafV, double& DeltaChi, - const double tpr_eq, const double p_pr, - const double Chin, const double fVn, - const double tildefV, const double Hatpn, - const double yield0, double& dChidtildefV, - double& dfVdDeltaD, double& dfVdDeltaQ, double& dfVdDeltaHatP) const; + inline virtual void computeConcentrationFactor(double& Cft, double& dCftDChi, const double Chi) const; + + inline virtual void computeResidual(fullVector<double> &res, double& res_norm, + const double DeltaGamma, const double DeltaHatP, const double DeltafV, const double DeltaChi, + const double tpr_eq, const double p_pr, const double Cft, const double yield, + const double Chin, const double fVn, const double An, const double Bn, + const double tildefV, const double K, const double G, const double Hatpn, + const double theta, const double yield0) const; + + + inline virtual void computeJacobian(fullMatrix<double> &J, + const double DeltaGamma, const double DeltaHatP, const double DeltafV, const double DeltaChi, + const double tpr_eq, const double p_pr, const double Cft, const double yield, + const double Chin, const double fVn, const double An, const double Bn, + const double tildefV, const double K, const double G, const double Hatpn, + const double theta, const double dCftdChi, const double h, const double yield0) const; #endif //SWIG }; diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp index 3476c617487bb0dd627321f367fec7b95c7d939b..e95f3140da453361566f904f067444dbff990598 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp @@ -104,15 +104,7 @@ void mlawNonLocalPorousCoupledLaw::setCoalescenceLaw(const CoalescenceLaw& added }; -void mlawNonLocalPorousCoupledLaw::setYieldSurfaceExponent(const double newN) -{ - _mlawCoales->setYieldSurfaceExponent(newN); -}; -void mlawNonLocalPorousCoupledLaw::setFailureTolerance(const double tol, const double elTol, const double localFailedPoro) -{ - _mlawGrowth->setFailureTolerance(tol,elTol,localFailedPoro); -} @@ -178,9 +170,9 @@ void mlawNonLocalPorousCoupledLaw::constitutive( static STensor3 DcorKirDtildefVstar, DFpDtildefVstar, DfVDEpr; static double DfVDtildefVstar; - + double T=0.;//-----------------------------------------added // Elastic predictor - this->elasticPredictor(_K,_mu,F1,Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff); + this->elasticPredictor(F1,Fp0,corKirpr,kcorprDev,ppr,DcorKirprDEpr,Fepr,Cepr,Epr,Lepr,dLepr,stiff);//---------mod double yield = ipvcur->getRefToIPJ2IsotropicHardening().getR(); double kCorPrEq = sqrt(1.5*kcorprDev.dotprod()); @@ -194,9 +186,8 @@ void mlawNonLocalPorousCoupledLaw::constitutive( // Coalesence double& Chi = ipvcur->getRefToLigamentRatio(); - double dChidHatP, dChidfvtilde; - _mlawCoales->computeLigamentRatio(ipvprev->getMatrixPlasticStrain(), tildefV, Chi, dChidHatP, dChidfvtilde); - //ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = ipvprev->getConstRefToIPCoalescence().getCoalescenceActiveFlag(); + Chi = _mlawCoales->computeLigamentRatio(ipvprev->getMatrixPlasticStrain(), tildefV); + ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = ipvprev->getConstRefToIPCoalescence().getCoalescenceActiveFlag(); /* Test for plasticity */ @@ -208,11 +199,7 @@ void mlawNonLocalPorousCoupledLaw::constitutive( bool fG = _mlawGrowth->yieldFunction(kCorPrEq,ppr,ipvprev,fVtildeStar); bool fT = _mlawCoales->yieldFunction(kCorPrEq,ppr,ipvprev,fVtildeStar); - - - - ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = false; - if ((ipvprev->getConstRefToIPCoalescence().getCoalescenceActiveFlag())) + if (ipvprev->getConstRefToIPCoalescence().getCoalescenceActiveFlag()) { fG = false; ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = true; @@ -222,16 +209,21 @@ void mlawNonLocalPorousCoupledLaw::constitutive( if (fG) { isPlastic = true; + /*STensor3& DcorKirDT;//-----added + STensor3& DFpDT;//-----added + STensorOperation::zero(DcorKirDT);//-----added + STensorOperation::zero(DFpDT);//-----added + double DfVDT = 0.;//------added*/ correctorOK = _mlawGrowth->plasticCorrector(F1,fVtildeStar,1.,kcorprDev,ppr,ipvprev,ipvcur, corKir, Fp1, fV1, Fe, Ce, Ee,Le,dLe, - stiff, DcorKirDEpr, DcorKirDtildefVstar, - DFpDEpr,DFpDtildefVstar, - DfVDEpr, DfVDtildefVstar); + stiff, DcorKirDEpr, DcorKirDtildefVstar, + DFpDEpr,DFpDtildefVstar, + DfVDEpr, DfVDtildefVstar);//-----mod //Msg::Info("Gurson"); // Check if Thom is more restrictive - if (fT and correctorOK) - { + //if (fT) + //{ double p_cor = corKir.trace()/3.; static STensor3 tauDev; tauDev = corKir; @@ -244,10 +236,9 @@ void mlawNonLocalPorousCoupledLaw::constitutive( if (fTbis) { ipvcur->getRefToIPCoalescence().getRefToCoalescenceActiveFlag() = true; - /* - static IPNonLocalPorosity ipvcurbis(*ipvcur); - ipvcurbis.operator =(*dynamic_cast<const IPVariable*>(ipvcur)); + IPNonLocalPorosity ipvcurbis(*ipvcur); + ipvcur->getRefToLocalPorosity() = ipvprev->getLocalPorosity(); ipvcur->getRefToFp() = ipvprev->getConstRefToFp(); ipvcur->getRefToMatrixPlasticStrain() = ipvprev->getMatrixPlasticStrain(); @@ -275,10 +266,10 @@ void mlawNonLocalPorousCoupledLaw::constitutive( DFpDEpr,DFpDtildefVstar, DfVDEpr, DfVDtildefVstar); //Msg::Info("Thomason after Gurson"); - - */ - } - } + */ + + } + //} } else if (fT) // If not Gurson, try with Thom @@ -295,8 +286,6 @@ void mlawNonLocalPorousCoupledLaw::constitutive( } else // Otherwise : elastic behaviour { - isPlastic = false; - STensorOperation::zero(DFpDEpr); STensorOperation::zero(DcorKirDtildefVstar); STensorOperation::zero(DFpDtildefVstar); @@ -315,10 +304,6 @@ void mlawNonLocalPorousCoupledLaw::constitutive( ipvcur->getRefToFp() = ipvprev->getConstRefToFp(); ipvcur->getRefToMatrixPlasticStrain() = ipvprev->getMatrixPlasticStrain(); ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy(); - - Tangent(0,0,0,0) = sqrt(-1.); - return; - } if (stiff) diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h index 8115a8134745d23c1c3d49dd58dd7f54fa9eb1ed..9ca0fc7df01bcd438203121e2f9dd71bd1e2ff4b 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.h @@ -41,9 +41,8 @@ public: virtual void setNucleationLaw(const NucleationLaw& added_gdnLaw); virtual void setScatterredInitialPorosity(double f0min, double f0max); virtual void setCoalescenceLaw(const CoalescenceLaw& added_coalsLaw); - virtual void setYieldSurfaceExponent(const double newN); - virtual void setFailureTolerance(const double tol, const double elTol, const double localFailedPoro); + // Constructors & destructor mlawNonLocalPorousCoupledLaw(const mlawNonLocalPorousCoupledLaw &source); virtual ~mlawNonLocalPorousCoupledLaw() @@ -98,7 +97,7 @@ public: - virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar) const + virtual bool yieldFunction(const double tau_eq, const double p, const IPNonLocalPorosity *q0, const double tildefVstar, double T = 0.) const { Msg::Fatal("mlawNonLocalPorousCoupledLaw::yieldFunction should not be used !!!"); }; diff --git a/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.cpp b/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.cpp index 13d191ac86018dac4cc7326c927dc7d8b321b8f0..373ba0d9ff788c1fc81adb8540dad5f0602adbf0 100644 --- a/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.cpp +++ b/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.cpp @@ -21,60 +21,23 @@ mlawPhenomenologicalSMP::mlawPhenomenologicalSMP(const int num,const double rho,const double alpha, const double beta, const double gamma,const double t0, - const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr, const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr, const double Tg, const double DeltaTg,const double Eg, const double Er, const double nug, const double nur, const double alphag, const double alphar,const double zg0,const double tau_y0):materialLaw(num,true),_alpha(alpha),_beta(beta),_gamma(gamma),_Kxg(Kxg),_Kyg(Kyg),_Kzg(Kzg), _Kxr(Kxr),_Kyr(Kyr),_Kzr(Kzr),_t0(t0),_order(-1),_w(w),_TaylorQuiney(TaylorQuiney), _c(c), _cp(cp),_cg(cg),_cr(cr),_Tg(Tg),_DeltaTg(DeltaTg),_Eg(Eg),_Er(Er),_Gg(Eg/2./(1.+nug)),_Gr(Er/2./(1.+nur)),_nug(nug),_nur(nur),_lambdag((Eg*nug)/(1.+nug)/(1.-2.*nug)),_lambdar((Er*nur)/(1.+nur)/(1.-2.*nur)),_Kg(Eg/3./(1.-2.*nug)),_Kr(Er/3./(1.-2.*nur)),_alphag(alphag),_alphar(alphar),_zg0(zg0),_tau_y0(tau_y0),_I2(1.),_I4(1.,1.){ + const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr, const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr, const double Tg, const double DeltaTg,const double Eg, const double Er, const double nug, const double nur, const double alphag, const double alphar,const double tau_y0):materialLaw(num,true),_alpha(alpha),_beta(beta),_gamma(gamma),_Kxg(Kxg),_Kyg(Kyg),_Kzg(Kzg), _Kxr(Kxr),_Kyr(Kyr),_Kzr(Kzr),_t0(t0),_order(-1),_w(w),_TaylorQuiney(TaylorQuiney), _c(c), _cp(cp),_cg(cg),_cr(cr),_Tg(Tg),_DeltaTg(DeltaTg),_Gg(Eg/2./(1.+nug)),_Gr(Er/2./(1.+nur)),_Kg(Eg/3./(1.-2.*nug)),_Kr(Er/3./(1.-2.*nur)),_alphag(alphag),_alphar(alphar),_tau_y0(tau_y0),_I2(1.),_I4(1.,1.){ - double _Gg2=_Gg+_Gg; - _C0g*=0.; - _C0g(0,0,0,0) = _lambdag + _Gg2; - _C0g(1,1,0,0) = _lambdag; - _C0g(2,2,0,0) = _lambdag; - _C0g(0,0,1,1) = _lambdag; - _C0g(1,1,1,1) = _lambdag + _Gg2; - _C0g(2,2,1,1) = _lambdag; - _C0g(0,0,2,2) = _lambdag; - _C0g(1,1,2,2) = _lambdag; - _C0g(2,2,2,2) = _lambdag + _Gg2; - - _C0g(1,0,1,0) = _Gg; - _C0g(2,0,2,0) = _Gg; - _C0g(0,1,0,1) = _Gg; - _C0g(2,1,2,1) = _Gg; - _C0g(0,2,0,2) = _Gg; - _C0g(1,2,1,2) = _Gg; - - _C0g(0,1,1,0) = _Gg; - _C0g(0,2,2,0) = _Gg; - _C0g(1,0,0,1) = _Gg; - _C0g(1,2,2,1) = _Gg; - _C0g(2,0,0,2) = _Gg; - _C0g(2,1,1,2) = _Gg; - - double _Gr2=_Gr+_Gr; - _C0r*=0.; - _C0r(0,0,0,0) = _lambdar + _Gr2; - _C0r(1,1,0,0) = _lambdar; - _C0r(2,2,0,0) = _lambdar; - _C0r(0,0,1,1) = _lambdar; - _C0r(1,1,1,1) = _lambdar + _Gr2; - _C0r(2,2,1,1) = _lambdar; - _C0r(0,0,2,2) = _lambdar; - _C0r(1,1,2,2) = _lambdar; - _C0r(2,2,2,2) = _lambdar + _Gr2; - - _C0r(1,0,1,0) = _Gr; - _C0r(2,0,2,0) = _Gr; - _C0r(0,1,0,1) = _Gr; - _C0r(2,1,2,1) = _Gr; - _C0r(0,2,0,2) = _Gr; - _C0r(1,2,1,2) = _Gr; - - _C0r(0,1,1,0) = _Gr; - _C0r(0,2,2,0) = _Gr; - _C0r(1,0,0,1) = _Gr; - _C0r(1,2,2,1) = _Gr; - _C0r(2,0,0,2) = _Gr; - _C0r(2,1,1,2) = _Gr; + _j2IH = new PerfectlyPlasticJ2IsotropicHardening(num, tau_y0,true); + + // by default, no temperature dependence + _temFunc_K = new constantScalarFunction(1.); + _temFunc_G = new constantScalarFunction(1.); + _temFunc_Sy0 = new constantScalarFunction(1.); + _temFunc_H = new constantScalarFunction(1.); + _temFunc_ThermalConductivity = new constantScalarFunction(1.); + _temFunc_cp = new constantScalarFunction(1.); + _tempFunc_alpha = new constantScalarFunction(1.); + + double _Gg2=_Gg+_Gg; + double _lambdag=(Eg*nug)/(1.+nug)/(1.-2.*nug); + double _lambdar=(Er*nur)/(1.+nur)/(1.-2.*nur); for (int i=0; i<3; i++){ for (int j=0; j<3; j++){ @@ -85,6 +48,10 @@ mlawPhenomenologicalSMP::mlawPhenomenologicalSMP(const int num,const double rho, } } } + + HookeTensor(_Kg,_Gg,_C0g); + HookeTensor(_Kr,_Gr,_C0r); + STensor3 R; //3x3 rotation matrix double co1,co2,co3,si1,si2,si3; @@ -134,42 +101,186 @@ mlawPhenomenologicalSMP::mlawPhenomenologicalSMP(const int num,const double rho, } } } - double nu = 0.29; - double E = 771.e6; - double mu = _Gg; - double lambda = (E*nu)/(1.+nu)/(1.-2.*nu); - double twicemu = mu+mu; STensor43 K_; + K_*=0.; - K_(0,0,0,0) = lambda + twicemu; - K_(1,1,0,0) = lambda; - K_(2,2,0,0) = lambda; - K_(0,0,1,1) = lambda; - K_(1,1,1,1) = lambda + twicemu; - K_(2,2,1,1) = lambda; - K_(0,0,2,2) = lambda; - K_(1,1,2,2) = lambda; - K_(2,2,2,2) = lambda+ twicemu; - - if(lambda>=1000.*mu) + K_(0,0,0,0) = _lambdag + _Gg2; + K_(1,1,0,0) = _lambdag; + K_(2,2,0,0) = _lambdag; + K_(0,0,1,1) = _lambdag; + K_(1,1,1,1) = _lambdag + _Gg2; + K_(2,2,1,1) = _lambdag; + K_(0,0,2,2) = _lambdag; + K_(1,1,2,2) = _lambdag; + K_(2,2,2,2) = _lambdag + _Gg2; + + K_(1,0,1,0) = _Gg; + K_(2,0,2,0) = _Gg; + K_(0,1,0,1) = _Gg; + K_(2,1,2,1) = _Gg; + K_(0,2,0,2) = _Gg; + K_(1,2,1,2) = _Gg; + + K_(0,1,1,0) = _Gg; + K_(0,2,2,0) = _Gg; + K_(1,0,0,1) = _Gg; + K_(1,2,2,1) = _Gg; + K_(2,0,0,2) = _Gg; + K_(2,1,1,2) = _Gg; + + + for(int i=0;i<3;i++) { - mu = lambda + mu; + for(int j=0;j<3;j++) + { + _Stiff_alphaDilatation(i,j)=0.; + for(int k=0;k<3;k++) + { + for(int l=0;l<3;l++) + { + _Stiff_alphaDilatation(i,j)+=K_(i,j,k,l)*_alphaDilatation(k,l); + } + } + } } + STensor3 kg, kr; + // to be unifom in DG3D q= k' gradT with k'=-k instead of q=-kgradT + kg(0,0) = -_Kxg; + kg(1,1) = -_Kyg; + kg(2,2) = -_Kzg; + kr(0,0) = -_Kxr; + kr(1,1) = -_Kyr; + kr(2,2) = -_Kzr; + for(int i=0;i<3;i++) + { + for(int j=0;j<3;j++) + { + _kg(i,j)=0.; + for(int m=0;m<3;m++) + { + for(int n=0;n<3;n++) + { + _kg(i,j)+=R(m,i)*R(n,j)*kg(m,n); + } + } + } + } + for(int i=0;i<3;i++) + { + for(int j=0;j<3;j++) + { + _kr(i,j)=0.; + for(int m=0;m<3;m++) + { + for(int n=0;n<3;n++) + { + _kr(i,j)+=R(m,i)*R(n,j)*kr(m,n); + } + } + } + } +} + +mlawPhenomenologicalSMP::mlawPhenomenologicalSMP(const int num,const double rho,const J2IsotropicHardening &j2IH,const double alpha, const double beta, const double gamma,const double t0, + const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr, const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr, const double Tg, const double DeltaTg,const double Eg, const double Er, const double nug, const double nur, const double alphag, const double alphar,const double tau_y0):materialLaw(num,true),_alpha(alpha),_beta(beta),_gamma(gamma),_Kxg(Kxg),_Kyg(Kyg),_Kzg(Kzg), _Kxr(Kxr),_Kyr(Kyr),_Kzr(Kzr),_t0(t0),_order(-1),_w(w),_TaylorQuiney(TaylorQuiney), _c(c), _cp(cp),_cg(cg),_cr(cr),_Tg(Tg),_DeltaTg(DeltaTg),_Gg(Eg/2./(1.+nug)),_Gr(Er/2./(1.+nur)),_Kg(Eg/3./(1.-2.*nug)),_Kr(Er/3./(1.-2.*nur)),_alphag(alphag),_alphar(alphar),_tau_y0(tau_y0),_I2(1.),_I4(1.,1.){ + + + _j2IH=j2IH.clone(); + + double _Gg2=_Gg+_Gg; + double _lambdag=(Eg*nug)/(1.+nug)/(1.-2.*nug); + double _lambdar=(Er*nur)/(1.+nur)/(1.-2.*nur); + + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + _I4dev(i,j,k,l) = 0.5*(_I2(i,k)*_I2(j,l)+_I2(i,l)*_I2(j,k)) - _I2(i,j)*_I2(k,l)/3.; + } + } + } + } + + HookeTensor(_Kg,_Gg,_C0g); + HookeTensor(_Kr,_Gr,_C0r); + + STensor3 R; //3x3 rotation matrix + + double co1,co2,co3,si1,si2,si3; + double s1c2, c1c2; + double _pi(3.14159265359); + double fpi = _pi/180.; + + co1 = cos(_alpha*fpi); + si1 = sin(_alpha*fpi); + + co2 = cos(_beta*fpi); + si2 = sin(_beta*fpi); + + co3 = cos(_gamma*fpi); + si3 = sin(_gamma*fpi); + + s1c2 = si1*co2; + c1c2 = co1*co2; + + R(0,0) = co3*co1 - s1c2*si3; + R(0,1) = co3*si1 + c1c2*si3; + R(0,2) = si2*si3; + + R(1,0) = -si3*co1 - s1c2*co3; + R(1,1) = -si3*si1 + c1c2*co3; + R(1,2) = si2*co3; + + R(2,0) = si1*si2; + R(2,1) = -co1*si2; + R(2,2) = co2; + + STensor3 alphaDilatation; + alphaDilatation(0,0)= _alphar; + alphaDilatation(1,1)= _alphar; + alphaDilatation(2,2)= _alphar; + for(int i=0;i<3;i++) + { + for(int j=0;j<3;j++) + { + _alphaDilatation(i,j)=0.; + for(int m=0;m<3;m++) + { + for(int n=0;n<3;n++) + { + _alphaDilatation(i,j)+=R(m,i)*R(n,j)*alphaDilatation(m,n); + } + } + } + } - K_(1,0,1,0) = mu; - K_(2,0,2,0) = mu; - K_(0,1,0,1) = mu; - K_(2,1,2,1) = mu; - K_(0,2,0,2) = mu; - K_(1,2,1,2) = mu; + STensor43 K_; - K_(0,1,1,0) = mu; - K_(0,2,2,0) = mu; - K_(1,0,0,1) = mu; - K_(1,2,2,1) = mu; - K_(2,0,0,2) = mu; - K_(2,1,1,2) = mu; + K_*=0.; + K_(0,0,0,0) = _lambdag + _Gg2; + K_(1,1,0,0) = _lambdag; + K_(2,2,0,0) = _lambdag; + K_(0,0,1,1) = _lambdag; + K_(1,1,1,1) = _lambdag + _Gg2; + K_(2,2,1,1) = _lambdag; + K_(0,0,2,2) = _lambdag; + K_(1,1,2,2) = _lambdag; + K_(2,2,2,2) = _lambdag + _Gg2; + + K_(1,0,1,0) = _Gg; + K_(2,0,2,0) = _Gg; + K_(0,1,0,1) = _Gg; + K_(2,1,2,1) = _Gg; + K_(0,2,0,2) = _Gg; + K_(1,2,1,2) = _Gg; + + K_(0,1,1,0) = _Gg; + K_(0,2,2,0) = _Gg; + K_(1,0,0,1) = _Gg; + K_(1,2,2,1) = _Gg; + K_(2,0,0,2) = _Gg; + K_(2,1,1,2) = _Gg; for(int i=0;i<3;i++) @@ -224,12 +335,51 @@ mlawPhenomenologicalSMP::mlawPhenomenologicalSMP(const int num,const double rho, } } + mlawPhenomenologicalSMP::mlawPhenomenologicalSMP(const mlawPhenomenologicalSMP &source) : materialLaw(source),_alpha(source._alpha),_beta(source._beta),_gamma(source._gamma) ,_Kxg(source. _Kxg),_Kyg(source._Kyg),_Kzg(source._Kzg),_Kxr(source._Kxr),_Kyr(source._Kyr),_Kzr(source._Kzr), _kg(source._kg) , _kr(source._kr), _t0(source._t0), _k0(source._k0), - _Stiff_alphaDilatation(source._Stiff_alphaDilatation),_alphaDilatation(source._alphaDilatation), _order(source._order), _w(source._w),_TaylorQuiney(source._TaylorQuiney), _c(source._c), _cp(source._cp),_cg(source._cg),_cr(source._cr),_Tg(source._Tg),_DeltaTg(source._DeltaTg),_Eg(source._Eg),_Er(source._Er),_Gg(source._Gg),_Gr(source._Gr),_nug(source._nug),_nur(source._nur),_lambdag(source._lambdag),_lambdar(source._lambdar),_Kg(source._Kg),_Kr(source._Kr),_alphag(source._alphag),_alphar(source._alphar),_zg0(source._zg0),_tau_y0(source._tau_y0),_C0r(source._C0r),_C0g(source._C0g),_I2(1.),_I4(1.,1.) + _Stiff_alphaDilatation(source._Stiff_alphaDilatation),_alphaDilatation(source._alphaDilatation), _order(source._order), _w(source._w),_TaylorQuiney(source._TaylorQuiney), _c(source._c), _cp(source._cp),_cg(source._cg),_cr(source._cr),_Tg(source._Tg),_DeltaTg(source._DeltaTg),_Gg(source._Gg),_Gr(source._Gr),_Kg(source._Kg),_Kr(source._Kr),_alphag(source._alphag),_alphar(source._alphar),_tau_y0(source._tau_y0),_C0r(source._C0r),_C0g(source._C0g),_I2(1.),_I4(1.,1.) { + _j2IH = NULL; + if (source._j2IH != NULL) + _j2IH = source._j2IH->clone(); + + _temFunc_Sy0 = NULL; // temperature dependence of initial yield stress + if (source._temFunc_Sy0!= NULL) + _temFunc_Sy0 = source._temFunc_Sy0->clone(); + + _temFunc_H = NULL; // temperature dependence of hardening stress + if (source._temFunc_H != NULL){ + _temFunc_H = source._temFunc_H->clone(); + } + + _temFunc_ThermalConductivity = NULL; + if (source._temFunc_ThermalConductivity!= NULL){ + _temFunc_ThermalConductivity = source._temFunc_ThermalConductivity->clone(); + } + + _temFunc_cp = NULL; + if (source._temFunc_cp != NULL){ + _temFunc_cp = source._temFunc_cp->clone(); + } + + _tempFunc_alpha = NULL; + if (source._tempFunc_alpha != NULL){ + _tempFunc_alpha = source._tempFunc_alpha->clone(); + } + + _temFunc_K = NULL; // bulk modulus; + if (source._temFunc_K != NULL){ + _temFunc_K = source._temFunc_K->clone(); + } + + _temFunc_G = NULL; // shear modulus; + if (source._temFunc_G!=NULL){ + _temFunc_G = source._temFunc_G->clone(); + } + } double mlawPhenomenologicalSMP::soundSpeed() const @@ -247,6 +397,7 @@ mlawPhenomenologicalSMP& mlawPhenomenologicalSMP::operator=(const materialLaw & { materialLaw::operator=(source); const mlawPhenomenologicalSMP* src =static_cast<const mlawPhenomenologicalSMP*>(&source); + _t0=src->_t0; _Stiff_alphaDilatation=src->_Stiff_alphaDilatation; _alphaDilatation=src->_alphaDilatation; @@ -263,15 +414,8 @@ mlawPhenomenologicalSMP& mlawPhenomenologicalSMP::operator=(const materialLaw & _Kr=src->_Kr; _Gg=src->_Gg; _Gr=src->_Gr; - _Eg=src->_Eg; - _Er=src->_Er; - _nug=src->_nug; - _nur=src->_nur; - _lambdag=src->_lambdag; - _lambdar=src->_lambdar; _alphag=src->_alphag; _alphar=src->_alphar; - _zg0=src->_zg0; _tau_y0=src->_tau_y0; _alpha = src->_alpha; _beta = src->_beta; @@ -300,13 +444,29 @@ void mlawPhenomenologicalSMP::createIPState(IPStateBase* &ips,const bool* state_ bool inter=true; const MInterfaceElement *iele = dynamic_cast<const MInterfaceElement*>(ele); if(iele==NULL) inter=false; - IPVariable* ipvi = new IPPhenomenologicalSMP(getzg0()); - IPVariable* ipv1 = new IPPhenomenologicalSMP(getzg0()); - IPVariable* ipv2 = new IPPhenomenologicalSMP(getzg0()); + IPVariable* ipvi = new IPPhenomenologicalSMP(); + IPVariable* ipv1 = new IPPhenomenologicalSMP(); + IPVariable* ipv2 = new IPPhenomenologicalSMP(); if(ips != NULL) delete ips; ips = new IP3State(state_,ipvi,ipv1,ipv2); } +void mlawPhenomenologicalSMP::HookeTensor(const double KT, const double GT, STensor43& C) const{ + + double lambda=KT-((2./3.)*GT); + + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + C(i,j,k,l) = KT*_I2(i,j)*_I2(k,l) + 2.*GT*_I4dev(i,j,k,l); + } + } + } + } +} + + void mlawPhenomenologicalSMP::constitutive(const STensor3& F0,const STensor3& Fn,STensor3 &P, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,STensor43 &Tangent,const bool stiff) const @@ -347,9 +507,13 @@ void mlawPhenomenologicalSMP::constitutive( const STensor3& F0, // initi STensorOperation::zero(Tangentr); STensorOperation::zero(dPrdT); double &zg=q1->getRefTozg(); + double dgammataueq=0.; + double dgammataueqdT=0.; + static STensor3 dgammataueqdF; + STensorOperation::zero(dgammataueqdF); + double dh; - double dcpdt=0.; dh = getTimeStep(); if(T>=_Tg+_DeltaTg) @@ -358,45 +522,53 @@ void mlawPhenomenologicalSMP::constitutive( const STensor3& F0, // initi } if((T<=_Tg+_DeltaTg)and(T>=_Tg-_DeltaTg)) { - constitutive2(F0,Fn,q0,q1,Tangentr,Tangentg,dPrdT,dPgdT,T0,T,stiff,Pr,Pg,dh,dgammataueq); + constitutive2(F0,Fn,q0,q1,Tangentr,Tangentg,dPrdT,dPgdT,T0,T,stiff,Pr,Pg,dh,dgammataueq,dgammataueqdT,dgammataueqdF); } if(T<=_Tg-_DeltaTg) { - constitutive3(F0,Fn,q0,q1,Tangentg,dPgdT,T,stiff,Pg,dh,dgammataueq); + constitutive3(F0,Fn,q0,q1,Tangentg,dPgdT,T,stiff,Pg,dh,dgammataueq,dgammataueqdT,dgammataueqdF); } P =Pr; P+=Pg; - double specificheat=zg*_cg+(1.-zg)*_cr; - if(dh>0.) - { - wth=-specificheat*(T-T0)/dh;// the - sign become from the term of thermal source - wth+=(dgammataueq)*_TaylorQuiney/dh; - } - else - wth=0.; - - /* if(dh>0.) + //Wth + double cp=zg*_cg+(1.-zg)*_cr; + static STensor3 dcpdF; + STensorOperation::zero(dcpdF); + double dzgdT=0.; + if((T<=_Tg+_DeltaTg)and(T>=_Tg-_DeltaTg)){ + dzgdT=-2.*_w*exp(2.*_w*(T-_Tg)); + dzgdT*=1./pow((1.+2.*_w*exp(2.*_w*(T-_Tg))),2); + } + double dcpdT=dzgdT*(_cg-_cr); + + if(dh>0.) + { + wth=-cp*(T-T0)/dh; + wth+=(dgammataueq)*_TaylorQuiney/dh; + } + else + wth=0.; + + if(dh>0.) { - dwthdT=-dcpdt*(T-T0)/dh-specificheat/dh; - dwthdT+=(dtauepsilon1dt)*_TaylorQuiney/dh; - dwthdT+=(dtauepsilon2dt)*_TaylorQuiney/dh; - + dwthdT=-dcpdT*(T-T0)/dh-cp/dh; + dwthdT+=(dgammataueqdT)*_TaylorQuiney/dh; for(int K = 0; K< 3; K++){ for(int i = 0; i< 3; i++){ dwthdF(K,i)=-dcpdF(K,i)*(T-T0)/dh; - dwthdF(K,i)+=(dtauepsilon1dF(K,i))*_TaylorQuiney/dh; + dwthdF(K,i)+=(dgammataueqdF(K,i))*_TaylorQuiney/dh; } } } - else*/ - //{ + else + { dwthdT=0.; STensorOperation::zero(dwthdF); - //} + } static STensor3 Fninv; STensorOperation::inverseSTensor3(Fn, Fninv); @@ -494,7 +666,7 @@ void mlawPhenomenologicalSMP::constitutive1(const STensor3& F0, const STensor3& } -void mlawPhenomenologicalSMP::constitutive2(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, STensor43& Tangentr, STensor43& Tangentg, STensor3& dPrdT, STensor3& dPgdT, double T0, double T, bool stiff, STensor3& Pr, STensor3& Pg, const double dh, double& dgammataueq) const +void mlawPhenomenologicalSMP::constitutive2(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, STensor43& Tangentr, STensor43& Tangentg, STensor3& dPrdT, STensor3& dPgdT, double T0, double T, bool stiff, STensor3& Pr, STensor3& Pg, const double dh, double& dgammataueq,double& dgammataueqdT, STensor3& dgammataueqdF) const { const STensor3 &Fp0=q0->getConstRefToFp(); @@ -511,8 +683,6 @@ void mlawPhenomenologicalSMP::constitutive2(const STensor3& F0, const STensor3& Fp=Fp0; Ff=Ff0; -//printf("T0= %f, T= %f\n",T0,T); - if(T>T0){ Fpg=Fpg0; static STensor3 Feg, Eeg,taueg; @@ -525,16 +695,16 @@ void mlawPhenomenologicalSMP::constitutive2(const STensor3& F0, const STensor3& static STensor3 N; N = _I2; double Delta_gamma=0.; - double H_gamma=0.; //If tau_y evolves with Delta_gamma then it is not 0 - double H_T=0.; //If tau_y evolves with T then it is not 0 + double H_gamma=0.; + double H_T=0.; + double taueq=0.; static STensor43 dexpDgammaN; dexpDgammaN=_I4; - tangentglassy(Fn,q0,q1,dexpDgammaN, Feg, dlnCeg,Eeg, N, Eegpreq, Delta_gamma, zg, H_gamma, H_T, T,Feg,taueg,dlnCeg,ddlnCeg,dPgdT,Tangentg); + tangentglassy(Fn,q0,q1,dexpDgammaN, Feg, dlnCeg,Eeg, N, Eegpreq, Delta_gamma, zg, H_gamma, H_T, T,taueq,Feg,taueg,dlnCeg,ddlnCeg,dgammataueqdT,dgammataueqdF,dPgdT,Tangentg); } if(T<=T0){ - double tau_y=zg*_tau_y0; - predictorCorrector(F0,Fn,q0,q1,tau_y,Pg,dh,T,dgammataueq,stiff,dPgdT, Tangentg); + predictorCorrector(F0,Fn,q0,q1,Pg,dh,T,dgammataueq,stiff,dgammataueqdT,dgammataueqdF,dPgdT,Tangentg); } //Resulting variables @@ -553,7 +723,7 @@ void mlawPhenomenologicalSMP::constitutive2(const STensor3& F0, const STensor3& } -void mlawPhenomenologicalSMP::constitutive3(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,STensor43& Tangentg, STensor3& dPgdT, double T, bool stiff, STensor3& Pg, const double dh, double& dgammataueq) const +void mlawPhenomenologicalSMP::constitutive3(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,STensor43& Tangentg, STensor3& dPgdT, double T, bool stiff, STensor3& Pg, const double dh, double& dgammataueq,double& dgammataueqdT, STensor3& dgammataueqdF) const { const STensor3 &Fp0=q0->getConstRefToFp(); @@ -571,12 +741,11 @@ void mlawPhenomenologicalSMP::constitutive3(const STensor3& F0, const STensor3& zg=1.; Ff=Ff0; - double tau_y=_tau_y0; static STensor43 dtauegdF, dFpgdF; static STensor3 dtauegdT, dFpgdT; static STensor63 ddlnCeg; STensorOperation::zero(dtauegdF);STensorOperation::zero(dtauegdT);STensorOperation::zero(dFpgdF);STensorOperation::zero(dFpgdT);STensorOperation::zero(ddlnCeg); - predictorCorrector(F0,Fn,q0,q1,tau_y,Pg,dh,T,dgammataueq,stiff,dPgdT,Tangentg); + predictorCorrector(F0,Fn,q0,q1,Pg,dh,T,dgammataueq,stiff,dgammataueqdT,dgammataueqdF,dPgdT,Tangentg); static STensor3 subs3=Ff; subs3+=Fpg; subs3-=2.*_I2; @@ -613,7 +782,7 @@ bool mlawPhenomenologicalSMP::checkDeltaEp(const STensor3& Fp0, const STensor3& } -void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, double tau_y,STensor3& Pg, const double dh,double T,double& dgammataueq, bool stiff,STensor3& dPgdT, STensor43& Tangentg) const +void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, STensor3& Pg, const double dh,double T,double& dgammataueq, bool stiff,double& dgammataueqdT, STensor3& dgammataueqdF,STensor3& dPgdT, STensor43& Tangentg) const { const double &gamma0=q0->getConstRefToEquivalentPlasticDefo(); double &gamma1=q1->getRefToEquivalentPlasticDefo(); @@ -650,6 +819,14 @@ void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STens static STensor3 N; N = Eegpr.dev(); N*= 1/Eegpreq; + + /* Test plasticity */ + /* _j2IH->hardening(gamma1, q1->getRefToIPJ2IsotropicHardening()); + double tau_y0 = _j2IH->getYield0(); + double tau_y = q1->getConstRefToIPJ2IsotropicHardening().getR(); + double H_gamma = q1->getConstRefToIPJ2IsotropicHardening().getDR();*/ + double tau_y=_tau_y0; + tau_y*=zg; double f=taueqpr-tau_y; @@ -658,6 +835,7 @@ void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STens double H_T=0.; //If tau_y evolves with T then it is not 0 static STensor43 dexpDgammaN; + double taueq=0.; if(f>0.){ @@ -670,7 +848,6 @@ void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STens double eps_f=fabs(f/taueqpr); double j1=1./((3.*zg*_Gg)+H_gamma); - double taueq; //Iterative process @@ -684,6 +861,9 @@ void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STens devtaueg *= (2.*_Gg*zg); taueq=sqrt(1.5*devtaueg.dotprod()); + /*_j2IH->hardening(gamma1, q1->getRefToIPJ2IsotropicHardening()); + tau_y = q1->getConstRefToIPJ2IsotropicHardening().getR(); + H_gamma = q1->getConstRefToIPJ2IsotropicHardening().getDR();*/ f=taueq-tau_y; eps_f=fabs(f/taueqpr); @@ -706,14 +886,16 @@ void mlawPhenomenologicalSMP::predictorCorrector(const STensor3& F0, const STens STensorOperation::multSTensor3(expDgammaN,Fpg0,Fpg); computePg(Fn,Ff,Fpg,Feg,Eeg,tauegpr,dlnCeg,ddlnCeg,zg,T,Pg); - //Plastic dissipation term - dgammataueq=taueq*Delta_gamma; } else{gamma1=gamma0;} + + //Plastic dissipation term + dgammataueq=taueq*Delta_gamma; + if(stiff){ //Tangent operators glassy phase - tangentglassy(Fn,q0,q1,dexpDgammaN, Fegpr, dlnCegpr,Eegpr, N, Eegpreq, Delta_gamma, zg, H_gamma, H_T, T,Feg,taueg,dlnCeg,ddlnCeg,dPgdT,Tangentg); - } + tangentglassy(Fn,q0,q1,dexpDgammaN, Fegpr, dlnCegpr,Eegpr, N, Eegpreq, Delta_gamma, zg, H_gamma, H_T, T,taueq,Feg,taueg,dlnCeg,ddlnCeg,dgammataueqdT,dgammataueqdF,dPgdT,Tangentg); + } } @@ -852,7 +1034,7 @@ STensorOperation::multSTensor3STensor43(tauer,dlnCer,Ser); } -void mlawPhenomenologicalSMP::tangentglassy(const STensor3& Fn,const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, const STensor43& dexpDelta_gammaNpr,const STensor3& Fegpr, STensor43& dlnCegpr,const STensor3& Eegpr,const STensor3& Npr,const double Eegpreq,const double Deltagamma,const double zg,const double H_gamma,const double H_T,const double T,const STensor3& Feg,const STensor3& taueg,const STensor43& dlnCeg,const STensor63& ddlnCeg, STensor3& dPgdT, STensor43& Tangentg) const { +void mlawPhenomenologicalSMP::tangentglassy(const STensor3& Fn,const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, const STensor43& dexpDelta_gammaNpr,const STensor3& Fegpr, STensor43& dlnCegpr,const STensor3& Eegpr,const STensor3& Npr,const double Eegpreq,const double Deltagamma,const double zg,const double H_gamma,const double H_T,const double T,const double taueq,const STensor3& Feg,const STensor3& taueg,const STensor43& dlnCeg,const STensor63& ddlnCeg, double& dgammataueqdT, STensor3& dgammataueqdF, STensor3& dPgdT, STensor43& Tangentg) const { const STensor3& Fpg0 = q0->getConstRefToFpg(); static STensor3 Fpg0inv; @@ -874,6 +1056,9 @@ void mlawPhenomenologicalSMP::tangentglassy(const STensor3& Fn,const IPPhenomeno dtauegdEegpr = _C0g; dtauegdEegpr *= zg; + STensorOperation::zero(dgammataueqdF); + dgammataueqdT=0.; + static double dzgdT=0.; if((T<=_Tg+_DeltaTg)and(T>=_Tg-_DeltaTg)){ dzgdT=-2.*_w*exp(2.*_w*(T-_Tg)); @@ -893,6 +1078,25 @@ void mlawPhenomenologicalSMP::tangentglassy(const STensor3& Fn,const IPPhenomeno } } + static STensor43 EegprToF; + for (int i=0; i<3; i++){ + for (int j=0; j<3; j++){ + for (int k=0; k<3; k++){ + for (int l=0; l<3; l++){ + EegprToF(i,j,k,l) = 0.; + for (int p=0; p<3; p++){ + for (int q=0; q<3; q++){ + for (int r=0; r<3; r++){ + EegprToF(i,j,k,l) += dlnCegpr(i,j,p,q)*Fegpr(k,p)*Ffinv(l,r)*Fpg0inv(r,q); + } + } + } + } + } + } + } + + if (Deltagamma > 0.){ static STensor3 DgammaDEepr; DgammaDEepr = (Npr); @@ -932,25 +1136,43 @@ if (Deltagamma > 0.){ static STensor3 DexpABT; STensorOperation::multSTensor43STensor3(dexpDelta_gammaNpr,BT,DexpABT); STensorOperation::multSTensor3Add(DexpABT,Fpg0,dFpgdT); - - } - static STensor43 EegprToF; - for (int i=0; i<3; i++){ - for (int j=0; j<3; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - EegprToF(i,j,k,l) = 0.; - for (int p=0; p<3; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - EegprToF(i,j,k,l) += dlnCegpr(i,j,p,q)*Fegpr(k,p)*Ffinv(l,r)*Fpg0inv(r,q); + static STensor3 dgammadF,dtaueqdF,devtaueg; + devtaueg=taueg.dev(); + STensorOperation::multSTensor3STensor43(DgammaDEepr,EegprToF,dgammadF); + for (int j=0; j<3; j++){ + for (int X=0; X<3; X++){ + dtaueqdF(j,X) = 0.; + for (int C=0; C<3; C++){ + for (int D=0; D<3; D++){ + for (int A=0; A<3; A++){ + for (int B=0; B<3; B++){ + dtaueqdF(j,X) += (3./2./taueq)*(devtaueg(C,D))*(dtauegdF(C,D,j,X)-((1/3.)*_I2(A,B)*dtauegdF(A,B,j,X)*_I2(C,D))); } } } } } } + + dgammataueqdF = (taueq*dgammadF); + dgammataueqdF += (dtaueqdF*Deltagamma); + + double dtaueqdT=0.; + + for (int C=0; C<3; C++){ + for (int D=0; D<3; D++){ + for (int A=0; A<3; A++){ + for (int B=0; B<3; B++){ + dtaueqdT +=devtaueg(C,D)*(dtauegdT(C,D)-((1/3.)*_I2(A,B)*dtauegdT(A,B)*_I2(C,D))); + } + } + } + } + + dtaueqdT *= (3./2./taueq); + + dgammataueqdT = (taueq*dDeltagammadT) + (Deltagamma*dtaueqdT); } STensorOperation::multSTensor43(dtauegdEegpr,EegprToF,dtauegdF); @@ -961,6 +1183,7 @@ if (Deltagamma > 0.){ STensorOperation::zero(dFpgdF); } + // done DcorKirDF, DcorKirDT, DFpDF, DFpDT static STensor43 DinvFpgdF; @@ -1097,13 +1320,6 @@ void mlawPhenomenologicalSMP::computePr(const STensor3& Fn,const STensor3& Fp,ST tauer+=devtauer; tauer*=(1.-zg);//Corotational stress of the rubbery phase - /*printf("T: %f\n",T); - Fn.print("Fn: \n"); - Fp.print("Fp: \n"); - Fer.print("Fer: \n"); - Eer.print("Eer: \n"); - tauer.print("tauer: \n");*/ - STensorOperation::multSTensor3STensor43(tauer,dlnCer,Ser);//Elastic 2nd Piola-Kirchhoff stress of the rubbery phase static STensor3 Pr_1, FpinvT; @@ -1137,13 +1353,6 @@ void mlawPhenomenologicalSMP::computePg(const STensor3& Fn,const STensor3& Ff,co taueg=peg; taueg+=devtaueg; - /*printf("T: %f\n",T); - Fn.print("Fn: \n"); - Ff.print("Ff: \n"); - Feg.print("Feg: \n"); - Eeg.print("Eeg: \n"); - taueg.print("taueg: \n");*/ - STensorOperation::multSTensor3STensor43(taueg,dlnCeg,Seg); static STensor3 Pg_1, Pg_2, FpginvT, FfinvT; diff --git a/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.h b/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.h index 865b139776c4410705b6de3def2be904109d6e04..b586b7aed3ec0f3202952e036836b25f03a44768 100644 --- a/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.h +++ b/NonLinearSolver/materialLaw/mlawPhenomenologicalSMP.h @@ -14,11 +14,13 @@ #include "STensor43.h" #include "STensor63.h" #include "ipSMP.h" +#include "scalarFunction.h" class mlawPhenomenologicalSMP : public materialLaw { protected: + J2IsotropicHardening *_j2IH; // isotropic hardening double _t0; STensor3 _I2; STensor43 _I4,_I4dev; @@ -38,12 +40,31 @@ class mlawPhenomenologicalSMP : public materialLaw STensor3 _k0; STensor3 _kg; STensor3 _kr; - double _w, _c, _cp, _cg, _cr, _TaylorQuiney, _Tg, _DeltaTg, _Kg, _Kr,_Eg,_Er,_nug,_nur,_lambdag,_lambdar,_Gg, _Gr,_alphag,_alphar,_zg0,_tau_y0; + double _w, _c, _cp, _cg, _cr, _TaylorQuiney, _Tg, _DeltaTg, _Kg, _Kr,_Gg, _Gr,_alphag,_alphar,_tau_y0; STensor43 _C0r,_C0g; + + // temperature dependence of hardening + scalarFunction* _temFunc_Sy0; // temperature dependence of initial yield stress + scalarFunction* _temFunc_H; // temperature dependence of hardening stress + + // temperature dependent elastic behavior + scalarFunction* _temFunc_K; // bulk modulus; + scalarFunction* _temFunc_G; // shear modulus; + + // temperature dependent thermal expansion + scalarFunction* _tempFunc_alpha; // temperature dependent + + // temperature dependence of thermal conductivity + scalarFunction* _temFunc_ThermalConductivity; + + // temperature dependence of specific heat + scalarFunction* _temFunc_cp; public: - mlawPhenomenologicalSMP(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Eg, const double Er, const double nug, const double nur,const double alphag, const double alphar, const double zg0, const double tau_y0); + mlawPhenomenologicalSMP(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Eg, const double Er, const double nug, const double nur,const double alphag, const double alphar, const double tau_y0); + mlawPhenomenologicalSMP(const int num,const double rho,const J2IsotropicHardening &j2IH,const double alpha, const double beta, const double gamma,const double t0, + const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr, const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr, const double Tg, const double DeltaTg,const double Eg, const double Er, const double nug, const double nur, const double alphag, const double alphar,const double tau_y0); #ifndef SWIG mlawPhenomenologicalSMP(const mlawPhenomenologicalSMP &source); mlawPhenomenologicalSMP& operator=(const materialLaw &source); @@ -53,13 +74,68 @@ class mlawPhenomenologicalSMP : public materialLaw // function of materialLaw virtual matname getType() const{return materialLaw::PhenomenologicalSMP;} virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt =0) const; + virtual const J2IsotropicHardening * getJ2IsotropicHardening() const {return _j2IH;} + void setIsotropicHardeningLaw(const J2IsotropicHardening& isoHard){ + if (_j2IH != NULL) delete _j2IH; + _j2IH = isoHard.clone(); + } + virtual double getG (double T) const { + double GT = _Gg*_temFunc_G->getVal(T); + return GT; + } + + virtual double getK (double T) const { + double KT = _Kg*_temFunc_K->getVal(T); + return KT; + } + + virtual double getThermalConductivity (double T) const { + double conductT = _Kxg*_temFunc_ThermalConductivity->getVal(T); + return conductT; + } + virtual double getalpha (double T) const { + double alphagT = _alphag*_tempFunc_alpha->getVal(T); + return alphagT; + } + + virtual double getcp (double T) const { + double cpT = _cg*_temFunc_cp->getVal(T); + return cpT; + } + virtual void setTemperatureFunction_ThermalExpansionCoefficient(const scalarFunction& Tfunc){ + if (_tempFunc_alpha != NULL) delete _tempFunc_alpha; + _tempFunc_alpha = Tfunc.clone(); + } + virtual void setTemperatureFunction_ThermalConductivity(const scalarFunction& Tfunc){ + if (_temFunc_ThermalConductivity != NULL) delete _temFunc_ThermalConductivity; + _temFunc_ThermalConductivity = Tfunc.clone(); + } + virtual void setTemperatureFunction_Cp(const scalarFunction& Tfunc){ + if (_temFunc_cp != NULL) delete _temFunc_cp; + _temFunc_cp = Tfunc.clone(); + } + virtual void setTemperatureFunction_Hardening(const scalarFunction& Tfunc){ + if (_temFunc_H != NULL) delete _temFunc_H; + _temFunc_H = Tfunc.clone(); + } + virtual void setTemperatureFunction_InitialYieldStress(const scalarFunction& Tfunc){ + if (_temFunc_Sy0 != NULL) delete _temFunc_Sy0; + _temFunc_Sy0 = Tfunc.clone(); + } + virtual void setTemperatureFunction_BulkModulus(const scalarFunction& Tfunc){ + if (_temFunc_K != NULL) delete _temFunc_K; + _temFunc_K = Tfunc.clone(); + } + virtual void setTemperatureFunction_ShearModulus(const scalarFunction& Tfunc){ + if (_temFunc_G != NULL) delete _temFunc_G; + _temFunc_G = Tfunc.clone(); + } public: void setStrainOrder(const int order){_order = order;}; double getInitialTemperature() const {return _t0;}; double getExtraDofStoredEnergyPerUnitField(double zg) const; - virtual double getzg0() const { return _zg0;}; //virtual double getInitialExtraDofStoredEnergyPerUnitField() const {getExtraDofStoredEnergyPerUnitField(zg);} virtual void constitutive( const STensor3& F0, // initial deformation gradient (input @ time n) @@ -117,7 +193,9 @@ public: STensor3& Pr, STensor3& Pg, const double dh, - double& dgammataueq + double& dgammataueq, + double& dgammataueqdT, + STensor3& dgammataueqdF ) const; void constitutive3( const STensor3& F0, @@ -130,7 +208,9 @@ public: bool stiff, STensor3& Pg, const double dh, - double& dgammataueq + double& dgammataueq, + double& dgammataueqdT, + STensor3& dgammataueqdF ) const; const STensor3& getInitialConductivityTensor() const { return _k0;}; virtual const STensor3& getStiff_alphaDilatation()const { return _Stiff_alphaDilatation;}; @@ -140,13 +220,19 @@ public: protected: - void predictorCorrector(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1, double tau_y,STensor3& Pg, const double dh,double T,double& dgammataueq,bool stiff,STensor3& dPgdT,STensor43& Tangentg) const; + void predictorCorrector(const STensor3& F0, const STensor3& Fn, const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,STensor3& Pg, const double dh,double T,double& dgammataueq,bool stiff,double& dgammataueqdT,STensor3& dgammataueqdF,STensor3& dPgdT,STensor43& Tangentg) const; + bool checkDeltaEp(const STensor3& Fp0, const STensor3& Fp) const; + void tangentrubbery(const STensor3& Fer,const STensor3& Fp,const STensor3& tauer,const STensor43& dlnCer,const STensor63& ddlnCer,const STensor3& Eer,const double T,const double zg, STensor3& dPrdT, STensor43& Tangentr) const; - void tangentglassy(const STensor3& Fn,const IPPhenomenologicalSMP *q0,IPPhenomenologicalSMP *q1, const STensor43& dexpDelta_gammaNpr,const STensor3& Fegpr, STensor43& dlnCegpr,const STensor3& Eegpr,const STensor3& Npr,const double Eegpreq,const double Deltagamma,const double zg,const double H_gamma,const double H_T,const double T,const STensor3& Feg,const STensor3& taueg,const STensor43& dlnCeg,const STensor63& ddlnCeg, STensor3& dPgdT, STensor43& Tangentg) const; - //void plasticitytangent(const IPPhenomenologicalSMP *q0,STensor43& dtauegdF, STensor3& dtauegdT, STensor43& dFpgdF, STensor3& dFpgdT,const STensor43& dexpDelta_gammaNpr,const STensor3& Fegpr, STensor43& dlnCegpr,const STensor3& Eegpr,const STensor3& Npr,const double Eegpreq,const double Deltagamma,const double zg,const double H_gamma,const double H_T,const double T) const; -void computePr(const STensor3& Fn,const STensor3& Fp,STensor3& Fer,STensor3& Eer,STensor3& tauer,STensor43& dlnCer,STensor63& ddlnCer,const double zg,const double T,STensor3& Pr)const; -void computePg(const STensor3& Fn,const STensor3& Ff,const STensor3& Fpg,STensor3& Feg,STensor3& Eeg,STensor3& taueg,STensor43& dlnCeg,STensor63& ddlnCeg,const double zg,const double T,STensor3& Pg)const; + + void tangentglassy(const STensor3& Fn,const IPPhenomenologicalSMP *q0,IPPhenomenologicalSMP *q1, const STensor43& dexpDelta_gammaNpr,const STensor3& Fegpr, STensor43& dlnCegpr,const STensor3& Eegpr,const STensor3& Npr,const double Eegpreq,const double Deltagamma,const double zg,const double H_gamma,const double H_T,const double T,const double taueq,const STensor3& Feg,const STensor3& taueg,const STensor43& dlnCeg,const STensor63& ddlnCeg,double& dgammataueqdT,STensor3& dgammataueqdF,STensor3& dPgdT, STensor43& Tangentg) const; + + void computePr(const STensor3& Fn,const STensor3& Fp,STensor3& Fer,STensor3& Eer,STensor3& tauer,STensor43& dlnCer,STensor63& ddlnCer,const double zg,const double T,STensor3& Pr)const; + + void computePg(const STensor3& Fn,const STensor3& Ff,const STensor3& Fpg,STensor3& Feg,STensor3& Eeg,STensor3& taueg,STensor43& dlnCeg,STensor63& ddlnCeg,const double zg,const double T,STensor3& Pg)const; + + virtual void HookeTensor(const double KT, const double GT, STensor43& C) const; #endif // SWIG }; diff --git a/NonLinearSolver/nlTerms/nlTerms.cpp b/NonLinearSolver/nlTerms/nlTerms.cpp index c1a7a6e0410768a18df06dafcb866440a1fc621f..cc6ac8e29719f8c0df75a060b5c793494c5d474b 100644 --- a/NonLinearSolver/nlTerms/nlTerms.cpp +++ b/NonLinearSolver/nlTerms/nlTerms.cpp @@ -166,7 +166,7 @@ template<> void BilinearTermPerturbation<double>::get(MElement *ele,int npts,Int } // divide all components by 1/2eps m.scale(_onedivtwoeps); - //m.print("stiff pertu\n"); + //m.print("stiff pertu\n"); } void mass3D::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> &m) const{ diff --git a/cm3apps/install.txt b/cm3apps/install.txt index d436b326b59e1b37c85502eec8d2167c95e4637b..0df94a9b89c17ed2b6ac805682883fe8a0bee638 100644 --- a/cm3apps/install.txt +++ b/cm3apps/install.txt @@ -1,6 +1,7 @@ INSTALL the different projects of cm3 lab update 06-2017 + This file describes how to install a cm3 projects on your computer. For cm3's cluster (e.g. cm3011 cm3012) all packages are install and the procedure of installation is described later (see B). There is now a special cm3apps projects that rules them all which is described herein but you can install only 1 project as before directly on the project folder. diff --git a/dG3D/benchmarks/AnisotropicRandomField/Stoch_Sample.py b/dG3D/benchmarks/AnisotropicRandomField/Stoch_Sample.py index c7bc937efe5c2a762ae73485c5a7deeb0cc4374c..51ccbc0d585702250601aececa4aac4dcffc787f 100644 --- a/dG3D/benchmarks/AnisotropicRandomField/Stoch_Sample.py +++ b/dG3D/benchmarks/AnisotropicRandomField/Stoch_Sample.py @@ -91,7 +91,7 @@ mysolver.solve() check = TestCheck() -check.equal(1.352692e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 101, 0),1.e-6) +check.equal(1.352749e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 101, 0),1.e-6) try: import linecache @@ -103,7 +103,7 @@ except: import os os._exit(1) else: - check.equal(6.845972e+08,float(linesmax.split(';')[1])) + check.equal(6.786223e+08,float(linesmax.split(';')[1])) check.equal(4.128571e+08,float(linesmin.split(';')[1])) check.equal(5.522685e+08,float(linesmean.split(';')[1])) diff --git a/dG3D/benchmarks/CMakeLists.txt b/dG3D/benchmarks/CMakeLists.txt index a40f7f5818aa98bfa7267d5eeb887cd891ebffe9..aee4c5a6216fdd6b0833b46a6c47a9d14a1ee435 100644 --- a/dG3D/benchmarks/CMakeLists.txt +++ b/dG3D/benchmarks/CMakeLists.txt @@ -11,8 +11,6 @@ add_subdirectory(CohesiveBand_cube) add_subdirectory(CohesiveBand_Plate) add_subdirectory(Gurson_Cube) add_subdirectory(Gurson_TwoHole) -add_subdirectory(Thomason_Cube) -add_subdirectory(Thomason_planeStrain) add_subdirectory(nonLocalDamageParallel) add_subdirectory(nonLocalMFH) add_subdirectory(seebeck) @@ -113,6 +111,7 @@ add_subdirectory(voidedRVE) add_subdirectory(smpT22) add_subdirectory(smpT22Mechanism2) add_subdirectory(smpT58) +add_subdirectory(smpPhenomenological) add_subdirectory(multiscaleCohesiveTest2D_fullDG_rotateRVE) add_subdirectory(multiscaleEnhanceStrain) add_subdirectory(nonLinearMixedBC_2D_DirectionFollowing) diff --git a/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py b/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py index 0481d48f9be9f71702a953adac0842f6625f598c..986f8d59d2555344ccc60257d6467584158825bb 100755 --- a/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py +++ b/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py @@ -211,7 +211,7 @@ mysolver.solve() check = TestCheck() -check.equal(-8.098084e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 61, 1),1.e-6) +check.equal(-8.094013e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 61, 1),1.e-4) diff --git a/dG3D/benchmarks/DG_HEX8_PRI6/twoHole.py b/dG3D/benchmarks/DG_HEX8_PRI6/twoHole.py index 9000b1844e1df7ac6af75cfac673f0bc4b0c481a..3169bad8f2026b7a02abb56f3eda820e51b7f5cb 100644 --- a/dG3D/benchmarks/DG_HEX8_PRI6/twoHole.py +++ b/dG3D/benchmarks/DG_HEX8_PRI6/twoHole.py @@ -80,5 +80,5 @@ mysolver.archivingForceOnPhysicalGroup("Face", 12, 1) mysolver.solve() check = TestCheck() -check.equal(-5.804757e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 12, 1),1.e-4) +check.equal(-5.802954e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 12, 1),1.e-4) diff --git a/dG3D/benchmarks/DG_PRI18/twoHole.py b/dG3D/benchmarks/DG_PRI18/twoHole.py index f7dc33a07270dee86508334dac1a19db3b6b55aa..3efbc5f3ac91afef9a2ada9785ba8583645ca77e 100644 --- a/dG3D/benchmarks/DG_PRI18/twoHole.py +++ b/dG3D/benchmarks/DG_PRI18/twoHole.py @@ -80,4 +80,4 @@ mysolver.archivingNodeDisplacement(19,1,1) mysolver.solve() check = TestCheck() -check.equal(-2.485282e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) +check.equal(-2.487279e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),5.e-4) diff --git a/dG3D/benchmarks/DG_PRI6/twoHole.py b/dG3D/benchmarks/DG_PRI6/twoHole.py index bd2756d14ffaf1c379d60476a2379057f591e3e3..5bea1e906efca5f27441edbb7b878ca50c1e8282 100644 --- a/dG3D/benchmarks/DG_PRI6/twoHole.py +++ b/dG3D/benchmarks/DG_PRI6/twoHole.py @@ -79,4 +79,4 @@ mysolver.archivingNodeDisplacement(19,1,1) mysolver.solve() check = TestCheck() -check.equal(-2.839032e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) +check.equal(-2.839032e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),5.e-4) diff --git a/dG3D/benchmarks/DG_TET4/twoHole.py b/dG3D/benchmarks/DG_TET4/twoHole.py index 5bbbd19875fc582eaa8e05230fc1f4500e06f6f6..7159fae5f55925faed73f5510cbe61aa98785e49 100644 --- a/dG3D/benchmarks/DG_TET4/twoHole.py +++ b/dG3D/benchmarks/DG_TET4/twoHole.py @@ -79,4 +79,4 @@ mysolver.archivingNodeDisplacement(19,1,1) mysolver.solve() check = TestCheck() -check.equal(-2.874055e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) +check.equal(-2.871230e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) diff --git a/dG3D/benchmarks/Gurson_Cube/cube.py b/dG3D/benchmarks/Gurson_Cube/cube.py index d7ee876c1c2853d287ef91b2db4ff43a7b049aca..82a7be5f379269735da20143b0578dab7f6660b5 100755 --- a/dG3D/benchmarks/Gurson_Cube/cube.py +++ b/dG3D/benchmarks/Gurson_Cube/cube.py @@ -49,8 +49,8 @@ BulkLaw1.setNonLocalMethod(1) CoalLawNum1 = 5 Coal_Law1 = FstarCoalescenceLaw(CoalLawNum1,fC,accRate) BulkLaw1.setCoalescenceLaw(Coal_Law1) -BulkLaw1.setPredictorCorrectorParameters(2,100,1.,2) - +BulkLaw1.setPredictorCorrectorParameters(2,100,1.,1) +#BulkLaw1.setReferenceT(298.) diff --git a/dG3D/benchmarks/Gurson_TwoHole/twoHole.py b/dG3D/benchmarks/Gurson_TwoHole/twoHole.py index 28b87cfee091e0b66c1e74a4cd389aca5315dd5b..5c9bb11c6ae14861613cc58f936da61f27853f3d 100644 --- a/dG3D/benchmarks/Gurson_TwoHole/twoHole.py +++ b/dG3D/benchmarks/Gurson_TwoHole/twoHole.py @@ -134,7 +134,7 @@ mysolver.archivingNodeDisplacement(19,1, nstepArchForce) mysolver.solve() check = TestCheck() -check.equal(-7.134948e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) +check.equal(-7.114719e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) diff --git a/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py b/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py index 8ca68b9e73dd4f47b69af012bba2f770a99aa693..64e32330522a12841de50cea756c9c743df52c34 100644 --- a/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py +++ b/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py @@ -90,7 +90,7 @@ mysolver.solve() check = TestCheck() -check.equal(1.365495e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 101, 0),1.e-6) +check.equal(1.365465e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 101, 0),1.e-6) try: import linecache @@ -103,7 +103,7 @@ except: os._exit(1) else: check.equal(6.750356e+08,float(linesmax.split(';')[1])) - check.equal(3.665907e+08,float(linesmin.split(';')[1])) + check.equal(3.653339e+08,float(linesmin.split(';')[1])) check.equal(5.462304e+08,float(linesmean.split(';')[1])) diff --git a/dG3D/benchmarks/Thomason_cube/cube.geo b/dG3D/benchmarks/Thomason_cube/cube.geo deleted file mode 100644 index 13ab07e718b4071d71d4bf4ff94a9a2afa1c3c1a..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/Thomason_cube/cube.geo +++ /dev/null @@ -1,51 +0,0 @@ -// Cube.geo -mm=1.0e-3; // Units -n=1; // Number of layers (in thickness / along z) -m = 1; // Number of element + 1 along y -p = 2; // Number of element + 1 along x (min 3 to have a crack) -L=2.*mm; // Cube lenght -sl1=L/n; - -// Face z = 0 (point in anti-clockwise order) -Point(1)={0,0,0,sl1}; -Point(2)={L,0,0,sl1}; -Point(3)={L,L,0,sl1}; -Point(4)={0,L,0,sl1}; -Line(1)={1,2}; -Line(2)={2,3}; -Line(3)={3,4}; -Line(4)={4,1}; -Line Loop(5) = {3, 4, 1, 2}; -Plane Surface(6) = {5}; - -// Cube extrusion -Extrude {0, 0, L} { - Surface{6}; Layers{n}; Recombine; -} - -// Physical entities - // Volume -Physical Volume(29) = {1}; - // Surface -Physical Surface(30) = {19}; // Left face x = 0 -Physical Surface(31) = {27}; // Right face x = L -Physical Surface(32) = {6}; // Back face z = 0 -Physical Surface(33) = {28}; // Front face z = L -Physical Surface(34) = {15}; // Down face y = 0 -Physical Surface(35) = {23}; // Up face y = L - -// Mesh -Transfinite Line {2, 4} = m Using Progression 1; -Transfinite Line {1, 3} = p Using Progression 1; -Transfinite Surface {6}; -Recombine Surface{6}; - - -// To save cube elongation -Physical Point(41) = {1}; // Point on left face (0,0,0) -Physical Point(42) = {4}; // Point on left face (0,L,0) -Physical Point(43) = {2}; // Point on right face (L,0,0) -Physical Point(44) = {3}; // Point on right face (L,L,0) - - - diff --git a/dG3D/benchmarks/Thomason_cube/cube.py b/dG3D/benchmarks/Thomason_cube/cube.py deleted file mode 100755 index 081f5219dd29a0107df09b486b6b54ad38bef494..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/Thomason_cube/cube.py +++ /dev/null @@ -1,159 +0,0 @@ -#coding-Utf-8-*- -from gmshpy import* -#from dG3DpyDebug import* -from dG3Dpy import* -from math import* - -# Script for testing cube problem with Gurson - -# Material law creation -# =================================================================================== -BulkLawNum1 = 1 - -# material parameters - bulk law -rho = 7850. # kg/m3: density -young = 210.0*1.e9 # Pa: module de young -nu = 0.3 # -: poisson coefficient -sy0 = 400.0e6 # Pa: initial yield stress -h_hard = 100.0e6 # Pa: hardenning coefficient -h_exp = 1.0 # -: exponential coefficient -HardenLawNum1 = 2 -Harden1 = PowerLawJ2IsotropicHardening(HardenLawNum1, sy0, h_hard, h_exp) -# - gurson -q1 = 1.5 -q2 = 1. -q3 = 1. -fVinitial = 0.01 -# - nucleation -fn = 0.1; -sn = 0.1; -epsilonn = 0.3; -NucleationLawNum1 = 3 -Gdnexp1 = ExponentialNucleationLaw(NucleationLawNum1, fn, sn, epsilonn); -# - non-local law -cl = 2.0e-4 # m2: non-local parameter (== NL-length^2) -ClLawNum1 = 4 -Cl_Law1 = IsotropicCLengthLaw(ClLawNum1, cl) -# material law creation -BulkLaw1 = NonLocalPorousThomasonDG3DMaterialLaw(BulkLawNum1, young, nu, rho, fVinitial, 5., Harden1, Cl_Law1) -BulkLaw1.setOrderForLogExp(9) -BulkLaw1.setNucleationLaw(Gdnexp1) -BulkLaw1.setPredictorCorrectorParameters(2,50,1.) -BulkLaw1.setYieldSurfaceExponent(20) - - - - - -# Solver parameters -# =================================================================================== -soltype = 1 # StaticLinear=0 (default, StaticNonLinear=1, Explicit=2, - # Multi=3, Implicit=4, Eigen=5) -nstep = 250 # Number of step -ftime =1.0 # Final time -tol=1.e-6 # Relative tolerance for NR scheme -tolAbs = 1.e-10 # Absolute tolerance for NR scheme -nstepArch=nstep/250 # Number of step between 2 archiving -nstepArchEnergy = 1 # Number of step between 2 energy computation and archiving -nstepArchForce = 1 # Number of step between 2 force archiving -MaxIter = 25 # Maximum number of iterations -StepIncrease = 3 # Number of successfull timestep before reincreasing it -StepReducFactor = 5.0 # Timestep reduction factor -NumberReduction = 4 # Maximum number of timespep reduction: max reduction = pow(StepReducFactor,this) -fullDg = bool(1) # O = CG, 1 = DG -dgnl = bool(1) # DG for non-local variables inside a domain (only if fullDg) -eqRatio = 1.0e6 # Ratio between "elastic" and non-local equations -space1 = 0 # Function space (Lagrange=0) -beta1 = 30.0 # Penality parameter for DG - -# Domain creation -## =================================================================================== -numPhysVolume1 = 29 # Number of a physical volume of the model in .geo -numDomain1 = 1000 # Number of the domain -field1 = dG3DDomain(numDomain1,numPhysVolume1,space1,BulkLawNum1,fullDg,3,1) -field1.stabilityParameters(beta1) # Adding stability parameters (for DG) -field1.setNonLocalStabilityParameters(beta1,dgnl) # Adding stability parameters (for DG) -field1.setNonLocalEqRatio(eqRatio) -field1.gaussIntegration(0,-1,-1) -#field1.matrixByPerturbation(1,1,1,1e-8) # Tangent computation analytically or by pertubation - - -# Solver creation -# =================================================================================== -mysolver = nonLinearMechSolver(numDomain1) # Solver associated with numSolver1 -geofile="cube.geo" -meshfile= "cube.msh" # name of mesh file -mysolver.createModel(geofile,meshfile,3,1) -#mysolver.loadModel(meshfile) # add mesh -mysolver.addDomain(field1) # add domain -mysolver.addMaterialLaw(BulkLaw1) # add material law -mysolver.Solver(2) # Library solving: Gmm=0 (default) Taucs=1 PETsc=2 -# solver parametrisation -mysolver.Scheme(soltype) # solver scheme -mysolver.snlData(nstep,ftime,tol,tolAbs) # solver parameters -mysolver.snlManageTimeStep(MaxIter,StepIncrease,StepReducFactor,NumberReduction) #timestep -# solver archiving -mysolver.stepBetweenArchiving(nstepArch) # archiving frequency -mysolver.energyComputation(nstepArchEnergy) # archiving frequency for energy -mysolver.lineSearch(bool(0)) # lineSearch activation -mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps") - -# Boundary conditions -# =============================== -tot_disp = 1.e-3 # Max disp == elongation 50 pourcent -mysolver.displacementBC("Face",30,0,0.) # face x = 0 -mysolver.displacementBC("Face",31,0,tot_disp) # face x = L -mysolver.displacementBC("Face",34,1,0.) # face y = 0 -mysolver.displacementBC("Face",32,2,0.) # face z = 0 - -mysolver.initialBC("Volume","Position",29,3,fVinitial) - -# Variable storage -# =============================== -mysolver.internalPointBuildView("svm",IPField.SVM, 1, 1) -mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1) -mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1) -mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1) -mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1) -mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1) -mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1) -mysolver.internalPointBuildView("damage",IPField.DAMAGE,1,1) -mysolver.internalPointBuildView("epl",IPField.PLASTICSTRAIN, 1, 1) -mysolver.internalPointBuildView("coalescence",IPField.COALESCENCE, 1, 1) -mysolver.internalPointBuildView("chi",IPField.LIGAMENT_RATIO, 1, 1) - -mysolver.archivingForceOnPhysicalGroup("Face", 31, 0, nstepArchForce) -mysolver.archivingNodeDisplacement(43,0, nstepArchForce) -mysolver.archivingIPOnPhysicalGroup("Volume",29, IPField.LOCAL_POROSITY,IPField.MEAN_VALUE); -mysolver.archivingIPOnPhysicalGroup("Volume",29, IPField.CORRECTED_POROSITY,IPField.MEAN_VALUE); -mysolver.archivingIPOnPhysicalGroup("Volume",29, IPField.DAMAGE,IPField.MEAN_VALUE); -mysolver.archivingIPOnPhysicalGroup("Volume",29, IPField.LIGAMENT_RATIO,IPField.MEAN_VALUE); - -# Solving -# =========== -mysolver.solve() - - - - - - -# Test -# =========== -check = TestCheck() -check.equal(1.300809e+00,mysolver.getArchivedForceOnPhysicalGroup("Face", 31, 0),1.e-5) - -import csv - -data = csv.reader(open('IPVolume29val_LOCAL_POROSITYMean.csv'), delimiter=';') -porosity = list(data) -check.equal(3.403506e-01,float(porosity[-1][1]),1e-5) - -data = csv.reader(open('IPVolume29val_LIGAMENT_RATIOMean.csv'), delimiter=';') -porosity = list(data) -check.equal(9.995000e-01,float(porosity[-1][1]),1e-5) - - - - - diff --git a/dG3D/benchmarks/Thomason_planeStrain/CMakeLists.txt b/dG3D/benchmarks/Thomason_planeStrain/CMakeLists.txt deleted file mode 100644 index 30f62ef5d5717944155262de21c9c35affcaf5ac..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/Thomason_planeStrain/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# test file - -set(PYFILE model.py) - -set(FILES2DELETE - *.csv - disp* - stress* -) - -add_cm3python_test(${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/Thomason_planeStrain/model.geo b/dG3D/benchmarks/Thomason_planeStrain/model.geo deleted file mode 100644 index 3fdd4201f9a9a920530ce47713deac24c02c9b23..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/Thomason_planeStrain/model.geo +++ /dev/null @@ -1,72 +0,0 @@ -mm = 1.; -scale = 1./3.; - -B = scale*7.5*mm; -R = scale*12.5*mm; -L = scale*32.5*mm; - -lsca1 = B*0.1; -lsca2 = L*0.1; -Point(1) = {0,0,0,lsca1}; -Point(2) = {L,0,0,lsca2}; -Point(3) = {L,B+R,0,lsca2}; -Point(4) = {B+R,B+R,0,0.7*lsca2}; -Point(5) = {B,B+R,0,0.5*lsca2}; -Point(6) = {B,B,0,0.4*lsca2}; -Point(7) = {0,B,0,lsca1}; -Point(8) = {B*0.2,0,0,lsca1}; -Point(9) = {B*0.2,B,0,lsca1}; - - -//+ -Symmetry {1, 0, 0, 0} { - Duplicata { Point{3}; Point{4}; Point{5}; Point{6}; Point{2}; Point{8}; Point{9}; } -} -//+ -Line(1) = {4, 3}; -//+ -Line(2) = {3, 2}; -//+ -Line(3) = {2, 8}; -//+ -Line(4) = {8, 15}; -//+ -Line(5) = {15, 14}; -//+ -Line(6) = {14, 10}; -//+ -Line(7) = {10, 11}; -//+ -Line(8) = {13, 16}; -//+ -Line(9) = {16,7}; -//+ -Line(10) = {7, 9}; -//+ -Line(11) = {9, 6}; -//+ -Circle(12) = {11, 12, 13}; -//+ -Circle(13) = {6, 5, 4}; -//+ -Line Loop(1) = {13,11, 8, 9, 10, 12, 1, 2, 3, 4, 5, 6, 7}; -//+ -Plane Surface(1) = {1}; -//+ -Physical Surface(11) = {1}; -//+ -Physical Line(1) = {5, 4, 3}; -//+ -Physical Line(2) = {2}; -//+ -Physical Line(4) = {6}; -//+ -Physical Point(1) = {14}; -//+ -Physical Point(2) = {2}; -//+ -Physical Point(3) = {3}; -//+ -Physical Point(4) = {10}; -//+ -Physical Point(5) = {7}; diff --git a/dG3D/benchmarks/Thomason_planeStrain/model.msh b/dG3D/benchmarks/Thomason_planeStrain/model.msh deleted file mode 100644 index f83c2a66192aa074505d54874f5452162de0cc06..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/Thomason_planeStrain/model.msh +++ /dev/null @@ -1,2829 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -1875 -1 10.83333333333333 0 0 -2 10.83333333333333 6.666666666666666 0 -3 6.666666666666666 6.666666666666666 0 -4 2.5 2.5 0 -5 0 2.5 0 -6 0.5 0 0 -7 0.5 2.5 0 -8 -10.83333333333333 6.666666666666666 0 -9 -6.666666666666666 6.666666666666666 0 -10 -2.5 2.5 0 -11 -10.83333333333333 0 0 -12 -0.5 0 0 -13 -0.5 2.5 0 -14 7.385536929746417 6.666666666666666 0 -15 8.157560940350034 6.666666666666666 0 -16 8.986669036448534 6.666666666666666 0 -17 9.877082154283016 6.666666666666666 0 -18 7.026101798206478 6.666666666666666 0 -19 7.771548935048793 6.666666666666666 0 -20 8.572114988398592 6.666666666666666 0 -21 9.431875595365852 6.666666666666666 0 -22 10.35520774380742 6.666666666666666 0 -23 10.83333333333333 5.714285714288318 0 -24 10.83333333333333 4.76190476191101 0 -25 10.83333333333333 3.809523809532154 0 -26 10.83333333333333 2.857142857151131 0 -27 10.83333333333333 1.904761904767414 0 -28 10.83333333333333 0.9523809523837068 0 -29 10.83333333333333 6.190476190477205 0 -30 10.83333333333333 5.238095238099803 0 -31 10.83333333333333 4.285714285721674 0 -32 10.83333333333333 3.333333333343024 0 -33 10.83333333333333 2.3809523809592 0 -34 10.83333333333333 1.428571428576048 0 -35 10.83333333333333 0.4761904761922615 0 -36 9.835602914927104 0 0 -37 8.911976369355045 0 0 -38 8.056950221418392 0 0 -39 7.265429200904338 0 0 -40 6.532696642531177 0 0 -41 5.854386162423832 0 0 -42 5.22645566105514 0 0 -43 4.645163211207747 0 0 -44 4.10704505744334 0 0 -45 3.608894412798498 0 0 -46 3.147742651554689 0 0 -47 2.720842016997203 0 0 -48 2.325648443369094 0 0 -49 1.959806984818979 0 0 -50 1.621137570445804 0 0 -51 1.307622082917243 0 0 -52 1.017392236851634 0 0 -53 0.7487185705861066 0 0 -54 10.33446812412996 0 0 -55 9.373789642140565 0 0 -56 8.484463295386199 0 0 -57 7.661189711161692 0 0 -58 6.899062921717705 0 0 -59 6.193541402477401 0 0 -60 5.540420911740162 0 0 -61 4.935809436131443 0 0 -62 4.376104134325725 0 0 -63 3.857969735120877 0 0 -64 3.378318532176665 0 0 -65 2.934292334276164 0 0 -66 2.52324523018353 0 0 -67 2.142727714094168 0 0 -68 1.790472277632455 0 0 -69 1.464379826681522 0 0 -70 1.162507159884575 0 0 -71 0.883055403718954 0 0 -72 0.6243592852932487 0 0 -73 0.2500000000006936 0 0 -74 1.376398994779038e-12 0 0 -75 -0.2499999999993064 0 0 -76 0.3750000000002482 0 0 -77 0.1250000000010349 0 0 -78 -0.1249999999989651 0 0 -79 -0.3749999999996532 0 0 -80 -0.7487185705855498 0 0 -81 -1.017392236850373 0 0 -82 -1.307622082915254 0 0 -83 -1.62113757044308 0 0 -84 -1.959806984815219 0 0 -85 -2.32564844336305 0 0 -86 -2.720842016988197 0 0 -87 -3.147742651543298 0 0 -88 -3.608894412784436 0 0 -89 -4.107045057425648 0 0 -90 -4.645163211186158 0 0 -91 -5.226455661029151 0 0 -92 -5.854386162395257 0 0 -93 -6.532696642505054 0 0 -94 -7.265429200881483 0 0 -95 -8.056950221400218 0 0 -96 -8.911976369342831 0 0 -97 -9.83560291492126 0 0 -98 -0.6243592852927619 0 0 -99 -0.8830554037179834 0 0 -100 -1.162507159882758 0 0 -101 -1.464379826679178 0 0 -102 -1.790472277629263 0 0 -103 -2.142727714089176 0 0 -104 -2.523245230175578 0 0 -105 -2.934292334265705 0 0 -106 -3.378318532163937 0 0 -107 -3.857969735104922 0 0 -108 -4.376104134305766 0 0 -109 -4.935809436107967 0 0 -110 -5.540420911712009 0 0 -111 -6.193541402450046 0 0 -112 -6.899062921693304 0 0 -113 -7.661189711140275 0 0 -114 -8.48446329537042 0 0 -115 -9.373789642132341 0 0 -116 -10.33446812412701 0 0 -117 -10.83333333333333 0.9523809523791189 0 -118 -10.83333333333333 1.904761904757214 0 -119 -10.83333333333333 2.857142857135337 0 -120 -10.83333333333333 3.809523809516155 0 -121 -10.83333333333333 4.761904761899665 0 -122 -10.83333333333333 5.714285714283165 0 -123 -10.83333333333333 0.4761904761895093 0 -124 -10.83333333333333 1.428571428568226 0 -125 -10.83333333333333 2.380952380946392 0 -126 -10.83333333333333 3.333333333324302 0 -127 -10.83333333333333 4.285714285708083 0 -128 -10.83333333333333 5.238095238091059 0 -129 -10.83333333333333 6.190476190474492 0 -130 -9.877082154290862 6.666666666666666 0 -131 -8.986669036460423 6.666666666666666 0 -132 -8.157560940358616 6.666666666666666 0 -133 -7.385536929748456 6.666666666666666 0 -134 -10.35520774381141 6.666666666666666 0 -135 -9.431875595375566 6.666666666666666 0 -136 -8.572114988410362 6.666666666666666 0 -137 -7.771548935052775 6.666666666666666 0 -138 -7.026101798207625 6.666666666666666 0 -139 -2.085901265967831 2.5 0 -140 -1.708076667100648 2.5 0 -141 -1.36334867386756 2.5 0 -142 -1.048818091494251 2.5 0 -143 -0.7618397227467431 2.5 0 -144 -2.292950632984396 2.5 0 -145 -1.89698896653448 2.5 0 -146 -1.535712670484597 2.5 0 -147 -1.206083382680906 2.5 0 -148 -0.9053289071204973 2.5 0 -149 -0.6309198613733715 2.5 0 -150 -0.2500000000010296 2.5 0 -151 -0.3750000000004945 2.5 0 -152 -0.1250000000005148 2.5 0 -153 0.249999999999347 2.5 0 -154 0.1249999999997097 2.5 0 -155 0.3749999999996735 2.5 0 -156 0.7618397227457877 2.5 0 -157 1.048818091491884 2.5 0 -158 1.363348673861989 2.5 0 -159 1.70807666709603 2.5 0 -160 2.085901265967014 2.5 0 -161 0.6309198613729146 2.5 0 -162 0.9053289071188796 2.5 0 -163 1.206083382676999 2.5 0 -164 1.535712670478653 2.5 0 -165 1.89698896653155 2.5 0 -166 2.292950632983267 2.5 0 -167 -6.608699057452484 5.974060597966588 0 -168 -6.446688804778639 5.330718093799408 0 -169 -6.198653859120903 4.748054996338049 0 -170 -5.882134840123009 4.233094182778583 0 -171 -5.513540219849968 3.789222235499018 0 -172 -5.107735412752894 3.416924041752256 0 -173 -4.677822875779812 3.114456279760894 0 -174 -4.235067684198537 2.878441324588791 0 -175 -3.788926201782463 2.704371831918785 0 -176 -3.347145841973953 2.587027585382962 0 -177 -2.915908992203907 2.520809599507327 0 -178 -6.652149474498949 6.319152850352535 0 -179 -6.54051862972588 5.649159755658586 0 -180 -6.333756667212417 5.034667607930587 0 -181 -6.049744823323342 4.484827350768209 0 -182 -5.705529666776735 4.004770600602979 0 -183 -5.316795416904073 3.596361357675504 0 -184 -4.897553694914227 3.258903853454126 0 -185 -4.460000994479005 2.989778415338864 0 -186 -4.014499852321482 2.784991601900256 0 -187 -3.569646372441851 2.639637023240497 0 -188 -3.132394721632422 2.548270373549337 0 -189 -2.708214630386186 2.50520565173402 0 -190 2.915908992202113 2.520809599507147 0 -191 3.347145841970565 2.587027585382258 0 -192 3.788926201776651 2.704371831916894 0 -193 4.23506768419054 2.878441324585129 0 -194 4.677822875769801 3.114456279754756 0 -195 5.107735412741269 3.416924041742927 0 -196 5.513540219838246 3.789222235486741 0 -197 5.882134840114571 4.233094182766855 0 -198 6.198653859115822 4.748054996328257 0 -199 6.446688804776262 5.330718093792385 0 -200 6.608699057451857 5.974060597962873 0 -201 2.708214630385554 2.505205651733989 0 -202 3.132394721629694 2.548270373548918 0 -203 3.569646372437442 2.639637023239326 0 -204 4.014499852314525 2.784991601897541 0 -205 4.46000099446989 2.989778415334006 0 -206 4.897553694903443 3.258903853446539 0 -207 5.316795416891924 3.596361357664359 0 -208 5.705529666766661 4.004770600590847 0 -209 6.049744823316377 4.484827350756879 0 -210 6.333756667208926 5.034667607922384 0 -211 6.540518629724631 5.649159755653629 0 -212 6.652149474498751 6.319152850350176 0 -213 -0.6243592852927748 1.25 0 -214 0.6099262718804728 1.269225699142995 0 -215 -1.897788031522137 1.291605200931919 0 -216 1.89767099497581 1.290961167118083 0 -217 -7.49206672630264 2.534920263830797 0 -218 7.492066726277545 2.534920263819789 0 -219 -3.153035974387928 1.271552247467277 0 -220 3.152977751978273 1.271546892872456 0 -221 8.462804765906752 4.591648977541134 0 -222 -8.46280476590392 4.591648977554855 0 -223 -0.01433211033273804 1.713151138300706 0 -224 -0.01322125148862309 0.7775771165445828 0 -225 -5.106313054753056 1.621886089504402 0 -226 5.106297697866527 1.621887037925995 0 -227 -1.192453841309826 0.7772953602022651 0 -228 1.197174743983672 0.7404858292683356 0 -229 -1.218220082648254 1.728086544951422 0 -230 1.223878487639324 1.716387287908732 0 -231 -0.5976545922776823 1.884483114271784 0 -232 0.6007372477383934 1.886830771663146 0 -233 -6.200242293821889 2.56228153041437 0 -234 6.200242293801489 2.562281530406165 0 -235 0.52975091886722 0.564223765946727 0 -236 -0.5724455970819688 0.6004385873582482 0 -237 4.025461761585491 1.660777681170492 0 -238 -4.02547134788501 1.660794709757038 0 -239 -7.195634599246136 3.780509860573456 0 -240 7.195634599231859 3.780509860562446 0 -241 2.416918467299973 0.7769522124173684 0 -242 -2.416939428527959 0.7770061389367853 0 -243 6.516681067537742 1.413253253841262 0 -244 -6.516687376023742 1.413264651123482 0 -245 -1.768028971465419 0.5777781464720719 0 -246 1.768300938736179 0.5770611148557845 0 -247 9.108946737601492 1.558212650465172 0 -248 -9.10894673761341 1.558212650459239 0 -249 2.460838156855276 1.761458075541969 0 -250 -2.461084416730754 1.761478111497403 0 -251 -0.1155037038386779 1.23076221331533 0 -252 -1.772007434149102 1.892820267249356 0 -253 1.785426603319035 1.889104320948049 0 -254 3.951879599164127 0.8151203569590006 0 -255 -3.951920744434463 0.8151347496410764 0 -256 -1.135658215123286 1.243058606123769 0 -257 1.13574076693897 1.240016707722356 0 -258 -8.841277530236701 3.069375546001624 0 -259 8.841277530197813 3.069375545990047 0 -260 7.730818446167127 5.44300274944411 0 -261 -7.73081844616393 5.443002749450435 0 -262 7.528388000654534 1.172675083721354 0 -263 -7.528388000662592 1.172675083720727 0 -264 -0.2195138409116717 2.086086737226102 0 -265 0.1915745758625127 2.107932960036432 0 -266 4.776713718741717 0.8511147365266915 0 -267 -4.776770302032353 0.8510951149306991 0 -268 0.1124817100442584 0.4004543242289116 0 -269 0.235854347870908 1.419667089736687 0 -270 5.311304900348579 2.486206646236468 0 -271 -5.311304900365235 2.486206646243921 0 -272 -9.447039754460377 5.374816882132782 0 -273 9.447039754454616 5.374816882132841 0 -274 3.213700747256081 1.947144098379847 0 -275 -3.213707773534876 1.947149827282416 0 -276 0.3635711778214478 0.9395322030242524 0 -277 -0.3805393870749454 0.9396725491784037 0 -278 -3.143438090852065 0.6358050608558721 0 -279 3.143428683879031 0.6358019842687153 0 -280 -0.3797957582285249 1.557510134093199 0 -281 -5.681644972309927 0.8575773643829274 0 -282 5.681603803101025 0.8575545087474679 0 -283 -0.2506860614711155 0.3767132345256468 0 -284 -0.9373907209982049 0.3989373157134278 0 -285 0.8906075174758108 0.369835682050705 0 -286 -6.393082595384068 3.463546325327856 0 -287 6.393082595370528 3.463546325314312 0 -288 -0.9700340217627001 2.084990292649098 0 -289 -0.8131736642492463 0.9077603383755676 0 -290 0.9736190418297312 2.085139661643627 0 -291 -0.8222985054593854 1.600369367975119 0 -292 -1.518229265575634 1.000218318485921 0 -293 0.8430434325362145 1.584605386924492 0 -294 4.575074643435441 2.2592448040036 0 -295 -4.575081514203521 2.25925893215923 0 -296 1.518476674741493 0.9976510710334163 0 -297 0.8142362203645896 0.8942356683402766 0 -298 -9.632481399797836 4.028740351868037 0 -299 9.632481399790709 4.028740351821472 0 -300 -1.426361924509323 0.4041109444767813 0 -301 1.4802011848946 0.4295405312632124 0 -302 -1.533047000897219 1.467542086163748 0 -303 1.532724441979594 1.465232391517634 0 -304 7.08443582834667 4.696713400904171 0 -305 -7.084435828347033 4.696713400916273 0 -306 -1.522120263526413 2.075333466268054 0 -307 1.525543951496896 2.074412856478869 0 -308 -2.409585796388058 1.28713021197066 0 -309 2.409487032555068 1.287139594840754 0 -310 -2.22362373688257 0.4293568955728162 0 -311 0.3878058405939719 1.684550831866079 0 -312 2.223770403935737 0.429298037060712 0 -313 -6.955268061304325 1.962429593160973 0 -314 6.955267009873516 1.962427693607473 0 -315 5.977104981882496 1.705209190776326 0 -316 -5.977104800842041 1.705227098244579 0 -317 0.4632315224705274 0.3153989578247945 0 -318 3.79804425131459 2.14393557390369 0 -319 -3.798041054707948 2.14394116918396 0 -320 9.790350366832595 2.561471123636935 0 -321 -9.790350366845058 2.561471123611097 0 -322 -0.6192241812219541 2.255955024770045 0 -323 -5.726132952701946 2.994765683823362 0 -324 5.726131430774098 2.994765350935593 0 -325 -0.6230597587201394 0.212204123523961 0 -326 0.6115527888336694 2.272918007996318 0 -327 -8.538173850133914 5.7793939935239 0 -328 8.538173850128009 5.779393993528861 0 -329 -7.999958744589774 3.220891046392024 0 -330 7.999958744557332 3.220891046376196 0 -331 -6.876819937517038 2.967707973258525 0 -332 6.876819937494371 2.967707973244637 0 -333 2.20720303447434 2.105022968957042 0 -334 -2.207462361600845 2.105083975005575 0 -335 -2.099804319770631 0.8753861494771056 0 -336 2.099926488169945 0.8749452968462983 0 -337 3.569242045440827 1.530806140767734 0 -338 -3.569269214984759 1.530830490841371 0 -339 0.2950688823857743 0.6690405445826455 0 -340 0.1025310839185273 1.040013716439964 0 -341 8.539643387195136 0.6710993673916749 0 -342 -8.539643387191918 0.6710993673852982 0 -343 8.276052080143312 1.998333336229206 0 -344 -8.276052080164167 1.998333336233783 0 -345 -6.58883687505414 4.138045437961754 0 -346 6.588836875045345 4.138045437950053 0 -347 2.126090991400113 1.516616141095235 0 -348 -2.126442585587166 1.516565913203954 0 -349 -0.3041768196036039 0.6813206086667825 0 -350 7.01512527955631 0.7504033615162171 0 -351 -7.015129033605689 0.7504043814853835 0 -352 0.6075349297390216 1.504074587947567 0 -353 2.866848542823931 2.056047731519151 0 -354 -2.866948013132522 2.056083309943373 0 -355 9.850632619075306 0.9627315229261851 0 -356 -9.850632619079747 0.9627315229198194 0 -357 -4.634086267576622 1.378749838285576 0 -358 4.634075167915824 1.378762390313658 0 -359 -4.374951653110386 0.4763522356459882 0 -360 4.374923093780837 0.4763500787372862 0 -361 -0.2975927628987536 1.817468400868129 0 -362 1.168153629306464 0.2651920052134881 0 -363 7.737849773148897 4.327850119608788 0 -364 -7.737849773144002 4.327850119628035 0 -365 2.865841209561883 0.4002100936437068 0 -366 -2.865839979268586 0.400221105105354 0 -367 -3.601611306677869 0.4829449821057253 0 -368 3.601576189412486 0.4829253123040712 0 -369 6.254224503133791 0.6386948384816175 0 -370 -6.254260061573762 0.6387041438626554 0 -371 -2.768609387547291 1.101941443535909 0 -372 2.768557631818455 1.10197158935766 0 -373 -0.00858504759857644 2.213929731769281 0 -374 0.3749999999996735 2.273531962098231 0 -375 -3.461062164138852 0.909238524478958 0 -376 3.461031909900418 0.909235646606922 0 -377 2.935601795129576 1.675081093961752 0 -378 -2.935692474516826 1.675092379168062 0 -379 -1.713311131381198 0.2557479009531993 0 -380 1.720232690669068 0.2583686294505667 0 -381 -0.01712992175574962 1.455313531388488 0 -382 -1.17102759464276 0.2345164599978352 0 -383 0.8037293781860908 0.6246044157437729 0 -384 -1.452583724602122 0.727436104081127 0 -385 -0.3750000000005148 2.279026467205605 0 -386 -4.162236105178193 2.415215281318788 0 -387 4.162237686164032 2.415213528631106 0 -388 1.470334069374363 0.7155791969547456 0 -389 -0.841474411673379 1.127508083712101 0 -390 -0.3802370619820311 1.190856733552692 0 -391 7.289863480243484 5.983352715727762 0 -392 -7.289863480241079 5.983352715731811 0 -393 -1.480197460169521 1.755224476589539 0 -394 -1.206083382680905 2.252857728534394 0 -395 1.484049147281946 1.752106786000208 0 -396 -0.8199916815195989 0.6362980764540502 0 -397 0.8378817730279683 1.124673020119937 0 -398 1.206083382676936 2.255154007057583 0 -399 0.3569414531967402 1.187122633276626 0 -400 -1.049327322201873 0.9670907528167784 0 -401 0.8670668283260738 1.854675321449155 0 -402 -0.04088379165176392 0.2711431837431029 0 -403 -0.8416830305119692 1.855872059149712 0 -404 -0.1505269169735389 0.9811046362898131 0 -405 -0.06408082268985127 0.5437866174847488 0 -406 0.6891853253255893 0.2197171899929417 0 -407 1.847171480720378 2.177828389949213 0 -408 -1.844909024753466 2.178622822201286 0 -409 1.04998551694263 0.9583528905764261 0 -410 4.197566795387239 1.21347470480597 0 -411 -4.19756768959268 1.213513892610383 0 -412 -0.01405551584046349 1.961577782211185 0 -413 -8.313257975798725 2.643166243647756 0 -414 8.313257975767772 2.643166243638618 0 -415 -0.6150015542180127 1.489237495895203 0 -416 10.03060941204408 4.902638308052782 0 -417 -10.0306094120502 4.902638308066278 0 -418 -10.12715652438955 3.339836823419692 0 -419 10.12715652441858 3.339836823414201 0 -420 7.095778210449088 1.429514257841507 0 -421 -7.09577821046461 1.429514257845341 0 -422 -5.219501703272735 0.6038126004168057 0 -423 5.2194564442453 0.6038092407248177 0 -424 8.476567185990321 3.772614493350866 0 -425 -8.476567186007836 3.772614493373708 0 -426 0.5846916391423377 1.036556735436928 0 -427 -1.065686996147062 1.525709213414501 0 -428 4.861830380731907 2.666492481697293 0 -429 -4.861843121585564 2.666505328655104 0 -430 1.800982671334885 1.562443059101496 0 -431 -1.802138600086596 1.561816849224858 0 -432 1.068316142740591 1.519537435596205 0 -433 -1.810283225756547 0.9261253319782009 0 -434 -0.6008438234769 1.026617489134368 0 -435 1.811335448871305 0.924477934998068 0 -436 9.237856294078195 4.719898146203913 0 -437 -9.23785629407798 4.719898146221237 0 -438 0.4268448283449094 2.044558658730534 0 -439 -0.4085689504786914 0.2101826041275101 0 -440 9.957649525759205 1.732009851269457 0 -441 -9.957649525759113 1.732009851254434 0 -442 5.63167252017133 1.382535253299674 0 -443 -5.631678337066808 1.382554129064356 0 -444 -5.005020514723201 2.114732764607291 0 -445 5.005010740473104 2.114729364779584 0 -446 -5.218278574179806 2.985822903501104 0 -447 7.056410647023934 5.310071010764172 0 -448 -7.056410647023066 5.310071010772309 0 -449 5.218267134106651 2.985819545824168 0 -450 -0.4503284766619995 2.061439399759399 0 -451 5.214200734839781 1.098535139653517 0 -452 -5.214249566351261 1.098534092530617 0 -453 8.258569694619698 5.174120888136999 0 -454 -8.258569694616432 5.174120888140669 0 -455 7.775796973466844 0.6536831620267975 0 -456 -7.775797599138209 0.6536833320212112 0 -457 10.03908451406595 5.892531938824264 0 -458 -10.03908451407015 5.892531938825101 0 -459 -1.145186120274044 0.543735636316211 0 -460 -8.865976938131613 2.366111779990699 0 -461 8.865976938108597 2.366111779991996 0 -462 1.053622157566892 0.5575644381434386 0 -463 7.591855850185467 1.797176739895275 0 -464 -7.591855895814216 1.797176822314143 0 -465 1.1900895753544 1.942554470102252 0 -466 -1.183766427328499 1.944792613629534 0 -467 -2.503722913531004 0.3085927969119775 0 -468 2.50375854136346 0.3085537992495332 0 -469 -7.820390729329199 6.107816558407897 0 -470 7.820390729327014 6.107816558406813 0 -471 0.8468568930856856 2.286167978361457 0 -472 -0.8801765957270498 0.189222735507448 0 -473 -0.8449109734771841 2.286655922034887 0 -474 0.244792875923066 0.2134629377224798 0 -475 0.1883842385969506 1.86530700683478 0 -476 -0.1852622913724402 1.58731351045502 0 -477 -4.557966282567982 1.83902063189752 0 -478 4.557939102595782 1.839016705901255 0 -479 -2.719081127267746 1.419805486476707 0 -480 2.718977662397838 1.4198087179489 0 -481 -3.761229522541615 1.201097855703166 0 -482 3.761195236755065 1.201072956986893 0 -483 5.773712175325562 2.314631242159062 0 -484 -5.773712175344054 2.314631242168466 0 -485 0.08966046031519236 1.267798540894151 0 -486 3.167414554760994 2.282541706650601 0 -487 -3.167435370703371 2.282550179283247 0 -488 4.827098893631522 0.394721788152073 0 -489 -4.827130071744791 0.3947150276201685 0 -490 -1.405506845468797 1.236173051699592 0 -491 -0.5659194814801415 0.803639444805849 0 -492 1.405555482928557 1.233247727686976 0 -493 9.249360405630817 0.6384087081566064 0 -494 -9.249360405629833 0.6384087081528712 0 -495 2.856043073865474 0.7880805361688288 0 -496 -2.856038449217069 0.7880428754616319 0 -497 5.978232551516568 3.672172722444052 0 -498 -5.978232662455445 3.672172746718211 0 -499 -0.8507464946523166 1.372647127853449 0 -500 -7.376074284738673 3.256860720578387 0 -501 7.376074284711687 3.256860720565052 0 -502 0.5651747027945766 0.7880322221791004 0 -503 0.174813773515561 2.310769480748247 0 -504 -0.463627459695204 0.4209215123126114 0 -505 -9.226905604869998 5.983947909938198 0 -506 9.226905604862946 5.983947909941502 0 -507 3.284786681443304 1.66072978186875 0 -508 -3.284821296135614 1.660744057651848 0 -509 0.8504072194772063 1.373688806242259 0 -510 0.1561164789946686 1.627597919625348 0 -511 -3.976990151113905 0.3698463253287041 0 -512 3.976955360685494 0.3698326026676929 0 -513 -3.292293731021092 0.3188957491908032 0 -514 3.292262203714659 0.3188962042455626 0 -515 -2.00072859677836 0.269740794900284 0 -516 2.001681304734661 0.269250369271627 0 -517 -0.2698764900948353 1.391452201155849 0 -518 0.1897936674607298 0.8380016977182709 0 -519 -0.730512661060715 2.059764894342557 0 -520 -1.292947524843075 0.9725745364595775 0 -521 0.8971668695690496 0.1671272980328471 0 -522 1.295936381540904 0.9514025211778097 0 -523 0.7211129380264105 2.071715066640706 0 -524 -0.7213361210198095 0.4249267296181769 0 -525 -6.358556243165763 2.091556003487061 0 -526 6.358556243144834 2.091556003482317 0 -527 -0.5669129867044517 1.693830863700495 0 -528 -5.467522297182398 1.937539661638836 0 -529 5.4675171693446 1.937533122529518 0 -530 9.417702599628603 3.406394539756231 0 -531 -9.417702599625416 3.406394539812745 0 -532 6.212397482986657 3.029548750497456 0 -533 -6.212397553845926 3.029548766001985 0 -534 -1.464379826679167 0.1734400268258675 0 -535 0.3001027680232747 0.4581896740798317 0 -536 1.464379826681524 0.1726757633067371 0 -537 -1.635676556030958 1.22212780033339 0 -538 0.6795824981164382 1.695271741998021 0 -539 1.635912319253445 1.21957976356374 0 -540 6.866434834282616 3.448243729208325 0 -541 -6.866434834296654 3.448243729221622 0 -542 0.6940236640245229 0.4368200070006851 0 -543 0.4396072316352251 1.401441693604094 0 -544 2.509950610807562 2.194636626148278 0 -545 -2.510254648326085 2.194839999919459 0 -546 1.535712670479009 2.321867363748036 0 -547 4.47884578600197 2.596408753575372 0 -548 -4.478830778975107 2.596410773903592 0 -549 -1.535712670484104 2.322778829601811 0 -550 -3.076436813228641 0.9413160303599293 0 -551 3.07640781028833 0.9413273298549165 0 -552 -0.188802705980766 2.319540320752538 0 -553 -7.752970757126247 3.703003050558905 0 -554 7.75297075710889 3.703003050542551 0 -555 5.647225314791818 0.4200117175907807 0 -556 -5.647249712116166 0.4200188217324777 0 -557 9.045482449078916 4.103859301734723 0 -558 -9.045482449082597 4.103859301766117 0 -559 10.33822555016727 0.478778118827473 0 -560 -10.33822555016692 0.4787781188247345 0 -561 -4.390986374730675 0.9060052960915999 0 -562 4.390961376702487 0.9059888245421952 0 -563 4.191789948119464 2.05938872855402 0 -564 -4.191791371655484 2.059399022447617 0 -565 6.027082884147001 1.14836802082841 0 -566 -6.027091424053485 1.148414023492802 0 -567 7.684818051672727 4.899705663576713 0 -568 -7.684818051669317 4.899705663588167 0 -569 -2.053234713196914 0.6425655762228772 0 -570 2.053655508624633 0.6419974942416429 0 -571 -6.679342187398619 2.487190978465301 0 -572 6.679342187373575 2.487190978454632 0 -573 -10.28159827137905 4.185857240041571 0 -574 10.28159827136058 4.185857240022297 0 -575 6.650623242600576 4.888149435286077 0 -576 -6.650623242602856 4.888149435296002 0 -577 3.552411067411759 1.879070683361963 0 -578 -3.552401043253682 1.879095343500113 0 -579 -0.4538540299632358 1.375811312939389 0 -580 -1.311019865353996 1.525519695821663 0 -581 2.125952378058878 1.158140804909156 0 -582 -2.12600784868785 1.158276072439472 0 -583 3.49346864955228 2.301679518464603 0 -584 -3.493466232671597 2.301680574300155 0 -585 -1.004026525910918 0.7664360328329745 0 -586 1.311537173361124 1.521337173518984 0 -587 1.273897157025198 0.541672400168644 0 -588 -2.035674070484654 1.836064656397072 0 -589 2.050633303739144 1.840834747907499 0 -590 -1.008166766577727 1.703257735534279 0 -591 0.9837496034087748 0.7550486484144501 0 -592 -7.107067464486052 4.238017656669162 0 -593 7.107067464478008 4.238017656656883 0 -594 5.501225192737053 3.395333013000545 0 -595 -5.501225192750326 3.395333013011198 0 -596 1.03847889331932 1.723551980396167 0 -597 -8.861891660677102 5.270637799585272 0 -598 8.861891660675036 5.270637799580875 0 -599 8.208259874178079 1.320854431065812 0 -600 -8.208259914963715 1.320854446399273 0 -601 -0.2022654230284958 0.1733877301351362 0 -602 0.1216298393539676 0.5853464979919052 0 -603 -2.258371874149295 0.8261961442069454 0 -604 -2.271473638607905 0.9676411056881288 0 -605 -2.11290608422924 1.016831110958289 0 -606 2.112939433114412 1.016543050877727 0 -607 2.271435422679426 0.9675465086632622 0 -608 2.25842247773496 0.8259487546318334 0 -609 -2.413262612458008 1.032068175453723 0 -610 -2.267796822537954 1.222703142205066 0 -611 2.267719705306973 1.222640199874955 0 -612 2.413202749927521 1.032045903629061 0 -613 1.655485277407965 1.981758588713459 0 -614 1.686357716108637 2.126120623214041 0 -615 1.816299042019706 2.033466355448631 0 -616 2.793341613279543 0.2001050468218534 0 -617 3.006791930558286 0.2001050468218534 0 -618 -3.006791315405942 0.200110552552677 0 -619 -2.793340998128392 0.200110552552677 0 -620 -1.808458229451284 2.035721544725321 0 -621 -1.683514644139939 2.12697814423467 0 -622 -1.647063848837757 1.984076866758705 0 -623 -8.298296804296069 0.3355496836926491 0 -624 -8.157720493165064 0.6623913497032548 0 -625 -7.916373910269213 0.3268416660106056 0 -626 7.916373597442618 0.3268415810133988 0 -627 8.15772018033099 0.6623912647092363 0 -628 8.298296804306764 0.3355496836958374 0 -629 0.31183009423244 1.552108960801383 0 -630 0.4137065361145985 1.542996262735087 0 -631 0.3377307897530666 1.410554391670391 0 -632 10.43197137268871 5.308462011170549 0 -633 10.03484696305502 5.397585123438523 0 -634 10.43620892369964 5.803408826556291 0 -635 -10.43620892370174 5.803408826554133 0 -636 -10.03484696306017 5.39758512344569 0 -637 -10.43197137269176 5.308462011174722 0 -638 3.079051706638271 0.3595531489446347 0 -639 3.220002427634674 0.1594481021227813 0 -640 -3.220018191282195 0.1594478745954016 0 -641 -3.079066855144839 0.3595584271480786 0 -642 0.8089827992753402 0.7594200420420247 0 -643 0.6844520404903337 0.7063183189614366 0 -644 0.6897054615795831 0.8411339452596884 0 -645 10.31184185008296 2.233116514202174 0 -646 10.31184185008296 2.709306990394032 0 -647 -10.31184185008919 2.709306990373217 0 -648 -10.31184185008919 2.233116514184156 0 -649 6.393460572832485 0.3193474192408087 0 -650 6.634674891345051 0.6945490999989172 0 -651 6.773910961043743 0.3752016807581086 0 -652 -6.773912838055372 0.3752021907426917 0 -653 -6.634694547589725 0.6945542626740194 0 -654 -6.393478352039407 0.3193520719313277 0 -655 6.978265073455075 6.325009691197215 0 -656 6.94928126884767 5.978706656845318 0 -657 -6.949281268846782 5.9787066568492 0 -658 -6.978265073453873 6.325009691199238 0 -659 1.530628310987952 2.198140110113452 0 -660 1.691442075599694 2.249847876848624 0 -661 3.36110989870955 1.401176516820095 0 -662 3.665218641097946 1.365939548877313 0 -663 3.457086494366669 1.236309924929674 0 -664 -3.457132748464771 1.236325051585221 0 -665 -3.665249368763186 1.365964173272269 0 -666 -3.361152594686343 1.401191369154324 0 -667 0.4942715441661827 1.785690801764613 0 -668 0.4073253344694406 1.864554745298307 0 -669 0.5137910380416514 1.96569471519684 0 -670 -0.8319907679856773 1.728120713562415 0 -671 -0.7042980086082105 1.774851461425103 0 -672 -0.6946057460819186 1.647100115837806 0 -673 0.372396437961533 0.1067314688612399 0 -674 0.3540121991967967 0.2644309477736372 0 -675 0.4816157612352637 0.1576994789123972 0 -676 -1.690310847618785 2.250700825901548 0 -677 -1.528916467005258 2.199056147934932 0 -678 3.611113573327741 1.055154301796907 0 -679 3.307004830939346 1.090391269739689 0 -680 -3.30704906926339 1.090395385973117 0 -681 -3.611145843340233 1.055168190091062 0 -682 -0.02044189582519376 0.1355715918715515 0 -683 0.101954542135651 0.2423030607327914 0 -684 0.1223964379622212 0.1067314688612399 0 -685 -0.5596120906109771 2.377977512385022 0 -686 -0.6905319519843486 2.377977512385022 0 -687 -0.5239915344698409 1.972961257015592 0 -688 -0.3739606197803765 1.939453900313764 0 -689 -0.447623677588218 1.850975757569956 0 -690 2.435162594705172 1.524298835191362 0 -691 2.26778901197759 1.401877867967995 0 -692 2.293464574127694 1.639037108318602 0 -693 -2.29376350115896 1.639022012350678 0 -694 -2.268014190987612 1.401848062587307 0 -695 -2.435335106559406 1.524304161734032 0 -696 -2.320281582705264 0.6031815172548007 0 -697 -2.363673325206787 0.3689748462423968 0 -698 -2.460331171029481 0.5427994679243814 0 -699 2.460338504331717 0.5427530058334509 0 -700 2.363764472649599 0.3689259181551226 0 -701 2.320344435617855 0.6031251247390402 0 -702 0.5474628108308983 0.6761279940629137 0 -703 0.6667401485266554 0.59441409084525 0 -704 0.2880950395954612 1.77492891935043 0 -705 0.30761453347093 1.954932832782657 0 -706 -7.652092799900401 0.9131792078709691 0 -707 -7.992028757050962 0.987268889210242 0 -708 -7.868323957813153 1.24676476506 0 -709 7.868323937416307 1.246764757393583 0 -710 7.992028423822461 0.9872687965463046 0 -711 7.652092487060688 0.9131791228740755 0 -712 0.6866962557897285 2.386459003998159 0 -713 0.5557763944168347 2.386459003998159 0 -714 -2.235087070862437 0.7097858575798313 0 -715 -2.138429225039742 0.5359612358978467 0 -716 8.72580987827509 0.3355496836958374 0 -717 -8.725809878267373 0.3355496836926491 0 -718 2.138712956280185 0.5356477656511774 0 -719 2.235286987962303 0.7094748533295057 0 -720 -0.1586990355461135 0.7294488626056826 0 -721 -0.2273518682885714 0.8312126224782979 0 -722 -0.08187408423108099 0.8793408764171979 0 -723 -0.6858891646528447 0.1061020617619805 0 -724 -0.5615298793600697 0.1061020617619805 0 -725 -2.146681813784338 2.302541987502788 0 -726 -2.358858504963465 2.149961987462517 0 -727 -2.298077957146957 2.34741999995973 0 -728 2.297925938387288 2.347318313074139 0 -729 2.358576822640951 2.14982979755266 0 -730 2.146552150220677 2.302511484478521 0 -731 10.34198297620432 0.957556237654946 0 -732 9.904141072417255 1.347370687097821 0 -733 10.39549142954627 1.342195401826582 0 -734 -10.39549142954622 1.342195401816777 0 -735 -9.90414107241943 1.347370687087127 0 -736 -10.34198297620654 0.9575562376494692 0 -737 -7.140279117243586 0.3752021907426917 0 -738 7.140277240230324 0.3752016807581086 0 -739 10.39549142954627 1.818385878018436 0 -740 9.8739999462959 2.146740487453196 0 -741 -9.873999946302085 2.146740487432766 0 -742 -10.39549142954622 1.818385878005824 0 -743 -8.347867395246265 6.223030330095283 0 -744 -8.762421443297168 6.223030330095283 0 -745 8.762421443288272 6.223030330097764 0 -746 8.347867395239021 6.223030330097764 0 -747 -1.610306348033771 0.6526071252765995 0 -748 -1.439472824555723 0.5657735242789541 0 -749 -1.597195447987371 0.4909445454744266 0 -750 -0.9825889008968214 0.5900168563851307 0 -751 -1.074606323092481 0.6550858345745927 0 -752 -0.9120091037152582 0.7013670546435123 0 -753 5.852181991145333 3.333469036689822 0 -754 6.095315017251613 3.350860736470754 0 -755 5.969264456880378 3.012157050716525 0 -756 -5.969265253273935 3.012157224912674 0 -757 -6.095315108150686 3.350860756360098 0 -758 -5.852182807578695 3.333469215270786 0 -759 0.4976703851664968 1.594312709906823 0 -760 0.5235710806871233 1.452758140775831 0 -761 -2.076519516483772 0.7589758628499914 0 -762 2.076790998397289 0.7584713955439706 0 -763 -0.2655331520242422 0.9603885927341085 0 -764 -0.3423581033392746 0.8104965789225931 0 -765 1.624251061815389 0.5033008230594984 0 -766 1.475267627134481 0.572559864108979 0 -767 1.619317504055271 0.646320155905265 0 -768 7.337700204994951 6.325009691197215 0 -769 -7.337700204994768 6.325009691199238 0 -770 5.518718165561339 2.74048599858603 0 -771 5.74992180304983 2.654698296547327 0 -772 5.542508537837071 2.400418944197765 0 -773 -5.542508537854644 2.400418944206194 0 -774 -5.749922564023 2.654698462995914 0 -775 -5.51871892653359 2.740486165033642 0 -776 10.43197137268871 4.832271534981896 0 -777 -10.43197137269176 4.832271534982971 0 -778 0.6401598729274158 1.791051256830583 0 -779 0.5336941693552051 1.68991128693205 0 -780 -8.373951651077817 0.9959769068922855 0 -781 8.373951630686609 0.9959768992287432 0 -782 -7.085704456850629 2.511055621148049 0 -783 -6.817305124351472 2.224810285813137 0 -784 -7.223667393803483 2.248674928495885 0 -785 7.223666868075531 2.248673978713631 0 -786 6.817304598623545 2.224809336031052 0 -787 7.08570445682556 2.51105562113721 0 -788 5.613678311755575 3.195049181968069 0 -789 5.73972887212681 3.533752867722298 0 -790 -5.739728927602886 3.533752879864704 0 -791 -5.613679072726136 3.19504934841728 0 -792 0.2473964379618798 0.1067314688612399 0 -793 -3.911756201296479 1.902367939470499 0 -794 -3.675221048980815 2.011518256342036 0 -795 -3.788936195569346 1.769945026628576 0 -796 3.788936414498625 1.769924182266227 0 -797 3.675227659363174 2.011503128632826 0 -798 3.91175300645004 1.902356627537091 0 -799 -0.4322528748016027 1.755649632284312 0 -800 -0.582283789491067 1.789156988986139 0 -801 1.028578201840237 1.898614895775704 0 -802 1.11428423433686 1.83305322524921 0 -803 0.9527728608226971 1.789113650922661 0 -804 -1.569836527945261 0.3299294227149903 0 -805 -1.740670051423308 0.4167630237126356 0 -806 0.09609577211685982 1.153906128667058 0 -807 0.2233009567559663 1.227460587085389 0 -808 0.2297362685576337 1.113568174858295 0 -809 -0.7196688113948257 1.870177586710748 0 -810 0.6435587139277299 1.599673164972794 0 -811 -1.100672605635174 1.384383909769135 0 -812 -0.9582167453996895 1.449178170633975 0 -813 -0.9932023548878013 1.307852866988609 0 -814 -7.184443331909838 2.751314118544661 0 -815 -6.778081062457828 2.727449475861913 0 -816 6.778081062433973 2.727449475849634 0 -817 7.184443331885959 2.751314118532213 0 -818 3.893328499170278 1.430925319078693 0 -819 3.797351903513159 1.595791910969113 0 -820 -3.797370281434884 1.595812600299205 0 -821 -3.893350435213312 1.430946282730102 0 -822 1.744266814702623 0.4177148721531756 0 -823 1.600216937781834 0.3439545803568895 0 -824 -2.592774408037625 0.9394737912363469 0 -825 -2.589097591967674 1.194535827753284 0 -826 2.589022332186762 1.194555592099207 0 -827 2.592738049559214 0.9394619008875141 0 -828 0.2330511308699875 0.9897729597321081 0 -829 0.360256315509094 1.063327418150439 0 -830 -3.56083512911922 1.704962917170742 0 -831 3.560826556426293 1.704938412064848 0 -832 -0.9249248985448482 1.779564897341995 0 -833 -1.095966596953113 1.824025174581906 0 -834 -1.012724728920234 1.900332336389623 0 -835 0.5762084238980584 0.2675580739088681 0 -836 0.5945926626627946 0.1098585949964708 0 -837 -6.302740074614997 3.246547545664921 0 -838 -6.185657628919756 3.567859536023033 0 -839 6.185657573443548 3.567859523879182 0 -840 6.302740039178593 3.246547537905884 0 -841 4.870186432891176 1.500324714119827 0 -842 4.596007135255803 1.608889548107457 0 -843 4.832118400231154 1.730451871913625 0 -844 -4.832139668660519 1.730453360700961 0 -845 -4.596026275072302 1.608885235091548 0 -846 -4.870199661164839 1.500317963894989 0 -847 -1.098240183610372 0.7718656965176198 0 -848 -1.168819980791935 0.6605154982592381 0 -849 0.9930739932080883 1.306852756982307 0 -850 0.9593616811088986 1.446613120919232 0 -851 1.102028454839781 1.379777071659281 0 -852 6.437618655341288 1.75240462866179 0 -853 6.656911626509175 2.026991848544895 0 -854 6.735974038705629 1.687840473724367 0 -855 -6.735977718664033 1.687847122142228 0 -856 -6.656912152235044 2.026992798324017 0 -857 -6.437621809594752 1.752410327305272 0 -858 9.179153571616155 1.098310679310889 0 -859 8.894501896412976 0.6547540377741407 0 -860 8.824295062398313 1.114656008928423 0 -861 -8.824295062402664 1.114656008922268 0 -862 -8.894501896410876 0.6547540377690847 0 -863 -9.179153571621622 1.098310679306055 0 -864 -2.505127324163042 2.34741999995973 0 -865 2.504975305403781 2.347318313074139 0 -866 4.781474921534443 1.97687303534042 0 -867 5.055654219169815 1.868308201352789 0 -868 -5.055666784738128 1.868309427055847 0 -869 -4.781493398645591 1.976876698252406 0 -870 -1.041288420636124 0.4713364760148194 0 -871 -0.8786912012589019 0.5176176960837391 0 -872 6.246893024710118 1.559231222308794 0 -873 6.167830612513665 1.898382597129321 0 -874 -6.167830522003902 1.89839155086582 0 -875 -6.246896088432892 1.559245874684031 0 -876 -1.349208771408888 1.741655510770481 0 -877 -1.33198194374901 1.850008545109536 0 -878 -1.200993254988377 1.836439579290478 0 -879 8.100327269527824 4.459749548574961 0 -880 7.711333912410812 4.613777891592751 0 -881 8.073811408789739 4.745677320558924 0 -882 -8.073811408786618 4.745677320571511 0 -883 -7.711333912406659 4.613777891608101 0 -884 -8.100327269523961 4.459749548591445 0 -885 -2.27463609012281 0.2146784477864081 0 -886 -2.112176166830465 0.3495488452365501 0 -887 -2.163188520070705 0.134870397450142 0 -888 0.1959854134327883 1.523632504681018 0 -889 0.2719611597943202 1.656074375745714 0 -890 2.163664874051877 0.1346251846358135 0 -891 2.112725854335199 0.3492742031661695 0 -892 2.274709423652415 0.214649018530356 0 -893 -0.1330153104061084 1.105933424802571 0 -894 -0.265381989477785 1.085980684921252 0 -895 -0.2478703829103545 1.21080947343401 0 -896 2.641379838430928 0.5885811530305376 0 -897 2.684799875462671 0.35438194644662 0 -898 -2.684781446399795 0.3544069510086658 0 -899 -2.641389703898273 0.5886136220210696 0 -900 1.081854308592066 2.01384706587294 0 -901 0.9203429350779025 1.969907491546391 0 -902 -0.9468645324857177 2.393327961017444 0 -903 -1.025497178079045 2.26975682528464 0 -904 -1.127450737087578 2.376428864267197 0 -905 5.986977234563525 2.438456386282613 0 -906 5.963186862287793 2.778523440670879 0 -907 -5.963187623261917 2.778523607118866 0 -908 -5.986977234582971 2.438456386291418 0 -909 -0.4375000000002574 2.389513233602803 0 -910 -0.4971120906112345 2.267490745987825 0 -911 -0.8461104531628478 1.250077605782775 0 -912 -0.9885663133983325 1.185283344917935 0 -913 -6.235485857588575 4.185569810370168 0 -914 -6.393745367087521 4.443050217149901 0 -915 6.393745367080584 4.443050217139155 0 -916 6.235485857579958 4.185569810358454 0 -917 0.4932763944166715 2.273224985047275 0 -918 0.4374999999998368 2.386765981049115 0 -919 -7.745410265135124 4.01542658509347 0 -920 -8.114768971567042 3.737808771966306 0 -921 -8.107208479575919 4.050232306500872 0 -922 8.107208479569609 4.050232306479827 0 -923 8.114768971549605 3.737808771946709 0 -924 7.745410265128893 4.015426585075669 0 -925 -0.9058585261373346 1.970431175899405 0 -926 -1.0769002245456 2.014891453139316 0 -927 -0.6895465728646939 0.8556998915907084 0 -928 -0.6929555814998702 0.7199687606299496 0 -929 -0.8165826728844225 0.772029207414809 0 -930 1.634737875300491 1.820605553474128 0 -931 1.504796549389421 1.913259821239538 0 -932 -6.634951266450553 3.215627149293191 0 -933 -6.544608745681481 2.998628369630255 0 -934 6.544608710240514 2.998628361871047 0 -935 6.634951266432449 3.215627149279475 0 -936 -1.501158861847967 1.915278971428796 0 -937 -1.626102447159312 1.824022371919447 0 -938 1.12745073708441 2.377577003528791 0 -939 1.026470137881311 2.27066099270952 0 -940 0.9478374922887849 2.393083989180728 0 -941 1.206984031496862 1.829470879005492 0 -942 1.337069361318173 1.84733062805123 0 -943 1.353963817460635 1.73424703695447 0 -944 9.479789678338399 1.260472086695679 0 -945 9.549996512353061 0.8005701155413958 0 -946 -9.54999651235479 0.8005701155363454 0 -947 -9.479789678346577 1.260472086689529 0 -948 6.765903173547025 1.081828307678739 0 -949 6.385452785335767 1.02597404616144 0 -950 -6.385473718798751 1.025984397493069 0 -951 -6.765908204814716 1.081834516304433 0 -952 9.315813948515203 2.815423334813491 0 -953 9.328163652470597 2.463791451814465 0 -954 8.853627234153205 2.717743662991022 0 -955 -8.853627234184156 2.717743662996162 0 -956 -9.328163652488335 2.463791451800898 0 -957 -9.315813948540878 2.81542333480636 0 -958 -1.352943345427456 2.010063039948794 0 -959 0.9868112699834692 1.182344863921146 0 -960 0.8441444962525873 1.249180913181098 0 -961 -1.298884922438083 0.635585870198669 0 -962 -1.322518782955974 0.7523657321416961 0 -963 -0.4383112083427864 0.6408795980125153 0 -964 -0.383902139649404 0.551121060489697 0 -965 -0.5180365283885864 0.5106800498354298 0 -966 4.111514278486364 1.437126192988231 0 -967 3.979381016071152 1.207273830896431 0 -968 -3.979398606067147 1.207305874156774 0 -969 -4.111519518738845 1.43715430118371 0 -970 7.971693873146213 5.036913275856856 0 -971 8.360687230263224 4.882884932839067 0 -972 -8.360687230260176 4.882884932847762 0 -973 -7.971693873142874 5.036913275864418 0 -974 2.891378767513022 2.288428665513149 0 -975 2.688399576815747 2.125342178833714 0 -976 2.712929801504838 2.357723112827713 0 -977 3.975581943970341 2.559792680274001 0 -978 3.980140968739311 2.279574551267398 0 -979 3.79348522654562 2.424153702910292 0 -980 -3.793483628245205 2.424156500551372 0 -981 -3.980138579943071 2.279578225251374 0 -982 -3.975581153480328 2.559793556618786 0 -983 -2.713081820264995 2.357824799713393 0 -984 -2.688601330729303 2.125461654931416 0 -985 -2.891428502668214 2.28844645472535 0 -986 -2.69838844562379 1.718285245332733 0 -987 -2.901320243824674 1.865587844555718 0 -988 -2.664016214931638 1.908780710720388 0 -989 2.663843349839603 1.90875290353056 0 -990 2.901225168976753 1.865564412740451 0 -991 2.698219975992425 1.718269584751861 0 -992 -8.469685975955878 4.182131735464282 0 -993 8.469685975948536 4.182131735446 0 -994 8.987461837855044 1.962162215228584 0 -995 9.449648552217043 2.059841887051054 0 -996 -9.449648552229235 2.059841887035168 0 -997 -8.987461837872512 1.962162215224969 0 -998 -1.285774022391684 0.4739232903964962 0 -999 -7.746012735446207 2.87790565511141 0 -1000 -7.688016514664223 3.238875883485205 0 -1001 -7.434070505520657 2.895890492204592 0 -1002 7.434070505494616 2.895890492192421 0 -1003 7.688016514634509 3.238875883470624 0 -1004 7.746012735417438 2.877905655097993 0 -1005 -0.5691825392810552 0.7020390160820487 0 -1006 -0.4350481505418727 0.7424800267363157 0 -1007 -1.485406495088878 0.863827211283524 0 -1008 -1.631433475179335 0.826780718029664 0 -1009 -1.664256245666091 0.9631718252320609 0 -1010 2.960767691898364 1.186759241115058 0 -1011 2.743767647108146 1.26089015365328 0 -1012 2.935977707188056 1.345677805410678 0 -1013 -2.936058550827837 1.345678866971992 0 -1014 -2.743845257407518 1.260873465006308 0 -1015 -2.960822680967609 1.186746845501593 0 -1016 1.664906061806399 0.9610645030157421 0 -1017 1.640834759122834 0.8200285659764068 0 -1018 1.494405372057928 0.856615133994081 0 -1019 -0.2585533019052126 1.951777569047116 0 -1020 -0.3349211587868356 2.073763068492751 0 -1021 -6.629758714840361 3.455895027274739 0 -1022 -6.871627385906846 3.207975851240073 0 -1023 6.871627385888494 3.207975851226481 0 -1024 6.629758714826572 3.455895027261318 0 -1025 9.129490064913208 3.237885042873139 0 -1026 9.604026483230598 2.983932831696583 0 -1027 -9.604026483235238 2.983932831711921 0 -1028 -9.129490064931058 3.237885042907185 0 -1029 1.789818193803742 0.7507695249269262 0 -1030 -1.789156098610983 0.7519517392251365 0 -1031 -0.3803882245284883 1.065264641365548 0 -1032 1.357816763425648 2.00848366329056 0 -1033 6.271881975842371 1.280810637334836 0 -1034 6.002093933014748 1.426788605802368 0 -1035 -6.002098112447763 1.426820560868691 0 -1036 -6.271889400038614 1.280839337308142 0 -1037 -3.004639035060326 0.5180130829806131 0 -1038 -3.217865910936579 0.4773504050233376 0 -1039 3.217845443796845 0.477349094257139 0 -1040 3.004634946720457 0.518006038956211 0 -1041 -8.134496148148923 5.611198371487168 0 -1042 -8.179282289731557 5.943605275965899 0 -1043 -7.775604587746565 5.775409653929166 0 -1044 7.77560458774707 5.775409653925461 0 -1045 8.179282289727512 5.943605275967837 0 -1046 8.134496148147567 5.611198371486486 0 -1047 0.4964912206688737 0.4398113618857608 0 -1048 0.381667145246901 0.3867943159523131 0 -1049 0.4149268434452474 0.5112067200132793 0 -1050 -1.088058702221803 2.168924010591746 0 -1051 -0.9074724976199422 2.185823107341992 0 -1052 6.490959735207936 3.800795881632182 0 -1053 6.727635854663981 3.793144583579189 0 -1054 -6.727635854675396 3.793144583591688 0 -1055 -6.490959735219104 3.800795881644805 0 -1056 3.645756450433435 2.222807546184146 0 -1057 3.641197425664465 2.503025675190749 0 -1058 -3.64119621722703 2.50302620310947 0 -1059 -3.645753643689773 2.222810871742057 0 -1060 2.827289728763707 1.547444905955326 0 -1061 3.044289773553924 1.473313993417104 0 -1062 -3.044364224452377 1.473322313317669 0 -1063 -2.827386800892286 1.547448932822385 0 -1064 -6.054323111984509 0.3193520719313277 0 -1065 6.054305332778812 0.3193474192408087 0 -1066 3.218882216710789 1.466138337370603 0 -1067 3.427014363442066 1.595767961318242 0 -1068 -3.427045255560186 1.59578727424661 0 -1069 -3.218928635261771 1.466148152559562 0 -1070 -1.270582530296041 1.239615828911681 0 -1071 -1.358263355411396 1.380846373760627 0 -1072 -1.223339040238641 1.384289150972716 0 -1073 2.589907909626556 1.590633396745435 0 -1074 2.564232347476453 1.353474156394827 0 -1075 -2.564333461827902 1.353467849223684 0 -1076 -2.59008277199925 1.590641798987055 0 -1077 -0.3571567605831598 0.3988173734191292 0 -1078 -0.2774314405373597 0.5290169215962146 0 -1079 5.829377702159166 1.265451637064042 0 -1080 5.804388751026913 1.543872222037999 0 -1081 -5.804391568954425 1.543890613654467 0 -1082 -5.829384880560147 1.265484076278579 0 -1083 0.7239040224542206 1.196949359631466 0 -1084 0.711286706085153 1.080614877778432 0 -1085 0.5973089555114053 1.152891217289961 0 -1086 -0.8144475831562998 0.094611367753724 0 -1087 -0.7516181772235946 0.2007134295157045 0 -1088 1.131178690479322 1.71996963415245 0 -1089 9.743062134260285 5.633674410478552 0 -1090 9.73882458324935 5.138727595092812 0 -1091 -9.738824583255287 5.13872759509953 0 -1092 -9.743062134265264 5.633674410478942 0 -1093 0.2963979005338241 1.303394861506657 0 -1094 0.1627574040930502 1.343732815315419 0 -1095 7.025522610161302 1.69597097572449 0 -1096 6.806229638993415 1.421383755841384 0 -1097 -6.806232793244176 1.421389454484412 0 -1098 -7.025523135884468 1.695971925503157 0 -1099 -5.930183751289228 3.952633464748397 0 -1100 -6.283534768754793 3.905109092339982 0 -1101 6.283534713280956 3.905109080197052 0 -1102 5.930183695815569 3.952633452605454 0 -1103 -4.108631359770246 1.860096866102327 0 -1104 -3.994916213181716 2.101670095815788 0 -1105 3.994917099717027 2.101662151228855 0 -1106 4.108625854852477 1.860083204862256 0 -1107 0.9102379674577084 2.185653820002542 0 -1108 1.089851212253334 2.170146834350605 0 -1109 -5.472205763440876 2.990294293662233 0 -1110 -5.26479173727252 2.736014774872513 0 -1111 5.264786017227615 2.736013096030318 0 -1112 5.472199282440375 2.99029244837988 0 -1113 1.223638970150047 1.38067694062067 0 -1114 1.358546328144841 1.37729245060298 0 -1115 1.270648124933764 1.236632217704666 0 -1116 7.988975834838524 6.387241612536739 0 -1117 -7.988975834843908 6.387241612537281 0 -1118 -2.485669532528419 1.978159055708431 0 -1119 -2.3342733891658 1.933281043251489 0 -1120 2.334020595664808 1.933240522249505 0 -1121 2.485394383831419 1.978047350845124 0 -1122 -7.994694070390181 5.308561818795551 0 -1123 -8.398371772375173 5.476757440832285 0 -1124 8.398371772373853 5.47675744083293 0 -1125 7.994694070393413 5.308561818790555 0 -1126 4.240984075612088 0.2381750393686431 0 -1127 4.510043152494292 0.2381750393686431 0 -1128 -4.510057432148272 0.2381761178229941 0 -1129 -4.240998355268017 0.2381761178229941 0 -1130 -1.188353430750529 1.525614454618082 0 -1131 -0.6962186393007839 0.6183683319061493 0 -1132 2.011880993187961 1.403788654106659 0 -1133 2.126021684729495 1.337378473002195 0 -1134 2.011811686517344 1.224550986013619 0 -1135 -4.995509934191807 0.9748146037306582 0 -1136 -4.924167916963942 1.238641965408097 0 -1137 -4.705428284804487 1.114922476608138 0 -1138 4.70539444332877 1.114938563420175 0 -1139 4.924137951377802 1.238648764983588 0 -1140 4.995457226790749 0.9748249380901044 0 -1141 -2.011897940104993 1.224940636685695 0 -1142 -2.126225217137508 1.337420992821713 0 -1143 -2.012115308554652 1.404085557067936 0 -1144 0.03579895919624725 0.3357987539860072 0 -1145 -0.0524823071708076 0.4074649006139258 0 -1146 0.02420044367720357 0.4721204708568302 0 -1147 -0.4732294342775434 0.8716559969921264 0 -1148 -0.1573834420804834 0.4602499260051978 0 -1149 -0.1457849265614397 0.3239282091343749 0 -1150 -0.6126015543848374 1.138308744567184 0 -1151 -0.7211591175751395 1.077062786423235 0 -1152 -0.7329168484830769 1.18875404185605 0 -1153 0.6663328634300399 2.172316537318513 0 -1154 0.5739788831856599 2.05813686268562 0 -1155 0.5191988085892894 2.158738333363426 0 -1156 0.2975858252045245 0.5636151093312386 0 -1157 0.4124099006264972 0.6166321552646863 0 -1158 -7.902662351050683 2.589043253739276 0 -1159 -8.15660836019425 2.93202864501989 0 -1160 8.156608360162553 2.932028645007407 0 -1161 7.902662351022659 2.589043253729204 0 -1162 -3.040327893333699 2.001616568612895 0 -1163 -3.074700124025851 1.811121103225239 0 -1164 3.074651271192828 1.811112596170799 0 -1165 3.040274645040006 2.001595914949498 0 -1166 9.533298131680349 1.645111250867314 0 -1167 -9.533298131686262 1.645111250856836 0 -1168 -0.00648630996007532 1.135387964877647 0 -1169 -0.02399791652750581 1.010559176364888 0 -1170 0.4643729403080122 0.8637822126016764 0 -1171 0.4301217925901755 0.7285363833808729 0 -1172 0.3293200301036111 0.8042863738034489 0 -1173 -0.5158143545994154 0.2111933638257355 0 -1174 -0.4542844752393457 0.105091302063755 0 -1175 -0.1559624366157459 1.765309769584417 0 -1176 -0.1558241393696086 1.889523091539657 0 -1177 -0.01419381308660076 1.837364460255946 0 -1178 -5.950754886844964 0.5293614827975666 0 -1179 -5.750817937255711 0.2100094108662388 0 -1180 5.750805738607825 0.2100058587953903 0 -1181 5.950724908962805 0.529353278036199 0 -1182 0.6118872914458715 0.500521886473706 0 -1183 0.5786275932475251 0.3761094824127398 0 -1184 -0.8007563583734296 0.3070747325628125 0 -1185 -0.6721979398699744 0.318565426571069 0 -1186 -7.126447111127855 3.112284346918456 0 -1187 7.12644711110303 3.112284346904844 0 -1188 1.189926658050858 1.520437304557595 0 -1189 -2.414685678447027 0.1542963984559887 0 -1190 -1.836559058098209 0.1278739504765997 0 -1191 -1.667224350912139 0.1278739504765997 0 -1192 0.6994639297534637 0.9653962018886024 0 -1193 0.826058996696279 1.009454344230106 0 -1194 0.660925092882402 1.979272919151926 0 -1195 2.414703492366277 0.1542768996247666 0 -1196 1.670685130557436 0.1291843147252833 0 -1197 1.840019837744024 0.1291843147252833 0 -1198 -0.1167846783760676 2.023832259718644 0 -1199 0.1786372929836622 0.3069586309756957 0 -1200 2.25573573029721 1.801146411724734 0 -1201 2.128918169106742 1.972928858432271 0 -1202 7.541961288231506 2.166048501857532 0 -1203 7.273561430029492 1.879802216751374 0 -1204 -7.273561978559271 1.879803207737558 0 -1205 -7.541961311058428 2.16604854307247 0 -1206 -5.160281310552158 1.36021009101751 0 -1207 5.160249216353154 1.360211088789756 0 -1208 -2.12156821604275 1.970574315701323 0 -1209 -2.248379243607704 1.798771383947237 0 -1210 2.027187257597359 2.141425679453127 0 -1211 1.966536373343696 2.338914194974606 0 -1212 -1.965405145360648 2.339311411100643 0 -1213 -2.026185693177156 2.14185339860343 0 -1214 -0.1926900969667566 1.311107207235589 0 -1215 -0.1435032059252924 1.423382866272169 0 -1216 -0.06631681279721377 1.343037872351909 0 -1217 -1.092492768662579 1.105074679470274 0 -1218 -1.171137423522474 0.969832644638178 0 -1219 -1.21430286998318 1.107816571291673 0 -1220 -6.619730058828498 4.513097436628878 0 -1221 -6.424638550861879 4.818102215817026 0 -1222 6.4246385508582 4.818102215807167 0 -1223 6.619730058822961 4.513097436618065 0 -1224 3.302230296889724 0.7725188154378186 0 -1225 3.531304049656452 0.6960804794554967 0 -1226 3.372502436645759 0.5593636482863933 0 -1227 -3.372524698764967 0.5593750214807987 0 -1228 -3.53133673540836 0.6960917532923416 0 -1229 -3.302250127495459 0.7725217926674151 0 -1230 8.761024817534619 3.938236897542795 0 -1231 9.23159252435376 3.755126920745477 0 -1232 8.947134892809462 3.589504516553549 0 -1233 -8.947134892816626 3.589504516593227 0 -1234 -9.231592524354006 3.755126920789431 0 -1235 -8.761024817545216 3.938236897569912 0 -1236 -1.349227185155936 1.104373794079585 0 -1237 -0.2275693907336377 1.489382855805435 0 -1238 -0.1011961065640949 1.521313520921754 0 -1239 -0.5909572704612323 1.591534179797849 0 -1240 -0.7186500298386991 1.544803431935161 0 -1241 7.173137063633709 5.646711863245967 0 -1242 6.832554852237895 5.642065804363522 0 -1243 -6.832554852237775 5.642065804369448 0 -1244 -7.173137063632073 5.64671186325206 0 -1245 8.658922358094067 3.420995019670457 0 -1246 -8.658922358122268 3.420995019687666 0 -1247 10.43620892369964 6.279599302745465 0 -1248 9.958083334174486 6.279599302745465 0 -1249 -9.958083334180508 6.279599302745884 0 -1250 -10.43620892370174 6.279599302745884 0 -1251 -1.113193424612991 1.715672140242851 0 -1252 1.215838574239937 1.095709614450083 0 -1253 1.172960949241767 0.9548777058771178 0 -1254 1.0928631419408 1.099184799149391 0 -1255 6.751549725900098 5.320394552278279 0 -1256 -6.751549725900853 5.320394552285858 0 -1257 8.658603305889786 1.439533540765492 0 -1258 -8.658603326288564 1.439533548429256 0 -1259 1.350745932234731 1.092325124432393 0 -1260 -6.445869870622272 2.758369872233643 0 -1261 6.445869835180115 2.758369864476044 0 -1262 -1.98026779079679 0.134870397450142 0 -1263 1.98074414477682 0.1346251846358135 0 -1264 -0.8273240379613127 1.017634211043834 0 -1265 -0.7070087438630732 0.9671889137549678 0 -1266 -8.882539727501957 5.881670951731049 0 -1267 -9.106787320665211 6.325307288302432 0 -1268 9.106787320655741 6.325307288304084 0 -1269 8.882539727495477 5.881670951735181 0 -1270 7.031034716757238 3.614376794885385 0 -1271 6.892235737138602 3.959277649256249 0 -1272 -6.892235737150138 3.959277649267605 0 -1273 -7.031034716771395 3.614376794897539 0 -1274 1.88499112173542 0.4231557420637058 0 -1275 1.860956997701865 0.2638094993610968 0 -1276 -1.857019864079779 0.2627443479267416 0 -1277 -1.88437878412189 0.4237594706861779 0 -1278 0.7189519479558479 0.1098585949964708 0 -1279 0.0446549162149521 0.9087954164922734 0 -1280 1.910978223680406 0.6095293045487137 0 -1281 2.027668406679647 0.455623931756635 0 -1282 -2.026981654987637 0.4561531855615806 0 -1283 -1.910631842331167 0.6101718613474746 0 -1284 -4.790051014463361 2.18699584838326 0 -1285 -4.933431818154382 2.390619046631198 0 -1286 -4.718462317894543 2.462882130407167 0 -1287 4.718452512083674 2.462868642850447 0 -1288 4.933420560602505 2.390610923238439 0 -1289 4.790042691954272 2.186987084391592 0 -1290 -0.7320675773495691 2.271305473402466 0 -1291 -0.8033753481119636 2.393327961017444 0 -1292 8.242155977160696 1.659593883647509 0 -1293 8.692499408872402 1.778272993347189 0 -1294 -8.692499408888789 1.778272993346511 0 -1295 -8.242155997563941 1.659593891316528 0 -1296 1.092772933079049 0.132596002606744 0 -1297 1.237887856111854 0.132596002606744 0 -1298 2.088362147569628 1.678725444501367 0 -1299 8.294655027955542 2.320749789933912 0 -1300 7.884059403210429 2.266626800024498 0 -1301 -7.884059403233403 2.26662680003229 0 -1302 -8.294655027981445 2.320749789940769 0 -1303 -2.08105832803591 1.676315284800513 0 -1304 -10.48024492886144 3.098489840277515 0 -1305 -9.958753445617301 2.950653973515394 0 -1306 9.95875344562559 2.950653973525568 0 -1307 10.48024492887596 3.098489840282666 0 -1308 0.8043483079157366 2.393083989180728 0 -1309 0.7292048409596774 2.279542993178888 0 -1310 6.836636351696008 4.417379419427112 0 -1311 6.867529535473623 4.792431418095124 0 -1312 -6.867529535474944 4.792431418106138 0 -1313 -6.836636351700586 4.417379419439014 0 -1314 -0.8293634210090072 0.4119320226658024 0 -1315 -0.9087836583626273 0.2940800256104379 0 -1316 -0.4733543724664883 1.625670498896847 0 -1317 -0.3386942605636393 1.687489267480664 0 -1318 7.055451745002699 1.089958809678862 0 -1319 -7.05545362203515 1.089959319665362 0 -1320 -0.8365225000558509 1.486508247914283 0 -1321 -0.9439927508032239 1.56303929069481 0 -1322 6.206319888394074 2.795915140451811 0 -1323 6.439792240587532 2.524736254430398 0 -1324 -6.439792240610254 2.524736254439835 0 -1325 -6.206319923833908 2.795915148208177 0 -1326 0.6087306008097472 1.386650143545281 0 -1327 0.7289710746081139 1.438881697094913 0 -1328 0.7301667456788395 1.321457252692626 0 -1329 0.08875953001102461 2.034755371123809 0 -1330 -0.01132028171951996 2.087753756990233 0 -1331 0.09149476413196815 2.160931345902856 0 -1332 -0.1140494442551241 2.150008234497692 0 -1333 -0.1841288211467276 0.6125536130757656 0 -1334 4.329768464750657 1.519770035742075 0 -1335 4.415820981651532 1.296118547559814 0 -1336 -4.415826978584651 1.296131865447979 0 -1337 -4.329778807730817 1.519772274021307 0 -1338 -0.03865103708923717 0.6606818670146658 0 -1339 -8.420618137413237 3.145133296196824 0 -1340 -8.577267753017713 2.85627089482469 0 -1341 8.577267752982792 2.856270894814333 0 -1342 8.420618137377572 3.145133296183122 0 -1343 0.2424312749232521 0.7535211211504582 0 -1344 0.2766824226410888 0.8887669503712616 0 -1345 0.9556797876384027 1.552071411260348 0 -1346 0.8467253260067105 1.479147096583375 0 -1347 7.93395396516439 1.897755038062241 0 -1348 -7.933953987989192 1.897755079273963 0 -1349 1.849326833155347 1.42670211310979 0 -1350 1.963536831367499 1.539529600098366 0 -1351 -1.964290592836881 1.539191381214406 0 -1352 -1.849963315804367 1.426711025078388 0 -1353 -8.238262965298805 3.496752769882866 0 -1354 8.238262965273826 3.496752769863531 0 -1355 4.583837547722101 0.8785517805344434 0 -1356 4.512518272309155 1.142375607427927 0 -1357 -4.512536321153648 1.142377567188588 0 -1358 -4.583878338381513 0.8785502055111495 0 -1359 -0.502298173637403 1.220428366776346 0 -1360 -0.4905404427294656 1.10873711134353 0 -1361 0.1461623756896286 0.9390077070791174 0 -1362 0.08828620798605337 0.8077894071314269 0 -1363 3.776727894288307 0.6490228346315359 0 -1364 3.706455754532272 0.8621780017829613 0 -1365 -3.706491454286657 0.8621866370600172 0 -1366 -3.776766025556165 0.6490398658734008 0 -1367 -5.086574010975399 2.576355987449513 0 -1368 -5.158162707544218 2.300469705425606 0 -1369 5.158157820410841 2.300468005508026 0 -1370 5.086567640540243 2.576349563966881 0 -1371 9.632995059464449 5.938239924382883 0 -1372 9.551993879572981 6.325307288304084 0 -1373 -9.551993879580429 6.325307288302432 0 -1374 -9.632995059470074 5.93823992438165 0 -1375 -4.948050724979809 3.050139591630999 0 -1376 -5.16300699346635 3.20137347262668 0 -1377 5.16300127342396 3.201371793783547 0 -1378 4.948045004938226 3.050137912789462 0 -1379 7.602963829536716 6.387241612536739 0 -1380 7.555127104785249 6.045584637067288 0 -1381 -7.555127104785139 6.045584637069854 0 -1382 -7.602963829538828 6.387241612537281 0 -1383 -0.0129216217617428 1.24928037710474 0 -1384 0.3124999999995103 2.386765981049115 0 -1385 -0.2261327115139011 0.08669386506756808 0 -1386 -0.1011327115135597 0.08669386506756808 0 -1387 -0.4906916052759227 0.9831450191563859 0 -1388 -4.198651894688365 2.646828302953789 0 -1389 4.198652685177286 2.646827426608118 0 -1390 -8.57101450914789 2.182222558112241 0 -1391 8.571014509125956 2.182222558110601 0 -1392 5.967914153117408 0.7481246736145426 0 -1393 5.664414558946421 0.6387831131691243 0 -1394 -5.664447342213046 0.6387980930577025 0 -1395 -5.967952516941844 0.7481407541227914 0 -1396 -3.792942281949171 0.184923162664352 0 -1397 -3.789300728895887 0.4263956537172147 0 -1398 -3.605252859731152 0.2414724910528626 0 -1399 3.605235301105492 0.2414626561520356 0 -1400 3.78926577504899 0.4263789574858821 0 -1401 3.792924886741996 0.1849163013338465 0 -1402 0.7252891811376181 1.54433998743603 0 -1403 1.66685355665724 1.513837725309565 0 -1404 1.718447495294165 1.391011411332618 0 -1405 1.58431838061652 1.342406077540687 0 -1406 -0.1215746073401298 0.2222654569391195 0 -1407 -1.239324838779007 0.1172582299989176 0 -1408 -1.094209915746566 0.1172582299989176 0 -1409 0.957279553210342 0.08356364901642356 0 -1410 1.032660249437757 0.2161596516231676 0 -1411 -1.584361778464089 1.344834943248569 0 -1412 -1.718907578058777 1.391972324779124 0 -1413 -1.667592800491908 1.514679467694303 0 -1414 0.5749331709684571 0.9122944788080143 0 -1415 4.294264086044863 1.059731764674083 0 -1416 -4.294277032161677 1.059759594350991 0 -1417 -0.3125000000007722 2.389513233602803 0 -1418 0.3092097021037111 2.076245809383483 0 -1419 0.1899794072297317 1.986619983435606 0 -1420 0.4708165461695389 1.111839684356777 0 -1421 0.4834338625386065 1.22817416620981 0 -1422 4.736131052419635 0.1973608940760365 0 -1423 5.026777277343331 0.1973608940760365 0 -1424 -5.026792866386971 0.1973575138100843 0 -1425 -4.736146641465474 0.1973575138100843 0 -1426 0.4741314084818927 0.9880444692305903 0 -1427 1.029380573391138 0.3175138436320966 0 -1428 0.8938871935224302 0.2684814900417761 0 -1429 3.041661773481553 2.401675653078874 0 -1430 3.017131548792462 2.169294719084876 0 -1431 -3.017191691917946 2.16931674461331 0 -1432 -3.041672181453639 2.401679889395287 0 -1433 -4.769832998682688 2.890480804207999 0 -1434 -5.040060847882685 2.826164116078104 0 -1435 5.040048757419279 2.82615601376073 0 -1436 4.769826628250854 2.890474380726025 0 -1437 -0.5347763289419768 2.158697212264722 0 -1438 -0.5904205688613573 2.060602147050978 0 -1439 -0.6748684211413345 2.157859959556301 0 -1440 -1.641168030128059 1.658520662907198 0 -1441 -1.50662223053337 1.611383281376643 0 -1442 -4.356949231586822 2.737426049246191 0 -1443 -4.57832682737746 2.855433526832243 0 -1444 4.578334330885886 2.855432516665064 0 -1445 4.356956735096254 2.73742503908025 0 -1446 1.968643913465092 1.041309369953612 0 -1447 1.854503221923558 1.107719551058076 0 -1448 -1.854035628639342 1.10886526645506 0 -1449 -1.968145537222198 1.042200702208837 0 -1450 -3.964455447774184 0.5924905374848902 0 -1451 -4.175970902112145 0.4230992804873461 0 -1452 -4.163436198772425 0.6457434926435323 0 -1453 4.163401346472482 0.6457352178481435 0 -1454 4.175939227233165 0.4230913407024895 0 -1455 3.964417479924811 0.5924764798133468 0 -1456 -1.284716028274233 2.376428864267197 0 -1457 -1.787073017117849 1.727318558237107 0 -1458 -1.918906335285625 1.698940752810965 0 -1459 -1.903840752316878 1.864442461823214 0 -1460 1.918029953529089 1.864969534427774 0 -1461 1.925807987537014 1.701638903504498 0 -1462 1.79320463732696 1.725773690024773 0 -1463 8.662348213290894 4.931143388561004 0 -1464 9.049873977376617 4.995267972892394 0 -1465 8.850330529992473 4.655773561872524 0 -1466 -8.85033052999095 4.655773561888046 0 -1467 -9.049873977377541 4.995267972903255 0 -1468 -8.66234821329051 4.931143388570064 0 -1469 1.50838679463077 1.608669588758921 0 -1470 1.642515909308415 1.657274922550852 0 -1471 0.8937394907974328 0.6898265320791115 0 -1472 1.018685880487833 0.6563065432789443 0 -1473 0.9286757678764913 0.5910844269436057 0 -1474 7.271756640105422 0.9615392226187853 0 -1475 7.31208310555181 1.30109467078143 0 -1476 -7.312083105563602 1.301094670783034 0 -1477 -7.27175851713414 0.9615397326030553 0 -1478 -4.042017604269776 0.184923162664352 0 -1479 4.042000209064417 0.1849163013338465 0 -1480 -0.6640836266691986 1.97212400430717 0 -1481 1.284716028269463 2.377577003528791 0 -1482 -4.291718815226496 1.749907670827279 0 -1483 4.291700432090636 1.749897193535874 0 -1484 3.190557651008538 2.114842902515224 0 -1485 -3.190571572119124 2.114850003282831 0 -1486 7.095751646412339 4.467365528780527 0 -1487 6.847952169761676 4.188031547303468 0 -1488 -6.847952169770096 4.188031547315457 0 -1489 -7.095751646416542 4.467365528792717 0 -1490 -0.3292844752389989 0.105091302063755 0 -1491 -3.420306037322775 2.444354079841558 0 -1492 3.420307245761422 2.444353551923431 0 -1493 -1.94029154761906 2.007343739299179 0 -1494 8.560230677647368 5.222379343858937 0 -1495 -8.560230677646768 5.22237934386297 0 -1496 1.948902392229761 2.009331568928356 0 -1497 1.777624073908204 2.338914194974606 0 -1498 -1.776492845927057 2.339311411100643 0 -1499 7.343817030317277 1.613345498868391 0 -1500 -7.343817053139413 1.613345540079742 0 -1501 1.324177407100532 0.3473662682383503 0 -1502 1.221025393165831 0.4034322026910661 0 -1503 1.377049170959899 0.4856064657159282 0 -1504 1.110887893436678 0.4113782216784633 0 -1505 1.163759657296045 0.5496184191560414 0 -1506 -8.589617456965168 2.504639011819227 0 -1507 8.589617456938186 2.504639011815307 0 -1508 9.542481660278961 0.3192043540783032 0 -1509 9.843117767001205 0.4813657614630926 0 -1510 -9.843117767000503 0.4813657614599097 0 -1511 -9.542481660275547 0.3192043540764356 0 -1512 0.1557117534073487 0.7116740978550881 0 -1513 0.05420429393267226 0.681461807268244 0 -1514 -1.025602095184905 0.2118695977526416 0 -1515 -0.9487844162887112 0.094611367753724 0 -1516 0.4009224141722915 2.159045310414383 0 -1517 0.08702606413210627 1.789229072567743 0 -1518 0.1722503587958096 1.746452463230064 0 -1519 0.07089218433096527 1.670374528963027 0 -1520 1.316266727993994 0.2189338842601126 0 -1521 1.386000954799383 0.08633788165336856 0 -1522 0.6916044946750561 0.3282685984968133 0 -1523 1.766791657114628 1.255270465340911 0 -1524 0.5247667517578489 1.335333696373544 0 -1525 -0.9312504932255594 0.937425545596173 0 -1526 -0.9454008669376258 1.04729941826444 0 -1527 9.080668387492931 0.3192043540783032 0 -1528 -9.080668387486332 0.3192043540764356 0 -1529 4.171420487933307 0.8605545907505979 0 -1530 4.382942235241662 0.6911694516397406 0 -1531 -4.382969013920531 0.691178765868794 0 -1532 -4.171453559582568 0.8605700228663381 0 -1533 7.395461126511577 0.7020432617715073 0 -1534 7.520613087185591 0.3268415810133988 0 -1535 -7.520613400009847 0.3268416660106056 0 -1536 -7.395463316371949 0.7020438567532974 0 -1537 -1.955043772763589 0.9007557407276532 0 -1538 0.8471684478309508 0.4972200488972389 0 -1539 0.9721148375213513 0.4637000600970718 0 -1540 -1.298694759576041 0.3193137022373083 0 -1541 -1.317703710660963 0.2039782434118513 0 -1542 -1.445370875594245 0.2887754856513244 0 -1543 -1.054209157820482 0.3167268878556315 0 -1544 4.566506873015611 2.049130754952428 0 -1545 -4.566523898385752 2.049139782028375 0 -1546 1.955630968520625 0.8997116159221832 0 -1547 -1.766732293776547 1.256866500632654 0 -1548 -4.383436442929503 2.159328977303423 0 -1549 -4.374878827111733 1.949209827172568 0 -1550 4.374864525357623 1.949202717227638 0 -1551 4.383432295777452 2.159316766278811 0 -1552 -1.621894668792376 2.411389414800905 0 -1553 1.62189466878752 2.410933681874018 0 -1554 0.08740688675778048 2.405384740374124 0 -1555 0.08311436295849225 2.262349606258764 0 -1556 -0.00429252379928822 2.35696486588464 0 -1557 -2.6122824652596 0.1542963984559887 0 -1558 2.612300279180332 0.1542768996247666 0 -1559 -1.158106857458402 0.3891260481570231 0 -1560 5.023277668938411 0.4992655144384454 0 -1561 5.22295605265022 0.3019046203624088 0 -1562 -5.222978682150943 0.3019063002084029 0 -1563 -5.023315887508764 0.4992638140184871 0 -1564 7.411142800747783 4.51228176025648 0 -1565 7.422458618813453 4.282933888132835 0 -1566 -7.422458618815027 4.282933888148598 0 -1567 -7.411142800745518 4.512281760272154 0 -1568 2.636480770582724 0.7825163742930986 0 -1569 2.860942141713678 0.5941453149062678 0 -1570 -2.860939214242828 0.594131990283493 0 -1571 -2.636488938872514 0.7825245071992086 0 -1572 -4.368658809690857 2.337237106739009 0 -1573 -4.177013738416838 2.237307151883202 0 -1574 4.177013817141748 2.237301128592564 0 -1575 4.368656164799736 2.337229166317353 0 -1576 1.472290505788062 0.3011081472849748 0 -1577 -4.670336950280335 2.631458051279348 0 -1578 4.670338083366938 2.631450617636333 0 -1579 3.450578308256579 0.1594481021227813 0 -1580 -3.450594071902764 0.1594478745954016 0 -1581 7.151351031854933 4.009263758609665 0 -1582 7.466742186190378 4.054179990085617 0 -1583 -7.466742186195069 4.054179990100746 0 -1584 -7.151351031866094 4.009263758621309 0 -1585 -3.44695251884948 0.4009203656482643 0 -1586 3.446919196563573 0.4009107582748169 0 -1587 0.9439336449852991 1.041512955348181 0 -1588 0.9321108686536098 0.9262942794583513 0 -1589 -0.09869387678967119 2.26673502626091 0 -1590 -0.09440135299038298 2.409770160376269 0 -1591 -0.0997972008525891 1.650232324377863 0 -1592 -0.2414275271355969 1.702390955661574 0 -1593 0.208349360869871 0.6271935212872753 0 -1594 0.212406886757454 2.405384740374124 0 -1595 5.216828589542541 0.8511721901891676 0 -1596 4.998085081493508 0.7274619886257545 0 -1597 -4.998136002652544 0.7274538576737524 0 -1598 -5.216875634811998 0.8511733464737115 0 -1599 4.601010993706179 0.4355359334446796 0 -1600 -4.601040862427588 0.4355336316330783 0 -1601 1.125398450775282 0.6490251337058871 0 -1602 1.090462173696223 0.7477672388413928 0 -1603 -1.38600095479721 0.08672001341293376 0 -1604 7.510340963205305 5.713177732585937 0 -1605 -7.510340963202505 5.713177732591123 0 -1606 -0.5833816524785207 0.9151284669701085 0 -1607 -0.2825290248004825 1.57241182227411 0 -1608 -1.422033433125607 1.496530890992705 0 -1609 -1.469276923183008 1.35185756893167 0 -1610 -0.2194013529908977 2.409770160376269 0 -1611 -1.931758969476731 0.784345454100539 0 -1612 0.2832872879310931 2.190732461067331 0 -1613 -1.370898026582505 2.287818279068103 0 -1614 -1.449530672175832 2.411389414800905 0 -1615 -1.364101823103659 2.164095597401224 0 -1616 -10.48024492886144 3.574680316467924 0 -1617 10.48024492887596 3.574680316473177 0 -1618 1.469139962454076 1.349240059602305 0 -1619 1.422130807670359 1.493284782518309 0 -1620 1.365813667086916 2.164783431768226 0 -1621 1.370898026577973 2.288510685402809 0 -1622 1.449530672170499 2.410933681874018 0 -1623 -1.722979890893752 1.074126566155795 0 -1624 1.932495478747969 0.7832377146198555 0 -1625 1.723623884062375 1.072028849280904 0 -1626 -1.576952910803296 1.111173059409655 0 -1627 -0.4126642383312571 2.170232933482502 0 -1628 7.39361454659553 5.37653688010414 0 -1629 -7.393614546593498 5.376536880111372 0 -1630 -7.900057905388966 1.559015634356708 0 -1631 -7.560121948238404 1.484925953017435 0 -1632 7.560121925420001 1.484925911808314 0 -1633 7.900057862181773 1.559015585480544 0 -1634 10.09442908462129 0.7207548208768291 0 -1635 10.08691423254719 0.2393890594137365 0 -1636 -10.08691423254409 0.2393890594123673 0 -1637 -10.09442908462333 0.7207548208722769 0 -1638 1.577194496997469 1.108615417298578 0 -1639 5.745886385677407 3.730697478965396 0 -1640 5.507382706287649 3.592277624243643 0 -1641 -5.507382706300147 3.592277624255108 0 -1642 -5.745886441152707 3.730697491108614 0 -1643 7.384626940009698 4.798209532240442 0 -1644 -7.384626940008175 4.79820953225222 0 -1645 5.854343343624013 1.002961264787939 0 -1646 6.140653693640396 0.8935314296550136 0 -1647 -6.140675742813624 0.8935590836777287 0 -1648 -5.854368198181707 1.002995693937865 0 -1649 0.7613129653263264 1.639938564461256 0 -1650 9.336972679658782 5.679382396037171 0 -1651 -9.336972679665188 5.67938239603549 0 -1652 2.999735878872253 0.711941260218772 0 -1653 -2.999738270034567 0.7119239681587519 0 -1654 -0.2041582734462188 2.20281352898932 0 -1655 -5.436852686572658 0.2100094108662388 0 -1656 5.43684048792348 0.2100058587953903 0 -1657 3.35358469840418 2.124411808422225 0 -1658 3.52293985848202 2.090375100913283 0 -1659 3.383055907333921 1.913107390870905 0 -1660 -3.383054408394279 1.913122585391265 0 -1661 -3.522933637962639 2.090387958900134 0 -1662 -3.353587003103237 2.124415200791286 0 -1663 -0.2972569204560933 2.182556602215854 0 -1664 10.5857794417503 0.7155795356055898 0 -1665 -10.58577944175012 0.7155795356019268 0 -1666 -1.588845479030183 0.2145939638895334 0 -1667 1.592306258675296 0.2155221963786519 0 -1668 7.474302678170375 3.741756455552498 0 -1669 -7.474302678186191 3.74175645556618 0 -1670 -1.372765624722599 0.8500053202703522 0 -1671 -1.242700683076451 0.8749349483309212 0 -1672 0.1831941746890368 2.209351220392339 0 -1673 -1.264619974001125 1.626803120386543 0 -1674 -1.395608662761758 1.640372086205601 0 -1675 -2.81232391838218 0.9449921594987702 0 -1676 2.812300352841964 0.9450260627632443 0 -1677 4.575818406261277 0.6637324076319888 0 -1678 -4.57586097757137 0.6637236752883436 0 -1679 -7.876464750858011 3.461947048475464 0 -1680 7.876464750833111 3.461947048459374 0 -1681 -9.772429562007481 3.373115681616219 0 -1682 9.772429562023593 3.373115681585216 0 -1683 -0.2819013529906404 2.299283393979072 0 -1684 1.397793160321535 1.636721979759596 0 -1685 1.267707830500224 1.618862230713858 0 -1686 -10.58577944175012 0.2393890594123673 0 -1687 10.5857794417503 0.2393890594137365 0 -1688 4.80190630618662 0.6229182623393823 0 -1689 -4.801950186888572 0.6229050712754338 0 -1690 5.450530123673163 0.7306818747361428 0 -1691 5.447902268970402 0.9780448242004927 0 -1692 -5.447947269330594 0.9780557284567724 0 -1693 -5.450573337791331 0.7306949823998665 0 -1694 1.542758698563663 0.08633788165336856 0 -1695 -1.542758698561123 0.08672001341293376 0 -1696 0.08716436137824356 1.913442394522983 0 -1697 0.2749068867576173 2.292150721423239 0 -1698 7.070423237685302 5.003392205834171 0 -1699 7.37061434934833 5.104888337170442 0 -1700 -7.370614349346191 5.104888337180238 0 -1701 -7.070423237685049 5.003392205844291 0 -1702 7.707818248919927 5.171354206510411 0 -1703 -7.707818248916624 5.1713542065193 0 -1704 1.246555562762288 0.8459441752230726 0 -1705 1.383135225457634 0.8334908590662776 0 -1706 1.333754406679017 0.7280325131115406 0 -1707 5.286907433605563 1.779710080227757 0 -1708 5.549594844757965 1.660034187914596 0 -1709 5.368985109018928 1.502211145612834 0 -1710 -5.368995695909932 1.502220109284379 0 -1711 -5.549600317124604 1.660046895351596 0 -1712 -5.286917675967727 1.779712875571619 0 -1713 5.389411034846589 2.211869884382993 0 -1714 5.236263954908852 2.026131243654551 0 -1715 -5.2362714059528 2.026136213123063 0 -1716 -5.389413598773817 2.211873153941379 0 -1717 3.856537417959596 1.008096656972947 0 -1718 4.074723197275683 1.014297530882486 0 -1719 -4.074744217013571 1.01432432112573 0 -1720 -3.856575133488039 1.008116302672121 0 -1721 -9.342448024269178 5.04735751417701 0 -1722 -9.634232853064088 4.811268227143758 0 -1723 9.634232853061139 4.811268227128347 0 -1724 9.342448024266407 5.047357514168377 0 -1725 -0.5924817903575068 0.4229241209653942 0 -1726 -0.5433436092076718 0.3165628179182862 0 -1727 0.7488765211053068 0.530712211372229 0 -1728 5.422936627505555 1.240535196476595 0 -1729 -5.422963951709034 1.240544110797487 0 -1730 -9.831545405924016 4.465689329967157 0 -1731 -9.435168846937909 4.374319249044637 0 -1732 9.435168846934452 4.374319249012693 0 -1733 9.831545405917396 4.465689329937128 0 -1734 3.114692781133302 1.106437111363686 0 -1735 2.922482721053393 1.021649459606288 0 -1736 -2.922523100387966 1.021628736947919 0 -1737 -3.114736393808284 1.106434138913603 0 -1738 -0.01573101604424383 1.584232334844597 0 -1739 0.03626526927972137 1.361556036141319 0 -1740 0.7923155907501669 0.403327844525695 0 -1741 3.330441602156637 2.292110612557602 0 -1742 -3.330450801687484 2.292115376791701 0 -1743 3.25728019836578 2.434784646016429 0 -1744 -3.257290606338662 2.434788882333104 0 -1745 -0.3054171867535935 0.1917851671313231 0 -1746 -0.7375528899725456 1.311323563926724 0 -1747 -0.6468908590508892 0.5126826584882125 0 -1748 -3.268749488683746 0.9252772774194437 0 -1749 -3.109937452040353 0.7885605456079007 0 -1750 3.109918247083681 0.7885646570618159 0 -1751 3.268719860094374 0.9252814882309193 0 -1752 5.620614672335081 2.12608218234429 0 -1753 -5.620617236263226 2.126085451903651 0 -1754 -1.194924905004702 2.098825171081964 0 -1755 1.198086479015668 2.098854238579917 0 -1756 0.8229427200775781 0.08356364901642356 0 -1757 0.1093622130575792 1.437490310562588 0 -1758 -0.7877118172689496 2.173210408188722 0 -1759 -1.461868055522216 1.118195685092757 0 -1760 -1.405588395209354 0.9863964274727492 0 -1761 -6.066134209254908 2.203093622827764 0 -1762 -5.875408488093047 2.009929170206523 0 -1763 5.875408578604029 2.009920216467694 0 -1764 6.066134209235198 2.20309362282069 0 -1765 0.06949327861945948 1.541455725506918 0 -1766 -5.43337570769445 0.5119157110746417 0 -1767 5.433340879518559 0.5119104791577992 0 -1768 0.2062922390337666 0.4293219991543716 0 -1769 0.2724478219731704 0.3358263059011558 0 -1770 1.407206528141198 0.974526796105613 0 -1771 1.462016078835025 1.115449399360196 0 -1772 -6.279399268493826 2.326918766950715 0 -1773 6.279399268473162 2.326918766944241 0 -1774 9.525091999709655 3.717567445788852 0 -1775 9.338981924434812 4.066299826778097 0 -1776 -9.338981924440215 4.066299826817077 0 -1777 -9.525091999711627 3.717567445840391 0 -1778 -9.87981896209369 3.684288587643865 0 -1779 -10.2043773978843 3.762847031730631 0 -1780 -9.957039835588443 4.107298795954804 0 -1781 9.957039835575642 4.107298795921885 0 -1782 10.20437739788958 3.762847031718249 0 -1783 9.879818962104647 3.684288587617837 0 -1784 5.722311075613548 1.821371156652922 0 -1785 -5.72231354901222 1.821383379941708 0 -1786 0.02877450833205816 0.564566557738327 0 -1787 5.656638161636177 1.120044881023571 0 -1788 -5.656661654688367 1.120065746723642 0 -1789 0.7931760974473194 0.1934222440128944 0 -1790 0.7839849155560481 2.178941522501082 0 -1791 10.55746580234695 3.997690524777225 0 -1792 10.55746580234695 4.473881000966653 0 -1793 -10.55746580235619 4.473881000970618 0 -1794 -10.55746580235619 3.997690524778863 0 -1795 3.110194238286439 1.667905437915251 0 -1796 -3.11025688532622 1.667918218409955 0 -1797 -0.7328740244351646 1.430942311874326 0 -1798 -0.6196804197553938 1.369618747947601 0 -1799 -0.3250567760384332 1.291154467354271 0 -1800 3.249243714349692 1.803936940124299 0 -1801 -3.249264534835246 1.803946942467132 0 -1802 0.3982743424159826 1.29428216344036 0 -1803 1.372115613199781 0.6286257985616948 0 -1804 1.235535950504435 0.6410791147184898 0 -1805 0.7339020380322336 1.870753046556151 0 -1806 0.773324663221256 1.774973531723588 0 -1807 -0.8502733414117076 2.072377593495827 0 -1808 -0.3248361241616801 1.474481167624524 0 -1809 0.8550551304311442 1.719640354186823 0 -1810 6.548656023688419 5.109433764539231 0 -1811 -6.548656023690747 5.109433764547705 0 -1812 5.304480302739161 3.406128527371736 0 -1813 -5.30448030275161 3.406128527381727 0 -1814 -0.5391066576280052 1.312905656469694 0 -1815 -0.4170455459726334 1.28333402324604 0 -1816 -0.7706639012697042 0.5306124030361136 0 -1817 4.320541736083001 2.505811141103239 0 -1818 -4.32053344207665 2.50581302761119 0 -1819 0.7940898831762422 1.963195194044931 0 -1820 -0.7860978457863421 1.957818476746134 0 -1821 0.8473659899280709 2.078427364142167 0 -1822 0.7898964214007 0.2947764360218234 0 -1823 6.853516944812255 5.099110223025124 0 -1824 -6.853516944812961 5.099110223034156 0 -1825 0.8989929118866822 0.8246421583773633 0 -1826 5.359746163421852 3.190576279412356 0 -1827 -5.359751883465066 3.190577958256151 0 -1828 2.966225442076902 0.8647039330118726 0 -1829 -2.966237631222855 0.8646794529107806 0 -1830 -0.3296275059749034 0.2934479193265784 0 -1831 -0.4360982050869477 0.3155520582200607 0 -1832 -0.9086000950800819 0.837098185604271 0 -1833 -1.026676924056395 0.8667633928248764 0 -1834 -1.120890581755849 0.8721930565095217 0 -1835 -0.2264757422498056 0.2750504823303915 0 -1836 -0.4168248940958803 1.466660723516294 0 -1837 -0.5344277920906242 1.432524404417296 0 -1838 -0.4973986562232688 1.523373814994201 0 -1839 -8.700032755405509 5.525015896554587 0 -1840 -9.04439863277355 5.627292854761736 0 -1841 9.044398632768992 5.627292854761189 0 -1842 8.700032755401523 5.525015896554867 0 -1843 4.526960214718706 2.427826778789486 0 -1844 -4.526956146589314 2.427834853031411 0 -1845 1.123580130463151 0.8494193599223809 0 -1846 10.15610384170233 4.544247774037539 0 -1847 -10.15610384171462 4.544247774053924 0 -1848 1.016867560175702 0.8567007694954381 0 -1849 0.117055774699113 0.4929004111104084 0 -1850 -0.9152326360185563 1.651813551754699 0 -1851 7.564522520910288 3.479931885553802 0 -1852 7.285854441971773 3.518685290563749 0 -1853 -7.285854441992404 3.518685290575921 0 -1854 -7.56452252093246 3.479931885568646 0 -1855 0.9407611629277675 1.654078683660329 0 -1856 9.154465707564826 5.322727340856858 0 -1857 -9.15446570756874 5.322727340859027 0 -1858 -1.036926881362395 1.61448347447439 0 -1859 3.418598874427532 1.769900232615357 0 -1860 -3.418611169694648 1.769919700575981 0 -1861 9.141669371578555 4.411878723969318 0 -1862 8.754143607492834 4.347754139637929 0 -1863 -8.754143607493258 4.347754139660486 0 -1864 -9.141669371580289 4.411878723993677 0 -1865 1.053397518029956 1.621544707996186 0 -1866 -1.141953539397658 1.626897879182962 0 -1867 -7.121254559517663 3.352552224900005 0 -1868 7.121254559497151 3.352552224886688 0 -1869 -1.520591700749877 1.229150426016491 0 -1870 1.146097315189957 1.617962361752468 0 -1871 1.520733901091001 1.226413745625358 0 -1872 0.2108663036886212 0.5217680860358684 0 -1873 -0.3618652600290355 1.383631757047619 0 -1874 -6.518949215282191 2.289373490976181 0 -1875 6.518949215259204 2.289373490968474 0 -$EndNodes -$Elements -945 -1 15 2 2 2 1 -2 15 2 3 3 2 -3 15 2 5 7 5 -4 15 2 4 10 8 -5 15 2 1 14 11 -6 8 2 2 2 2 23 29 -7 8 2 2 2 23 24 30 -8 8 2 2 2 24 25 31 -9 8 2 2 2 25 26 32 -10 8 2 2 2 26 27 33 -11 8 2 2 2 27 28 34 -12 8 2 2 2 28 1 35 -13 8 2 1 3 1 36 54 -14 8 2 1 3 36 37 55 -15 8 2 1 3 37 38 56 -16 8 2 1 3 38 39 57 -17 8 2 1 3 39 40 58 -18 8 2 1 3 40 41 59 -19 8 2 1 3 41 42 60 -20 8 2 1 3 42 43 61 -21 8 2 1 3 43 44 62 -22 8 2 1 3 44 45 63 -23 8 2 1 3 45 46 64 -24 8 2 1 3 46 47 65 -25 8 2 1 3 47 48 66 -26 8 2 1 3 48 49 67 -27 8 2 1 3 49 50 68 -28 8 2 1 3 50 51 69 -29 8 2 1 3 51 52 70 -30 8 2 1 3 52 53 71 -31 8 2 1 3 53 6 72 -32 8 2 1 4 6 73 76 -33 8 2 1 4 73 74 77 -34 8 2 1 4 74 75 78 -35 8 2 1 4 75 12 79 -36 8 2 1 5 12 80 98 -37 8 2 1 5 80 81 99 -38 8 2 1 5 81 82 100 -39 8 2 1 5 82 83 101 -40 8 2 1 5 83 84 102 -41 8 2 1 5 84 85 103 -42 8 2 1 5 85 86 104 -43 8 2 1 5 86 87 105 -44 8 2 1 5 87 88 106 -45 8 2 1 5 88 89 107 -46 8 2 1 5 89 90 108 -47 8 2 1 5 90 91 109 -48 8 2 1 5 91 92 110 -49 8 2 1 5 92 93 111 -50 8 2 1 5 93 94 112 -51 8 2 1 5 94 95 113 -52 8 2 1 5 95 96 114 -53 8 2 1 5 96 97 115 -54 8 2 1 5 97 11 116 -55 8 2 4 6 11 117 123 -56 8 2 4 6 117 118 124 -57 8 2 4 6 118 119 125 -58 8 2 4 6 119 120 126 -59 8 2 4 6 120 121 127 -60 8 2 4 6 121 122 128 -61 8 2 4 6 122 8 129 -62 9 2 11 1 335 242 582 603 604 605 -63 9 2 11 1 336 581 241 606 607 608 -64 9 2 11 1 582 242 308 604 609 610 -65 9 2 11 1 581 309 241 611 612 607 -66 9 2 11 1 253 307 407 613 614 615 -67 9 2 11 1 46 47 365 65 616 617 -68 9 2 11 1 86 87 366 105 618 619 -69 9 2 11 1 252 408 306 620 621 622 -70 9 2 11 1 95 342 456 623 624 625 -71 9 2 11 1 38 455 341 626 627 628 -72 9 2 11 1 269 311 543 629 630 631 -73 9 2 11 1 23 416 457 632 633 634 -74 9 2 11 1 122 458 417 635 636 637 -75 9 2 11 1 46 365 514 617 638 639 -76 9 2 11 1 87 513 366 640 641 618 -77 9 2 11 1 297 383 502 642 643 644 -78 9 2 11 1 26 27 320 33 645 646 -79 9 2 11 1 118 119 321 125 647 648 -80 9 2 11 1 40 369 350 649 650 651 -81 9 2 11 1 93 351 370 652 653 654 -82 9 2 11 1 3 391 200 655 656 212 -83 9 2 11 1 9 167 392 178 657 658 -84 9 2 11 1 307 546 407 659 660 614 -85 9 2 11 1 220 337 482 661 662 663 -86 9 2 11 1 219 481 338 664 665 666 -87 9 2 11 1 232 311 438 667 668 669 -88 9 2 11 1 291 403 527 670 671 672 -89 9 2 11 1 6 474 317 673 674 675 -90 9 2 11 1 306 408 549 621 676 677 -91 9 2 11 1 220 482 376 663 678 679 -92 9 2 11 1 219 375 481 680 681 664 -93 9 2 11 1 74 402 474 682 683 684 -94 9 2 11 1 13 322 143 685 686 149 -95 9 2 11 1 231 450 361 687 688 689 -96 9 2 11 1 249 309 347 690 691 692 -97 9 2 11 1 250 348 308 693 694 695 -98 9 2 11 1 242 310 467 696 697 698 -99 9 2 11 1 241 468 312 699 700 701 -100 9 2 11 1 235 502 383 702 643 703 -101 9 2 11 1 311 475 438 704 705 668 -102 9 2 11 1 263 456 600 706 707 708 -103 9 2 11 1 262 599 455 709 710 711 -104 9 2 11 1 7 156 326 161 712 713 -105 9 2 11 1 242 569 310 714 715 696 -106 9 2 11 1 37 38 341 56 628 716 -107 9 2 11 1 95 96 342 114 717 623 -108 9 2 11 1 241 312 570 701 718 719 -109 9 2 11 1 224 349 404 720 721 722 -110 9 2 11 1 12 80 325 98 723 724 -111 9 2 11 1 139 334 545 725 726 727 -112 9 2 11 1 160 544 333 728 729 730 -113 9 2 11 1 28 355 440 731 732 733 -114 9 2 11 1 117 441 356 734 735 736 -115 9 2 11 1 93 94 351 112 737 652 -116 9 2 11 1 39 40 350 58 651 738 -117 9 2 11 1 27 440 320 739 740 645 -118 9 2 11 1 118 321 441 648 741 742 -119 9 2 11 1 131 132 327 136 743 744 -120 9 2 11 1 15 16 328 20 745 746 -121 9 2 11 1 245 384 300 747 748 749 -122 9 2 11 1 396 459 585 750 751 752 -123 9 2 11 1 324 497 532 753 754 755 -124 9 2 11 1 323 533 498 756 757 758 -125 9 2 11 1 311 352 543 759 760 630 -126 9 2 11 1 242 335 569 603 761 714 -127 9 2 11 1 241 570 336 719 762 608 -128 9 2 11 1 277 404 349 763 721 764 -129 9 2 11 1 246 301 388 765 766 767 -130 9 2 11 1 3 14 391 18 768 655 -131 9 2 11 1 9 392 133 658 769 138 -132 9 2 11 1 270 324 483 770 771 772 -133 9 2 11 1 271 484 323 773 774 775 -134 9 2 11 1 23 24 416 30 776 632 -135 9 2 11 1 121 122 417 128 637 777 -136 9 2 11 1 117 118 441 124 742 734 -137 9 2 11 1 27 28 440 34 733 739 -138 9 2 11 1 232 538 311 778 779 667 -139 9 2 11 1 342 600 456 780 707 624 -140 9 2 11 1 341 455 599 627 710 781 -141 9 2 11 1 217 571 313 782 783 784 -142 9 2 11 1 218 314 572 785 786 787 -143 9 2 11 1 324 594 497 788 789 753 -144 9 2 11 1 323 498 595 758 790 791 -145 9 2 11 1 6 73 474 76 792 673 -146 9 2 11 1 238 319 578 793 794 795 -147 9 2 11 1 237 577 318 796 797 798 -148 9 2 11 1 231 361 527 689 799 800 -149 9 2 11 1 401 465 596 801 802 803 -150 9 2 11 1 245 300 379 749 804 805 -151 9 2 11 1 340 485 399 806 807 808 -152 9 2 11 1 231 527 403 800 671 809 -153 9 2 11 1 311 538 352 779 810 759 -154 9 2 11 1 256 427 499 811 812 813 -155 9 2 11 1 217 331 571 814 815 782 -156 9 2 11 1 218 572 332 787 816 817 -157 9 2 11 1 237 482 337 818 662 819 -158 9 2 11 1 238 338 481 820 665 821 -159 9 2 11 1 246 380 301 822 823 765 -160 9 2 11 1 242 371 308 824 825 609 -161 9 2 11 1 241 309 372 612 826 827 -162 9 2 11 1 276 340 399 828 808 829 -163 9 2 11 1 238 578 338 795 830 820 -164 9 2 11 1 237 337 577 819 831 796 -165 9 2 11 1 403 590 466 832 833 834 -166 9 2 11 1 6 317 406 675 835 836 -167 9 2 11 1 533 286 498 837 838 757 -168 9 2 11 1 532 497 287 754 839 840 -169 9 2 11 1 226 358 478 841 842 843 -170 9 2 11 1 225 477 357 844 845 846 -171 9 2 11 1 227 585 459 847 751 848 -172 9 2 11 1 257 509 432 849 850 851 -173 9 2 11 1 243 526 314 852 853 854 -174 9 2 11 1 244 313 525 855 856 857 -175 9 2 11 1 247 493 341 858 859 860 -176 9 2 11 1 248 342 494 861 862 863 -177 9 2 11 1 10 139 545 144 727 864 -178 9 2 11 1 4 544 160 865 728 166 -179 9 2 11 1 226 478 445 843 866 867 -180 9 2 11 1 225 444 477 868 869 844 -181 9 2 11 1 284 459 396 870 750 871 -182 9 2 11 1 243 315 526 872 873 852 -183 9 2 11 1 244 525 316 857 874 875 -184 9 2 11 1 229 393 466 876 877 878 -185 9 2 11 1 221 363 567 879 880 881 -186 9 2 11 1 222 568 364 882 883 884 -187 9 2 11 1 85 310 515 885 886 887 -188 9 2 11 1 269 510 311 888 889 629 -189 9 2 11 1 48 516 312 890 891 892 -190 9 2 11 1 251 404 390 893 894 895 -191 9 2 11 1 241 365 468 896 897 699 -192 9 2 11 1 242 467 366 698 898 899 -193 9 2 11 1 290 465 401 900 801 901 -194 9 2 11 1 142 473 394 902 903 904 -195 9 2 11 1 234 483 324 905 771 906 -196 9 2 11 1 233 323 484 907 774 908 -197 9 2 11 1 13 385 322 909 910 685 -198 9 2 11 1 73 74 474 77 684 792 -199 9 2 11 1 256 499 389 813 911 912 -200 9 2 11 1 169 170 345 181 913 914 -201 9 2 11 1 197 198 346 209 915 916 -202 9 2 11 1 7 326 374 713 917 918 -203 9 2 11 1 364 553 425 919 920 921 -204 9 2 11 1 363 424 554 922 923 924 -205 9 2 11 1 288 403 466 925 834 926 -206 9 2 11 1 289 491 396 927 928 929 -207 9 2 11 1 253 395 307 930 931 613 -208 9 2 11 1 331 286 533 932 837 933 -209 9 2 11 1 332 532 287 934 840 935 -210 9 2 11 1 252 306 393 622 936 937 -211 9 2 11 1 157 398 471 938 939 940 -212 9 2 11 1 230 465 395 941 942 943 -213 9 2 11 1 247 355 493 944 945 858 -214 9 2 11 1 248 494 356 863 946 947 -215 9 2 11 1 243 350 369 948 650 949 -216 9 2 11 1 244 370 351 950 653 951 -217 9 2 11 1 259 320 461 952 953 954 -218 9 2 11 1 258 460 321 955 956 957 -219 9 2 11 1 306 466 393 958 877 936 -220 9 2 11 1 257 397 509 959 960 849 -221 9 2 11 1 227 459 384 848 961 962 -222 9 2 11 1 236 349 504 963 964 965 -223 9 2 11 1 237 410 482 966 967 818 -224 9 2 11 1 238 481 411 821 968 969 -225 9 2 11 1 221 567 453 881 970 971 -226 9 2 11 1 222 454 568 972 973 882 -227 9 2 11 1 190 353 544 974 975 976 -228 9 2 11 1 192 387 318 977 978 979 -229 9 2 11 1 175 319 386 980 981 982 -230 9 2 11 1 177 545 354 983 984 985 -231 9 2 11 1 250 378 354 986 987 988 -232 9 2 11 1 249 353 377 989 990 991 -233 9 2 11 1 222 364 425 884 921 992 -234 9 2 11 1 221 424 363 993 922 879 -235 9 2 11 1 247 461 320 994 953 995 -236 9 2 11 1 248 321 460 996 956 997 -237 9 2 11 1 300 384 459 748 961 998 -238 9 2 11 1 217 329 500 999 1000 1001 -239 9 2 11 1 218 501 330 1002 1003 1004 -240 9 2 11 1 236 491 349 1005 1006 963 -241 9 2 11 1 292 384 433 1007 1008 1009 -242 9 2 11 1 220 372 480 1010 1011 1012 -243 9 2 11 1 219 479 371 1013 1014 1015 -244 9 2 11 1 296 435 388 1016 1017 1018 -245 9 2 11 1 264 361 450 1019 688 1020 -246 9 2 11 1 541 286 331 1021 932 1022 -247 9 2 11 1 540 332 287 1023 935 1024 -248 9 2 11 1 259 530 320 1025 1026 952 -249 9 2 11 1 258 321 531 957 1027 1028 -250 9 2 11 1 246 388 435 767 1017 1029 -251 9 2 11 1 245 433 384 1030 1008 747 -252 9 2 11 1 277 390 404 1031 894 763 -253 9 2 11 1 307 395 465 931 942 1032 -254 9 2 11 1 243 565 315 1033 1034 872 -255 9 2 11 1 244 316 566 875 1035 1036 -256 9 2 11 1 4 190 544 201 976 865 -257 9 2 11 1 278 366 513 1037 641 1038 -258 9 2 11 1 279 514 365 1039 638 1040 -259 9 2 11 1 10 545 177 864 983 189 -260 9 2 11 1 261 327 469 1041 1042 1043 -261 9 2 11 1 260 470 328 1044 1045 1046 -262 9 2 11 1 235 317 535 1047 1048 1049 -263 9 2 11 1 288 394 473 1050 903 1051 -264 9 2 11 1 287 346 540 1052 1053 1024 -265 9 2 11 1 286 541 345 1021 1054 1055 -266 9 2 11 1 192 318 583 979 1056 1057 -267 9 2 11 1 175 584 319 1058 1059 980 -268 9 2 11 1 220 480 377 1012 1060 1061 -269 9 2 11 1 219 378 479 1062 1063 1013 -270 9 2 11 1 92 93 370 111 654 1064 -271 9 2 11 1 40 41 369 59 1065 649 -272 9 2 11 1 220 507 337 1066 1067 661 -273 9 2 11 1 219 338 508 666 1068 1069 -274 9 2 11 1 256 490 580 1070 1071 1072 -275 9 2 11 1 249 480 309 1073 1074 690 -276 9 2 11 1 250 308 479 695 1075 1076 -277 9 2 11 1 283 504 349 1077 964 1078 -278 9 2 11 1 315 565 442 1034 1079 1080 -279 9 2 11 1 316 443 566 1081 1082 1035 -280 9 2 11 1 214 397 426 1083 1084 1085 -281 9 2 11 1 80 472 325 1086 1087 723 -282 9 2 11 1 230 596 465 1088 802 941 -283 9 2 11 1 273 457 416 1089 633 1090 -284 9 2 11 1 272 417 458 1091 636 1092 -285 9 2 11 1 269 399 485 1093 807 1094 -286 9 2 11 1 243 314 420 854 1095 1096 -287 9 2 11 1 244 421 313 1097 1098 855 -288 9 2 11 1 170 498 345 1099 1100 913 -289 9 2 11 1 197 346 497 916 1101 1102 -290 9 2 11 1 238 564 319 1103 1104 793 -291 9 2 11 1 237 318 563 798 1105 1106 -292 9 2 11 1 290 471 398 1107 939 1108 -293 9 2 11 1 271 323 446 775 1109 1110 -294 9 2 11 1 270 449 324 1111 1112 770 -295 9 2 11 1 257 586 492 1113 1114 1115 -296 9 2 11 1 15 328 470 746 1045 1116 -297 9 2 11 1 132 469 327 1117 1042 743 -298 9 2 11 1 250 545 334 1118 726 1119 -299 9 2 11 1 249 333 544 1120 729 1121 -300 9 2 11 1 261 454 327 1122 1123 1041 -301 9 2 11 1 260 328 453 1046 1124 1125 -302 9 2 11 1 43 44 360 62 1126 1127 -303 9 2 11 1 89 90 359 108 1128 1129 -304 9 2 11 1 256 580 427 1072 1130 811 -305 9 2 11 1 236 396 491 1131 928 1005 -306 9 2 11 1 216 347 581 1132 1133 1134 -307 9 2 11 1 267 452 357 1135 1136 1137 -308 9 2 11 1 266 358 451 1138 1139 1140 -309 9 2 11 1 215 582 348 1141 1142 1143 -310 9 2 11 1 268 402 405 1144 1145 1146 -311 9 2 11 1 277 349 491 764 1006 1147 -312 9 2 11 1 283 405 402 1148 1145 1149 -313 9 2 11 1 213 434 389 1150 1151 1152 -314 9 2 11 1 326 523 438 1153 1154 1155 -315 9 2 11 1 235 535 339 1049 1156 1157 -316 9 2 11 1 217 413 329 1158 1159 999 -317 9 2 11 1 218 330 414 1004 1160 1161 -318 9 2 11 1 275 354 378 1162 987 1163 -319 9 2 11 1 274 377 353 1164 990 1165 -320 9 2 11 1 247 320 440 995 740 1166 -321 9 2 11 1 248 441 321 1167 741 996 -322 9 2 11 1 251 340 404 1168 1169 893 -323 9 2 11 1 276 502 339 1170 1171 1172 -324 9 2 11 1 12 325 439 724 1173 1174 -325 9 2 11 1 223 361 412 1175 1176 1177 -326 9 2 11 1 235 339 502 1157 1171 702 -327 9 2 11 1 92 370 556 1064 1178 1179 -328 9 2 11 1 41 555 369 1180 1181 1065 -329 9 2 11 1 235 542 317 1182 1183 1047 -330 9 2 11 1 325 472 524 1087 1184 1185 -331 9 2 11 1 217 500 331 1001 1186 814 -332 9 2 11 1 218 332 501 817 1187 1002 -333 9 2 11 1 257 432 586 851 1188 1113 -334 9 2 11 1 85 467 310 1189 697 885 -335 9 2 11 1 83 84 379 102 1190 1191 -336 9 2 11 1 297 426 397 1192 1084 1193 -337 9 2 11 1 523 232 438 1194 669 1154 -338 9 2 11 1 48 312 468 892 700 1195 -339 9 2 11 1 287 497 346 839 1101 1052 -340 9 2 11 1 286 345 498 1055 1100 838 -341 9 2 11 1 49 50 380 68 1196 1197 -342 9 2 11 1 264 412 361 1198 1176 1019 -343 9 2 11 1 268 474 402 1199 683 1144 -344 9 2 11 1 249 589 333 1200 1201 1120 -345 9 2 11 1 218 463 314 1202 1203 785 -346 9 2 11 1 217 313 464 784 1204 1205 -347 9 2 11 1 225 357 452 846 1136 1206 -348 9 2 11 1 226 451 358 1207 1139 841 -349 9 2 11 1 250 334 588 1119 1208 1209 -350 9 2 11 1 160 333 407 730 1210 1211 -351 9 2 11 1 139 408 334 1212 1213 725 -352 9 2 11 1 251 517 381 1214 1215 1216 -353 9 2 11 1 256 400 520 1217 1218 1219 -354 9 2 11 1 169 345 576 914 1220 1221 -355 9 2 11 1 198 575 346 1222 1223 915 -356 9 2 11 1 309 581 347 611 1133 691 -357 9 2 11 1 308 348 582 694 1142 610 -358 9 2 11 1 279 376 368 1224 1225 1226 -359 9 2 11 1 278 367 375 1227 1228 1229 -360 9 2 11 1 250 354 545 988 984 1118 -361 9 2 11 1 249 544 353 1121 975 989 -362 9 2 11 1 424 557 530 1230 1231 1232 -363 9 2 11 1 425 531 558 1233 1234 1235 -364 9 2 11 1 256 520 490 1219 1236 1070 -365 9 2 11 1 381 517 476 1215 1237 1238 -366 9 2 11 1 291 527 415 672 1239 1240 -367 9 2 11 1 200 391 447 656 1241 1242 -368 9 2 11 1 167 448 392 1243 1244 657 -369 9 2 11 1 259 424 530 1245 1232 1025 -370 9 2 11 1 258 531 425 1028 1233 1246 -371 9 2 11 1 2 457 17 1247 1248 22 -372 9 2 11 1 8 130 458 134 1249 1250 -373 9 2 11 1 229 466 590 878 833 1251 -374 9 2 11 1 257 522 409 1252 1253 1254 -375 9 2 11 1 199 200 447 211 1242 1255 -376 9 2 11 1 167 168 448 179 1256 1243 -377 9 2 11 1 247 341 599 860 781 1257 -378 9 2 11 1 248 600 342 1258 780 861 -379 9 2 11 1 257 492 522 1115 1259 1252 -380 9 2 11 1 331 533 571 933 1260 815 -381 9 2 11 1 332 572 532 816 1261 934 -382 9 2 11 1 84 85 515 103 887 1262 -383 9 2 11 1 48 49 516 67 1263 890 -384 9 2 11 1 289 389 434 1264 1151 1265 -385 9 2 11 1 131 327 505 744 1266 1267 -386 9 2 11 1 16 506 328 1268 1269 745 -387 9 2 11 1 240 540 346 1270 1053 1271 -388 9 2 11 1 239 345 541 1272 1054 1273 -389 9 2 11 1 246 516 380 1274 1275 822 -390 9 2 11 1 245 379 515 805 1276 1277 -391 9 2 11 1 6 406 53 836 1278 72 -392 9 2 11 1 224 404 340 722 1169 1279 -393 9 2 11 1 246 570 516 1280 1281 1274 -394 9 2 11 1 245 515 569 1277 1282 1283 -395 9 2 11 1 295 444 429 1284 1285 1286 -396 9 2 11 1 294 428 445 1287 1288 1289 -397 9 2 11 1 143 322 473 686 1290 1291 -398 9 2 11 1 247 599 343 1257 1292 1293 -399 9 2 11 1 248 344 600 1294 1295 1258 -400 9 2 11 1 51 52 362 70 1296 1297 -401 9 2 11 1 249 347 589 692 1298 1200 -402 9 2 11 1 218 414 343 1161 1299 1300 -403 9 2 11 1 217 344 413 1301 1302 1158 -404 9 2 11 1 250 588 348 1209 1303 693 -405 9 2 11 1 119 418 321 1304 1305 647 -406 9 2 11 1 26 320 419 646 1306 1307 -407 9 2 11 1 156 471 326 1308 1309 712 -408 9 2 11 1 304 346 575 1310 1223 1311 -409 9 2 11 1 305 576 345 1312 1220 1313 -410 9 2 11 1 284 524 472 1314 1184 1315 -411 9 2 11 1 280 527 361 1316 799 1317 -412 9 2 11 1 243 420 350 1096 1318 948 -413 9 2 11 1 244 351 421 951 1319 1097 -414 9 2 11 1 291 499 427 1320 812 1321 -415 9 2 11 1 234 532 572 1322 1261 1323 -416 9 2 11 1 233 571 533 1324 1260 1325 -417 9 2 11 1 214 352 509 1326 1327 1328 -418 9 2 11 1 2 23 457 29 634 1247 -419 9 2 11 1 8 458 122 1250 635 129 -420 9 2 11 1 265 412 373 1329 1330 1331 -421 9 2 11 1 264 373 412 1332 1330 1198 -422 9 2 11 1 283 349 405 1078 1333 1148 -423 9 2 11 1 237 358 410 1334 1335 966 -424 9 2 11 1 238 411 357 969 1336 1337 -425 9 2 11 1 224 405 349 1338 1333 720 -426 9 2 11 1 258 329 413 1339 1159 1340 -427 9 2 11 1 259 414 330 1341 1160 1342 -428 9 2 11 1 276 339 518 1172 1343 1344 -429 9 2 11 1 293 432 509 1345 850 1346 -430 9 2 11 1 218 343 463 1300 1347 1202 -431 9 2 11 1 217 464 344 1205 1348 1301 -432 9 2 11 1 216 430 347 1349 1350 1132 -433 9 2 11 1 215 348 431 1143 1351 1352 -434 9 2 11 1 258 425 329 1246 1353 1339 -435 9 2 11 1 259 330 424 1342 1354 1245 -436 9 2 11 1 266 562 358 1355 1356 1138 -437 9 2 11 1 267 357 561 1137 1357 1358 -438 9 2 11 1 213 390 434 1359 1360 1150 -439 9 2 11 1 224 340 518 1279 1361 1362 -440 9 2 11 1 254 368 376 1363 1225 1364 -441 9 2 11 1 255 375 367 1365 1228 1366 -442 9 2 11 1 271 429 444 1367 1285 1368 -443 9 2 11 1 270 445 428 1369 1288 1370 -444 9 2 11 1 17 457 506 1248 1371 1372 -445 9 2 11 1 130 505 458 1373 1374 1249 -446 9 2 11 1 172 173 446 184 1375 1376 -447 9 2 11 1 194 195 449 206 1377 1378 -448 9 2 11 1 14 470 391 1379 1380 768 -449 9 2 11 1 133 392 469 769 1381 1382 -450 9 2 11 1 251 485 340 1383 806 1168 -451 9 2 11 1 276 518 340 1344 1361 828 -452 9 2 11 1 7 374 153 918 1384 155 -453 9 2 11 1 132 133 469 137 1382 1117 -454 9 2 11 1 14 15 470 19 1116 1379 -455 9 2 11 1 74 75 601 78 1385 1386 -456 9 2 11 1 277 434 390 1387 1360 1031 -457 9 2 11 1 174 175 386 186 982 1388 -458 9 2 11 1 192 193 387 204 1389 977 -459 9 2 11 1 16 17 506 21 1372 1268 -460 9 2 11 1 130 131 505 135 1267 1373 -461 9 2 11 1 248 460 344 997 1390 1294 -462 9 2 11 1 247 343 461 1293 1391 994 -463 9 2 11 1 282 369 555 1392 1181 1393 -464 9 2 11 1 281 556 370 1394 1178 1395 -465 9 2 11 1 88 511 367 1396 1397 1398 -466 9 2 11 1 45 368 512 1399 1400 1401 -467 9 2 11 1 293 509 352 1346 1327 1402 -468 9 2 11 1 303 430 539 1403 1404 1405 -469 9 2 11 1 74 601 402 1386 1406 682 -470 9 2 11 1 233 533 323 1325 756 907 -471 9 2 11 1 234 324 532 906 755 1322 -472 9 2 11 1 81 82 382 100 1407 1408 -473 9 2 11 1 52 521 362 1409 1410 1296 -474 9 2 11 1 302 537 431 1411 1412 1413 -475 9 2 11 1 297 502 426 644 1414 1192 -476 9 2 11 1 358 562 410 1356 1415 1335 -477 9 2 11 1 357 411 561 1336 1416 1357 -478 9 2 11 1 13 150 385 151 1417 909 -479 9 2 11 1 265 438 475 1418 705 1419 -480 9 2 11 1 214 426 399 1085 1420 1421 -481 9 2 11 1 42 43 488 61 1422 1423 -482 9 2 11 1 90 91 489 109 1424 1425 -483 9 2 11 1 276 399 426 829 1420 1426 -484 9 2 11 1 285 362 521 1427 1410 1428 -485 9 2 11 1 247 440 355 1166 732 944 -486 9 2 11 1 248 356 441 947 735 1167 -487 9 2 11 1 190 486 353 1429 1430 974 -488 9 2 11 1 177 354 487 985 1431 1432 -489 9 2 11 1 173 429 446 1433 1434 1375 -490 9 2 11 1 194 449 428 1378 1435 1436 -491 9 2 11 1 322 450 519 1437 1438 1439 -492 9 2 11 1 142 143 473 148 1291 902 -493 9 2 11 1 302 431 393 1413 1440 1441 -494 9 2 11 1 156 157 471 162 940 1308 -495 9 2 11 1 173 174 548 185 1442 1443 -496 9 2 11 1 193 194 547 205 1444 1445 -497 9 2 11 1 216 581 435 1134 1446 1447 -498 9 2 11 1 215 433 582 1448 1449 1141 -499 9 2 11 1 255 511 359 1450 1451 1452 -500 9 2 11 1 254 360 512 1453 1454 1455 -501 9 2 11 1 141 142 394 147 904 1456 -502 9 2 11 1 252 431 588 1457 1458 1459 -503 9 2 11 1 253 589 430 1460 1461 1462 -504 9 2 11 1 221 598 436 1463 1464 1465 -505 9 2 11 1 222 437 597 1466 1467 1468 -506 9 2 11 1 303 395 430 1469 1470 1403 -507 9 2 11 1 383 591 462 1471 1472 1473 -508 9 2 11 1 262 350 420 1474 1318 1475 -509 9 2 11 1 263 421 351 1476 1319 1477 -510 9 2 11 1 88 89 511 107 1478 1396 -511 9 2 11 1 44 45 512 63 1401 1479 -512 9 2 11 1 231 519 450 1480 1438 687 -513 9 2 11 1 157 158 398 163 1481 938 -514 9 2 11 1 238 357 477 1337 845 1482 -515 9 2 11 1 237 478 358 1483 842 1334 -516 9 2 11 1 274 353 486 1165 1430 1484 -517 9 2 11 1 275 487 354 1485 1431 1162 -518 9 2 11 1 304 593 346 1486 1487 1310 -519 9 2 11 1 305 345 592 1313 1488 1489 -520 9 2 11 1 12 439 75 1174 1490 79 -521 9 2 11 1 175 176 584 187 1491 1058 -522 9 2 11 1 191 192 583 203 1057 1492 -523 9 2 11 1 252 588 408 1459 1493 620 -524 9 2 11 1 221 453 598 971 1494 1463 -525 9 2 11 1 222 597 454 1468 1495 972 -526 9 2 11 1 253 407 589 615 1496 1460 -527 9 2 11 1 159 160 407 165 1211 1497 -528 9 2 11 1 139 140 408 145 1498 1212 -529 9 2 11 1 314 463 420 1203 1499 1095 -530 9 2 11 1 313 421 464 1098 1500 1204 -531 9 2 11 1 301 362 587 1501 1502 1503 -532 9 2 11 1 362 462 587 1504 1505 1502 -533 9 2 11 1 344 460 413 1390 1506 1302 -534 9 2 11 1 343 414 461 1299 1507 1391 -535 9 2 11 1 36 493 355 1508 945 1509 -536 9 2 11 1 97 356 494 1510 946 1511 -537 9 2 11 1 224 518 602 1362 1512 1513 -538 9 2 11 1 81 382 472 1408 1514 1515 -539 9 2 11 1 326 438 374 1155 1516 917 -540 9 2 11 1 223 475 510 1517 1518 1519 -541 9 2 11 1 51 362 536 1297 1520 1521 -542 9 2 11 1 348 588 431 1303 1458 1351 -543 9 2 11 1 317 542 406 1183 1522 835 -544 9 2 11 1 216 539 430 1523 1404 1349 -545 9 2 11 1 214 543 352 1524 760 1326 -546 9 2 11 1 347 430 589 1350 1461 1298 -547 9 2 11 1 289 400 389 1525 1526 1264 -548 9 2 11 1 84 515 379 1262 1276 1190 -549 9 2 11 1 37 341 493 716 859 1527 -550 9 2 11 1 96 494 342 1528 862 717 -551 9 2 11 1 254 562 360 1529 1530 1453 -552 9 2 11 1 255 359 561 1452 1531 1532 -553 9 2 11 1 39 350 455 738 1533 1534 -554 9 2 11 1 94 456 351 1535 1536 737 -555 9 2 11 1 335 582 433 605 1449 1537 -556 9 2 11 1 285 383 462 1538 1473 1539 -557 9 2 11 1 300 382 534 1540 1541 1542 -558 9 2 11 1 284 472 382 1315 1514 1543 -559 9 2 11 1 294 445 478 1289 866 1544 -560 9 2 11 1 295 477 444 1545 869 1284 -561 9 2 11 1 336 435 581 1546 1446 606 -562 9 2 11 1 215 431 537 1352 1412 1547 -563 9 2 11 1 49 380 516 1197 1275 1263 -564 9 2 11 1 262 455 350 711 1533 1474 -565 9 2 11 1 263 351 456 1477 1536 706 -566 9 2 11 1 295 564 477 1548 1549 1545 -567 9 2 11 1 294 478 563 1544 1550 1551 -568 9 2 11 1 252 393 431 937 1440 1457 -569 9 2 11 1 140 549 408 1552 676 1498 -570 9 2 11 1 159 407 546 1497 660 1553 -571 9 2 11 1 5 503 373 1554 1555 1556 -572 9 2 11 1 86 366 467 619 898 1557 -573 9 2 11 1 47 468 365 1558 897 616 -574 9 2 11 1 300 459 382 998 1559 1540 -575 9 2 11 1 42 488 423 1423 1560 1561 -576 9 2 11 1 91 422 489 1562 1563 1424 -577 9 2 11 1 334 408 588 1213 1493 1208 -578 9 2 11 1 304 363 593 1564 1565 1486 -579 9 2 11 1 305 592 364 1489 1566 1567 -580 9 2 11 1 241 495 365 1568 1569 896 -581 9 2 11 1 242 366 496 899 1570 1571 -582 9 2 11 1 253 430 395 1462 1470 930 -583 9 2 11 1 333 589 407 1201 1496 1210 -584 9 2 11 1 295 386 564 1572 1573 1548 -585 9 2 11 1 294 563 387 1551 1574 1575 -586 9 2 11 1 301 536 362 1576 1520 1501 -587 9 2 11 1 173 548 429 1443 1577 1433 -588 9 2 11 1 194 428 547 1436 1578 1444 -589 9 2 11 1 45 46 514 64 639 1579 -590 9 2 11 1 87 88 513 106 1580 640 -591 9 2 11 1 240 593 363 1581 1565 1582 -592 9 2 11 1 239 364 592 1583 1566 1584 -593 9 2 11 1 88 367 513 1398 1585 1580 -594 9 2 11 1 45 514 368 1579 1586 1399 -595 9 2 11 1 297 397 409 1193 1587 1588 -596 9 2 11 1 5 373 552 1556 1589 1590 -597 9 2 11 1 223 476 361 1591 1592 1175 -598 9 2 11 1 255 367 511 1366 1397 1450 -599 9 2 11 1 254 512 368 1455 1400 1363 -600 9 2 11 1 89 359 511 1129 1451 1478 -601 9 2 11 1 44 512 360 1479 1454 1126 -602 9 2 11 1 339 602 518 1593 1512 1343 -603 9 2 11 1 256 389 400 912 1526 1217 -604 9 2 11 1 5 153 503 154 1594 1554 -605 9 2 11 1 266 451 423 1140 1595 1596 -606 9 2 11 1 267 422 452 1597 1598 1135 -607 9 2 11 1 43 360 488 1127 1599 1422 -608 9 2 11 1 90 489 359 1425 1600 1128 -609 9 2 11 1 85 86 467 104 1557 1189 -610 9 2 11 1 47 48 468 66 1195 1558 -611 9 2 11 1 285 462 362 1539 1504 1427 -612 9 2 11 1 228 462 591 1601 1472 1602 -613 9 2 11 1 82 534 382 1603 1541 1407 -614 9 2 11 1 260 391 470 1604 1380 1044 -615 9 2 11 1 261 469 392 1043 1381 1605 -616 9 2 11 1 289 434 491 1265 1606 927 -617 9 2 11 1 280 361 476 1317 1592 1607 -618 9 2 11 1 311 510 475 889 1518 704 -619 9 2 11 1 302 580 490 1608 1071 1609 -620 9 2 11 1 5 552 150 1590 1610 152 -621 9 2 11 1 36 37 493 55 1527 1508 -622 9 2 11 1 96 97 494 115 1511 1528 -623 9 2 11 1 245 569 433 1283 1611 1030 -624 9 2 11 1 265 374 438 1612 1516 1418 -625 9 2 11 1 141 394 549 1456 1613 1614 -626 9 2 11 1 306 549 394 677 1613 1615 -627 9 2 11 1 119 120 418 126 1616 1304 -628 9 2 11 1 25 26 419 32 1307 1617 -629 9 2 11 1 303 492 586 1618 1114 1619 -630 9 2 11 1 278 513 367 1038 1585 1227 -631 9 2 11 1 279 368 514 1226 1586 1039 -632 9 2 11 1 307 398 546 1620 1621 659 -633 9 2 11 1 158 546 398 1622 1621 1481 -634 9 2 11 1 257 409 397 1254 1587 959 -635 9 2 11 1 215 537 433 1547 1623 1448 -636 9 2 11 1 246 435 570 1029 1624 1280 -637 9 2 11 1 216 435 539 1447 1625 1523 -638 9 2 11 1 292 433 537 1009 1623 1626 -639 9 2 11 1 322 385 450 910 1627 1437 -640 9 2 11 1 260 447 391 1628 1241 1604 -641 9 2 11 1 261 392 448 1605 1244 1629 -642 9 2 11 1 263 600 464 708 1630 1631 -643 9 2 11 1 262 463 599 1632 1633 709 -644 9 2 11 1 36 355 559 1509 1634 1635 -645 9 2 11 1 97 560 356 1636 1637 1510 -646 9 2 11 1 296 539 435 1638 1625 1016 -647 9 2 11 1 196 497 594 1639 789 1640 -648 9 2 11 1 171 595 498 1641 790 1642 -649 9 2 11 1 38 39 455 57 1534 626 -650 9 2 11 1 94 95 456 113 625 1535 -651 9 2 11 1 304 567 363 1643 880 1564 -652 9 2 11 1 305 364 568 1567 883 1644 -653 9 2 11 1 282 565 369 1645 1646 1392 -654 9 2 11 1 281 370 566 1395 1647 1648 -655 9 2 11 1 344 464 600 1348 1630 1295 -656 9 2 11 1 343 599 463 1292 1633 1347 -657 9 2 11 1 293 352 538 1402 810 1649 -658 9 2 11 1 273 506 457 1650 1371 1089 -659 9 2 11 1 272 458 505 1092 1374 1651 -660 9 2 11 1 279 365 495 1040 1569 1652 -661 9 2 11 1 278 496 366 1653 1570 1037 -662 9 2 11 1 264 552 373 1654 1589 1332 -663 9 2 11 1 91 92 556 110 1179 1655 -664 9 2 11 1 41 42 555 60 1656 1180 -665 9 2 11 1 274 583 577 1657 1658 1659 -666 9 2 11 1 275 578 584 1660 1661 1662 -667 9 2 11 1 264 450 385 1020 1627 1663 -668 9 2 11 1 308 371 479 825 1014 1075 -669 9 2 11 1 309 480 372 1074 1011 826 -670 9 2 11 1 28 559 355 1664 1634 731 -671 9 2 11 1 117 356 560 736 1637 1665 -672 9 2 11 1 300 534 379 1542 1666 804 -673 9 2 11 1 80 81 472 99 1515 1086 -674 9 2 11 1 301 380 536 823 1667 1576 -675 9 2 11 1 240 363 554 1582 924 1668 -676 9 2 11 1 239 553 364 1669 919 1583 -677 9 2 11 1 249 377 480 991 1060 1073 -678 9 2 11 1 250 479 378 1076 1063 986 -679 9 2 11 1 227 384 520 962 1670 1671 -680 9 2 11 1 312 516 570 891 1281 718 -681 9 2 11 1 310 569 515 715 1282 886 -682 9 2 11 1 335 433 569 1537 1611 761 -683 9 2 11 1 239 592 345 1584 1488 1272 -684 9 2 11 1 240 346 593 1271 1487 1581 -685 9 2 11 1 265 373 503 1331 1555 1672 -686 9 2 11 1 229 580 393 1673 1674 876 -687 9 2 11 1 336 570 435 762 1624 1546 -688 9 2 11 1 242 496 371 1571 1675 824 -689 9 2 11 1 241 372 495 827 1676 1568 -690 9 2 11 1 266 360 562 1677 1530 1355 -691 9 2 11 1 267 561 359 1358 1531 1678 -692 9 2 11 1 329 425 553 1353 920 1679 -693 9 2 11 1 330 554 424 1680 923 1354 -694 9 2 11 1 284 382 459 1543 1559 870 -695 9 2 11 1 321 418 531 1305 1681 1027 -696 9 2 11 1 320 530 419 1026 1682 1306 -697 9 2 11 1 264 385 552 1663 1683 1654 -698 9 2 11 1 230 395 586 943 1684 1685 -699 9 2 11 1 11 560 97 1686 1636 116 -700 9 2 11 1 1 36 559 54 1635 1687 -701 9 2 11 1 266 488 360 1688 1599 1677 -702 9 2 11 1 267 359 489 1678 1600 1689 -703 9 2 11 1 282 423 451 1690 1595 1691 -704 9 2 11 1 281 452 422 1692 1598 1693 -705 9 2 11 1 50 536 380 1694 1667 1196 -706 9 2 11 1 83 379 534 1191 1666 1695 -707 9 2 11 1 223 412 475 1177 1696 1517 -708 9 2 11 1 265 503 374 1672 1697 1612 -709 9 2 11 1 304 447 567 1698 1699 1643 -710 9 2 11 1 305 568 448 1644 1700 1701 -711 9 2 11 1 260 453 567 1125 970 1702 -712 9 2 11 1 261 568 454 1703 973 1122 -713 9 2 11 1 228 522 388 1704 1705 1706 -714 9 2 11 1 226 529 442 1707 1708 1709 -715 9 2 11 1 225 443 528 1710 1711 1712 -716 9 2 11 1 270 529 445 1713 1714 1369 -717 9 2 11 1 271 444 528 1368 1715 1716 -718 9 2 11 1 254 482 410 1717 967 1718 -719 9 2 11 1 255 411 481 1719 968 1720 -720 9 2 11 1 272 437 417 1721 1722 1091 -721 9 2 11 1 273 416 436 1090 1723 1724 -722 9 2 11 1 325 524 504 1185 1725 1726 -723 9 2 11 1 235 383 542 703 1727 1182 -724 9 2 11 1 226 442 451 1709 1728 1207 -725 9 2 11 1 225 452 443 1206 1729 1710 -726 9 2 11 1 298 417 437 1730 1722 1731 -727 9 2 11 1 299 436 416 1732 1723 1733 -728 9 2 11 1 220 551 372 1734 1735 1010 -729 9 2 11 1 219 371 550 1015 1736 1737 -730 9 2 11 1 243 369 565 949 1646 1033 -731 9 2 11 1 244 566 370 1036 1647 950 -732 9 2 11 1 254 410 562 1718 1415 1529 -733 9 2 11 1 255 561 411 1532 1416 1719 -734 9 2 11 1 223 381 476 1738 1238 1591 -735 9 2 11 1 251 381 485 1216 1739 1383 -736 9 2 11 1 285 542 383 1740 1727 1538 -737 9 2 11 1 274 486 583 1484 1741 1657 -738 9 2 11 1 275 584 487 1662 1742 1485 -739 9 2 11 1 190 191 486 202 1743 1429 -740 9 2 11 1 176 177 487 188 1432 1744 -741 9 2 11 1 75 439 601 1490 1745 1385 -742 9 2 11 1 213 389 499 1152 911 1746 -743 9 2 11 1 236 504 524 965 1725 1747 -744 9 2 11 1 278 375 550 1229 1748 1749 -745 9 2 11 1 279 551 376 1750 1751 1224 -746 9 2 11 1 219 550 375 1737 1748 680 -747 9 2 11 1 220 376 551 679 1751 1734 -748 9 2 11 1 140 141 549 146 1614 1552 -749 9 2 11 1 158 159 546 164 1553 1622 -750 9 2 11 1 270 483 529 772 1752 1713 -751 9 2 11 1 271 528 484 1716 1753 773 -752 9 2 11 1 153 374 503 1384 1697 1594 -753 9 2 11 1 288 466 394 926 1754 1050 -754 9 2 11 1 302 393 580 1441 1674 1608 -755 9 2 11 1 290 398 465 1108 1755 900 -756 9 2 11 1 52 53 521 71 1756 1409 -757 9 2 11 1 269 485 381 1094 1739 1757 -758 9 2 11 1 196 197 497 208 1102 1639 -759 9 2 11 1 170 171 498 182 1642 1099 -760 9 2 11 1 303 586 395 1619 1684 1469 -761 9 2 11 1 322 519 473 1439 1758 1290 -762 9 2 11 1 292 490 520 1759 1236 1760 -763 9 2 11 1 316 525 484 874 1761 1762 -764 9 2 11 1 315 483 526 1763 1764 873 -765 9 2 11 1 82 83 534 101 1695 1603 -766 9 2 11 1 269 381 510 1757 1765 888 -767 9 2 11 1 91 556 422 1655 1766 1562 -768 9 2 11 1 42 423 555 1561 1767 1656 -769 9 2 11 1 50 51 536 69 1521 1694 -770 9 2 11 1 268 535 474 1768 1769 1199 -771 9 2 11 1 292 520 384 1760 1670 1007 -772 9 2 11 1 296 522 492 1770 1259 1771 -773 9 2 11 1 306 394 466 1615 1754 958 -774 9 2 11 1 233 484 525 908 1761 1772 -775 9 2 11 1 234 526 483 1773 1764 905 -776 9 2 11 1 260 567 447 1702 1699 1628 -777 9 2 11 1 261 448 568 1629 1700 1703 -778 9 2 11 1 299 530 557 1774 1231 1775 -779 9 2 11 1 298 558 531 1776 1234 1777 -780 9 2 11 1 298 418 573 1778 1779 1780 -781 9 2 11 1 299 574 419 1781 1782 1783 -782 9 2 11 1 317 474 535 674 1769 1048 -783 9 2 11 1 214 509 397 1328 960 1083 -784 9 2 11 1 315 442 529 1080 1708 1784 -785 9 2 11 1 316 528 443 1785 1711 1081 -786 9 2 11 1 223 510 381 1519 1765 1738 -787 9 2 11 1 224 602 405 1513 1786 1338 -788 9 2 11 1 282 451 442 1691 1728 1787 -789 9 2 11 1 281 443 452 1788 1729 1692 -790 9 2 11 1 53 406 521 1278 1789 1756 -791 9 2 11 1 296 388 522 1018 1705 1770 -792 9 2 11 1 326 471 523 1309 1790 1153 -793 9 2 11 1 307 465 398 1032 1755 1620 -794 9 2 11 1 24 25 574 31 1791 1792 -795 9 2 11 1 120 121 573 127 1793 1794 -796 9 2 11 1 265 475 412 1419 1696 1329 -797 9 2 11 1 270 428 449 1370 1435 1111 -798 9 2 11 1 271 446 429 1110 1434 1367 -799 9 2 11 1 258 413 460 1340 1506 955 -800 9 2 11 1 259 461 414 954 1507 1341 -801 9 2 11 1 220 377 507 1061 1795 1066 -802 9 2 11 1 219 508 378 1069 1796 1062 -803 9 2 11 1 213 499 415 1746 1797 1798 -804 9 2 11 1 255 481 375 1720 681 1365 -805 9 2 11 1 254 376 482 1364 678 1717 -806 9 2 11 1 251 390 517 895 1799 1214 -807 9 2 11 1 274 507 377 1800 1795 1164 -808 9 2 11 1 275 378 508 1163 1796 1801 -809 9 2 11 1 214 399 543 1421 1802 1524 -810 9 2 11 1 228 388 587 1706 1803 1804 -811 9 2 11 1 232 401 538 1805 1806 778 -812 9 2 11 1 288 473 519 1051 1758 1807 -813 9 2 11 1 280 476 517 1607 1237 1808 -814 9 2 11 1 150 552 385 1610 1683 1417 -815 9 2 11 1 267 489 422 1689 1563 1597 -816 9 2 11 1 266 423 488 1596 1560 1688 -817 9 2 11 1 293 538 401 1649 1806 1809 -818 9 2 11 1 198 199 575 210 1810 1222 -819 9 2 11 1 168 169 576 180 1221 1811 -820 9 2 11 1 195 196 594 207 1640 1812 -821 9 2 11 1 171 172 595 183 1813 1641 -822 9 2 11 1 213 579 390 1814 1815 1359 -823 9 2 11 1 318 387 563 978 1574 1105 -824 9 2 11 1 319 564 386 1104 1573 981 -825 9 2 11 1 1 559 28 1687 1664 35 -826 9 2 11 1 11 117 560 123 1665 1686 -827 9 2 11 1 262 420 463 1475 1499 1632 -828 9 2 11 1 263 464 421 1631 1500 1476 -829 9 2 11 1 236 524 396 1747 1816 1131 -830 9 2 11 1 120 573 418 1794 1779 1616 -831 9 2 11 1 25 419 574 1617 1782 1791 -832 9 2 11 1 193 547 387 1445 1817 1389 -833 9 2 11 1 174 386 548 1388 1818 1442 -834 9 2 11 1 232 523 401 1194 1819 1805 -835 9 2 11 1 238 477 564 1482 1549 1103 -836 9 2 11 1 237 563 478 1106 1550 1483 -837 9 2 11 1 231 403 519 809 1820 1480 -838 9 2 11 1 301 587 388 1503 1803 766 -839 9 2 11 1 290 523 471 1821 1790 1107 -840 9 2 11 1 285 521 406 1428 1789 1822 -841 9 2 11 1 199 447 575 1255 1823 1810 -842 9 2 11 1 168 576 448 1811 1824 1256 -843 9 2 11 1 284 396 524 871 1816 1314 -844 9 2 11 1 297 591 383 1825 1471 642 -845 9 2 11 1 195 594 449 1812 1826 1377 -846 9 2 11 1 172 446 595 1376 1827 1813 -847 9 2 11 1 291 415 499 1240 1797 1320 -848 9 2 11 1 276 426 502 1426 1414 1170 -849 9 2 11 1 372 551 495 1735 1828 1676 -850 9 2 11 1 269 543 399 631 1802 1093 -851 9 2 11 1 371 496 550 1675 1829 1736 -852 9 2 11 1 277 491 434 1147 1606 1387 -853 9 2 11 1 283 439 504 1830 1831 1077 -854 9 2 11 1 325 504 439 1726 1831 1173 -855 9 2 11 1 299 419 530 1783 1682 1774 -856 9 2 11 1 298 531 418 1777 1681 1778 -857 9 2 11 1 288 519 403 1807 1820 925 -858 9 2 11 1 290 401 523 901 1819 1821 -859 9 2 11 1 289 396 585 929 752 1832 -860 9 2 11 1 289 585 400 1832 1833 1525 -861 9 2 11 1 227 520 400 1671 1218 1834 -862 9 2 11 1 283 402 601 1149 1406 1835 -863 9 2 11 1 280 579 415 1836 1837 1838 -864 9 2 11 1 327 597 505 1839 1840 1266 -865 9 2 11 1 328 506 598 1269 1841 1842 -866 9 2 11 1 294 387 547 1575 1817 1843 -867 9 2 11 1 295 548 386 1844 1818 1572 -868 9 2 11 1 280 415 527 1838 1239 1316 -869 9 2 11 1 304 575 447 1311 1823 1698 -870 9 2 11 1 305 448 576 1701 1824 1312 -871 9 2 11 1 228 409 522 1845 1253 1704 -872 9 2 11 1 24 574 416 1792 1846 776 -873 9 2 11 1 121 417 573 777 1847 1793 -874 9 2 11 1 297 409 591 1588 1848 1825 -875 9 2 11 1 324 449 594 1112 1826 788 -876 9 2 11 1 323 595 446 791 1827 1109 -877 9 2 11 1 213 415 579 1798 1837 1814 -878 9 2 11 1 268 405 602 1146 1786 1849 -879 9 2 11 1 291 590 403 1850 832 670 -880 9 2 11 1 240 554 501 1668 1851 1852 -881 9 2 11 1 239 500 553 1853 1854 1669 -882 9 2 11 1 285 406 542 1822 1522 1740 -883 9 2 11 1 294 547 428 1843 1578 1287 -884 9 2 11 1 295 429 548 1286 1577 1844 -885 9 2 11 1 293 401 596 1809 803 1855 -886 9 2 11 1 273 436 598 1724 1464 1856 -887 9 2 11 1 272 597 437 1857 1467 1721 -888 9 2 11 1 299 416 574 1733 1846 1781 -889 9 2 11 1 298 573 417 1780 1847 1730 -890 9 2 11 1 291 427 590 1321 1858 1850 -891 9 2 11 1 227 400 585 1834 1833 847 -892 9 2 11 1 274 577 507 1659 1859 1800 -893 9 2 11 1 275 508 578 1801 1860 1660 -894 9 2 11 1 228 591 409 1602 1848 1845 -895 9 2 11 1 272 505 597 1651 1840 1857 -896 9 2 11 1 273 598 506 1856 1841 1650 -897 9 2 11 1 221 436 557 1465 1861 1862 -898 9 2 11 1 222 558 437 1863 1864 1466 -899 9 2 11 1 318 577 583 797 1658 1056 -900 9 2 11 1 319 584 578 1059 1661 794 -901 9 2 11 1 293 596 432 1855 1865 1345 -902 9 2 11 1 225 528 444 1712 1715 868 -903 9 2 11 1 226 445 529 867 1714 1707 -904 9 2 11 1 283 601 439 1835 1745 1830 -905 9 2 11 1 282 555 423 1393 1767 1690 -906 9 2 11 1 281 422 556 1693 1766 1394 -907 9 2 11 1 337 507 577 1067 1859 831 -908 9 2 11 1 338 578 508 830 1860 1068 -909 9 2 11 1 221 557 424 1862 1230 993 -910 9 2 11 1 222 425 558 992 1235 1863 -911 9 2 11 1 330 501 554 1003 1851 1680 -912 9 2 11 1 329 553 500 1679 1854 1000 -913 9 2 11 1 299 557 436 1775 1861 1732 -914 9 2 11 1 298 437 558 1731 1864 1776 -915 9 2 11 1 229 590 427 1251 1858 1866 -916 9 2 11 1 331 500 541 1186 1867 1022 -917 9 2 11 1 332 540 501 1023 1868 1187 -918 9 2 11 1 229 427 580 1866 1130 1673 -919 9 2 11 1 302 490 537 1609 1869 1411 -920 9 2 11 1 230 432 596 1870 1865 1088 -921 9 2 11 1 303 539 492 1405 1871 1618 -922 9 2 11 1 282 442 565 1787 1079 1645 -923 9 2 11 1 281 566 443 1648 1082 1788 -924 9 2 11 1 268 602 535 1849 1872 1768 -925 9 2 11 1 230 586 432 1685 1188 1870 -926 9 2 11 1 239 541 500 1273 1867 1853 -927 9 2 11 1 240 501 540 1852 1868 1270 -928 9 2 11 1 315 529 483 1784 1752 1763 -929 9 2 11 1 316 484 528 1762 1753 1785 -930 9 2 11 1 339 535 602 1156 1872 1593 -931 9 2 11 1 292 537 490 1626 1869 1759 -932 9 2 11 1 296 492 539 1771 1871 1638 -933 9 2 11 1 280 517 579 1808 1873 1836 -934 9 2 11 1 327 454 597 1123 1495 1839 -935 9 2 11 1 328 598 453 1842 1494 1124 -936 9 2 11 1 233 525 571 1772 1874 1324 -937 9 2 11 1 234 572 526 1323 1875 1773 -938 9 2 11 1 390 579 517 1815 1873 1799 -939 9 2 11 1 228 587 462 1804 1505 1601 -940 9 2 11 1 278 550 496 1749 1829 1653 -941 9 2 11 1 279 495 551 1652 1828 1750 -942 9 2 11 1 191 583 486 1492 1741 1743 -943 9 2 11 1 176 487 584 1744 1742 1491 -944 9 2 11 1 313 571 525 783 1874 856 -945 9 2 11 1 314 526 572 853 1875 786 -$EndElements diff --git a/dG3D/benchmarks/Thomason_planeStrain/model.py b/dG3D/benchmarks/Thomason_planeStrain/model.py deleted file mode 100644 index 77cbd49ec941f60c99768e71074980436b430d29..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/Thomason_planeStrain/model.py +++ /dev/null @@ -1,182 +0,0 @@ -#coding-Utf-8-*- -from gmshpy import* -from dG3Dpy import* -from math import* - -# Script for plane notched specimen with Gurson - - -# Material law creation -# =================================================================================== -BulkLawNum1 = 11 -# material parameters - bulk law -rho = 7600. # kg/m3: density -young = 210.e3 # Pa: module de young -nu = 0.3 # -: poisson coefficient -sy0 = 354.41 # initial yield stress -h_hard = 500. -h_exp = 0.13 # exponential coefficient - -# hardening -Harden1 = SwiftJ2IsotropicHardening(BulkLawNum1, sy0, h_hard, h_exp) - - -# - non-local law -l = 0.4 -cl = l*l -Cl_Law1 = IsotropicCLengthLaw(BulkLawNum1, cl) - -# - nucleation -fn = 0.1; -sn = 0.; -epsilonn = 0.1; -NucleationLawNum1 = 3 -Gdnexp1 = ExponentialNucleationLaw(NucleationLawNum1, fn, sn, epsilonn); - -# - gurson -fVinitial = 0.05 # initial porosity - -# material law creation -#BulkLaw1 = NonLocalDamageGursonDG3DMaterialLaw(BulkLawNum1, rho, young, nu, q1,q2,q3,fVinitial,Harden1, Cl_Law1, 1e-6,False,1e-8) - -BulkLaw1 = NonLocalPorousThomasonDG3DMaterialLaw(BulkLawNum1, young, nu, rho, fVinitial, 10., Harden1, Cl_Law1) -BulkLaw1.setOrderForLogExp(7) -BulkLaw1.setYieldSurfaceExponent(20) -BulkLaw1.setNucleationLaw(Gdnexp1) -BulkLaw1.setPredictorCorrectorParameters(0,20,1.) -BulkLaw1.setSubStepping(bool(0),3) - - - -# Solver parameters - implicit -# =================================================================================== -soltype = 1 # StaticLinear=0 (default, StaticNonLinear=1, Explicit=2, # Multi=3, Implicit=4, Eigen=5) -nstep = 10 # Number of step -ftime =1.0 # Final time -tol=1.e-6 # Relative tolerance for NR scheme -tolAbs = 1.e-7 # Absolute tolerance for NR scheme -nstepArchIP=1 # Number of step between 2 archiving -nstepArchForce =1 # Number of step between 2 force archiving -nstepArchEnergy = nstepArchForce # Number of step between 2 energy computation and archiving - -MaxIter = 15 # Maximum number of iterations -StepIncrease = 2 # Number of successfull timestep before reincreasing it -StepReducFactor = 2. # Timestep reduction factor -NumberReduction = 20 # Maximum number of timespep reduction: max reduction = pow(StepReducFactor,this) - -fullDg = False -eqRatio = 1.0 # Ratio between "elastic" and non-local equations -space1 = 0 # Function space (Lagrange=0) -beta1 = 100.0 # Penality parameter for DG - -# Domain creation - -meshfile= "model.msh" # name of mesh file - -## =================================================================================== -field1 = dG3DDomain(11,11,0,BulkLawNum1,fullDg,2,1) -#field1.setBulkDamageBlockedMethod(-1) # not block -#field1.forceCohesiveInsertionAllIPs(True,0) -field1.stabilityParameters(beta1) # Adding stability parameters (for DG) -field1.setNonLocalStabilityParameters(beta1,fullDg) # Adding stability parameters (for DG) -field1.setNonLocalEqRatio(eqRatio) -#field1.matrixByPerturbation(1,1,1,1e-7) - -# Solver creation -# =================================================================================== -mysolver = nonLinearMechSolver(1000) # Solver associated with numSolver1 - -mysolver.loadModel(meshfile) # add mesh -mysolver.addDomain(field1) # add domain -mysolver.addMaterialLaw(BulkLaw1) # add material law - -# solver parametrisation -mysolver.Scheme(soltype) # solver scheme -mysolver.Solver(2) # Library solver: Gmm=0 (default) Taucs=1 PETsc=2 -mysolver.snlData(nstep,ftime,tol,tolAbs) # solver parameters for imp. solving (numb. of step, final time and tolerance) -mysolver.snlManageTimeStep(MaxIter,StepIncrease,StepReducFactor,NumberReduction) - -# solver archiving -mysolver.stepBetweenArchiving(nstepArchIP) # archiving frequency -mysolver.energyComputation(nstepArchEnergy) # archiving frequency for energy - -# path following -method = 0 -withPF = bool(1) -mysolver.pathFollowing(withPF,method) -if method == 0: - mysolver.setPathFollowingIncrementAdaptation(True,3,0.3) - mysolver.setPathFollowingControlType(0) - mysolver.setPathFollowingCorrectionMethod(0) - mysolver.setPathFollowingArcLengthStep(0.01) - mysolver.setBoundsOfPathFollowingArcLengthSteps(1.e-5,0.1); -else: - # time-step adaptation by number of NR iterations - mysolver.setPathFollowingIncrementAdaptation(True,3,0.3) - mysolver.setPathFollowingLocalSteps(1e-4,1.e-4) - mysolver.setPathFollowingSwitchCriterion(0.) - mysolver.setPathFollowingLocalIncrementType(1); - mysolver.setBoundsOfPathFollowingLocalSteps(1.e-6,2.e-4) - -# Boundary conditions -# =============================== -mysolver.initialBC("Face","Position",11,3,fVinitial) -mysolver.initialBC("Face","Position",12,3,fVinitial) -mysolver.displacementBC("Face",11,2,0.) -mysolver.displacementBC("Edge",1,1,0.) -mysolver.displacementBC("Edge",4,0,0.) - -if withPF == True: - mysolver.sameDisplacementBC("Edge",2,3,0) - mysolver.forceBC("Node",3,0,1e4) -else: - mysolver.displacementBC("Edge",2,0,1.e-2) - - -# Variable storage -# =============================== -mysolver.internalPointBuildView("svm",IPField.SVM, 1, 1) -mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1) -mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1) -mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1) -mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1) -mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1) -mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1) -mysolver.internalPointBuildView("damage",IPField.DAMAGE,1,1) -mysolver.internalPointBuildView("local_fV",IPField.LOCAL_POROSITY,1,1) -mysolver.internalPointBuildView("local_fV_max",IPField.LOCAL_POROSITY,1,IPField.MAX_VALUE) -mysolver.internalPointBuildView("epl_max",IPField.PLASTICSTRAIN, 1, IPField.MAX_VALUE) -mysolver.internalPointBuildView("triaxiality",IPField.STRESS_TRIAXIALITY, 1, 1) -mysolver.internalPointBuildView("COALESCENCE",IPField.COALESCENCE, 1, 1) -mysolver.internalPointBuildView("NONLOCAL_POROSITY",IPField.NONLOCAL_POROSITY, 1, 1) -mysolver.internalPointBuildView("CORRECTED_POROSITY",IPField.CORRECTED_POROSITY, 1, 1) -mysolver.internalPointBuildView("CORRECTED_POROSITY_MAX",IPField.CORRECTED_POROSITY, 1, IPField.MAX_VALUE) -mysolver.internalPointBuildView("POROSITY_AT_COALESCENCE",IPField.POROSITY_AT_COALESCENCE, 1, 1) -mysolver.internalPointBuildView("FAILED",IPField.FAILED, 1, 1) -mysolver.internalPointBuildView("chi",IPField.LIGAMENT_RATIO, 1, 1) -mysolver.internalPointBuildView("chi_max",IPField.LIGAMENT_RATIO, 1, IPField.MAX_VALUE) -mysolver.OneUnknownBuildView("nonlocalVar",3,1) - -mysolver.archivingForceOnPhysicalGroup("Edge", 4, 0, nstepArchForce) -mysolver.archivingNodeDisplacement(3,0, nstepArchForce) -mysolver.archivingNodeDisplacement(5,1, nstepArchForce) - -mysolver.archivingIPOnPhysicalGroup("Face", 11, IPField.NONLOCAL_POROSITY,IPField.MAX_VALUE,nstepArchForce) -mysolver.archivingIPOnPhysicalGroup("Face", 11, IPField.LOCAL_POROSITY,IPField.MAX_VALUE,nstepArchForce) -mysolver.archivingIPOnPhysicalGroup("Face", 11, IPField.CORRECTED_POROSITY,IPField.MAX_VALUE,nstepArchForce) - -mysolver.solve() - - - - - -check = TestCheck() -check.equal(-1.249122e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 4, 0),1.e-4) - - - - - - - diff --git a/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py b/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py index 2b35c5ec57406693e61ba20a0e4c8cd83d2849b8..75e99ecc62ae19f1845c046ad6a14d4b5e50a5cb 100644 --- a/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py +++ b/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py @@ -108,6 +108,6 @@ mysolver.archivingForceOnPhysicalGroup("Face", 5678, 2) mysolver.solve() check = TestCheck() -check.equal(2.614308e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 5678, 2),1.e-3) +check.equal(4.062433e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 5678, 2),1.e-3) diff --git a/dG3D/benchmarks/TransverseAnisotropicThermoMec/cubeTransverseAnisotropy.py b/dG3D/benchmarks/TransverseAnisotropicThermoMec/cubeTransverseAnisotropy.py index a099970896c13d412805dd782f8fa8bbd384c1a5..a6872b637a5444bce95a9815412c1fe070a939b2 100644 --- a/dG3D/benchmarks/TransverseAnisotropicThermoMec/cubeTransverseAnisotropy.py +++ b/dG3D/benchmarks/TransverseAnisotropicThermoMec/cubeTransverseAnisotropy.py @@ -102,6 +102,6 @@ check.equal(-2.123032e-06,mysolver.getArchivedNodalValue(8,0,mysolver.displaceme check.equal(2.124099e-06,mysolver.getArchivedNodalValue(8,1,mysolver.displacement),1.e-5) check.equal(4.520618e-07,mysolver.getArchivedNodalValue(8,2,mysolver.displacement),1.e-4) check.equal(2.272999e+03,mysolver.getArchivedNodalValue(8,3,mysolver.displacement),1.e-5) -check.equal(-1.100321e-08,mysolver.getArchivedForceOnPhysicalGroup("Face", 1234, 2),1.e-4) +check.equal(-1.099978e-08,mysolver.getArchivedForceOnPhysicalGroup("Face", 1234, 2),1.e-4) diff --git a/dG3D/benchmarks/compositeHyperDamage/Window.py b/dG3D/benchmarks/compositeHyperDamage/Window.py index 712e5f970a0f8160cebcbcbd90bb16890afc73ce..a90d8760ecbbe91c150dbcbd29f63dba81909875 100644 --- a/dG3D/benchmarks/compositeHyperDamage/Window.py +++ b/dG3D/benchmarks/compositeHyperDamage/Window.py @@ -163,6 +163,6 @@ mysolver.archivingNodeDisplacement(3,0,1) mysolver.solve() check = TestCheck() -check.equal(1.450730e-04,mysolver.getArchivedNodalValue(3, 0,0),1.e-2) +check.equal(1.565943e-04,mysolver.getArchivedNodalValue(3, 0,0),1.e-2) diff --git a/dG3D/benchmarks/conden_ldbc_DG/run.py b/dG3D/benchmarks/conden_ldbc_DG/run.py index f8a4f6fb0b557a0510781db8c252784b086ed5ed..d1d6e36510b821e2340c604f3a0b0b233c551cbf 100644 --- a/dG3D/benchmarks/conden_ldbc_DG/run.py +++ b/dG3D/benchmarks/conden_ldbc_DG/run.py @@ -102,12 +102,10 @@ mysolver.solve() # test check check = TestCheck() - check.equal(-1.033252e+02,mysolver.getHomogenizedStress(0,0),1.e-4) check.equal(6.149973e+02,mysolver.getHomogenizedStress(1,0),1.e-4) check.equal(1.905315e+03,mysolver.getHomogenizedStress(2,2),1.e-4) - check.equal(8.328033e+04,mysolver.getHomogenizedTangent(0,0,0,0),1.e-4) check.equal(25140.8338148441,mysolver.getHomogenizedTangent(0,0,1,1),1.e-4) check.equal(3.076014e+04,mysolver.getHomogenizedTangent(0,1,0,1),1.e-4) diff --git a/dG3D/benchmarks/nonLocalJ2/twoHole.py b/dG3D/benchmarks/nonLocalJ2/twoHole.py index 1d2e48463f8e09f6569091583663e0a5eaf8f765..e9e2226a5fd1f4bb9569810c7bc36085e650d7fe 100644 --- a/dG3D/benchmarks/nonLocalJ2/twoHole.py +++ b/dG3D/benchmarks/nonLocalJ2/twoHole.py @@ -88,6 +88,6 @@ mysolver.archivingNodeDisplacement(19,1,1) mysolver.solve() check = TestCheck() -check.equal(-2.875732e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 12, 1),1.e-4) +check.equal(-2.849925e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 12, 1),1.e-4) diff --git a/dG3D/benchmarks/nonlocalDamageExpliciteErosion/notchedBar.py b/dG3D/benchmarks/nonlocalDamageExpliciteErosion/notchedBar.py index 2adf6e4720638653ba262bb4e892878a4c1a043d..ba2d5335c719cfd9d34db6749b751e2eee4a8397 100755 --- a/dG3D/benchmarks/nonlocalDamageExpliciteErosion/notchedBar.py +++ b/dG3D/benchmarks/nonlocalDamageExpliciteErosion/notchedBar.py @@ -122,6 +122,6 @@ mysolver.archivingNodeDisplacement(73,1,nstepArchForce) mysolver.solve() check = TestCheck() -check.equal(1.219152e-01,mysolver.getEnergy(energeticField.damage),1.e-4) +check.equal(1.217930e-01,mysolver.getEnergy(energeticField.damage),1.e-4) diff --git a/dG3D/benchmarks/pathFollowing_TrueSnapback/twoHole.py b/dG3D/benchmarks/pathFollowing_TrueSnapback/twoHole.py index b662cc129b5eca8b4778410f1007b8448fc6447e..0647fb1b05701848254fbc8f09936c2cb75c02e9 100644 --- a/dG3D/benchmarks/pathFollowing_TrueSnapback/twoHole.py +++ b/dG3D/benchmarks/pathFollowing_TrueSnapback/twoHole.py @@ -91,4 +91,4 @@ mysolver.archivingForceOnPhysicalGroup('Face',12,1) mysolver.solve() check = TestCheck() -check.equal(-1.035437e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 12, 1),1.e-4) +check.equal(-1.035948e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 12, 1),1.e-4) diff --git a/dG3D/benchmarks/Thomason_cube/CMakeLists.txt b/dG3D/benchmarks/smpPhenomenological/CMakeLists.txt similarity index 74% rename from dG3D/benchmarks/Thomason_cube/CMakeLists.txt rename to dG3D/benchmarks/smpPhenomenological/CMakeLists.txt index 135442cbde917caae8e02b936f8aa9ad909b8987..cb15a1ed74ed5cce9eabff6492f13f620f15a7d5 100644 --- a/dG3D/benchmarks/Thomason_cube/CMakeLists.txt +++ b/dG3D/benchmarks/smpPhenomenological/CMakeLists.txt @@ -1,8 +1,9 @@ # test file -set(PYFILE cube.py) +set(PYFILE SMP_tension.py) set(FILES2DELETE + cube.msh *.csv disp* stress* diff --git a/dG3D/benchmarks/smpPhenomenological/SMP_tension.py b/dG3D/benchmarks/smpPhenomenological/SMP_tension.py new file mode 100644 index 0000000000000000000000000000000000000000..7f50a1d2a5a924d2f9539aa9e89187aa22535597 --- /dev/null +++ b/dG3D/benchmarks/smpPhenomenological/SMP_tension.py @@ -0,0 +1,182 @@ +#coding-Utf-8-*- +from gmshpy import * + +#from dG3DpyDebug import* +from dG3Dpy import * + + +#script to launch beam problem with a python script + +# material law + +#(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Kg, const double Kr, const double Gg, const double Gr,const double alphag, const double alphar, const double zg0, const double tau_y0) + +lawnum= 1 # unique number of law +rho = 1020. +alpha = beta=gamma=0. +t0 = 273.+127. #390K +Kxg=Kyg=Kzg=Kxr=Kyr=Kzr=0.5 +w=0.2 +TaylorQuiney=0. +c=1. +cp=0. +cg=1974210. +cr=1744200. +Tg=350. +DeltaTg=30. +Eg=771.e6 +Er=0.9e6 +nug=0.29 +nur=0.49 +Gg=Eg/(2.*(1.+nug)) +Gr=Er/(2.*(1.+nur)) +alphar=25.e-5 +alphag=13.e-5 +zg0=0. +tau_y0=10.e6 + +# geometry +geofile="cube.geo" # name of mesh file +meshfile="cube.msh" # name of mesh file + +# solver +sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 +soltype = 1 # StaticLinear=0 (default) StaticNonLinear=1 +nstep =50# number of step (used only if soltype=1)#640 +ftime =4. # Final time (used only if soltype=1)22 t = 680 +tol=1.e-5 # relative tolerance for NR scheme (used only if soltype=1) +nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) +fullDg = False #O = CG, 1 = DG +space1 = 0 # function space (Lagrange=0) +beta1 = 40. + + +law1 = PhenomenologicalSMPDG3DMaterialLaw(lawnum,rho,alpha,beta,gamma,t0,Kxg,Kyg,Kzg,Kxr,Kyr,Kzr,w,TaylorQuiney,c,cp,cg,cr,Tg,DeltaTg,Eg,Er,nug,nur,alphag,alphar,tau_y0) +law1.setStrainOrder(-1) + +# creation of ElasticField +nfield = 10 # number of the field (physical number of surface) +#myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg) + +myfield1 = ThermoMechanicsDG3DDomain(1000,nfield,space1,lawnum,fullDg,1.e6) + +myfield1.matrixByPerturbation(0,0,0,1e-8) +#myfield1.matrixByPerturbation(1,1,1,1e-8) +myfield1.stabilityParameters(beta1) +myfield1.ThermoMechanicsStabilityParameters(beta1,fullDg) +# creation of Solver +mysolver = nonLinearMechSolver(1000) +mysolver.createModel(geofile,meshfile,3,2) +mysolver.addDomain(myfield1) +mysolver.addMaterialLaw(law1) +mysolver.Scheme(soltype) +mysolver.Solver(sol) +mysolver.snlData(nstep,ftime/2.,tol,tol) +mysolver.snlManageTimeStep(50, 3, 2, 10) +mysolver.stepBetweenArchiving(nstepArch) +# BC + +#mechanical BC + +#cyclicFunctionDisp1=cycleFunctionTime(0., 0.,0.5,0.0001,1.5,-0.0001,2.5,0.0001,3.5,-0.0001,4.,0.); +#cyclicFunctionDisp2=cycleFunctionTime(0., 0.,0.5,0.0001,1.5,0.0001,2.5,-0.0001,3.5,-0.0001,4.,0.); +cyclicFunctionDisp=cycleFunctionTime(0., 0.,ftime/4.,0.0003,ftime/2.,0.0003); +cyclicFunctionForce=cycleFunctionTime(0., 0.,ftime/4.,0.18/1.e-6,ftime/2.,0.18/1.e-6,101.*ftime/200.,0.,ftime,0.); + + +mysolver.displacementBC("Face",5678,2,0.) +mysolver.displacementBC("Face",4158,0,0.) +mysolver.displacementBC("Face",1265,1,0.) +#mysolver.displacementBC("Face",2376,0,cyclicFunctionDisp1) +mysolver.displacementBC("Face",3487,1,cyclicFunctionDisp) +#mysolver.forceBC("Face",3487,1,cyclicFunctionForce) + + +#thermal BC +#cyclicFunctionTemp=cycleFunctionTime(0., t0, 1., t0,2.,200.,3.,200.,ftime,t0); +cyclicFunctionTemp1=cycleFunctionTime(0., t0, ftime/4., t0 ,ftime/2., t0/2, 3.*ftime/4., t0/2, ftime,t0); +mysolver.initialBC("Volume","Position",nfield,3,t0) +mysolver.displacementBC("Volume",nfield,3,cyclicFunctionTemp1); + + +mysolver.archivingForceOnPhysicalGroup("Face", 1265, 1) +mysolver.archivingForceOnPhysicalGroup("Face", 3487, 1) +#mysolver.archivingForceOnPhysicalGroup("Face", 5678, 2) +#mysolver.archivingForceOnPhysicalGroup("Face", 1234, 3) +#mysolver.archivingForceOnPhysicalGroup("Face", 5678, 3) +#mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.SIG_ZZ,IPField.MEAN_VALUE); +#mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.STRAIN_ZZ,IPField.MEAN_VALUE); +#mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.TEMPERATURE,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.PLASTICSTRAIN,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.SIG_XX,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.SIG_YY,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.STRAIN_YY,IPField.MEAN_VALUE); +mysolver.internalPointBuildView("svm",IPField.SVM, 1, 1) +mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1) +mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1) +mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1) +mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1) +mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1) +mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1) +mysolver.internalPointBuildView("epl",IPField.PLASTICSTRAIN, 1, 1) +mysolver.internalPointBuildView("temperature",IPField.TEMPERATURE, 1, 1) +mysolver.internalPointBuildView("qx",IPField.THERMALFLUX_X, 1, 1) +mysolver.internalPointBuildView("qy",IPField.THERMALFLUX_Y, 1, 1) +mysolver.internalPointBuildView("qz",IPField.THERMALFLUX_Z, 1, 1) +mysolver.archivingNodeDisplacement(2,0,nstepArch) + + + + +mysolver.solve() + +check = TestCheck() +check.equal(-1.206378e-04,mysolver.getArchivedNodalValue(2,0,mysolver.displacement),1e-5) +mysolver.Scheme(soltype) +mysolver.Solver(sol) +mysolver.snlData(nstep,ftime/2.,tol,tol) +mysolver.snlManageTimeStep(50, 3, 2, 10) +mysolver.stepBetweenArchiving(nstepArch) + +mysolver.resetBoundaryConditions(False) + +#mechanical BC + +mysolver.displacementBC("Face",5678,2,0.) +mysolver.displacementBC("Face",4158,0,0.) +mysolver.displacementBC("Face",1265,1,0.) + +#thermal BC +#cyclicFunctionTemp2=cycleFunctionTime(ftime/2., t0/2, 3.*ftime/4., t0/2, ftime,t0); +cyclicFunctionTemp2=cycleFunctionTime(0., t0/2, ftime/4., t0/2, ftime/2.,t0); +cyclicFunctionForce2=cycleFunctionTime(0., 0.,ftime/2.,0.); +#mysolver.initialBC("Volume","Position",nfield,3,t0) +mysolver.displacementBC("Volume",nfield,3,cyclicFunctionTemp2) +mysolver.forceBC("Face",3487,1,cyclicFunctionForce2) + +mysolver.archivingForceOnPhysicalGroup("Face", 1265, 1) +mysolver.archivingForceOnPhysicalGroup("Face", 3487, 1) +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.PLASTICSTRAIN,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.SIG_XX,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.SIG_YY,IPField.MEAN_VALUE); +mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.STRAIN_YY,IPField.MEAN_VALUE); +mysolver.internalPointBuildView("svm",IPField.SVM, 1, 1) +mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1) +mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1) +mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1) +mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1) +mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1) +mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1) +mysolver.internalPointBuildView("epl",IPField.PLASTICSTRAIN, 1, 1) +mysolver.internalPointBuildView("temperature",IPField.TEMPERATURE, 1, 1) +mysolver.internalPointBuildView("qx",IPField.THERMALFLUX_X, 1, 1) +mysolver.internalPointBuildView("qy",IPField.THERMALFLUX_Y, 1, 1) +mysolver.internalPointBuildView("qz",IPField.THERMALFLUX_Z, 1, 1) +mysolver.archivingNodeDisplacement(8,1,nstepArch) + +mysolver.solve() + +check2 = TestCheck() +check2.equal(1.e-19,mysolver.getArchivedNodalValue(8,1,mysolver.displacement),1e2) + + diff --git a/dG3D/benchmarks/smpPhenomenological/cube.geo b/dG3D/benchmarks/smpPhenomenological/cube.geo new file mode 100644 index 0000000000000000000000000000000000000000..c4b5274a9c52ae745fca8fd17e63222cf48b976a --- /dev/null +++ b/dG3D/benchmarks/smpPhenomenological/cube.geo @@ -0,0 +1,97 @@ +// Test case a SCB with a vertical load at its free extremity +// Size + +//definition of unit +mm = 1e-03; + +// volum fraction + +x=1*mm; +y=1*mm; +z=1*mm; + +// Characteristic length +Lc1=z/2.5; + +// definition of points +Point(1) = { 0.0 , 0.0 , 0.0 , Lc1}; +Point(2) = { x , 0.0 , 0.0 , Lc1}; +Point(3) = { x , y , 0.0 , Lc1}; +Point(4) = { 0.0 , y , 0.0 , Lc1}; +Point(5) = { 0.0 , 0.0 , z , Lc1}; +Point(6) = { x , 0.0 , z , Lc1}; +Point(7) = { x , y , z , Lc1}; +Point(8) = { 0.0 , y , z , Lc1}; + +// Line between points +Line(1) = {1,2}; +Line(2) = {2,3}; +Line(3) = {3,4}; +Line(4) = {4,1}; +Line(5) = {5,6}; +Line(6) = {6,7}; +Line(7) = {7,8}; +Line(8) = {8,5}; +Line(9) = {1,5}; +Line(10)= {2,6}; +Line(11)= {3,7}; +Line(12)= {4,8}; + +// Surface definition +Line Loop(1) = {1,2,3,4}; +Line Loop(2) = {5,6,7,8}; +Line Loop(3) = {1,10,-5,-9}; +Line Loop(4) = {2,11,-6,-10}; +Line Loop(5) = {3,12,-7,-11}; +Line Loop(6) = {4,9,-8,-12}; + +Plane Surface(1) = {1}; +Plane Surface(2) = {2}; +Plane Surface(3) = {3}; +Plane Surface(4) = {4}; +Plane Surface(5) = {5}; +Plane Surface(6) = {6}; + +//VOlume + +Surface Loop(7) = {1,2,3,4,5,6}; +Volume(1) = {7}; + +// Physical objects to applied BC and material +Physical Surface(1234) = {1}; +Physical Surface(5678) = {2}; +Physical Surface(1265) = {3}; +Physical Surface(2376) = {4}; +Physical Surface(3487) = {5}; +Physical Surface(4158) = {6}; +Physical Line(12) = {1}; +Physical Line(23) = {2}; +Physical Line(34) = {3}; +Physical Line(41) = {4}; +Physical Line(56) = {5}; +Physical Line(67) = {6}; +Physical Line(78) = {7}; +Physical Line(85) = {8}; +Physical Line(15) = {9}; +Physical Line(26) = {10}; +Physical Line(37) = {11}; +Physical Line(48) = {12}; + +Physical Point(1) ={1}; +Physical Point(2) ={2}; +Physical Point(3) ={3}; +Physical Point(4) ={4}; +Physical Point(5) ={5}; +Physical Point(6) ={6}; +Physical Point(7) ={7}; +Physical Point(8) ={8}; + +Physical Volume(10) ={1}; + +// define transfinite mesh +Transfinite Line {1,2,3,4,5,6,7,8} = 3; +Transfinite Line {9,10,11,12} =2; +Transfinite Surface {1,2,3,4,5,6} ; +Recombine Surface {1,2,3,4,5,6} ; +Transfinite Volume {1}; + diff --git a/dG3D/benchmarks/twoHole/twoHole.py b/dG3D/benchmarks/twoHole/twoHole.py index 437745151003606e99713161514db9ccba71fcc4..50326f40f820a1f24f6c2a2a3df1b4444d332d4f 100644 --- a/dG3D/benchmarks/twoHole/twoHole.py +++ b/dG3D/benchmarks/twoHole/twoHole.py @@ -108,5 +108,5 @@ mysolver.solve() check = TestCheck() check.equal(-6.856988e-05,mysolver.getArchivedForceOnPhysicalGroup("Face", 55, 1),6e-2) -check.equal(3e-6,mysolver.getArchivedNodalValue(57,1,mysolver.displacement),1e-6) +check.equal(3e-6,mysolver.getArchivedNodalValue(57,1,mysolver.displacement),1e-5) diff --git a/dG3D/src/dG3DDomain.cpp b/dG3D/src/dG3DDomain.cpp index 3a7b5062996ba94e3839106e6bdba577362356df..9c8afc9569c4e95c909a83ed058497287f3210d9 100644 --- a/dG3D/src/dG3DDomain.cpp +++ b/dG3D/src/dG3DDomain.cpp @@ -498,10 +498,12 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) (static_cast<dG3DForceInter*>(ltermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalContinuity(getNonLocalContinuity()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalContinuity(getNonLocalContinuity()); + if (!_bmbp){ + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalContinuity(getNonLocalContinuity()); + } } } } @@ -805,7 +807,7 @@ void dG3DDomain::computeStrain(MElement *e, const int npts_bulk, IntPt *GP, F(2,1) += Grads[i+0*nbFF][1]*disp(i+2*nbFF); F(2,2) += Grads[i+0*nbFF][2]*disp(i+2*nbFF); } - if(STensorOperation::determinantSTensor3(F) < 1.e-15) Msg::Error("Negative Jacobian"); + if(STensorOperation::determinantSTensor3(F) < 1.e-15) Msg::Error("Negative Jacobian in ele %d",e->getNum()); if( ipv->getNumberNonLocalVariable()>getNumNonLocalVariable() ) Msg::Fatal("Your material law uses more non local variables than your domain dG3DDomain::computeStrain bulk"); diff --git a/dG3D/src/dG3DIPVariable.cpp b/dG3D/src/dG3DIPVariable.cpp index b4da849462e421ed01d49a838f2c381d99f236ca..9666ca01aaa0e1fb97eff7775606cdb6c8eb83da 100644 --- a/dG3D/src/dG3DIPVariable.cpp +++ b/dG3D/src/dG3DIPVariable.cpp @@ -1762,7 +1762,7 @@ void SMPDG3DIPVariable::restart() PhenomenologicalSMPDG3DIPVariable::PhenomenologicalSMPDG3DIPVariable( double tinitial,const mlawPhenomenologicalSMP &_lawSMP, const bool oninter) : ThermoMechanicsDG3DIPVariableBase(oninter) { - _TMIPSMP = new IPPhenomenologicalSMP(_lawSMP.getzg0()); + _TMIPSMP = new IPPhenomenologicalSMP(); this->getRefToTemperature()=tinitial; } diff --git a/dG3D/src/dG3DMaterialLaw.cpp b/dG3D/src/dG3DMaterialLaw.cpp index 6d8bc5f22ace288535faf2e62984a71f2ec22296..e8ec52a6580a1c08bb721ff833115c371fc2ab41 100644 --- a/dG3D/src/dG3DMaterialLaw.cpp +++ b/dG3D/src/dG3DMaterialLaw.cpp @@ -2283,14 +2283,30 @@ void SMPDG3DMaterialLaw::stress(IPVariable* ipv, const IPVariable* ipvp, const b } -PhenomenologicalSMPDG3DMaterialLaw::PhenomenologicalSMPDG3DMaterialLaw(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Eg, const double Er, const double nug, const double nur,const double alphag, const double alphar, const double zg0, const double tau_y0): +PhenomenologicalSMPDG3DMaterialLaw::PhenomenologicalSMPDG3DMaterialLaw(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Eg, const double Er, const double nug, const double nur,const double alphag, const double alphar, const double tau_y0): dG3DMaterialLaw (num,rho, true) { - _lawTMSMP = new mlawPhenomenologicalSMP(num,rho,alpha,beta,gamma,t0,Kxg,Kyg,Kzg,Kxr,Kyr,Kzr,w,TaylorQuiney,c,cp,cg,cr,Tg,DeltaTg,Eg,Er,nug,nur,alphag,alphar,zg0,tau_y0); + _lawTMSMP = new mlawPhenomenologicalSMP(num,rho,alpha,beta,gamma,t0,Kxg,Kyg,Kzg,Kxr,Kyr,Kzr,w,TaylorQuiney,c,cp,cg,cr,Tg,DeltaTg,Eg,Er,nug,nur,alphag,alphar,tau_y0); - double nu = 0.3; //to be updated - double mu = 1.e6; //to be updated - double E = 2.*mu*(1.+nu); //Where does this come from? To Have the E corresponding to the Vmax, MUmax + double nu = 0.29; //to be updated + double E = 771.e6; //to be updated + // double E = 2.*mu*(1.+nu); //Where does this come from? To Have the E corresponding to the Vmax, MUmax + //In the linear & homogeneous & isotropic case ? + + linearK = _lawTMSMP->getInitialConductivityTensor(); + Stiff_alphaDilatation=_lawTMSMP->getStiff_alphaDilatation(); + + fillElasticStiffness(E, nu, elasticStiffness); +} + +PhenomenologicalSMPDG3DMaterialLaw::PhenomenologicalSMPDG3DMaterialLaw(const int num,const double rho,const J2IsotropicHardening &j2IH,const double alpha, const double beta, const double gamma,const double t0,const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr, const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr, const double Tg, const double DeltaTg,const double Eg, const double Er, const double nug, const double nur, const double alphag, const double alphar,const double tau_y0): + dG3DMaterialLaw (num,rho, true) +{ + //_lawTMSMP = new mlawPhenomenologicalSMP(num,rho,alpha,beta,gamma,t0,Kxg,Kyg,Kzg,Kxr,Kyr,Kzr,w,TaylorQuiney,c,cp,cg,cr,Tg,DeltaTg,Eg,Er,nug,nur,alphag,alphar,zg0,tau_y0); + + double nu = 0.29; //to be updated + double E = 771.e6; //to be updated + // double Er/2./(1.+nur); //Where does this come from? To Have the E corresponding to the Vmax, MUmax //In the linear & homogeneous & isotropic case ? linearK = _lawTMSMP->getInitialConductivityTensor(); diff --git a/dG3D/src/dG3DMaterialLaw.h b/dG3D/src/dG3DMaterialLaw.h index fd8fe2d9bcd4f0b682ab6d943a566a74c27c83f6..444747c4659df9c71426834178de8493ce2df8c1 100644 --- a/dG3D/src/dG3DMaterialLaw.h +++ b/dG3D/src/dG3DMaterialLaw.h @@ -1033,7 +1033,8 @@ class PhenomenologicalSMPDG3DMaterialLaw :public dG3DMaterialLaw // ,public mlaw STensor3 Stiff_alphaDilatation; public: - PhenomenologicalSMPDG3DMaterialLaw(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Eg, const double Er, const double nug, const double nur,const double alphag, const double alphar, const double zg0, const double tau_y0); + PhenomenologicalSMPDG3DMaterialLaw(const int num, const double rho, const double alpha, const double beta, const double gamma ,const double t0, const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr,const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr,const double Tg,const double DeltaTg, const double Eg, const double Er, const double nug, const double nur,const double alphag, const double alphar, const double tau_y0); + PhenomenologicalSMPDG3DMaterialLaw(const int num,const double rho,const J2IsotropicHardening &j2IH,const double alpha, const double beta, const double gamma,const double t0,const double Kxg,const double Kyg, const double Kzg, const double Kxr, const double Kyr, const double Kzr, const double w, const double TaylorQuiney, const double c, const double cp, const double cg, const double cr, const double Tg, const double DeltaTg,const double Eg, const double Er, const double nug, const double nur, const double alphag, const double alphar,const double tau_y0); void setStrainOrder(const int order); diff --git a/dG3D/src/dG3DTerms.cpp b/dG3D/src/dG3DTerms.cpp index 4b3d48ccaa417b3b9a17dcf7602c07b31c418e42..d17d43dd8c6afbecc9605fde260ec8c0d70301ae 100644 --- a/dG3D/src/dG3DTerms.cpp +++ b/dG3D/src/dG3DTerms.cpp @@ -1087,7 +1087,7 @@ void dG3DForceInter::get(MElement *ele, int npts, IntPt *GP, fullVector<double> } } } - //mStiff.print("analytical bulk"); + //mStiff.print("analytical bulk"); } } diff --git a/dG3D/src/nonLocalDamageDG3DIPVariable.cpp b/dG3D/src/nonLocalDamageDG3DIPVariable.cpp index 59070064bc70fa07331a0c2ffed91eba201749bc..d84cdf02cd98820aba052f5d0e2d9fac7a8b0158 100644 --- a/dG3D/src/nonLocalDamageDG3DIPVariable.cpp +++ b/dG3D/src/nonLocalDamageDG3DIPVariable.cpp @@ -50,6 +50,7 @@ virtualNonLocalDamageDG3DIPVariable::virtualNonLocalDamageDG3DIPVariable(const v if (src._ipvBase != NULL){ _ipvBase = dynamic_cast<dG3DIPVariableBase*>(src._ipvBase->clone()); } + _constitutiveExtraDofDiffusionData = NULL; if(src._constitutiveExtraDofDiffusionData!=NULL) { _constitutiveExtraDofDiffusionData = new constitutiveExtraDofDiffusionData(*(src._constitutiveExtraDofDiffusionData)); diff --git a/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp b/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp index 84b566a9ba2d2eb1f51ad232c7c7a2eb57deb19c..c59626e4a1466c3ba80244b65ba8d98d07f49d31 100644 --- a/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp +++ b/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp @@ -639,7 +639,8 @@ NonLocalDamageGursonDG3DMaterialLaw::NonLocalDamageGursonDG3DMaterialLaw(const i } NonLocalDamageGursonDG3DMaterialLaw::NonLocalDamageGursonDG3DMaterialLaw(const NonLocalDamageGursonDG3DMaterialLaw &source) : - dG3DMaterialLaw(source), _nonLocalMethod(source._nonLocalMethod) + dG3DMaterialLaw(source), _nonLocalMethod(source._nonLocalMethod), + _imposedInitialPorosity(source._imposedInitialPorosity) { _nldGursonlaw = NULL; if (source._nldGursonlaw != NULL){ @@ -702,6 +703,11 @@ void NonLocalDamageGursonDG3DMaterialLaw::setNonLocalMethod(const int i) { } }; +void NonLocalDamageGursonDG3DMaterialLaw::setInitialPorosityOnElement(const int ele, const double fInit){ + Msg::Info("set initial porosity: ele = %d f0 = %e",ele,fInit); + _imposedInitialPorosity[ele] = fInit; +}; + void NonLocalDamageGursonDG3DMaterialLaw::createIPState(IPStateBase* &ips,const bool* state_,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const { // check interface element @@ -709,6 +715,10 @@ void NonLocalDamageGursonDG3DMaterialLaw::createIPState(IPStateBase* &ips,const const MInterfaceElement *iele = dynamic_cast<const MInterfaceElement*>(ele); if(iele==NULL) inter=false; double fvInit = _nldGursonlaw->getInitialPorosity(); + std::map<int,double>::const_iterator it = _imposedInitialPorosity.find(ele->getNum()); + if (it != _imposedInitialPorosity.end()){ + fvInit = it->second; + } IPVariable* ipvi = NULL; if (_nonLocalMethod == 1) ipvi = new nonLocalPorosityDG3DIPVariable(*_nldGursonlaw,fvInit,inter); @@ -756,6 +766,10 @@ void NonLocalDamageGursonDG3DMaterialLaw::createIPVariable(IPVariable* &ipv,cons inter=false; } double fvInit = _nldGursonlaw->getInitialPorosity(); + std::map<int,double>::const_iterator it = _imposedInitialPorosity.find(ele->getNum()); + if (it != _imposedInitialPorosity.end()){ + fvInit = it->second; + } if (_nonLocalMethod == 1) ipv = new nonLocalPorosityDG3DIPVariable(*_nldGursonlaw,fvInit,inter); else if (_nonLocalMethod == 2) @@ -872,19 +886,7 @@ void NonLocalPorousThomasonDG3DMaterialLaw::setScatterredInitialPorosity(const d _nlpthomlaw->setScatterredInitialPorosity(fmin,fmax); }; void NonLocalPorousThomasonDG3DMaterialLaw::setCoalescenceLaw(const CoalescenceLaw& added_coalesLaw) -{ - _nlpthomlaw->setCoalescenceLaw(added_coalesLaw); -}; - -void NonLocalPorousThomasonDG3DMaterialLaw::setYieldSurfaceExponent(const double newN) -{ - _nlpthomlaw->setYieldSurfaceExponent(newN); -}; - -void NonLocalPorousThomasonDG3DMaterialLaw::setSubStepping(const bool fl, const int maxNumStep){ - _nlpthomlaw->setSubStepping(fl,maxNumStep); -} - + {_nlpthomlaw->setCoalescenceLaw(added_coalesLaw);}; void NonLocalPorousThomasonDG3DMaterialLaw::createIPState(IPStateBase* &ips,const bool* state_,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const { @@ -1014,20 +1016,6 @@ void NonLocalPorousCoupledDG3DMaterialLaw::setScatterredInitialPorosity(const do }; void NonLocalPorousCoupledDG3DMaterialLaw::setCoalescenceLaw(const CoalescenceLaw& added_coalesLaw) {_nlpcoupledlaw->setCoalescenceLaw(added_coalesLaw);}; - -void NonLocalPorousCoupledDG3DMaterialLaw::setYieldSurfaceExponent(const double newN) -{ - _nlpcoupledlaw->setYieldSurfaceExponent(newN); -}; - -void NonLocalPorousCoupledDG3DMaterialLaw::setFailureTolerance(const double tol, const double elTol, const double localF){ - _nlpcoupledlaw->setFailureTolerance(tol,elTol,localF); -}; - -void NonLocalPorousCoupledDG3DMaterialLaw::setSubStepping(const bool fl, const int maxNumStep){ - _nlpcoupledlaw->setSubStepping(fl,maxNumStep); -} - void NonLocalPorousCoupledDG3DMaterialLaw::createIPState(IPStateBase* &ips,const bool* state_,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const { diff --git a/dG3D/src/nonLocalDamageDG3DMaterialLaw.h b/dG3D/src/nonLocalDamageDG3DMaterialLaw.h index 0015e0cbc9091859ee7819fded50a4676f044eb0..d7cf432084e35bf0e6223afa7e4aa72ac0d67762 100644 --- a/dG3D/src/nonLocalDamageDG3DMaterialLaw.h +++ b/dG3D/src/nonLocalDamageDG3DMaterialLaw.h @@ -252,6 +252,7 @@ class NonLocalDamageGursonDG3DMaterialLaw : public dG3DMaterialLaw #ifndef SWIG mlawNonLocalDamageGurson *_nldGursonlaw; // pointer to allow to choose between LLN style or Gmsh Style. The choice is performed by the constructor (2 constructors with != arguments) int _nonLocalMethod; // 1 - nonlocal porosity, 2 - nonlocal plastic deformation, 3-nonlocal volumetric plasti deformation + std::map<int, double> _imposedInitialPorosity; #endif //SWIG public: @@ -273,6 +274,7 @@ class NonLocalDamageGursonDG3DMaterialLaw : public dG3DMaterialLaw void setCorrectedRegularizedFunction(const scalarFunction& fct); void setLocalRegularizedFunction(const scalarFunction& fct); void setNonLocalMethod(const int i); + void setInitialPorosityOnElement(const int ele, const double fInit); #ifndef SWIG NonLocalDamageGursonDG3DMaterialLaw(const NonLocalDamageGursonDG3DMaterialLaw &source); virtual ~NonLocalDamageGursonDG3DMaterialLaw(); @@ -320,8 +322,6 @@ public: virtual void setNucleationLaw(const NucleationLaw& added_GdnLaw); virtual void setScatterredInitialPorosity(const double fmin, const double fmax); virtual void setCoalescenceLaw(const CoalescenceLaw& added_coalesLaw); - virtual void setYieldSurfaceExponent(const double newN); - virtual void setSubStepping(const bool fl, const int maxNumStep); #ifndef SWIG NonLocalPorousThomasonDG3DMaterialLaw(const NonLocalPorousThomasonDG3DMaterialLaw &source); @@ -378,9 +378,6 @@ public: virtual void setNucleationLaw(const NucleationLaw& added_GdnLaw); virtual void setScatterredInitialPorosity(const double fmin, const double fmax); virtual void setCoalescenceLaw(const CoalescenceLaw& added_coalesLaw); - virtual void setYieldSurfaceExponent(const double newN); - virtual void setFailureTolerance(const double tol, const double elTol, const double localFailed); - virtual void setSubStepping(const bool fl, const int maxNumStep); #ifndef SWIG NonLocalPorousCoupledDG3DMaterialLaw(const NonLocalPorousCoupledDG3DMaterialLaw &source); diff --git a/dgshell/benchmarks/switchImplExpl/beam.py b/dgshell/benchmarks/switchImplExpl/beam.py index 3a3f9c9b7b7e43f581b4bb76d65f8e7ba9e98f15..5952b3eb6e4e4a148fd97260857611bb44149f07 100644 --- a/dgshell/benchmarks/switchImplExpl/beam.py +++ b/dgshell/benchmarks/switchImplExpl/beam.py @@ -106,7 +106,7 @@ check.equal(-3.943707e-02,mysolver.getArchivedNodalValue(22,2,mysolver.displacem try: import linecache lforce = linecache.getline('previousScheme/force41comp2.csv',1) - lenergy= linecache.getline('previousScheme/energy.csv',3) + lenergy= linecache.getline('previousScheme/energy.csv',2) except: print('Cannot get values in the files') import os