AGX Dynamics  2.37.2.0
TerrainPhysics.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/Terrain.h>
20 
21 namespace agxTerrain
22 {
27  {
28  public:
52  const agx::Vec3i& voxelIndex,
53  agx::Real stress,
54  agx::Real timeFactor,
55  agx::Real& newCompaction);
56 
83  const agx::Vec3i& voxelIndex,
84  agx::Real stress,
85  agx::Real timeFactor,
86  agx::Real& newCompaction);
87 
97  static agx::Real calculateStressFromUniformDiskLoad(agx::Real depth, agx::Real surfaceLoad, agx::Real diskRadius);
98 
107  static agx::Real calculateBoussinesqFrolichSubSoilStress(agx::Real depth, agx::Real surfaceForce, agx::Real concentrationFactor, const agx::Vec3& rk_vec);
108 
115  static agx::Real calculateCompressionMultiplier( agx::Real hardnessRate, agx::Real compaction );
116 
128  static agx::Real calculateCompactionTimeFactor(agx::Real contactTime, agx::Real tau_c);
129 
136  static agx::Real getAngleOfReposeMultiplier(Terrain* terrain, const agx::Vec3i& voxelIndex);
137 
144  static agx::Real getAngleOfReposeMultiplier(Terrain* terrain, const agx::Vec3i& voxelIndex, const agx::Real compaction);
145 
154  static agx::Real calculateReposeHeight(Terrain* terrain, const agx::Vec2i& receivingIndex, const agx::Vec2i& reposingIndex);
155 
156 
160  static agx::Vec2 calculateReposeHeights( Terrain* terrain,
161  const agx::Vec3i& receivingSurfaceVoxelIndex,
162  const agx::Vec3i& reposingSurfaceVoxelIndex,
163  const agx::Vec2& tanReposeAngles);
164 
165 
169  static agx::Vec2 calculateReposeHeights( Terrain* terrain,
170  const agx::Vec3i& receivingSurfaceVoxelIndex,
171  const agx::Vec3i& reposingSurfaceVoxelIndex,
172  const agx::Vec2& tanReposeAngles,
173  const agx::Real& receivingSurfaceCompaction,
174  const agx::Real& reposingSurfaceCompaction);
175 
183  static agx::Real calculateYoungsModulus_POW2(agx::Real originalYoungsModulus, agx::Real hardeningRate, agx::Real compaction);
184 
199  static agx::Real calculateYoungsModulus_CAM_CLAY(agx::Real originalYoungsModulus, agx::Real k_e, agx::Real n_e, agx::Real compaction);
200 
215 
222  static agx::Real calculatePreconsolidationStressLog10(Terrain* terrain, const agx::Vec3i& voxelIndex);
223 
230  static agx::Real calculatePreconsolidationStressVoidRatio(Terrain* terrain, const agx::Vec3i& voxelIndex);
231 
242  static agx::Real calculateDilatancyAngleVoxel( const Terrain* terrain, const agx::Vec3i& voxelIndex );
243 
256  static agx::Real calculateDilatancyAngle(agx::Real dilatancyAngleScalingFactor, agx::Real dilatancyAngle, agx::Real compaction);
257 
268  static agx::Real calculateEffectiveFrictionAngleVoxel( const Terrain* terrain, const agx::Vec3i& voxelIndex );
269 
279  static agx::Real calculateEffectiveReposeAngle(const TerrainMaterial* terrainMaterial);
280 
291  static agx::Real calculateEffectiveFrictionAngleTerrainIndex( const Terrain* terrain, const agx::Vec2i& terrainIndex );
292 
306  static agx::Real calculateEffectiveFrictionAngle( agx::Real nominalFrictionAngle,
307  agx::Real dilatancyAngleScalingFactor,
308  agx::Real nominalDilatancyAngle,
309  agx::Real compaction);
310 
321  static agx::Real estimateCriticalCompaction(agx::Real dilatancyAngleScalingFactor, agx::Real dilatancyAngle);
322  };
323 }
static agx::Real calculateReposeHeight(Terrain *terrain, const agx::Vec2i &receivingIndex, const agx::Vec2i &reposingIndex)
Calculate the local repose height, i.e the height difference where above that avalanching will begin...
static bool calculateNewCompactionFromStressLog10(Terrain *terrain, const agx::Vec3i &voxelIndex, agx::Real stress, agx::Real timeFactor, agx::Real &newCompaction)
Estimate new compaction in a voxel from an applied stress using the density log10 method...
static agx::Real calculateEffectiveReposeAngle(const TerrainMaterial *terrainMaterial)
Calculate the effective repose angle of a specific terrain, unmodified by compaction.
static agx::Real calculateEffectiveFrictionAngleVoxel(const Terrain *terrain, const agx::Vec3i &voxelIndex)
Calculate the effective friction angle of a voxel in a specific terrain.
static agx::Real calculatePreconsolidationStressLog10(Terrain *terrain, const agx::Vec3i &voxelIndex)
Calculate the pre-consolidation stress of the material in a voxel with specified index using the void...
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
static agx::Real getAngleOfReposeMultiplier(Terrain *terrain, const agx::Vec3i &voxelIndex)
Calculate the multiplier which is used to modify the local angle of repose of the material given the ...
static agx::Real calculateDilatancyAngle(agx::Real dilatancyAngleScalingFactor, agx::Real dilatancyAngle, agx::Real compaction)
Calculate the dilatancy angle for a TerrainMaterial given a specific compaction.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes...
Definition: Geometry.h:59
static agx::Vec2 calculateReposeHeights(Terrain *terrain, const agx::Vec3i &receivingSurfaceVoxelIndex, const agx::Vec3i &reposingSurfaceVoxelIndex, const agx::Vec2 &tanReposeAngles)
Performs the same calculations as calculateReposeHeight and also computes the height difference for t...
static agx::Real calculateBoussinesqFrolichSubSoilStress(agx::Real depth, agx::Real surfaceForce, agx::Real concentrationFactor, const agx::Vec3 &rk_vec)
Calculate stress at a given depth and distance from a surface point force using the Boussinesq-Frolic...
static agx::Real calculateDilatancyAngleVoxel(const Terrain *terrain, const agx::Vec3i &voxelIndex)
Calculate the local dilatancy angle in a specified voxel in the terrain.
static agx::Real calculateYoungsModulus_CAM_CLAY(agx::Real originalYoungsModulus, agx::Real k_e, agx::Real n_e, agx::Real compaction)
Calculate a new Young&#39;s modulus using the Cam-Clay model from critical-state theories.
static agx::Real calculateEffectiveFrictionAngle(agx::Real nominalFrictionAngle, agx::Real dilatancyAngleScalingFactor, agx::Real nominalDilatancyAngle, agx::Real compaction)
Calculate the effective friction angle of a TerrainMaterial given a specified compaction.
static agx::Real calculateYoungsModulus_POW2(agx::Real originalYoungsModulus, agx::Real hardeningRate, agx::Real compaction)
Calculate a new Young&#39;s modulus given a hardening rate and compaction.
This class is used to describe the general material properties of the Terrain.
static agx::Real calculateHardnessMultiplier_CAM_CLAY(agx::Real k_e, agx::Real n_e, agx::Real compaction)
Calculate the hardness multiplier for the the Cam-Clay model from critical-state theories.
static agx::Real calculateStressFromUniformDiskLoad(agx::Real depth, agx::Real surfaceLoad, agx::Real diskRadius)
Calculate stress at a given depth directly under the middle axis of a uniform disk, given in "An Introduction to Soil Mechanics pg. 219." This is the Boussinesq method integrated over a uniform disk.
Utility class where most of the physics calculation used in agxTerrain is gathered.
static bool calculateNewCompactionFromStressVoidRatio(Terrain *terrain, const agx::Vec3i &voxelIndex, agx::Real stress, agx::Real timeFactor, agx::Real &newCompaction)
Estimate new compaction in a voxel from an applied stress using the void ratio method.
static agx::Real calculateCompressionMultiplier(agx::Real hardnessRate, agx::Real compaction)
Calculate the compression multiplier which is used to modify the Young&#39;s Modulus of terrain contacts ...
static agx::Real calculatePreconsolidationStressVoidRatio(Terrain *terrain, const agx::Vec3i &voxelIndex)
Calculate the pre-consolidation stress of the material in a voxel with specified index using the void...
static agx::Real calculateEffectiveFrictionAngleTerrainIndex(const Terrain *terrain, const agx::Vec2i &terrainIndex)
Calculate the effective friction angle at the surface of a specific terrain with a given terrain inde...
double Real
Definition: Real.h:42
static agx::Real calculateCompactionTimeFactor(agx::Real contactTime, agx::Real tau_c)
Calculate the compaction time factor used to relax the compaction rate of the material.
static agx::Real estimateCriticalCompaction(agx::Real dilatancyAngleScalingFactor, agx::Real dilatancyAngle)
Estimate the critical compaction of a TerrainMaterial which is used in calculating the local dilatanc...