AGX Dynamics  2.37.3.2
SoilPenetrationResistance.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 
65  PenetrationModel getPenetrationModel();
66 
67  void setPenetrationModel(PenetrationModel model);
68 
69  agx::Prismatic* getPenetrationPrismatic();
70 
71  void setupPenetrationResistance(TerrainToolCollection* collection);
72 
73  bool isActive();
74 
75  void onEnableChange( bool enable );
76 
84  void setActive(bool enable);
85 
86  protected:
87  virtual ~SoilPenetrationResistance();
88 
89  private:
90 
91  agx::Real calculateToothPressureElasticPlasticLimit(agx::Real cohesion,
92  agx::Real poissionRatio,
93  agx::Real frictionAngle,
94  agx::Real E,
95  agx::Real p0,
96  agx::Real a,
97  agx::Real a0);
98 
99  agx::Real calculateToothPressurePlastic(agx::Real cohesion,
100  agx::Real poissionRatio,
101  agx::Real frictionAngle,
102  agx::Real E,
103  agx::Real p0,
104  agx::Real dilatancyAngle,
105  agx::Real a,
106  agx::Real a0);
107 
108  void calculateToothRadiusAndDepth(TerrainToolCollection* collection, agx::Real& a, agx::Real& h);
109 
110  agx::Real calculateSeparatingPlateArea(TerrainToolCollection* collection, agx::Vec3Vector& contactPositions);
111 
112  agx::Real calculateSeparatingPlateMassParticles(TerrainToolCollection* collection);
113 
114  void getPressureAndYoungsModulusAtTeeth( TerrainToolCollection* collection,
115  agx::UInt nTeeth,
116  agx::Real& p0,
117  agx::Real& E,
118  agx::Real& compaction,
119  agx::Real& meanDilatancyAngle,
120  agx::Real& meanDepth,
121  agx::Real swell );
122 
123  agx::Vec3iVector voxelIndicesAlongEdge(TerrainToolCollection* collection, agx::Line edge);
124 
125  agx::Real calculateSeparatingPlateForce(TerrainToolCollection* collection);
126 
127  agx::Real calculateToothForce(TerrainToolCollection* collection);
128 
129  void calculatePowerSeriesCoefficients(const agx::Real gamma,
130  const agx::Real xi,
131  const agx::UInt n,
132  agx::RealVector& coefficients);
133 
134  agx::Real calculatePowerSeries(const agx::Real x,
135  const agx::Real gamma,
136  const agx::UInt n,
137  const agx::RealVector& coefficients);
138 
139  agx::Real calculatePressureLimit(const agx::Real m,
140  const agx::Real beta,
141  const agx::Real gamma,
142  const agx::Real delta,
143  const agx::Real eta,
144  const agx::UInt n,
145  const agx::RealVector& coefficients);
146 
147  agx::Real calculatePressureRatio(const agx::Real R_limit,
148  const agx::Real a,
149  const agx::Real a0,
150  const agx::Real m,
151  const agx::Real beta,
152  const agx::Real gamma,
153  const agx::Real delta,
154  const agx::Real eta,
155  const agx::UInt n,
156  const agx::RealVector& coefficients);
157 
158  private:
159  agx::PrismaticRef m_penetrationPrismatic;
160  PenetrationModel m_model;
161  };
162 }
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes...
Definition: Geometry.h:59
Collection of terrain tool (currently Shovel) related objects which are terrain instance specific...
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Base class providing referencing counted objects.
Definition: Referenced.h:119
uint32_t UInt
Definition: Integer.h:34
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
#define AGXTERRAIN_EXPORT
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
Definition: Prismatic.h:67
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
double Real
Definition: Real.h:42