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

correct insertion function in dG3D porosity cohesive band model

parent 487c54a7
Branches
Tags
1 merge request!132Coal jl8
......@@ -406,6 +406,7 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons
// -actual stress state: yieldThomason = sthingOfStress - Cft*R/R0
// -correction to satidfy fT=0 with actual stress: yieldThomason + Cft*R/R0 - CftOffset*Cft*R/R0 = 0
// -solving for offset gives: CftOffset = (yieldThomason + Cft*R/R0)/(Cft*R/R0) = 1+yieldThomason*R0/(Cft*R)
// NB: if _CfTOffsetMethod > 1: fT>0,
// Compute Thomason yield surface
double yieldThomason = _mlawCoales->yieldFunction(kcorEq,pcor,R,yieldfV,q0,q1,T);
......
......@@ -1197,61 +1197,56 @@ void PorosityCohesiveBand3DLaw::stress(IPVariable* ipv, const IPVariable* ipvpre
void PorosityCohesiveBand3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPStateBase* ipsp, const bool forcedInsert) const{
// check failure onset from both negative and postive IPStates
// Check failure onset on both negative and postive IPStates
// Get ipvs
/// Get IP fracture
FractureCohesive3DIPVariable* fMinusCur = dynamic_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::current));
FractureCohesive3DIPVariable* fMinusPrev = dynamic_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::previous));
FractureCohesive3DIPVariable* fPlusCur = dynamic_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::current));
FractureCohesive3DIPVariable* fPlusPrev = dynamic_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::previous));
if (fMinusCur == NULL or fPlusCur == NULL or fMinusPrev==NULL or fPlusPrev==NULL){
Msg::Fatal("FractureCohesive3DIPVariable must be used in NonlocalPorosityCohesiveBand3DLaw::checkCohesiveInsertion");
Msg::Fatal("PorosityCohesiveBand3DLaw::checkCohesiveInsertion: FractureCohesive3DIPVariable must be used");
}
if (fMinusPrev->isbroken() or fPlusPrev->isbroken()){
Msg::Warning("Previous IPs are broken");
Msg::Fatal("PorosityCohesiveBand3DLaw::checkCohesiveInsertion: Previous IPs are broken");
fMinusCur->broken();
fPlusCur->broken();
return;
}
/// Get ipvs for non-local porous
nonLocalPorosityDG3DIPVariable* ipvm = dynamic_cast<nonLocalPorosityDG3DIPVariable*>(fMinusCur->getIPvBulk());
nonLocalPorosityDG3DIPVariable* ipvp = dynamic_cast<nonLocalPorosityDG3DIPVariable*>(fPlusCur->getIPvBulk());
if (ipvm == NULL or ipvp == NULL){
Msg::Fatal("nonLocalPorosityDG3DIPVariable must be used in NonlocalPorosityCohesiveBand3DLaw::checkCohesiveInsertion");
}
/// Get IP coalescence
IPCoalescence& ipcolm = ipvm->getIPNonLocalPorosity()->getRefToIPCoalescence();
IPCoalescence& ipcolp = ipvp->getIPNonLocalPorosity()->getRefToIPCoalescence();
if ((ipcolm.getCoalescenceActiveFlag() or ipcolp.getCoalescenceActiveFlag()) or forcedInsert){
// Check if crack insertion is requested (because coalescence occurs or it is forced to occur)
if ((ipcolm.getCoalescenceOnsetFlag() or ipcolp.getCoalescenceOnsetFlag()) or forcedInsert){
printf("rank %d: cohesive element is inserted \n",Msg::GetCommRank());
fMinusCur->broken();
fPlusCur->broken();
if (!forcedInsert){
if (!ipcolm.getCoalescenceActiveFlag()) {
ipcolm.operator=(*dynamic_cast<const IPCoalescence*>(&ipcolp));
}
else{
ipcolp.operator=(*dynamic_cast<const IPCoalescence*>(&ipcolm));
}
}
else{
if (_coalescenceLaw != NULL){
// Force IP to be in a coalescence state if not already in that state
if (!ipcolm.getCoalescenceOnsetFlag()){
_coalescenceLaw->forceCoalescence(ipvm->getIPNonLocalPorosity()->getYieldPorosity(), ipvm->getIPNonLocalPorosity(),&ipcolm);
_coalescenceLaw->forceCoalescence(ipvp->getIPNonLocalPorosity()->getYieldPorosity(), ipvp->getIPNonLocalPorosity(),&ipcolp);
}
else
Msg::Warning("problem with forcedInsert in PorosityCohesiveBand3DLaw::checkCohesiveInsertion");
if (!ipcolp.getCoalescenceOnsetFlag()){
_coalescenceLaw->forceCoalescence(ipvp->getIPNonLocalPorosity()->getYieldPorosity(), ipvp->getIPNonLocalPorosity(),&ipcolp);
}
// activate nonlocal to local transition
fMinusCur->setNonLocalToLocal(true);
fPlusCur->setNonLocalToLocal(true);
// broken is checked via bulk terial law, see function stress
// initialize cohesive law in negative part
// initialize data for cohesive law in negative part
static SVector3 zeroVec;
static STensor3 zeroTen;
......@@ -1262,6 +1257,7 @@ void PorosityCohesiveBand3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPStat
Cohesive3DIPVariableBase* coMinus = fMinusCur->getIPvFrac();
coMinus->initializeFracture(fMinusCur->getConstRefToJump(),0.,0.,0.,0.,0.,true,zeroTen,0.,normDir,zeroVec,
fMinusCur->getIPvBulk());
// positive part take a same value as negative cohesive part
Cohesive3DIPVariableBase* coPlus = fPlusCur->getIPvFrac();
coPlus->initializeFracture(fPlusCur->getConstRefToJump(),0.,0.,0.,0.,0.,true,zeroTen,0.,normDir,zeroVec,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment