~ubuntu-branches/ubuntu/trusty/yade/trusty

« back to all changes in this revision

Viewing changes to pkg/dem/JointedCohesiveFrictionalPM.hpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky, cf3f8d9
  • Date: 2013-10-30 20:56:33 UTC
  • mfrom: (20.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20131030205633-1f01r7hjce17d723
Tags: 1.05.0-2
[cf3f8d9] Pass -ftrack-macro-expansion=0 only if gcc>=4.8. (Closes: #726009)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* lucScholtes2010 */
 
2
 
 
3
#pragma once
 
4
 
 
5
#include<yade/pkg/common/ElastMat.hpp>
 
6
#include<yade/pkg/common/Dispatching.hpp>
 
7
#include<yade/pkg/common/NormShearPhys.hpp>
 
8
#include<yade/pkg/dem/ScGeom.hpp>
 
9
 
 
10
/** This class holds information associated with each body state*/
 
11
class JCFpmState: public State {
 
12
        YADE_CLASS_BASE_DOC_ATTRS_CTOR(JCFpmState,State,"JCFpm state information about each body.\n\nNone of that is used for computation (at least not now), only for post-processing.",
 
13
                ((int,tensBreak,0,,"number of tensile breakages. [-]"))
 
14
                ((int,shearBreak,0,,"number of shear breakages. [-]"))
 
15
                // ((int,noIniLinks,0,,"number of initial cohesive interactions. [-]"))
 
16
                // ((Real,tensBreakRel,0,,"relative number of tensile breakages (compared with noIniLinks). [-]"))
 
17
                // ((Real,shearBreakRel,0,,"relative number of shear breakages (compared with noIniLinks). [-]"))
 
18
                ,
 
19
                createIndex();
 
20
        );
 
21
        REGISTER_CLASS_INDEX(JCFpmState,State);
 
22
};
 
23
REGISTER_SERIALIZABLE(JCFpmState);
 
24
 
 
25
/** This class holds information associated with each body */
 
26
class JCFpmMat: public FrictMat {
 
27
        public:
 
28
                virtual shared_ptr<State> newAssocState() const { return shared_ptr<State>(new JCFpmState); }
 
29
                virtual bool stateTypeOk(State* s) const { return (bool)dynamic_cast<JCFpmState*>(s); }
 
30
                
 
31
        YADE_CLASS_BASE_DOC_ATTRS_CTOR(JCFpmMat,FrictMat,"possibly jointed cohesive frictional material, for use with other JCFpm classes",
 
32
                ((int,type,0,,"if particles of two different types interact, it will be with friction only (no cohesion).[-]"))
 
33
                ((bool,onJoint,false,,"identifies if the particle is on a joint surface. [-]"))
 
34
                ((int,joint,0,,"indicates the number of joint surfaces to which the particle belongs (0-> no joint, 1->1 joint, etc..). [-]"))
 
35
                ((Vector3r,jointNormal1,Vector3r::Zero(),,"specifies the normal direction to the joint plane 1. Rk: the ideal here would be to create a vector of vector wich size is defined by the joint integer (as much joint normals as joints). However, it needs to make the pushback function works with python since joint detection is done through a python script. lines 272 to 312 of cpp file should therefore be adapted. [-]"))
 
36
                ((Vector3r,jointNormal2,Vector3r::Zero(),,"specifies the normal direction to the joint plane 2. [-]"))
 
37
                ((Vector3r,jointNormal3,Vector3r::Zero(),,"specifies the normal direction to the joint plane 3. [-]")),
 
38
                createIndex();
 
39
        );
 
40
        REGISTER_CLASS_INDEX(JCFpmMat,FrictMat);
 
41
};
 
42
REGISTER_SERIALIZABLE(JCFpmMat);
 
43
 
 
44
/** This class holds information associated with each interaction */
 
45
class JCFpmPhys: public NormShearPhys {
 
46
        public:
 
47
                virtual ~JCFpmPhys();
 
48
 
 
49
                YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(JCFpmPhys,NormShearPhys,"representation of a single interaction of the JCFpm type, storage for relevant parameters",
 
50
                        ((Real,initD,0,,"equilibrium distance for interacting particles. Computed as the interparticular distance at first contact detection."))
 
51
                        ((bool,isCohesive,false,,"If false, particles interact in a frictional way. If true, particles are bonded regarding the given cohesion and tensileStrength. [-]"))
 
52
                        ((bool,more,false,,"specifies if the interaction is crossed by more than 3 joints. If true, interaction is deleted (temporary solution). [-]"))
 
53
                        ((bool,isOnJoint,false,,"if true, particles interact as part of a joint (see Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM for details). [-]"))
 
54
                        ((Real,frictionAngle,0,,"defines Coulomb friction. [rad]"))
 
55
                        ((Real,tanFrictionAngle,0,,"tangent of frictionAngle. [-]"))
 
56
                        ((Real,crossSection,0,,"crossSection=pi*Rmin^2. [m2]"))
 
57
                        ((Real,FnMax,0,,"defines the maximum admissible normal force in traction FnMax=tensileStrength*crossSection. [N]"))
 
58
                        ((Real,FsMax,0,,"defines the maximum admissible tangential force in shear FsMax=cohesion*FnMax. [N]"))
 
59
                        ((Vector3r,jointNormal,Vector3r::Zero(),,"Normal direction to the joint."))
 
60
                        ((Real,jointCumulativeSliding,0,,"sliding distance for particles interacting on a joint. Used when soothJoint is true in Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM to take into account dilatancy due to shearing. [-]"))
 
61
                        ((Real,dilationAngle,0,,"defines the dilatancy of the joint surface. [rad]"))
 
62
                        ((Real,tanDilationAngle,0,,"tangent of dilationAngle. [-]"))
 
63
                        ((Real,dilation,0,,"defines the normal displacement in the joint after sliding treshold. [m]"))
 
64
                        ,
 
65
                        createIndex();
 
66
                        ,
 
67
                );
 
68
                DECLARE_LOGGER;
 
69
                REGISTER_CLASS_INDEX(JCFpmPhys,NormShearPhys);
 
70
};
 
71
REGISTER_SERIALIZABLE(JCFpmPhys);
 
72
 
 
73
/** 2d functor creating InteractionPhysics (Ip2) taking JCFpmMat and JCFpmMat of 2 bodies, returning type JCFpmPhys */
 
74
class Ip2_JCFpmMat_JCFpmMat_JCFpmPhys: public IPhysFunctor{
 
75
        public:
 
76
                virtual void go(const shared_ptr<Material>& pp1, const shared_ptr<Material>& pp2, const shared_ptr<Interaction>& interaction);
 
77
                
 
78
                FUNCTOR2D(JCFpmMat,JCFpmMat);
 
79
                DECLARE_LOGGER;
 
80
                
 
81
                YADE_CLASS_BASE_DOC_ATTRS(Ip2_JCFpmMat_JCFpmMat_JCFpmPhys,IPhysFunctor,"converts 2 JCFpmMat instances to JCFpmPhys with corresponding parameters.",
 
82
                        ((int,cohesiveTresholdIteration,1,,"should new contacts be cohesive? They will before this iter, they won't afterward."))
 
83
                        ((Real,alpha,0.,,"defines the shear to normal stiffness ratio ks/kn in the matrix."))
 
84
                        ((Real,tensileStrength,0.,,"defines the maximum admissible normal force in traction FnMax=tensileStrength*crossSection in the matrix. [Pa]"))
 
85
                        ((Real,cohesion,0.,,"defines the maximum admissible tangential force in shear FsMax=cohesion*crossSection in the matrix. [Pa]"))
 
86
                        ((Real,jointNormalStiffness,0.,,"defines the normal stiffness on the joint surface. [Pa]"))
 
87
                        ((Real,jointShearStiffness,0.,,"defines the shear stiffness on the joint surface. [Pa]"))
 
88
                        ((Real,jointTensileStrength,0.,,"defines the maximum admissible normal force in traction FnMax=tensileStrength*crossSection on the joint surface. [Pa]"))
 
89
                        ((Real,jointCohesion,0.,,"defines the maximum admissible tangential force in shear FsMax=cohesion*crossSection on the joint surface. [Pa]"))
 
90
                        ((Real,jointFrictionAngle,-1,,"defines Coulomb friction on the joint surface. [rad]"))
 
91
                        ((Real,jointDilationAngle,0,,"defines the dilatancy of the joint surface (only valid for smooth contact logic). [rad]"))
 
92
                );
 
93
                
 
94
};
 
95
REGISTER_SERIALIZABLE(Ip2_JCFpmMat_JCFpmMat_JCFpmPhys);
 
96
 
 
97
/** 2d functor creating the interaction law (Law2) based on SphereContactGeometry (ScGeom) and JCFpmPhys of 2 bodies, returning type JointedCohesiveFrictionalPM */
 
98
class Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM: public LawFunctor{
 
99
        public:
 
100
                virtual void go(shared_ptr<IGeom>& _geom, shared_ptr<IPhys>& _phys, Interaction* I);
 
101
                FUNCTOR2D(ScGeom,JCFpmPhys);
 
102
 
 
103
                YADE_CLASS_BASE_DOC_ATTRS(Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM,LawFunctor,"Interaction law for cohesive frictional material, e.g. rock, possibly presenting joint surfaces. Joint surfaces can be defined in a preprocessing phase through .stl meshes (see ref for details of the procedure), and can be mechanically described with a smooth contact logic [Ivars2011]_ (implemented in Yade in [Scholtes2012]_).",
 
104
                        ((bool,smoothJoint,false,,"if true, particles belonging to joint surface have a smooth contact logic [Ivars2011]_, [Scholtes2012]_."))
 
105
                        ((bool,recordCracks,false,,"if true a text file cracks.txt will be created (iteration, position, type (tensile or shear), cross section and contact normal)."))
 
106
                        ((bool,cracksFileExist,false,,"If true, text file already exists and its content won't be reset."))
 
107
                );
 
108
                DECLARE_LOGGER; 
 
109
};
 
110
REGISTER_SERIALIZABLE(Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM);