~yade-dev/yade/0.80

« back to all changes in this revision

Viewing changes to pkg/dem/CapillaryTriaxialTest.hpp

  • Committer: Anton Gladky
  • Date: 2012-05-02 21:50:42 UTC
  • Revision ID: gladky.anton@gmail.com-20120502215042-v1fa9r65usqe7kfk
0.80.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*************************************************************************
 
2
*  Copyright (C) 2006 by Bruno Chareyre                                  *
 
3
*  bruno.chareyre@hmg.inpg.fr                                            *
 
4
*  Copyright (C) 2006 by luc Scholtes                                    *
 
5
*  luc.scholtes@hmg.inpg.fr                                              *
 
6
*                                                                        *
 
7
*  This program is free software; it is licensed under the terms of the  *
 
8
*  GNU General Public License v2 or later. See file LICENSE for details. *
 
9
*************************************************************************/
 
10
 
 
11
#pragma once
 
12
 
 
13
#include<yade/core/FileGenerator.hpp>
 
14
#include<yade/lib/base/Math.hpp>
 
15
 
 
16
class ForceRecorder;
 
17
class AveragePositionRecorder;
 
18
class VelocityRecorder;
 
19
class TriaxialStressController;
 
20
class TriaxialCompressionEngine;
 
21
class TriaxialStateRecorder;
 
22
class CapillaryStressRecorder;
 
23
class GlobalStiffnessTimeStepper;
 
24
 
 
25
/*! \brief Triaxial test on unsaturated sphere packings
 
26
 
 
27
        This preprocessor is a variant of TriaxialTest, including the model of capillary forces developed as part of the PhD of Luc Scholtès. See the documentation of Law2_ScGeom_CapillaryPhys_Capillarity or the main page https://yade-dem.org/wiki/CapillaryTriaxialTest, for more details.
 
28
        Results obtained with this preprocessor were reported for instance in "Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75."
 
29
        
 
30
 */
 
31
 
 
32
class CapillaryTriaxialTest : public FileGenerator
 
33
{
 
34
        private :
 
35
                Vector3r         gravity;
 
36
                Vector3r         spheresColor;
 
37
                bool             wall_top
 
38
                                ,wall_bottom
 
39
                                ,wall_1
 
40
                                ,wall_2
 
41
                                ,wall_3
 
42
                                ,wall_4
 
43
                                ,wall_top_wire
 
44
                                ,wall_bottom_wire
 
45
                                ,wall_1_wire
 
46
                                ,wall_2_wire
 
47
                                ,wall_3_wire
 
48
                                ,wall_4_wire
 
49
                                ,spheresRandomColor;
 
50
        
 
51
                shared_ptr<TriaxialCompressionEngine> triaxialcompressionEngine;
 
52
                shared_ptr<TriaxialStressController> triaxialstressController;
 
53
                shared_ptr<TriaxialStateRecorder> triaxialStateRecorder;
 
54
                shared_ptr<CapillaryStressRecorder> capillaryStressRecorder;
 
55
                shared_ptr<GlobalStiffnessTimeStepper> globalStiffnessTimeStepper;
 
56
                        
 
57
                void createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents,bool wire);
 
58
                void createSphere(shared_ptr<Body>& body, Vector3r position, Real radius,bool big,bool dynamic);
 
59
                void createActors(shared_ptr<Scene>& scene);
 
60
                void positionRootBody(shared_ptr<Scene>& scene);
 
61
                typedef pair<Vector3r, Real> BasicSphere;       
 
62
        public : 
 
63
                ~CapillaryTriaxialTest ();
 
64
                bool generate(std::string& message);
 
65
                
 
66
                YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(
 
67
                CapillaryTriaxialTest,FileGenerator,"This preprocessor is a variant of TriaxialTest, including the model of capillary forces developed as part of the PhD of Luc Scholtès. See the documentation of Law2_ScGeom_CapillaryPhys_Capillarity or the main page https://yade-dem.org/wiki/CapillaryTriaxialTest, for more details.\n\n Results obtained with this preprocessor were reported for instance in 'Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75.'"
 
68
                ,
 
69
                ((Vector3r,lowerCorner,Vector3r(0,0,0),,"Lower corner of the box."))
 
70
                ((Vector3r,upperCorner,Vector3r(1,1,1),,"Upper corner of the box."))
 
71
                ((string,importFilename,"",,"File with positions and sizes of spheres."))
 
72
                ((string,Key,"",,"A code that is added to output filenames."))
 
73
                ((string,fixedBoxDims,"",,"string that contains some subset (max. 2) of {'x','y','z'} ; contains axes will have box dimension hardcoded, even if box is scaled as mean_radius is prescribed: scaling will be applied on the rest."))
 
74
                ((Real,CapillaryPressure,0,,"Define succion in the packing [Pa]. This is the value used in the capillary model."))
 
75
                ((bool,water,true,,"activate capillary model"))
 
76
                ((bool,fusionDetection,false,,"test overlaps between liquid bridges on modify forces if overlaps exist"))
 
77
                ((bool,binaryFusion,true,,"Defines how overlapping bridges affect the capillary forces (see :yref:`CapillaryTriaxialTest::fusionDetection`). If binary=true, the force is null as soon as there is an overlap detected, if not, the force is divided by the number of overlaps."))
 
78
                ((string,WallStressRecordFile,"./WallStressesWater"+Key,,""))
 
79
                ((string,capillaryStressRecordFile,"./capStresses"+Key,,""))
 
80
                ((string,contactStressRecordFile,"./contStresses"+Key,,""))
 
81
                ((bool,internalCompaction,false,,"flag for choosing between moving boundaries or increasing particles sizes during the compaction stage."))
 
82
                ((bool,biaxial2dTest,false,,"FIXME : what is that?"))
 
83
                ((bool,fixedPoroCompaction,false,,"flag to choose an isotropic compaction until a fixed porosity choosing a same translation speed for the six walls"))
 
84
                ((bool,autoCompressionActivation,true,,"Do we just want to generate a stable packing under isotropic pressure (false) or do we want the triaxial loading to start automatically right after compaction stage (true)?"))
 
85
                ((bool,autoUnload,true,,"auto adjust the isotropic stress state from :yref:`TriaxialTest::sigmaIsoCompaction` to :yref:`TriaxialTest::sigmaLateralConfinement` if they have different values. See docs for :yref:`TriaxialCompressionEngine::autoUnload`"))
 
86
                ((bool,autoStopSimulation,false,,"freeze the simulation when conditions are reached (don't activate this if you want to be able to run/stop from Qt GUI)"))
 
87
                ((bool,noFiles,false,,"Do not create any files during run (.xml, .spheres, wall stress records)"))
 
88
                ((bool,facetWalls,false,,"Use facets for boundaries (not tested)"))
 
89
                ((bool,wallWalls,false,,"Use walls for boundaries (not tested)"))
 
90
                ((bool,boxWalls,true,,"Use boxes for boundaries (recommended)."))               
 
91
                ((Real,fixedPorosity,1,,"FIXME : what is that?"))
 
92
                ((Real,thickness,0.001,,"thickness of boundaries. It is arbitrary and should have no effect"))
 
93
                ((Real,maxMultiplier,1.01,,"max multiplier of diameters during internal compaction (initial fast increase)"))
 
94
                ((Real,finalMaxMultiplier,1.001,,"max multiplier of diameters during internal compaction (secondary precise adjustment)"))
 
95
                ((Real,Rdispersion,0.3,,"Normalized standard deviation of generated sizes."))
 
96
                ((Real,radiusMean,-1,,"Mean radius. If negative (default), autocomputed to as a function of box size and :yref:`TriaxialTest::numberOfGrains`"))
 
97
                ((Real,sphereYoungModulus,15000000.0,,"Stiffness of spheres."))
 
98
                ((Real,sphereKsDivKn,0.5,,"Ratio of shear vs. normal contact stiffness for spheres."))
 
99
                ((Real,sphereFrictionDeg,18.0,,"Friction angle [°] of spheres assigned just before triaxial testing."))
 
100
                ((Real,compactionFrictionDeg,sphereFrictionDeg,,"Friction angle [°] of spheres during compaction (different values result in different porosities)]. This value is overridden by :yref:`TriaxialTest::sphereFrictionDeg` before triaxial testing."))
 
101
                ((Real,boxYoungModulus,15000000.0,,"Stiffness of boxes."))
 
102
                ((Real,maxWallVelocity,10,,"max velocity of boundaries. Usually useless, but can help stabilizing the system in some cases."))
 
103
                ((Real,boxKsDivKn,0.5,,"Ratio of shear vs. normal contact stiffness for boxes."))
 
104
                ((Real,boxFrictionDeg,0.0,,"Friction angle [°] of boundaries contacts."))
 
105
                ((Real,density,2600,,"density of spheres"))
 
106
                ((Real,strainRate,1,,"Strain rate in triaxial loading."))
 
107
                ((Real,defaultDt,0.0001,,"Max time-step. Used as initial value if defined. Latter adjusted by the time stepper."))
 
108
                ((Real,dampingForce,0.2,,"Coefficient of Cundal-Non-Viscous damping (applied on on the 3 components of forces)"))
 
109
                ((Real,dampingMomentum,0.2,,"Coefficient of Cundal-Non-Viscous damping (applied on on the 3 components of torques)"))
 
110
                ((Real,StabilityCriterion,0.01,,"Value of unbalanced force for which the system is considered stable. Used in conditionals to switch between loading stages."))
 
111
                ((Real,wallOversizeFactor,1.3,,"Make boundaries larger than the packing to make sure spheres don't go out during deformation."))
 
112
                ((Real,sigmaIsoCompaction,50000,,"Confining stress during isotropic compaction."))
 
113
                ((Real,sigmaLateralConfinement,50000,,"Lateral stress during triaxial loading. An isotropic unloading is performed if the value is not equal to :yref:`CapillaryTriaxialTest::SigmaIsoCompaction`."))
 
114
                
 
115
                ((int,timeStepUpdateInterval,50,,"interval for :yref:`GlobalStiffnessTimeStepper`"))
 
116
                ((int,timeStepOutputInterval,50,,"interval for outputing general information on the simulation (stress,unbalanced force,...)"))
 
117
                ((int,wallStiffnessUpdateInterval,10,,"interval for updating the stiffness of sample/boundaries contacts"))
 
118
                ((int,radiusControlInterval,10,,"interval between size changes when growing spheres."))
 
119
                ((int,numberOfGrains,400,,"Number of generated spheres."))
 
120
                ((int,recordIntervalIter,20,,"interval between file outputs"))
 
121
                ,
 
122
                /* init */
 
123
                ,
 
124
                /* constructor */
 
125
                wall_top                = true;
 
126
                wall_bottom             = true;
 
127
                wall_1                  = true;
 
128
                wall_2                  = true;
 
129
                wall_3                  = true;
 
130
                wall_4                  = true;
 
131
                wall_top_wire           = true;
 
132
                wall_bottom_wire        = true;
 
133
                wall_1_wire             = true;
 
134
                wall_2_wire             = true;
 
135
                wall_3_wire             = true;
 
136
                wall_4_wire             = true;
 
137
                spheresColor            = Vector3r(0.8,0.3,0.3);
 
138
                spheresRandomColor      = false;
 
139
                WallStressRecordFile = "./WallStresses"+Key;    
 
140
                gravity                 = Vector3r(0,-9.81,0);
 
141
                ,
 
142
                //.def("setContactProperties",&TriaxialCompressionEngine::setContactProperties,"Assign a new friction angle (degrees) to dynamic bodies and relative interactions")
 
143
                 );
 
144
//      DECLARE_LOGGER;
 
145
};
 
146
REGISTER_SERIALIZABLE(CapillaryTriaxialTest);
 
147
 
 
148