← Back to team overview

yade-users team mailing list archive

Re: [Question #261724]: Interaction of FrictMat and a new class of material

 

Could you also show us the Python script you use?
Thanks
Jan

2015-02-05 19:21 GMT+01:00 behzad <question261724@xxxxxxxxxxxxxxxxxxxxx>:

> Question #261724 on Yade changed:
> https://answers.launchpad.net/yade/+question/261724
>
> behzad posted a new comment:
> I paste it here. How can I attach files?
>
> // 2014 © Behzad Majidi <behzad.majidi@xxxxxxxxx>
> // 2014 © Ricardo Pieralisi <ricpieralisi@xxxxxxxxx>
>
> #pragma once
>
> #include<core/Material.hpp>
> #include<pkg/dem/FrictPhys.hpp>
> #include<pkg/dem/ViscoelasticPM.hpp>
> #include<pkg/dem/CohesiveFrictionalContactLaw.hpp>
> #include<pkg/common/Dispatching.hpp>
> #include<pkg/dem/ScGeom.hpp>
> #include<pkg/dem/DemXDofGeom.hpp>
> #include<pkg/common/MatchMaker.hpp>
>
>
> //********************** CohBurgersMat ****************************/
>
> class CohBurgersMat : public CohFrictMat
> {
>         public :
>                 virtual ~CohBurgersMat () {};
>
> /// Serialization
>         YADE_CLASS_BASE_DOC_ATTRS_CTOR(CohBurgersMat,CohFrictMat,"",
>                 ((Real,kmn,NaN,,"Normal elastic stiffness for Maxwell."))
>                 ((Real,cmn,NaN,,"Normal viscous constant for Maxwell."))
>                 ((Real,kms,NaN,,"Shear elastic stiffness for Maxwell."))
>                 ((Real,cms,NaN,,"Shear viscous constant for Maxwell."))
>                 ((Real,kkn,NaN,,"Normal elastic stiffness for Kelvin."))
>                 ((Real,ckn,NaN,,"Normal viscous constant for Kelvin."))
>                 ((Real,kks,NaN,,"Shear elastic stiffness for Kelvin."))
>                 ((Real,cks,NaN,,"Shear viscous constant for Kelvin.")),
>                 createIndex();
>                 );
> /// Indexable
>         REGISTER_CLASS_INDEX(CohBurgersMat,CohFrictMat);
> };
>
> REGISTER_SERIALIZABLE(CohBurgersMat);
>
>
> //********************** CohBurgersPhys ****************************/
>
> class CohBurgersPhys : public CohFrictPhys
> {
>         public :
>                 virtual ~CohBurgersPhys() {};
>                 void SetBreakingState() {cohesionBroken = true;
> normalAdhesion = 0; shearAdhesion = 0;};
>
>         YADE_CLASS_BASE_DOC_ATTRS_CTOR(CohBurgersPhys,CohFrictPhys,"",
>                 ((Real,kmn,NaN,,"Stiffness of Maxwell's spring(normal)"))
>                 ((Real,kkn,NaN,,"Stiffness of Kelvin's spring(normal)"))
>                 ((Real,cmn,NaN,,"Viscosity of Maxwell's dashpot(normal)"))
>                 ((Real,ckn,NaN,,"Viscosity of Kelvin's dashpot(normal)"))
>                 ((Real,kms,NaN,,"Stiffness of Maxwell's spring(shear)"))
>                 ((Real,kks,NaN,,"Stiffness of Kelvin's spring(shear)"))
>                 ((Real,cms,NaN,,"Viscosity of Maxwell's dashpot(shear)"))
>                 ((Real,cks,NaN,,"Viscosity of Kelvin's dashpot(shear)"))
>                 ((Vector3r,ukn,Vector3r(0,0,0),,"Normal displacement"))
>                 ((Vector3r,uks,Vector3r(0,0,0),,"Shear displacement")),
>                 createIndex();
>         )
>         REGISTER_CLASS_INDEX(CohBurgersPhys,CohFrictPhys);
> };
>
> REGISTER_SERIALIZABLE(CohBurgersPhys);
>
>
> //********************** Ip2_CohBurgersMat_CohBurgersMat_CohBurgersPhys
> ****************************/
>
> class Ip2_CohBurgersMat_CohBurgersMat_CohBurgersPhys: public IPhysFunctor
>  {
>         public :
>                 virtual void go(                const
> shared_ptr<Material>& b1,
>                                                 const
> shared_ptr<Material>& b2,
>                                                 const
> shared_ptr<Interaction>& interaction);
>                 virtual void
> Calculate_CohBurgersMat_CohBurgersMat_CohBurgersPhys(const
> shared_ptr<Material>& b1, const shared_ptr<Material>& b2, const
> shared_ptr<Interaction>& interaction, shared_ptr<CohBurgersPhys> phys);
>                 int cohesionDefinitionIteration;
>
> YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_CohBurgersMat_CohBurgersMat_CohBurgersPhys,IPhysFunctor,
>         "Convert 2 instances of :yref:`CohBurgersMat` to
> :yref:`CohBurgersPhys` using the rule of consecutive connection.",
>         ((bool,setCohesionNow,false,,"If true, assign cohesion to all
> existing contacts"))
>         ((bool,setCohesionOnNewContacts,false,,"If true, assign cohesion
> at all new contacts."))
>         ,
>         cohesionDefinitionIteration = -1;
>         );
>         FUNCTOR2D(CohBurgersMat,CohBurgersMat);
> };
> REGISTER_SERIALIZABLE(Ip2_CohBurgersMat_CohBurgersMat_CohBurgersPhys);
>
>
>
> class Ip2_FrictMat_CohBurgersMat_CohBurgersPhys: public IPhysFunctor
> {
>         public :
>                 virtual void go(        const shared_ptr<Material>& b1,
>                                         const shared_ptr<Material>& b2,
>                                         const shared_ptr<Interaction>&
> interaction);
>                 virtual void
> Calculate_FrictMat_CohBurgersMat_CohBurgersPhys(const shared_ptr<Material>&
> b1, const shared_ptr<Material>& b2, const shared_ptr<Interaction>&
> interaction, shared_ptr<CohBurgersPhys> phys);
>                 int cohesionDefinitionIteration;
>
> YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_FrictMat_CohBurgersMat_CohBurgersPhys,IPhysFunctor,
>         "converts an interaction of FrictMat and CohBurgersMat to
> CohBurgersPhys",
>         ((bool,setCohesionNow,false,,"If true, assign cohesion to all
> existing contacts"))
>         ((bool,setCohesionOnNewContacts,false,,"If true, assign cohesion
> at all new contacts."))
>         ,
>         cohesionDefinitionIteration = -1;
>         );
>         FUNCTOR2D(FrictMat,CohBurgersMat);
> };
>
> REGISTER_SERIALIZABLE(Ip2_FrictMat_CohBurgersMat_CohBurgersPhys);
>
>
> //******************** Law2_ScGeom_CohBurgersPhys_CohesiveBurgers
> *************************/
>
>
> class Law2_ScGeom_CohBurgersPhys_CohesiveBurgers: public LawFunctor {
>         public:
>                 virtual bool go(shared_ptr<IGeom>& _geom,
> shared_ptr<IPhys>& _phys, Interaction*);
>
>         FUNCTOR2D(ScGeom,CohBurgersPhys);
>
>         YADE_CLASS_BASE_DOC(Law2_ScGeom_CohBurgersPhys_CohesiveBurgers,
> LawFunctor,"");
>
> };
> REGISTER_SERIALIZABLE(Law2_ScGeom_CohBurgersPhys_CohesiveBurgers);
>
> bool computeForceTorqueCohBurgers(shared_ptr<IGeom>& _geom,
> shared_ptr<IPhys>& _phys, Interaction* I, Vector3r & force, Vector3r &
> torque1, Vector3r & torque2);
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References