AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxTerrain::TerrainPhysics Class Reference

Utility class where most of the physics calculation used in agxTerrain is gathered. More...

#include <TerrainPhysics.h>

Static Public Member Functions

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-Frolich method.
 
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 calculateCompressionMultiplier (agx::Real hardnessRate, agx::Real compaction)
 Calculate the compression multiplier which is used to modify the Young's Modulus of terrain contacts given the soil compaction at the contact location.
 
static agx::Real calculateDilatancyAngle (agx::Real dilatancyAngleScalingFactor, agx::Real dilatancyAngle, agx::Real compaction)
 Calculate the dilatancy angle for a TerrainMaterial given a specific compaction.
 
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 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 calculateEffectiveFrictionAngleTerrainIndex (const Terrain *terrain, const agx::Vec2i &terrainIndex)
 Calculate the effective friction angle at the surface of a specific terrain with a given terrain index.
 
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 calculateEffectiveReposeAngle (const TerrainMaterial *terrainMaterial)
 Calculate the effective repose angle of a specific terrain, unmodified by compaction.
 
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 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 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 calculatePreconsolidationStressLog10 (Terrain *terrain, const agx::Vec3i &voxelIndex)
 Calculate the pre-consolidation stress of the material in a voxel with specified index using the void ratio method.
 
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 ratio method.
 
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, between two terrain indices, which is determined by the material angle of repose and the local compaction.
 
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 the reverse flow.
 
static agx::Vec2 calculateReposeHeights (Terrain *terrain, const agx::Vec3i &receivingSurfaceVoxelIndex, const agx::Vec3i &reposingSurfaceVoxelIndex, const agx::Vec2 &tanReposeAngles, const agx::Real &receivingSurfaceCompaction, const agx::Real &reposingSurfaceCompaction)
 Performs the same calculations as calculateReposeHeight and also computes the height difference for the reverse flow.
 
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.
 
static agx::Real calculateTanReposeAngle (Terrain *terrain, const agx::Vec2i &reposingIndex)
 
static agx::Real calculateYoungsModulus_CAM_CLAY (agx::Real originalYoungsModulus, agx::Real k_e, agx::Real n_e, agx::Real compaction)
 Calculate a new Young's modulus using the Cam-Clay model from critical-state theories.
 
static agx::Real calculateYoungsModulus_POW2 (agx::Real originalYoungsModulus, agx::Real hardeningRate, agx::Real compaction)
 Calculate a new Young's modulus given a hardening rate and compaction.
 
static agx::Real estimateCriticalCompaction (agx::Real dilatancyAngleScalingFactor, agx::Real dilatancyAngle)
 Estimate the critical compaction of a TerrainMaterial which is used in calculating the local dilatancy angle in the terrain from varying compaction.
 
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 compaction in a voxel.
 
static agx::Real getAngleOfReposeMultiplier (Terrain *terrain, const agx::Vec3i &voxelIndex, const agx::Real compaction)
 Calculate the multiplier which is used to modify the local angle of repose of the material given the compaction in a voxel.
 

Detailed Description

Utility class where most of the physics calculation used in agxTerrain is gathered.

Definition at line 26 of file TerrainPhysics.h.

Member Function Documentation

◆ calculateBoussinesqFrolichSubSoilStress()

static agx::Real agxTerrain::TerrainPhysics::calculateBoussinesqFrolichSubSoilStress ( agx::Real  depth,
agx::Real  surfaceForce,
agx::Real  concentrationFactor,
const agx::Vec3 &  rk_vec 
)
static

Calculate stress at a given depth and distance from a surface point force using the Boussinesq-Frolich method.

Parameters
depth- The specified depth at which to calculate the stress.
surfaceForce- The applied point force (N) at the surface.
concentrationFactor- The Frolich concentration factor which determines the elasticity of the soil. Default value is 3, which is perfectly elastic.
rk_vec- The distance vector from the point force to the location in at which to calculate the stress.
Returns
The stress (Pa) at the specified depth given by the Boussinesq.

◆ calculateCompactionTimeFactor()

static agx::Real agxTerrain::TerrainPhysics::calculateCompactionTimeFactor ( agx::Real  contactTime,
agx::Real  tau_c 
)
static

Calculate the compaction time factor used to relax the compaction rate of the material.

The relaxation of the compaction rate follows the following formula:

new_compaction = old_compaction + delta_compaction * time_factor time_factor = 1.0 - exp(-contactTime / tau_c)

The longer a contact has been active, the faster the compaction rate will increase until it reaches the maximum change in compaction given by the applied stress.

Parameters
contactTime- The specified contact time.
tau_c- The relaxation time constant.
Returns
The time factor used to modify the compaction rate.

◆ calculateCompressionMultiplier()

static agx::Real agxTerrain::TerrainPhysics::calculateCompressionMultiplier ( agx::Real  hardnessRate,
agx::Real  compaction 
)
static

Calculate the compression multiplier which is used to modify the Young's Modulus of terrain contacts given the soil compaction at the contact location.

Parameters
hardnessRate- The specified hardness rate of the material, i.e how fast it gets stiffer with compaction.
compaction- The specified compaction of the soil.
Returns
The compression multiplier used to modify the stiffness of the material.

◆ calculateDilatancyAngle()

static agx::Real agxTerrain::TerrainPhysics::calculateDilatancyAngle ( agx::Real  dilatancyAngleScalingFactor,
agx::Real  dilatancyAngle,
agx::Real  compaction 
)
static

Calculate the dilatancy angle for a TerrainMaterial given a specific compaction.

The dilatancy angle is a function of the local compaction, the critical compaction and the nominal dilatancy angle:

local_dilatancy_angle = dilatancyAngleScalingFactor * ( local_compaction - critical_compaction )

Parameters
dilatancyAngleScalingFactor- Scaling factor of the dilatancy angle due to compaction
dilatancyAngle- Nominal dilatancy angle
compaction- The specified compaction that is used to calculate the dilatancy angle
Returns
The dilatancy angle of the TerrainMaterial given a specific compaction.

◆ calculateDilatancyAngleVoxel()

static agx::Real agxTerrain::TerrainPhysics::calculateDilatancyAngleVoxel ( const Terrain *  terrain,
const agx::Vec3i &  voxelIndex 
)
static

Calculate the local dilatancy angle in a specified voxel in the terrain.

The dilatancy angle is a function of the local compaction, the critical compaction and the nominal dilatancy angle:

local_dilatancy_angle = dilatancyAngleScalingFactor * ( local_compaction - critical_compaction )

Parameters
terrain- The terrain object
voxelIndex- The specified voxel index
Returns
The local dilatancy angle in the Terrain at specified voxel.

◆ calculateEffectiveFrictionAngle()

static agx::Real agxTerrain::TerrainPhysics::calculateEffectiveFrictionAngle ( agx::Real  nominalFrictionAngle,
agx::Real  dilatancyAngleScalingFactor,
agx::Real  nominalDilatancyAngle,
agx::Real  compaction 
)
static

Calculate the effective friction angle of a TerrainMaterial given a specified compaction.

The effective friction angle can be expressed as:

eff_friction_angle = base_friction_angle + voxel_dilatancy_angle

Parameters
nominalFrictionAngle- The friction angle in the bulk nominal state
dilatancyAngleScalingFactor- The scaling factor of the dilatancy angle and critical compaction
nominalDilatancyAngle- The dilatancy angle in the bulk nominal state
compaction- The specified compaction that is used to calculate the effective friction angle
Returns
The effective friction angle scaled by compaction, scaling factor and dilatancy angle

◆ calculateEffectiveFrictionAngleTerrainIndex()

static agx::Real agxTerrain::TerrainPhysics::calculateEffectiveFrictionAngleTerrainIndex ( const Terrain *  terrain,
const agx::Vec2i &  terrainIndex 
)
static

Calculate the effective friction angle at the surface of a specific terrain with a given terrain index.

The effective friction angle is expressed as:

eff_friction_angle = base_friction_angle + voxel_dilatancy_angle

Parameters
terrain- The TerrainMaterial object
terrainIndex- The specified terrain index where the effective friction angle of the terrain will be calculated.
Returns
The effective friction angle of a specified terrain at a given terrain index.

◆ calculateEffectiveFrictionAngleVoxel()

static agx::Real agxTerrain::TerrainPhysics::calculateEffectiveFrictionAngleVoxel ( const Terrain *  terrain,
const agx::Vec3i &  voxelIndex 
)
static

Calculate the effective friction angle of a voxel in a specific terrain.

The effective friction angle is expressed as:

eff_friction_angle = base_friction_angle + voxel_dilatancy_angle

Parameters
terrain- The TerrainMaterial object
voxelIndex- The specified voxel index where the effective friction angle of the terrain will be calculated.
Returns
The effective friction angle of a specified voxel index in the specified terrain.

◆ calculateEffectiveReposeAngle()

static agx::Real agxTerrain::TerrainPhysics::calculateEffectiveReposeAngle ( const TerrainMaterial *  terrainMaterial)
static

Calculate the effective repose angle of a specific terrain, unmodified by compaction.

The repose angle is expressed as:

effective_repose_angle = internal_friction_angle + delta_repose_angle

Parameters
terrainMaterial- The TerrainMaterial object
Returns
The effective repose angle of the terrain.

◆ calculateHardnessMultiplier_CAM_CLAY()

static agx::Real agxTerrain::TerrainPhysics::calculateHardnessMultiplier_CAM_CLAY ( agx::Real  k_e,
agx::Real  n_e,
agx::Real  compaction 
)
static

Calculate the hardness multiplier for the the Cam-Clay model from critical-state theories.

This is the following expression:

h = ( 1.0 + sign( compaction - 1.0 ) * k_e * ( abs( compaction - 1.0 ) ^ n_e ) )

where 'compaction' is the local compaction of the material, 'k_e' is and 'n_e' are hardening parameters that for a constant packing ratio has values 1.0 and 0.5 respectively.

Parameters
k_e- One of the hardening parameters of the model
n_e- One of the hardening parameters of the model
compaction- The local compaction of the material.
Returns
The hardness multiplier for the CAM-Clay model.

◆ calculateNewCompactionFromStressLog10()

static bool agxTerrain::TerrainPhysics::calculateNewCompactionFromStressLog10 ( Terrain *  terrain,
const agx::Vec3i &  voxelIndex,
agx::Real  stress,
agx::Real  timeFactor,
agx::Real &  newCompaction 
)
static

Estimate new compaction in a voxel from an applied stress using the density log10 method.

Compaction occurs only if the applied stress is bigger than the pre-consolidation stress in the element. The compaction curve follows the following expression:

delta_rho = (C * log10( stress / preconsolidationStress )) * timeFactor new_rho = old_rho + delta_rho

where 'stress' is the applied stress in the voxel, 'preconsolidationStress' is the pre-consolidation stress of the material in nominal compaction given by the User in BulkMaterial, 'C' is the compression index of the material, 'old_rho' the density of the material given nominal compaction of the material, 'delta_rho' is the change in density, timeFactor is a factor the relaxes the rate change in density/compaction over time given a relaxation constant (See 'calculateCompactionTimeFactor') and 'new_rho' is the new density.

The new compaction of the material is given by the ratio between the new and the old density:

new_compaction = new_rho/old_rho

Parameters
terrain- The Terrain that will be processed
voxelIndex- The specified index to check for compression
stress- The applied stress (Pa) in the voxel.
timeFactor-The time factor (0.0-1.0) which modifies the calculated change in compaction from the applied stress. Used for compaction rate relaxation.
newCompaction- The new compaction of the voxel, or the old one if no compaction occurred.
Returns
True if compaction occurred in the voxel, false otherwise.

◆ calculateNewCompactionFromStressVoidRatio()

static bool agxTerrain::TerrainPhysics::calculateNewCompactionFromStressVoidRatio ( Terrain *  terrain,
const agx::Vec3i &  voxelIndex,
agx::Real  stress,
agx::Real  timeFactor,
agx::Real &  newCompaction 
)
static

