AGX Dynamics  2.35.0.1
SoilPenetrationResistance.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agxTerrain/export.h>
20 #include <agx/agx_vector_types.h>
21 #include <agx/Prismatic.h>
22 #include <agx/Line.h>
23 
24 namespace agxTerrain
25 {
26  class Shovel;
27  class TerrainToolCollection;
28  class TerrainMaterial;
29 
32  {
33  public:
34 
35  enum class PenetrationModel
36  {
37  NO_MODEL,
38  ELASTIC_PLASTIC_LIMIT,
39  PLASTIC
40  };
41 
43 
49  void addNotification(agxSDK::Simulation* simulation, Shovel* shovel);
50 
56  void removeNotification(agxSDK::Simulation* simulation, Shovel* shovel);
57 
63  void onPre(TerrainToolCollection* collection);
64 
66 
68 
70 
72 
73  bool isActive();
74 
75  void onEnableChange( bool enable );
76 
84  void setActive(bool enable);
85 
86  protected:
88 
89  private:
90 
91  agx::Real calculateToothPressureNoModel(TerrainMaterial* material,
92  agx::Real E,
93  agx::Real p0,
94  agx::Real a,
95  agx::Real a0);
96 
97  agx::Real calculateToothPressureElasticPlasticLimit(TerrainMaterial* material,
98  agx::Real E,
99  agx::Real p0,
100  agx::Real a,
101  agx::Real a0);
102 
103  agx::Real calculateToothPressurePlastic(TerrainMaterial* material,
104  agx::Real E,
105  agx::Real p0,
106  agx::Real dilatancyAngle,
107  agx::Real a,
108  agx::Real a0);
109 
110  void calculateToothRadiusAndDepth(TerrainToolCollection* collection, agx::Real& a, agx::Real& h);
111 
112  agx::Real calculateSeparatingPlateArea(TerrainToolCollection* collection);
113 
114  agx::Real calculateSeparatingPlateMassParticles(TerrainToolCollection* collection);
115 
116  void getPressureAndYoungsModulusAtTeeth( TerrainToolCollection* collection,
117  agx::UInt nTeeth,
118  agx::Real& p0,
119  agx::Real& E,
120  agx::Real& compaction,
121  agx::Real& meanDilatancyAngle,
122  agx::Real& meanDepth );
123 
124  agx::Real calculateSeparatingPlateForce(TerrainToolCollection* collection);
125 
126  agx::Real calculateToothForce(TerrainToolCollection* collection);
127 
128  void calculatePowerSeriesCoefficients(const agx::Real gamma,
129  const agx::Real xi,
130  const agx::UInt n,
131  agx::RealVector& coefficients);
132 
133  agx::Real calculatePowerSeries(const agx::Real x,
134  const agx::Real gamma,
135  const agx::UInt n,
136  const agx::RealVector& coefficients);
137 
138  agx::Real calculatePressureLimit(const agx::Real m,
139  const agx::Real beta,
140  const agx::Real gamma,
141  const agx::Real delta,
142  const agx::Real eta,
143  const agx::UInt n,
144  const agx::RealVector& coefficients);
145 
146  agx::Real calculatePressureRatio(const agx::Real R_limit,
147  const agx::Real a,
148  const agx::Real a0,
149  const agx::Real m,
150  const agx::Real beta,
151  const agx::Real gamma,
152  const agx::Real delta,
153  const agx::Real eta,
154  const agx::UInt n,
155  const agx::RealVector& coefficients);
156 
157  private:
158  agx::PrismaticRef m_penetrationPrismatic;
159  PenetrationModel m_model;
160  };
161 }
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXTERRAIN_EXPORT
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
void addNotification(agxSDK::Simulation *simulation, Shovel *shovel)
void setPenetrationModel(PenetrationModel model)
void onPre(TerrainToolCollection *collection)
void setupPenetrationResistance(TerrainToolCollection *collection)
void removeNotification(agxSDK::Simulation *simulation, Shovel *shovel)
agx::Prismatic * getPenetrationPrismatic()
This class is used to describe the general material properties of the Terrain.
Collection of terrain tool (currently Shovel) related objects which are terrain instance specific.
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
Definition: Prismatic.h:68
Base class providing referencing counted objects.
Definition: Referenced.h:114
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
Definition: Geometry.h:60
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42