AGXDynamics  2.31.1.0
agxTerrain::TerrainMaterial::CompactionProperties Class Reference

Class containing the properties of the soil compaction model used in agxTerrain, such as compression index and soil hardening constants. More...

#include <TerrainMaterial.h>

+ Inheritance diagram for agxTerrain::TerrainMaterial::CompactionProperties:

Public Member Functions

 CompactionProperties ()
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
agx::Real getAngleOfReposeCompactionRate () const
 
agx::Real getBankStatePhi () const
 
agx::Real getCompactionTimeRelaxationConstant () const
 
agx::Real getCompressionIndex () const
 
agx::Real getDilatancyAngleScalingFactor () const
 Get the dilatancy angle scaling factor with respect to the compaction in the terrain. More...
 
agx::Real getHardeningConstantKE () const
 
agx::Real getHardeningConstantNE () const
 
agx::Real getPreconsolidationStress () const
 
int getReferenceCount () const
 
agx::Real getStressCutOffFraction () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void setAngleOfReposeCompactionRate (agx::Real angleOfReposeCompactionRate)
 Set how the compaction should increase the angle of repose. More...
 
void setBankStatePhi (agx::Real phi0)
 Set the phi0 value of the bank state soil. More...
 
void setCompactionTimeRelaxationConstant (agx::Real compactionTimeRelaxationConstant)
 Set time relaxation for compaction. More...
 
void setCompressionIndex (agx::Real compressionIndex)
 Sets the compression index for the soil, which is the constant that determines how fast the soil should compress given increased surface stress. More...
 
void setDilatancyAngleScalingFactor (agx::Real scalingFactor)
 Set the dilatancy angle scaling factor with respect to compaction in the terrain. More...
 
void setHardeningConstantKE (agx::Real k_e)
 Set the hardening constant k_e of the bulk material, i.e how the Young's modulus of the terrain contacts should scale with increasing/decreasing compaction. More...
 
void setHardeningConstantNE (agx::Real n_e)
 Set the hardening constant n_e of the bulk material, i.e how the Young's modulus of the terrain contacts should scale with increasing/decreasing compaction. More...
 
void setPreconsolidationStress (agx::Real preconsolidationStress)
 Set the stress at which the soil in the default state was compressed in, i.e when it has nominal compaction 1.0. More...
 
void setStressCutOffFraction (agx::Real stressCutOffFraction)
 Set the fraction of the surface stress that should serve as a cutoff value from when the stress propagation from the surface downward into the soil should stop. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Static Public Member Functions

template<typename T >
static bool ValidateCast (const Referenced *object)
 

Public Attributes

 AGXTERRAIN_STORE_RESTORE_INTERFACE
 

Protected Member Functions

virtual ~CompactionProperties ()
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Class containing the properties of the soil compaction model used in agxTerrain, such as compression index and soil hardening constants.

CompressionIndex - Describes how quickly the density of the material increases with compression. SwellFactor - Describes the amount the soil swells when going from its bank state to its loose state. HardeningRate - Describes how quickly the Young's modulus of the material increases with compression. PreconsolidationStress - Describes the pressure the soil was consolidated by. CompactionTimeRelaxationConstant - Describes how quickly the material is compressed when exposed to a compressing stress. StressCutOffFraction - Describes the fraction of the surface stress that must be reached before cutting off stress calculations downward in the Terrain. angleOfReposeCompactionRate - Describes how quickly the angle of repose of the material increases with compression.

Definition at line 274 of file TerrainMaterial.h.

Constructor & Destructor Documentation

◆ CompactionProperties()

agxTerrain::TerrainMaterial::CompactionProperties::CompactionProperties ( )

◆ ~CompactionProperties()

virtual agxTerrain::TerrainMaterial::CompactionProperties::~CompactionProperties ( )
inlineprotectedvirtual

Definition at line 437 of file TerrainMaterial.h.

Member Function Documentation

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ getAngleOfReposeCompactionRate()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getAngleOfReposeCompactionRate ( ) const
Returns
how the compaction should affect the angle of repose.
Note
See 'setAngleOfReposeCompactionRate' for explanation of scaling law.

◆ getBankStatePhi()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getBankStatePhi ( ) const
Returns
the bank state phi0 used in the compression algorithm (See 'setBankStatePhi'), defined as compaction = 1.0 of the material.

◆ getCompactionTimeRelaxationConstant()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getCompactionTimeRelaxationConstant ( ) const
Returns
the time relaxation constant for compaction. See setCompactionTimeRelaxationConstant. for explanation of compaction rate relaxation.

