Modifying the Cohesive Frictional Contact Law
Hi guys,
I'm having a look on Cohesive Frictional Contact Law to see if I can modify it to convert it to a cohesive Burger's model (Maxwell model in series with a Kelvin model).
I have two question:
1- Do I need to create a new class of materials? To input the cohesion strengths and dashpot, springs properties?
2- Let's have a look on CohesiveFrictio
It's not here:
Real un = geom->penetrati
Real Fn = phys->kn*
If I change it to
Real Fn = phys->kn*
that would be enough modifying the normal force calculation?
;======
/******
* Copyright (C) 2007 by Bruno Chareyre <email address hidden> *
* Copyright (C) 2008 by Janek Kozicki <email address hidden> *
* *
* This program is free software; it is licensed under the terms of the *
* GNU General Public License v2 or later. See file LICENSE for details. *
*******
#include "CohesiveFricti
#include<
#include<
#include<
#include<
#include<
YADE_PLUGIN(
CREATE_
Real Law2_ScGeom6D_
{
Real normEnergy=0;
FOREACH(const shared_
if(!I->isReal()) continue;
CohFrictPhys* phys = YADE_CAST<
if (phys) {
normEnergy += 0.5*(phys-
}
}
return normEnergy;
}
Real Law2_ScGeom6D_
{
Real shearEnergy=0;
FOREACH(const shared_
if(!I->isReal()) continue;
CohFrictPhys* phys = YADE_CAST<
if (phys) {
shearEnergy += 0.5*(phys-
}
}
return shearEnergy;
}
void CohesiveFrictio
{
if(!functor) functor=
functor-
functor-
functor-
functor-
functor-
FOREACH(const shared_
if(!I->isReal()) continue;
functor-
}
void Law2_ScGeom6D_
{
const Real& dt = scene->dt;
const int &id1 = contact->getId1();
const int &id2 = contact->getId2();
ScGeom6D* geom = YADE_CAST<
CohFrictPhys* phys = YADE_CAST<
Vector3r& shearForce = phys->shearForce;
if (contact-
Real un = geom->penetrati
Real Fn = phys->kn*
if (phys->fragile && (-Fn)> phys->normalAdh
// BREAK due to tension
scene-
} else {
if ((-Fn)> phys->normalAdh
Fn=-
phys->unp = un+phys-
if (phys->unpMax && phys->unp<
scene-
}
phys->normalForce = Fn*geom->normal;
State* de1 = Body::byId(
State* de2 = Body::byId(
/////
if (shear_creep) shearForce -= phys->ks*
/////
Vector3r& shearForce = geom->rotate(
const Vector3r& dus = geom->shearIncr
//Linear elasticity giving "trial" shear force
shearForce -= phys->ks*dus;
Real Fs = phys->shearForc
Real maxFs = phys->shearAdhe
if (!phys-
maxFs += Fn*phys-
maxFs = std::max((Real) 0, maxFs);
if (Fs > maxFs) {//Plasticity condition on shear force
if (phys->fragile && !phys->
phys-
maxFs = max((Real) 0, Fn*phys-
}
maxFs = maxFs / Fs;
Vector3r trialForce=
shearForce *= maxFs;
if (scene-
Real dissip=
if(dissip>0) scene->
if (Fn<0) phys->normalForce = Vector3r:
}
//Apply the force
applyForceAtC
// Vector3r force = -phys->
// scene->
// scene->
// scene->
// scene->
/// Moment law ///
if (phys->
if (!useIncrementa
if (twist_creep) {
Real viscosity_twist = creep_viscosity * std::pow((2 * std::min(
Real angle_twist_creeped = geom->getTwist() * (1 - dt/viscosity_
Quaternionr q_twist(
Quaternionr q_twist_
Quaternionr q_twist_
geom-
}
phys-
phys-
}
else{ // Use incremental formulation to compute moment_twis and moment_bending (no twist_creep is applied)
if (twist_creep) throw std::invalid_
Vector3r relAngVel = geom->getRelAng
// *** Bending ***//
Vector3r relAngVelBend = relAngVel - geom->normal.
Vector3r relRotBend = relAngVelBend*dt; // relative rotation due to rolling behaviour
// incremental formulation for the bending moment (as for the shear part)
Vector3r& momentBend = phys->moment_
momentBend = geom->rotate(
momentBend = momentBend-
// -------
// *** Torsion ***//
Vector3r relAngVelTwist = geom->normal.
Vector3r relRotTwist = relAngVelTwist*dt; // component of relative rotation along n FIXME: sign?
// incremental formulation for the torsional moment
Vector3r& momentTwist = phys->moment_twist;
momentTwist = geom->rotate(
momentTwist = momentTwist-
}
/// Plasticity ///
// limit rolling moment to the plastic value, if required
Real RollMax = phys->maxRollPl
if (RollMax>0.){ // do we want to apply plasticity?
if (!useIncrementa
Real scalarRoll = phys->moment_
if (scalarRoll>
Real ratio = RollMax/scalarRoll;
phys-
}
}
// limit twisting moment to the plastic value, if required
Real TwistMax = phys->maxTwistM
if (TwistMax>0.){ // do we want to apply plasticity?
if (!useIncrementa
Real scalarTwist= phys->moment_
if (scalarTwist>
Real ratio = TwistMax/
phys-
}
}
// Apply moments now
Vector3r moment = phys->moment_twist + phys->moment_
scene-
scene-
}
/// Moment law END ///
}
}
;======
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: