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

« back to all changes in this revision

Viewing changes to pkg/dem/RockPM.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
 
/**
2
 
 
3
 
=== HIGH LEVEL OVERVIEW OF RockPM ===
4
 
 
5
 
Rock Particle Model (RockPM) is a set of classes for modelling
6
 
mechanical behavior of mining rocks.
7
 
*/
8
 
 
9
 
#pragma once
10
 
 
11
 
#include<yade/pkg/common/Dispatching.hpp>
12
 
#include<yade/pkg/dem/ScGeom.hpp>
13
 
#include<yade/pkg/common/PeriodicEngines.hpp>
14
 
#include<yade/pkg/common/NormShearPhys.hpp>
15
 
#include<yade/pkg/common/ElastMat.hpp>
16
 
 
17
 
class RpmState: public State {
18
 
        YADE_CLASS_BASE_DOC_ATTRS_CTOR(RpmState,State,"State information about Rpm body.",
19
 
                ((int,specimenNumber,0,,"The variable is used for particle size distribution analyze. Indicates, to which part of specimen belongs para of particles."))
20
 
                ((Real,specimenMass,0,,"Indicates the mass of the whole stone, which owns the particle."))
21
 
                ((Real,specimenVol,0,,"Indicates the mass of the whole stone, which owns the particle."))
22
 
                ((Real,specimenMaxDiam,0,,"Indicates the maximal diametr of the specimen.")),
23
 
                /*ctor*/ createIndex();
24
 
        );
25
 
        REGISTER_CLASS_INDEX(RpmState,State);
26
 
};
27
 
REGISTER_SERIALIZABLE(RpmState);
28
 
 
29
 
/** This class holds information associated with each body */
30
 
class RpmMat: public FrictMat {
31
 
                public:
32
 
                        virtual shared_ptr<State> newAssocState() const { return shared_ptr<State>(new RpmState); }
33
 
                        virtual bool stateTypeOk(State* s) const { return (bool)dynamic_cast<RpmState*>(s); }
34
 
                YADE_CLASS_BASE_DOC_ATTRS_CTOR(RpmMat,FrictMat,"Rock material, for use with other Rpm classes.",
35
 
                        ((int,exampleNumber,0,,"Number of the specimen. This value is equal for all particles of one specimen. [-]"))
36
 
                        ((bool,initCohesive,false,,"The flag shows, whether particles of this material can be cohesive. [-]"))
37
 
                        ((Real,stressCompressMax,0,,"Maximal strength for compression. The main destruction parameter. [Pa] //(Needs to be reworked)"))
38
 
                        ((Real,stressStretchingMax,0,,"Maximal strength for stretching. [Pa]"))
39
 
                        ((Real,stressShearMax,0,,"Maximal strength for shearing. [Pa]"))
40
 
                        ((Real,G_over_E,1,,"Ratio of normal/shear stiffness at interaction level. [-]"))
41
 
                        ((Real,Zeta,0,,"Damping Ratio, http://en.wikipedia.org/wiki/Damping_ratio [-]")),
42
 
                        createIndex();
43
 
                        );
44
 
                
45
 
                REGISTER_CLASS_INDEX(RpmMat,FrictMat);
46
 
};
47
 
REGISTER_SERIALIZABLE(RpmMat);
48
 
 
49
 
 
50
 
class Ip2_RpmMat_RpmMat_RpmPhys: public IPhysFunctor{
51
 
        public:
52
 
                virtual void go(const shared_ptr<Material>& pp1, const shared_ptr<Material>& pp2, const shared_ptr<Interaction>& interaction);
53
 
                FUNCTOR2D(RpmMat,RpmMat);
54
 
                DECLARE_LOGGER;
55
 
        YADE_CLASS_BASE_DOC_ATTRS(Ip2_RpmMat_RpmMat_RpmPhys,IPhysFunctor,"Convert 2 RpmMat instances to RpmPhys with corresponding parameters.",);
56
 
};
57
 
REGISTER_SERIALIZABLE(Ip2_RpmMat_RpmMat_RpmPhys);
58
 
 
59
 
 
60
 
class RpmPhys: public NormShearPhys {
61
 
        private:
62
 
        public:
63
 
                Real Fn,  epsN, sigmaN, cn, cs;
64
 
                Vector3r epsT,  Fs, sigmaT;
65
 
                bool updatedCnFlag;
66
 
                 
67
 
                virtual ~RpmPhys();
68
 
 
69
 
                YADE_CLASS_BASE_DOC_ATTRS_CTOR(RpmPhys,NormShearPhys,"Representation of a single interaction of the Rpm type: storage for relevant parameters.\n\n Evolution of the contact is governed by Law2_Dem3DofGeom_RpmPhys_Rpm, that includes damage effects and chages of parameters inside RpmPhys",
70
 
                        ((Real,E,NaN,,"normal modulus (stiffness / crossSection) [Pa]"))
71
 
                        ((Real,crossSection,0,,"equivalent cross-section associated with this contact [m²]"))
72
 
                        ((Real,G,NaN,,"shear modulus [Pa]"))
73
 
                        ((Real,tanFrictionAngle,NaN,,"tangens of internal friction angle [-]"))
74
 
                        ((bool,isCohesive,false,,"if not cohesive, interaction is deleted when distance is greater than lengthMaxTension or less than lengthMaxCompression."))
75
 
                        ((Real,epsMaxCompression,0,,"Maximal relative penetration of particles during compression. If it is more, the interaction is deleted [m]"))
76
 
                        ((Real,epsMaxTension,0,,"Maximal relative distance between particles during tension. If it is more, the interaction is deleted [m]"))
77
 
                        ((Real,epsMaxShear,0,,"Maximal relative distance between particles in tangential direction. If it is more, the interaction is deleted [m]"))
78
 
                        ((Real,Kn,0,,"Stiffness in normal direction [N/m]"))
79
 
                        ((Real,Ks,0,,"Stiffness in shear direction [N/m]")),
80
 
                        /*ctor*/createIndex(); Fn=0; epsN=0; sigmaN=0; sigmaT = Vector3r::Zero(); epsT=Vector3r::Zero(); Fs=Vector3r::Zero(); cn=0; cs=0;
81
 
                );
82
 
        REGISTER_CLASS_INDEX(RpmPhys,NormShearPhys);
83
 
};
84
 
REGISTER_SERIALIZABLE(RpmPhys);
85
 
 
86
 
class Law2_Dem3DofGeom_RockPMPhys_Rpm: public LawFunctor{
87
 
        public:
88
 
                virtual void go(shared_ptr<IGeom>& _geom, shared_ptr<IPhys>& _phys, Interaction* I);
89
 
                FUNCTOR2D(Dem3DofGeom,RpmPhys);
90
 
                
91
 
        YADE_CLASS_BASE_DOC(Law2_Dem3DofGeom_RockPMPhys_Rpm,LawFunctor,"Constitutive law for the Rpm model");
92
 
        DECLARE_LOGGER; 
93
 
};
94
 
REGISTER_SERIALIZABLE(Law2_Dem3DofGeom_RockPMPhys_Rpm);
95
 
 
96