◆ getCompressionIndex()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getCompressionIndex ( ) const
Returns
the compression index of the material, i.e how fast the material should increase in density from increased stress. See �setCompressionIndex` for scaling law.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getDilatancyAngleScalingFactor()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getDilatancyAngleScalingFactor ( ) const
inline

Get the dilatancy angle scaling factor with respect to the compaction in the terrain.

The dilatancy angle modifies the effective local angle of friction in terrain by the following formula:

eff_friction_angle = friction_angle + scalingFactor * ( voxelCompaction - criticalCompaction )

Returns
the dilatancy angle scaling factor

Definition at line 928 of file TerrainMaterial.h.

◆ getHardeningConstantKE()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getHardeningConstantKE ( ) const
Returns
the hardening constant k_e of the bulk material, i.e how the Young's modulus of the terrain contacts should scale with increasing/decreasing compaction.
Note
- See 'setHardeningConstantsKE' for scaling law

◆ getHardeningConstantNE()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getHardeningConstantNE ( ) const
Returns
the hardening constant n_e of the bulk material, i.e how the Young's modulus of the terrain contacts should scale with increasing/decreasing compaction.
Note
- See 'setHardeningConstantsNE' for scaling law

◆ getPreconsolidationStress()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getPreconsolidationStress ( ) const
Returns
the pre-consolidation stress (Pa) of the material, i.e how much stress is needed in order to compact the soil further than the starting nominal compaction.
Note
- Nominal compaction is defined as 1.0.

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getStressCutOffFraction()

agx::Real agxTerrain::TerrainMaterial::CompactionProperties::getStressCutOffFraction ( ) const
Returns
the fraction of the surface stress that should serve as a cutoff value from when the stress propagation from the surface downward into the soil should stop.

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

◆ setAngleOfReposeCompactionRate()

void agxTerrain::TerrainMaterial::CompactionProperties::setAngleOfReposeCompactionRate ( agx::Real  angleOfReposeCompactionRate)

Set how the compaction should increase the angle of repose.

The tan of the angle of repose is increased by the following factor: The applied angle of repose of the material is active when the soil is in loose compaction, i.e has compaction 1.0 / swellFactor.

m = 2.0 ^ ( angleOfReposeCompactionRate * ( compaction - (1.0/swellFactor) ) )

Parameters
angleOfReposeCompactionRate- the specified compaction angle of repose rate to set to the bulk material. (Default: 1.0)

◆ setBankStatePhi()

void agxTerrain::TerrainMaterial::CompactionProperties::setBankStatePhi ( agx::Real  phi0)

Set the phi0 value of the bank state soil.

This is used in the compaction calculation where soil stress generates compacted soil. note See 'setCompressionIndex' for an explanation of how phi0 is used in compaction calculations.

Parameters
phi0- The specified phi0 of the soil in the bank state. (Default: 0.5)

◆ setCompactionTimeRelaxationConstant()

void agxTerrain::TerrainMaterial::CompactionProperties::setCompactionTimeRelaxationConstant ( agx::Real  compactionTimeRelaxationConstant)

Set time relaxation for compaction.

The factor is used to cap the change in density during the contact according to: change in density during time step = change in density from compaction * timeFactor where: timeFactor = 1.0 - exp(contactTime/tau)

Parameters
compactionTimeRelaxationConstant- the specified time constant to be set on the bulk material. (Default: 0.05)

◆ setCompressionIndex()

void agxTerrain::TerrainMaterial::CompactionProperties::setCompressionIndex ( agx::Real  compressionIndex)

Sets the compression index for the soil, which is the constant that determines how fast the soil should compress given increased surface stress.

The formula for computing the compaction curve is given by the following expression:

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

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 and phi zero is derived from the initial void ratio e0 ( Default phi0: 0.5 ) in the soil:

phi0 = e0 / ( 1.0 + e0 )
Parameters
compressionIndex- The compression index C used in the formula above. (Default: 0.1)

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setDilatancyAngleScalingFactor()

void agxTerrain::TerrainMaterial::CompactionProperties::setDilatancyAngleScalingFactor ( agx::Real  scalingFactor)

Set the dilatancy angle scaling factor with respect to compaction in the terrain.

The dilatancy angle modifies the effective local angle of friction in terrain by the following formula:

eff_friction_angle = friction_angle + scalingFactor * ( voxelCompaction - criticalCompaction )

Parameters
scalingFactor- The specified dilatancy angle scaling factor to set. ( Default: 15 * agx::PI / 180 radians )

◆ setHardeningConstantKE()

void agxTerrain::TerrainMaterial::CompactionProperties::setHardeningConstantKE ( agx::Real  k_e)

Set the hardening constant k_e of the bulk material, i.e how the Young's modulus of the terrain contacts should scale with increasing/decreasing compaction.

The formula for this is:

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
k_e- The hardening constant k_e of the material. (Default: 1.0)

◆ setHardeningConstantNE()

void agxTerrain::TerrainMaterial::CompactionProperties::setHardeningConstantNE ( agx::Real  n_e)

Set the hardening constant n_e of the bulk material, i.e how the Young's modulus of the terrain contacts should scale with increasing/decreasing compaction.

The formula for this is:

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
n_e- The hardening constant n_e of the material. (Default: 0.5)

◆ setPreconsolidationStress()

void agxTerrain::TerrainMaterial::CompactionProperties::setPreconsolidationStress ( agx::Real  preconsolidationStress)

Set the stress at which the soil in the default state was compressed in, i.e when it has nominal compaction 1.0.

In order to compress the soil further, the applied stress on the soil has to exceed this.

Parameters
preconsolidationStress- the specified preconsolidationStress to set on the bulk material when in nominal compaction. (Default: 98e3 Pa)

◆ setStressCutOffFraction()

void agxTerrain::TerrainMaterial::CompactionProperties::setStressCutOffFraction ( agx::Real  stressCutOffFraction)

Set the fraction of the surface stress that should serve as a cutoff value from when the stress propagation from the surface downward into the soil should stop.

Parameters
stressCutOffFraction- the fraction of the surface stress that serves as the cutoff. (Default: 0.01)

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ AGXTERRAIN_STORE_RESTORE_INTERFACE

agxTerrain::TerrainMaterial::CompactionProperties::AGXTERRAIN_STORE_RESTORE_INTERFACE

Definition at line 434 of file TerrainMaterial.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.


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