Estimate new compaction in a voxel from an applied stress using the void ratio method.

Compaction occurs only if the applied stress is bigger than the pre-consolidation stress in the element. The compaction curve follows the following expression:

rho_new = rho_old * ( 1.0 / ( 1.0 - phi0 * C * ln( stress / preconsolidationStress ) ) ) * timeFactor

where 'C' is the compression index, 'rho_new' is the new density of the material, 'rho_old' is the old density before compaction, 'preconsolidationStress' is stress used to initialize the soil in the bank sate, 'stress' is the applied compaction stress, timeFactor is a factor the relaxes the rate change in density/compaction over time given a relaxation constant (See 'calculateCompactionTimeFactor') and 'new_rho' is the new density. and phi zero is derived from the initial void ratio e0 ( Default phi0: 0.5 ) in the soil:

phi0 = 1.0 / ( 1.0 + e0 )

The new compaction of the material is given by the ratio between the new and the old density:

new_compaction = new_rho/old_rho

Parameters
terrain- The Terrain that will be processed
voxelIndex- The specified index to check for compression
stress- The applied stress (Pa) in the voxel.
timeFactor-The time factor (0.0-1.0) which modifies the calculated change in compaction from the applied stress. Used for compaction rate relaxation.
newCompaction- The new compaction of the voxel, or the old one if no compaction occurred.
Returns
True if compaction occurred in the voxel, false otherwise.

◆ calculatePreconsolidationStressLog10()

static agx::Real agxTerrain::TerrainPhysics::calculatePreconsolidationStressLog10 ( Terrain *  terrain,
const agx::Vec3i &  voxelIndex 
)
static

Calculate the pre-consolidation stress of the material in a voxel with specified index using the void ratio method.

Parameters
terrain- The terrain object
voxelIndex- The specified voxel index
Returns
The pre-consolidation of solid mass in the voxel given by the specified index.

◆ calculatePreconsolidationStressVoidRatio()

static agx::Real agxTerrain::TerrainPhysics::calculatePreconsolidationStressVoidRatio ( Terrain *  terrain,
const agx::Vec3i &  voxelIndex 
)
static

Calculate the pre-consolidation stress of the material in a voxel with specified index using the void ratio method.

Parameters
terrain- The terrain object
voxelIndex- The specified voxel index
Returns
The pre-consolidation of solid mass in the voxel given by the specified index.

◆ calculateReposeHeight()

static agx::Real agxTerrain::TerrainPhysics::calculateReposeHeight ( Terrain *  terrain,
const agx::Vec2i &  receivingIndex,
const agx::Vec2i &  reposingIndex 
)
static

Calculate the local repose height, i.e the height difference where above that avalanching will begin, between two terrain indices, which is determined by the material angle of repose and the local compaction.

Parameters
terrain- The terrain object
receivingIndex- The receiving index, the place where material will flow TO.
reposingIndex- The reposing index, the place where material will flow FROM.
Returns
the repose height between the two terrain indices. Any height difference that his higher than this will cause avalanching.

◆ calculateReposeHeights() [1/2]

static agx::Vec2 agxTerrain::TerrainPhysics::calculateReposeHeights ( Terrain *  terrain,
const agx::Vec3i &  receivingSurfaceVoxelIndex,
const agx::Vec3i &  reposingSurfaceVoxelIndex,
const agx::Vec2 &  tanReposeAngles 
)
static

Performs the same calculations as calculateReposeHeight and also computes the height difference for the reverse flow.

◆ calculateReposeHeights() [2/2]

static agx::Vec2 agxTerrain::TerrainPhysics::calculateReposeHeights ( Terrain *  terrain,
const agx::Vec3i &  receivingSurfaceVoxelIndex,
const agx::Vec3i &  reposingSurfaceVoxelIndex,
const agx::Vec2 &  tanReposeAngles,
const agx::Real &  receivingSurfaceCompaction,
const agx::Real &  reposingSurfaceCompaction 
)
static

Performs the same calculations as calculateReposeHeight and also computes the height difference for the reverse flow.

◆ calculateStressFromUniformDiskLoad()

static agx::Real agxTerrain::TerrainPhysics::calculateStressFromUniformDiskLoad ( agx::Real  depth,
agx::Real  surfaceLoad,
agx::Real  diskRadius 
)
static

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.

Parameters
depth- The specified depth under the disk to calculate the stress.
surfaceLoad- The applied surface stress (Pa) from the uniform disk.
diskRadius- The radius of the uniform surface disk.
Returns
The stress (Pa) at the specified depth given by the uniform disk method.

◆ calculateTanReposeAngle()

static agx::Real agxTerrain::TerrainPhysics::calculateTanReposeAngle ( Terrain *  terrain,
const agx::Vec2i &  reposingIndex 
)
static

◆ calculateYoungsModulus_CAM_CLAY()

static agx::Real agxTerrain::TerrainPhysics::calculateYoungsModulus_CAM_CLAY ( agx::Real  originalYoungsModulus,
agx::Real  k_e,
agx::Real  n_e,
agx::Real  compaction 
)
static

Calculate a new Young's modulus using the Cam-Clay model from critical-state theories.

This is the following expression:

E_eff = E_0 * ( 1.0 + sign( compaction - 1.0 ) * k_e * ( abs( compaction - 1.0 ) ^ n_e ) )

where 'E_eff' is the effective Young's Modulus, 'E_0' is the original Young's modulus, 'compaction' is the local compaction of the material, 'k_e' is and 'n_e' are hardening parameters that for a constant packing ratio has values 1.0 and 0.5 respectively.

Parameters
originalYoungsModulus- The original Young's modulus of the material.
k_e- One of the hardening parameters of the model
n_e- One of the hardening parameters of the model
compaction- The local compaction of the material.
Returns
The modified Young's modulus given by the Cam-Clay model with hardening constants and the local compaction of the material.

◆ calculateYoungsModulus_POW2()

static agx::Real agxTerrain::TerrainPhysics::calculateYoungsModulus_POW2 ( agx::Real  originalYoungsModulus,
agx::Real  hardeningRate,
agx::Real  compaction 
)
static

Calculate a new Young's modulus given a hardening rate and compaction.

Parameters
originalYoungsModulus- The original Young's modulus of the material.
hardeningRate- The hardening rate of the material.
compaction- The local compaction of the material.
Returns
The modified Young's modulus given by the hardening rate and the local compaction of the material.

◆ estimateCriticalCompaction()

static agx::Real agxTerrain::TerrainPhysics::estimateCriticalCompaction ( agx::Real  dilatancyAngleScalingFactor,
agx::Real  dilatancyAngle 
)
static

Estimate the critical compaction of a TerrainMaterial which is used in calculating the local dilatancy angle in the terrain from varying compaction.

The formula is expressed as:

critical_compaction = nominal_compaction - dilatancy_angle / dilatancy_angle_scaling_factor

Parameters
dilatancyAngleScalingFactor- The scaling factor used in the calculation of the critical compaction
dilatancyAngle- The specified dilatancy angle used in the calculation of the critical compaction
Returns
The estimated critical compaction of the TerrainMaterial.

◆ getAngleOfReposeMultiplier() [1/2]

static agx::Real agxTerrain::TerrainPhysics::getAngleOfReposeMultiplier ( Terrain *  terrain,
const agx::Vec3i &  voxelIndex 
)
static

Calculate the multiplier which is used to modify the local angle of repose of the material given the compaction in a voxel.

Parameters
terrain- The terrain object
voxelIndex- The specified voxel index
Returns
The angle of repose multiplier in the voxel element given by the specified index.

◆ getAngleOfReposeMultiplier() [2/2]

static agx::Real agxTerrain::TerrainPhysics::getAngleOfReposeMultiplier ( Terrain *  terrain,
const agx::Vec3i &  voxelIndex,
const agx::Real  compaction 
)
static

Calculate the multiplier which is used to modify the local angle of repose of the material given the compaction in a voxel.

Parameters
terrain- The terrain object
compaction- The specified compaction
Returns
The angle of repose multiplier in the voxel element given by the specified index.

The documentation for this class was generated from the following file: