GranOO  3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GranOO3::DEM::Stress Class Reference

a property for computing stress associated to DEM::Element More...

#include <Stress.hpp>

Inheritance diagram for GranOO3::DEM::Stress:
Inheritance graph
[legend]

Public Member Functions

 Stress ()
 constructor More...
 
virtual ~Stress ()
 destructor More...
 
virtual std::string info () const
 Display some useful info in the terminal
More...
 
double get_hydrostatic_stress () const
 get the hydrostatic stress More...
 
double get_vonmises_stress () const
 get the von Mises stress More...
 
double get_tresca_stress () const
 get the Tresca stress More...
 
void add_criterion (double value)
 add a criterion, the criterion is often used for fracture but you can use it as you want More...
 
double & criterion (size_t i)
 get the i_th criterion More...
 
void compute_virial_stress ()
 compute the stress using the virial method More...
 
void compute_virial_stress_for (Element *de, unsigned int level, std::set< Element * > &set)
 a util recursive method for computing virial stress More...
 
void compute_lsq_stress ()
 compute the stress using a least square method (EXPERIMENTAL) More...
 
void update_principal_stress ()
 update the principal stresses from the current value of the _stress_tensor attribute More...
 
- Public Member Functions inherited from GranOO3::Core::Prop< Element >
 Prop ()
 
virtual ~Prop ()
 
Element & item ()
 
const Element & item () const
 
void set_item (Element &)
 
virtual void set_color (const Core::Color &)
 
Core::Colorget_color ()
 
float & get_line_width ()
 
virtual void add (SetOf< Prop< Element > > *)
 
virtual void erase (SetOf< Prop< Element > > *)
 
virtual std::ostream & write_ascii (std::ostream &out) const
 
virtual std::istream & read_ascii (std::istream &in)
 
- Public Member Functions inherited from GranOO3::Core::Base
virtual ~Base ()
 
size_t numID () const
 
size_t uID () const
 
void set_numID (size_t val)
 
void clear_numID ()
 
Physic::Materialget_mat () const
 
void set_mat (Physic::Material *)
 
Baseitem ()
 
const Baseitem () const
 
bool is_same (const Base &) const
 
template<class T >
T & cast_to ()
 
template<class T >
const T & cast_to () const
 
template<class T >
bool is () const
 
virtual bool is (size_t) const
 
virtual const std::string & get_ID () const
 
virtual Baseclone ()
 
template<class T >
T & clone_to ()
 
virtual std::ostream & export_to_povray (std::ostream &out) const
 
Signal< Base & > & deleted_signal ()
 
- Public Member Functions inherited from GranOO3::Core::Null
 Null ()
 
virtual ~Null ()
 
- Public Member Functions inherited from GranOO3::Core::Drawable
 Drawable ()
 
virtual ~Drawable ()
 
virtual void draw ()
 
virtual void draw_edge ()
 
virtual void init_default_color ()
 
virtual std::ostream & get_info (std::ostream &os) const
 
virtual const Colordefault_color () const
 
Colorget_color ()
 
const Colorget_color () const
 
virtual void set_alpha (float alpha)
 
void apply_color () const
 
void apply_edge_color () const
 
void apply_default_color ()
 
void apply_selected_color ()
 
void set_line_width (float)
 
float get_line_width () const
 
float & get_line_width ()
 
void apply_line_width () const
 
bool is_visible () const
 
void set_visible (bool)
 
void paint ()
 
void paint_edge ()
 
unsigned int get_item_glkey () const
 
- Public Member Functions inherited from GranOO3::Core::Register< Base >
 Register ()
 
virtual ~Register ()
 
void erase_from_all_setof ()
 
bool belong_to_setof (const std::string &setOfId) const
 
bool belong_to_setof (const SetOf< Base > &set) const
 
std::list< SetOf< Base > * > & get_setof_list ()
 
unsigned long long int get_numeric_ID () const
 
- Public Member Functions inherited from GranOO3::Core::Register< type >
 Register ()
 
virtual ~Register ()
 
void erase_from_all_setof ()
 
bool belong_to_setof (const std::string &setOfId) const
 
bool belong_to_setof (const SetOf< type > &set) const
 
std::list< SetOf< type > * > & get_setof_list ()
 
unsigned long long int get_numeric_ID () const
 
- Public Member Functions inherited from GranOO3::Core::Register< Stress >
 Register ()
 
virtual ~Register ()
 
void erase_from_all_setof ()
 
bool belong_to_setof (const std::string &setOfId) const
 
bool belong_to_setof (const SetOf< Stress > &set) const
 
std::list< SetOf< Stress > * > & get_setof_list ()
 
unsigned long long int get_numeric_ID () const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int)
 complete serializing of the item in the *.gdd format More...
 

Private Attributes

Geom::SymTensor _stress_tensor
 the main stress tensor which is updated by the compute_virial_stress() and the compute_lsq_stress() methods. More...
 
Geom::Point _principal_point
 this is just a trick for having a local frame ("useless as this") More...
 
Geom::Quaternion _principal_quat
 this quaternion that model the rotation matrix (from global frame) for retrieving the principal directions More...
 
Geom::Frame _principal_frame
 the local frame which are expressed the principal stresses (principal direction) More...
 
Geom::Vector _principal_stress
 a vector that stores the three principal stresses, note that the component are ordered like this X > Y > Z More...
 
double _principal_stress_1
 the value of the first (maximal) principal stress More...
 
double _principal_stress_2
 the value of the second (intermediate) principal stress More...
 
double _principal_stress_3
 the value of the third (lower) principal stress More...
 
double _criterion
 the value of the main criterion (in case of only one criterion is applied) More...
 
std::vector< double > _criterion_list
 the values of criteria (in case of many criteria are applied) More...
 
unsigned int _neighbour_level
 the neighbor level (level of neighboring) for the computation of the virial stress. More...
 
double _volume_fraction
 the volume fraction for computing virial stress (virial stress computation needs the real volume). More...
 
bool _include_velocity
 a flag for including the velocity within the virial stress computation More...
 
bool _periodic
 a flag for including priodic condition for the virial stress computation More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Public Types inherited from GranOO3::Core::Prop< Element >
typedef Element Owner
 
- Static Public Member Functions inherited from GranOO3::Core::Base
static Baseget_by_numID (size_t)
 
static void clear_all_numID ()
 
static unsigned int get_sub_class_number ()
 
- Static Public Member Functions inherited from GranOO3::Core::Drawable
static Drawableget_drawable_item_by_glkey (int)
 
static void set_draw_precision (unsigned int p)
 
static void increase_draw_precision ()
 
static void decrease_draw_precision ()
 
static unsigned int get_draw_precision ()
 
- Static Public Attributes inherited from GranOO3::Core::Null
static Null null = Null()
 
- Protected Member Functions inherited from GranOO3::Core::Prop< Element >
virtual Basebase_item ()
 
virtual const Basebase_item () const
 
void serialize (Archive &ar, const unsigned int)
 
- Protected Member Functions inherited from GranOO3::Core::Base
 Base ()
 
- Static Protected Member Functions inherited from GranOO3::Core::Base
static unsigned int affect_class_rank_ID ()
 

Detailed Description

a property for computing stress associated to DEM::Element

The aim of this DEM::Element property is to compute stresses associated to DEM::Element. Here, the method used for computing strains can be chosen between two methods :

[1] André, D., Jebahi, M., Iordanoff, I., Charles, J. L., & Néauport, J. (2013). Using the discrete element method to simulate brittle fracture in the indentation of a silica glass with a blunt indenter. Computer Methods in Applied Mechanics and Engineering, 265, 136-147.

Constructor & Destructor Documentation

◆ Stress()

GranOO3::DEM::Stress::Stress ( )

constructor

Construct a new Stress element. Do not call this constructor. To build a new Stress instance, you must create a new property by invoking the Element::new_prop<Stress>() method of the Element class.

◆ ~Stress()

GranOO3::DEM::Stress::~Stress ( )
virtual

destructor

Destruct a Stress instance. Be aware, as Stress is a property, you must not invoke destructor by yourself, it could lead to unexpected behavior. Note that the Stress instances are automatically destructed when their associated elements are destructed.

Member Function Documentation

◆ add_criterion()

void GranOO3::DEM::Stress::add_criterion ( double  value)

add a criterion, the criterion is often used for fracture but you can use it as you want

Parameters
[in]value: the treshold value of the criterion

This method can be used to store one or more criteria within a DEM::Element. It can be used for applying different criteria with different discrete elements and/or applying more that one criteria to a given discrete element.

◆ compute_lsq_stress()

void GranOO3::DEM::Stress::compute_lsq_stress ( )

compute the stress using a least square method (EXPERIMENTAL)

The idea here is too use the same method as DEM::Strain for computing stresses by taking into account all the interaction forces and torques of neighbors element. However, it does not work as expected :-( TODO: debug this or remove this

This method update the _stress_tensor attribute using a least square method. The idea here is too use the same method as DEM::Strain for computing stresses by taking into account all the interaction forces and torques of neighbors element. However, it does not work as expected :-( TODO: debug this or remove this

◆ compute_virial_stress()

void GranOO3::DEM::Stress::compute_virial_stress ( )

compute the stress using the virial method

This method update the _stress_tensor attribute using the virial stress method [1].

Nguyen, T. T., André, D., & Huger, M. (2019). Analytic laws for direct calibration of discrete element modeling of brittle elastic media using cohesive beam model. Computational Particle Mechanics, 6(3), 393-409.

◆ compute_virial_stress_for()

void GranOO3::DEM::Stress::compute_virial_stress_for ( Element de,
unsigned int  level,
std::set< Element * > &  set 
)

a util recursive method for computing virial stress

Parameters
[in]de: a pointer to the current element for computing virial stress
[in]level: the current neighbor level
[in]set: that list of element that has been parsed

This method is called by the compute_virial_stress() method. There is probably no reason for you to call directly this method. If you want to learn more about the neighbor level, please refer to [1].

Nguyen, T. T., André, D., & Huger, M. (2019). Analytic laws for direct calibration of discrete element modeling of brittle elastic media using cohesive beam model. Computational Particle Mechanics, 6(3), 393-409.

◆ criterion()

double & GranOO3::DEM::Stress::criterion ( size_t  i)

get the i_th criterion

Parameters
[in]i: the rank of the criterion to get
Returns
a (modifiable) reference to the criterion value

This method can be used to retrieve the criterion value with its associated rank i.

◆ get_hydrostatic_stress()

double GranOO3::DEM::Stress::get_hydrostatic_stress ( ) const

get the hydrostatic stress

Returns
the hydrostatic stress value

Note that the hydrostatic is computed on the fly with the current vales of the _stress_tensor attribute.

◆ get_tresca_stress()

double GranOO3::DEM::Stress::get_tresca_stress ( ) const

get the Tresca stress

Returns
the Tresca stress value

Note that the Tresca is computed on the fly with the current vales of the _principal_stress_1 and the _principal_stress_3 attributes.

◆ get_vonmises_stress()

double GranOO3::DEM::Stress::get_vonmises_stress ( ) const

get the von Mises stress

Returns
the von Mises stress value

Note that the von Mises is computed on the fly with the current vales of the _stress_tensor attribute.

◆ info()

std::string GranOO3::DEM::Stress::info ( ) const
virtual

Display some useful info in the terminal

Reimplemented from GranOO3::Core::Prop< Element >.

◆ serialize()

template<class Archive >
void GranOO3::DEM::Stress::serialize ( Archive &  ar,
const unsigned int  version 
)
private

complete serializing of the item in the *.gdd format

See also
the Domain classes to get additional info about I/O

◆ update_principal_stress()

void GranOO3::DEM::Stress::update_principal_stress ( )

update the principal stresses from the current value of the _stress_tensor attribute

This method computes the principal stresses and stores the results in the _principal_stress,
_principal_stress_1, _principal_stress_2, _principal_stress_3 attributes

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ _criterion

double GranOO3::DEM::Stress::_criterion
private

the value of the main criterion (in case of only one criterion is applied)

◆ _criterion_list

std::vector< double > GranOO3::DEM::Stress::_criterion_list
private

the values of criteria (in case of many criteria are applied)

◆ _include_velocity

bool GranOO3::DEM::Stress::_include_velocity
private

a flag for including the velocity within the virial stress computation

Based on our experiences, including velocity is useless but we let this option valid... just in case

◆ _neighbour_level

unsigned int GranOO3::DEM::Stress::_neighbour_level
private

the neighbor level (level of neighboring) for the computation of the virial stress.

0 corresponds to the direct neighbors, 1 corresponds to the second level of neighbors and so on...

◆ _periodic

bool GranOO3::DEM::Stress::_periodic
private

a flag for including priodic condition for the virial stress computation

For neighbour level = 1, this flag must be activated when dealing with periodic condition because an element can interact with an other element situated at the other side of the domain. You can let this flag to false in other case.

◆ _principal_frame

Geom::Frame GranOO3::DEM::Stress::_principal_frame
private

the local frame which are expressed the principal stresses (principal direction)

◆ _principal_point

Geom::Point GranOO3::DEM::Stress::_principal_point
private

this is just a trick for having a local frame ("useless as this")

◆ _principal_quat

Geom::Quaternion GranOO3::DEM::Stress::_principal_quat
private

this quaternion that model the rotation matrix (from global frame) for retrieving the principal directions

◆ _principal_stress

Geom::Vector GranOO3::DEM::Stress::_principal_stress
private

a vector that stores the three principal stresses, note that the component are ordered like this X > Y > Z

◆ _principal_stress_1

double GranOO3::DEM::Stress::_principal_stress_1
private

the value of the first (maximal) principal stress

◆ _principal_stress_2

double GranOO3::DEM::Stress::_principal_stress_2
private

the value of the second (intermediate) principal stress

◆ _principal_stress_3

double GranOO3::DEM::Stress::_principal_stress_3
private

the value of the third (lower) principal stress

◆ _stress_tensor

Geom::SymTensor GranOO3::DEM::Stress::_stress_tensor
private

the main stress tensor which is updated by the compute_virial_stress() and the compute_lsq_stress() methods.

◆ _volume_fraction

double GranOO3::DEM::Stress::_volume_fraction
private

the volume fraction for computing virial stress (virial stress computation needs the real volume).


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