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

clean actual code before modifying it

parent c569e61a
No related branches found
No related tags found
1 merge request!128Coal jl8
......@@ -342,7 +342,8 @@ void mlawNonLocalPorousCoupledLaw::computeDResidualLocal(STensor3 &dres0dEpr, ST
}
}
void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, const IPNonLocalPorosity *q0, const double* T) const{
void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, const IPNonLocalPorosity *q0, const double* T) const
{
// Get ipvs
const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence());
IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence());
......@@ -350,6 +351,7 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
Msg::Fatal("mlawNonLocalPorousThomasonLaw::computeResidual: IPThomasonCoalescence must be used!");
}
// Get stress state
const STensor3& kCor = q1->getConstRefToCorotationalKirchhoffStress();
static STensor3 devKcor;
static double kcorEq, pcor;
......@@ -357,32 +359,31 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
pcor /= 3.;
kcorEq = sqrt(1.5*devKcor.dotprod());
// Get needed data for testing criterion
const double R = q1->getCurrentViscoplasticYieldStress();
const double yieldfV = q1->getYieldPorosity();
const double R0 = _j2IH->getYield0();
const double Cft = q1Thom->getConcentrationFactor();
// get needed data for testing criterion
double yieldfV = q1->getYieldPorosity();
double R0 = _j2IH->getYield0();
double Cft = q1Thom->getConcentrationFactor();
// Coupling management
if (_withCrackTransition){
// If crack transition is used, coalescence is used only at interface as crack insertion criterion.
// If crack transition is used,
// At the interface: coalescence is used as crack insertion criterion
// In the bulk, nothing is done (== always Gurson)
if (q1->getLocation() == IPVariable::INTERFACE_MINUS or q1->getLocation() == IPVariable::INTERFACE_PLUS)
{
// Compute normal components on the interface from kCor
// Get normal traction on the interface from tau stress
double sigmax = 0.;
static SVector3 Norm;
//Norm = q1->getConstRefToCurrentOutwardNormal();
Norm = q1->getConstRefToReferenceOutwardNormal();
if (Norm.norm() > 0){
if (Norm.norm() > 0){ // is it usefulll ???
Norm.normalize();
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
sigmax += Norm(i)*kCor(i,j)*Norm(j);
}
}
// update maximal stress
// update maximal stress -- will be removed soon
q1Thom->getRefToMaximalTractionStress()= q0Thom->getMaximalTractionStress();
if (sigmax > q1Thom->getMaximalTractionStress()){
q1Thom->getRefToMaximalTractionStress() = sigmax;
......@@ -392,8 +393,7 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
Msg::Fatal("mlawNonLocalPorousCoupledLaw::updatePlasticState: zero normal");
}
// - Check if the normal traction force is sufficient to obtain coalescence in normal direction of the interface
// Check if the normal traction force is sufficient to obtain coalescence in normal direction of the interface
if (!q0Thom->getCoalescenceOnsetFlag())
{
// Check Thomason criterion:
......@@ -498,7 +498,8 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
}
else
{
// Coalescence never occurs in the bulk
// In the bulk:
// Coalescence never occurs
q1Thom->getRefToCoalescenceOnsetFlag() = false;
// Reset onset variables to their default value
// Porosity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment