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

solve problem about declaration

parent 5947be09
No related branches found
No related tags found
2 merge requests!147Coal jl8,!133Coal jl8
...@@ -235,7 +235,7 @@ void ThomasonCoalescenceLaw::setThomasonCoefficient(const double a, const double ...@@ -235,7 +235,7 @@ void ThomasonCoalescenceLaw::setThomasonCoefficient(const double a, const double
_beta = b; _beta = b;
}; };
void ThomasonCoalescenceLaw::setCoupledPorousLaw(mlawNonLocalPorousCoupledLaw* law){ void ThomasonCoalescenceLaw::setCoupledPorousLaw(mlawNonLocalPorosity* law){
_bulkCoupledPorousLaw = law; _bulkCoupledPorousLaw = law;
} }
...@@ -438,7 +438,30 @@ void ThomasonCoalescenceLaw::forceCoalescence(const double fV, const IPNonLocalP ...@@ -438,7 +438,30 @@ void ThomasonCoalescenceLaw::forceCoalescence(const double fV, const IPNonLocalP
q1Thom->getRefToCoalescenceActiveFlag() = true; q1Thom->getRefToCoalescenceActiveFlag() = true;
q1Thom->getRefToAccelerateRate() = _acceleratedRate; q1Thom->getRefToAccelerateRate() = _acceleratedRate;
// Temporary // set Cft offset values
if (_bulkCoupledPorousLaw != NULL){
const int method = _bulkCoupledPorousLaw->getCftOffsetMethod();
if (method == 2){
/*
// Compute Cft
// Get stress state
const STensor3& kCor = q1Porous->getConstRefToCorotationalKirchhoffStress();
STensor3 devKcor;
double kcorEq, pcor;
STensorOperation::decomposeDevTr(kCor,devKcor,pcor);
pcor /= 3.;
kcorEq = sqrt(1.5*devKcor.dotprod());
// Get needed data for testing criterion
const double R = q1Porous->getCurrentViscoplasticYieldStress();
const double yieldfV = q1Porous->getYieldPorosity();
const double R0 = _bulkCoupledPorousLaw->getJ2IsotropicHardening()->getYield0();
const double Cft = q1Thom->getConcentrationFactor();
*/
}
}
Msg::Info("Coalescence forced at Cft Offset = %e", q1Thom->getRefToCrackOffsetOnCft()); Msg::Info("Coalescence forced at Cft Offset = %e", q1Thom->getRefToCrackOffsetOnCft());
} }
}; };
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
class IPNonLocalPorosity; class IPNonLocalPorosity;
class mlawNonLocalPorousCoupledLaw; class mlawNonLocalPorosity;
#endif // SWIG #endif // SWIG
...@@ -160,7 +160,7 @@ class ThomasonCoalescenceLaw : public CoalescenceLaw ...@@ -160,7 +160,7 @@ class ThomasonCoalescenceLaw : public CoalescenceLaw
bool _onlyInterface; // =true: check coalescence only on interface bool _onlyInterface; // =true: check coalescence only on interface
// Offset managamement // Offset managamement
mlawNonLocalPorousCoupledLaw* _bulkCoupledPorousLaw; // Pointer to access to CftOffsetMethod stored in mlawNonLocalPorousCoupledLaw mlawNonLocalPorosity* _bulkCoupledPorousLaw; // Pointer to access to CftOffsetMethod stored in mlawNonLocalPorous
public: public:
// Constructors & destructor // Constructors & destructor
...@@ -169,7 +169,7 @@ class ThomasonCoalescenceLaw : public CoalescenceLaw ...@@ -169,7 +169,7 @@ class ThomasonCoalescenceLaw : public CoalescenceLaw
const bool withNormal=false, const bool nlcheck = true, const bool onlyInt = false); const bool withNormal=false, const bool nlcheck = true, const bool onlyInt = false);
void setRegularizedFunction(const scalarFunction& f); void setRegularizedFunction(const scalarFunction& f);
void setThomasonCoefficient(const double a, const double b); void setThomasonCoefficient(const double a, const double b);
void setCoupledPorousLaw(mlawNonLocalPorousCoupledLaw* law); void setCoupledPorousLaw(mlawNonLocalPorosity* law);
#ifndef SWIG #ifndef SWIG
ThomasonCoalescenceLaw(const ThomasonCoalescenceLaw& src); ThomasonCoalescenceLaw(const ThomasonCoalescenceLaw& src);
virtual ~ThomasonCoalescenceLaw(); virtual ~ThomasonCoalescenceLaw();
......
...@@ -197,6 +197,8 @@ protected: ...@@ -197,6 +197,8 @@ protected:
const std::vector<NucleationLaw*> * getGursonDamageNucleationContainer() const {return &_gdnLawContainer;}; const std::vector<NucleationLaw*> * getGursonDamageNucleationContainer() const {return &_gdnLawContainer;};
const viscosityLaw * getViscoplasticLaw() const {return _viscoplastlaw;}; const viscosityLaw * getViscoplasticLaw() const {return _viscoplastlaw;};
const CoalescenceLaw* getCoalescenceLaw() const {return _coalescenceLaw;}; const CoalescenceLaw* getCoalescenceLaw() const {return _coalescenceLaw;};
virtual int getCftOffsetMethod() const{return 0;};
//----------------------------------------------------added //----------------------------------------------------added
virtual double bulkModulus(double T) const; virtual double bulkModulus(double T) const;
virtual double bulkModulusDerivative (double T) const; virtual double bulkModulusDerivative (double T) const;
......
...@@ -245,7 +245,7 @@ void mlawNonLocalPorousCoupledLaw::createIPState(IPStateBase* &ips,const bool* s ...@@ -245,7 +245,7 @@ void mlawNonLocalPorousCoupledLaw::createIPState(IPStateBase* &ips,const bool* s
const int mlawNonLocalPorousCoupledLaw::getCftOffsetMethod() const{ int mlawNonLocalPorousCoupledLaw::getCftOffsetMethod() const{
return _CfTOffsetMethod; return _CfTOffsetMethod;
} }
......
...@@ -94,7 +94,7 @@ class mlawNonLocalPorousCoupledLaw : public mlawNonLocalPorosity ...@@ -94,7 +94,7 @@ class mlawNonLocalPorousCoupledLaw : public mlawNonLocalPorosity
}; };
// Functions of mlawNonLocalPorousCoupledLaw // Functions of mlawNonLocalPorousCoupledLaw
virtual const int getCftOffsetMethod() const; virtual int getCftOffsetMethod() const;
// Functions of mlawPorous // Functions of mlawPorous
virtual double yieldFunction(const double kcorEq, const double pcor, const double R, const double yieldfV, virtual double yieldFunction(const double kcorEq, const double pcor, const double R, const double yieldfV,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment