Logo Search packages:      
Sourcecode: yade version File versions  Download package

Public Types | Public Member Functions | Public Attributes | Private Attributes

TriaxialCompressionEngine Class Reference

Class for controlling optional initial isotropic compaction and subsequent triaxial test with constant lateral stress and constant axial strain rate. More...

#include <TriaxialCompressionEngine.hpp>

Inheritance diagram for TriaxialCompressionEngine:
Inheritance graph
[legend]
Collaboration diagram for TriaxialCompressionEngine:
Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  STATE_UNINITIALIZED, STATE_ISO_COMPACTION, STATE_ISO_UNLOADING, STATE_TRIAX_LOADING,
  STATE_FIXED_POROSITY_COMPACTION, STATE_LIMBO
}
enum  {
  wall_bottom = 0, wall_top, wall_left, wall_right,
  wall_front, wall_back
}
 

internal index values for retrieving walls


Public Member Functions

virtual void action ()
virtual void callPostLoad (void)
virtual void checkPyClassRegistersItself (const std::string &thisClassName) const
void computeStressStrain ()
 Compute stresses on walls as "Vector3r stress[6]", compute meanStress, strain[3] and mean strain.
Real ComputeUnbalancedForce (bool maxUnbalanced=false)
 Compute the mean/max unbalanced force in the assembly (normalized by mean contact force)
void controlExternalStress (int wall, Vector3r resultantForce, State *p, Real wall_max_vel)
 Regulate the stress applied on walls with flag wall_XXX_activated = true.
void controlInternalStress (Real multiplier)
 Regulate the mean stress by changing spheres size, WARNING : this function assumes that all dynamic bodies in the problem are spheres.
void doStateTransition (stateNum nextState)
virtual string getBaseClassName (unsigned int i=0) const
virtual int getBaseClassNumber ()
Vector3r getStress (int boundId)
 ! Getter for stress in python
virtual bool isActivated ()
bool operator!= (const Serializable &other)
bool operator== (const Serializable &other)
virtual boost::python::dict pyDict () const
virtual void pyHandleCustomCtorArgs (boost::python::tuple &args, boost::python::dict &kw)
virtual void pyRegisterClass (boost::python::object _scope)
virtual void pySetAttr (const std::string &key, const boost::python::object &value)
std::string pyStr ()
 string representation of this object
void pyUpdateAttrs (const boost::python::dict &d)
 REGISTER_BASE_CLASS_NAME (Factorable)
 REGISTER_CLASS_NAME (Serializable)
 REGISTER_CLASS_NAME (Factorable)
template<class ArchiveT >
void serialize (ArchiveT &ar, unsigned int version)
void setContactProperties (Real frictionDegree)
 Change physical properties of interactions and/or bodies in the middle of a simulation (change only friction for the moment, complete this function to set cohesion and others before compression test)
string stateName (stateNum st)
void updateParameters ()
void updateStiffness ()
 update the stiffness of boundary-packing interaction (sum of contacts stiffness on the boundary)
 YADE_CLASS_BASE_DOC (GlobalEngine, Engine,"Engine that will generally affect the whole simulation (contrary to PartialEngine).")
 YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY (TriaxialCompressionEngine, TriaxialStressController,"The engine is a state machine with the following states; transitions my be automatic, see below.\n\n""#. STATE_ISO_COMPACTION: isotropic compaction (compression) until the prescribed mean pressue sigmaIsoCompaction is reached and the packing is stable. The compaction happens either by straining the walls (!internalCompaction) or by growing size of grains (internalCompaction).\n""#. STATE_ISO_UNLOADING: isotropic unloading from the previously reached state, until the mean pressure sigmaLateralConfinement is reached (and stabilizes).\n\n\t.. note::\n\t\tthis state will be skipped if sigmaLateralConfinement == sigmaIsoCompaction.\n""#. STATE_TRIAX_LOADING: confined uniaxial compression: constant sigmaLateralConfinement is kept at lateral walls (left, right, front, back), while top and bottom walls load the packing in their axis (by straining), until the value of epsilonMax (deformation along the loading axis) is reached. At this point, the simulation is stopped.\n""#. STATE_FIXED_POROSITY_COMPACTION: isotropic compaction (compression) until a chosen porosity value (parameter:fixedPorosity). The six walls move with a chosen translation speed (parameter StrainRate).\n""#. STATE_TRIAX_LIMBO: currently unused, since simulation is hard-stopped in the previous state.\n\n""Transition from COMPACTION to UNLOADING is done automatically if autoUnload==true;\n\n Transition from (UNLOADING to LOADING) or from (COMPACTION to LOADING: if UNLOADING is skipped) is done automatically if autoCompressionActivation=true; Both autoUnload and autoCompressionActivation are true by default.\n\n""\n\n.. note::\n\t This engine handles many different manipulations, including some save/reload with attributes modified manually in between. Please don't modify the algorithms, even if they look strange (especially test sequences) without notifying me and getting explicit approval. A typical situation is somebody generates a sample with !autoCompressionActivation and run : he wants a saved simulation at the end. He then reload the saved state, modify some parameters, set autoCompressionActivation=true, and run. He should get the compression test done.",((Real, strainRate, 0,,"target strain rate (./s)"))((Real, currentStrainRate, 0,,"current strain rate - converging to :yref:`TriaxialCompressionEngine::strainRate` (./s)"))((Real, UnbalancedForce, 1,,"mean resultant forces divided by mean contact force"))((Real, StabilityCriterion, 0.001,,"tolerance in terms of :yref:`TriaxialCompressionEngine::UnbalancedForce` to consider the packing is stable"))((Vector3r, translationAxis, TriaxialStressController::normal[wall_bottom_id],,"compression axis"))((bool, autoCompressionActivation, true,,"Auto-switch from isotropic compaction (or unloading state if sigmaLateralConfinement<sigmaIsoCompaction) to deviatoric loading"))((bool, autoUnload, true,,"Auto-switch from isotropic compaction to unloading"))((bool, autoStopSimulation, true,,"Stop the simulation when the sample reach STATE_LIMBO, or keep running"))((int, testEquilibriumInterval, 20,,"interval of checks for transition between phases, higher than 1 saves computation time."))((stateNum, currentState, 1,,"There are 5 possible states in which TriaxialCompressionEngine can be. See above :yref:`yade.wrapper.TriaxialCompressionEngine` "))((stateNum, previousState, 1,,"Previous state (used to detect manual changes of the state in .xml)"))((Real, sigmaIsoCompaction, 1,,"Prescribed isotropic pressure during the compaction phase"))((Real, previousSigmaIso, 1,,"Previous value of inherited sigma_iso (used to detect manual changes of the confining pressure)"))((Real, sigmaLateralConfinement, 1,,"Prescribed confining pressure in the deviatoric loading; might be different from :yref:`TriaxialCompressionEngine::sigmaIsoCompaction`"))((std::string, Key,"",,"A string appended at the end of all files, use it to name simulations."))((bool, noFiles, false,,"If true, no files will be generated (*.xml, *.spheres,...)"))((Real, frictionAngleDegree,-1,,"Value of friction assigned just before the deviatoric loading"))((Real, epsilonMax, 0.5,,"Value of axial deformation for which the loading must stop"))((Real, uniaxialEpsilonCurr, 1,,"Current value of axial deformation during confined loading (is reference to strain[1])"))((Real, fixedPoroCompaction, false,,"A special type of compaction with imposed final porosity :yref:`TriaxialCompressionEngine::fixedPorosity` (WARNING : can give unrealistic results!)"))((Real, fixedPorosity, 0,,"Value of porosity chosen by the user"))((Real, maxStress, 0,,"Max value of stress during the simulation (for post-processing)")), translationAxisx=Vector3r(1, 0, 0);translationAxisz=Vector3r(0, 0, 1);currentState=STATE_UNINITIALIZED;previousState=currentState;Phase1End="Compacted";FinalIterationPhase1=0;Iteration=0;firstRun=true;previousSigmaIso=sigma_iso;boxVolume=0;saveSimulation=false;,.def("setContactProperties",&TriaxialCompressionEngine::setContactProperties,"Assign a new friction angle (degrees) to dynamic bodies and relative interactions")) DECLARE_LOGGER
 YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY (TriaxialStressController, BoundaryController,"An engine maintaining constant stresses on some boundaries of a parallepipedic packing.",((unsigned int, stiffnessUpdateInterval, 10,,"target strain rate (./s)"))((unsigned int, radiusControlInterval, 10,,""))((unsigned int, computeStressStrainInterval, 10,,""))((Real, wallDamping, 0.25,,"wallDamping coefficient - wallDamping=0 implies a (theoretical) perfect control, wallDamping=1 means no movement"))((Real, thickness,-1,,""))((int, wall_bottom_id, 0,,"id of boundary ; coordinate 1-"))((int, wall_top_id, 0,,"id of boundary ; coordinate 1+"))((int, wall_left_id, 0,,"id of boundary ; coordinate 0-"))((int, wall_right_id, 0,,"id of boundary ; coordinate 0+"))((int, wall_front_id, 0,,"id of boundary ; coordinate 2+"))((int, wall_back_id, 0,,"id of boundary ; coordinate 2-"))((bool, wall_bottom_activated, true,,""))((bool, wall_top_activated, true,,""))((bool, wall_left_activated, true,,""))((bool, wall_right_activated, true,,""))((bool, wall_front_activated, true,,""))((bool, wall_back_activated, true,,""))((Real, height, 0,,""))((Real, width, 0,,""))((Real, depth, 0,,""))((Real, height0, 0,,""))((Real, width0, 0,,""))((Real, depth0, 0,,""))((Real, sigma_iso, 0,,"prescribed confining stress (see :yref:`TriaxialStressController::isAxisymetric`)"))((Real, sigma1, 0,,"prescribed stress on axis 1 (see :yref:`TriaxialStressController::isAxisymetric`)"))((Real, sigma2, 0,,"prescribed stress on axis 2 (see :yref:`TriaxialStressController::isAxisymetric`)"))((Real, sigma3, 0,,"prescribed stress on axis 3 (see :yref:`TriaxialStressController::isAxisymetric`)"))((bool, isAxisymetric, true,,"if true, sigma_iso is assigned to sigma1, 2 and 3 (applies at each iteration and overrides user-set values of s1,2,3)"))((Real, maxMultiplier, 1.001,,"max multiplier of diameters during internal compaction (initial fast increase - :yref:`TriaxialStressController::finalMaxMultiplier` is used in a second stage)"))((Real, finalMaxMultiplier, 1.00001,,"max multiplier of diameters during internal compaction (secondary precise adjustment - :yref:`TriaxialStressController::maxMultiplier` is used in the initial stage)"))((Real, max_vel, 0.001,,"Maximum allowed walls velocity [m/s]. This value superseeds the one assigned by the stress controller if the later is higher. max_vel can be set to infinity in many cases, but sometimes helps stabilizing packings. Based on this value, different maxima are computed for each axis based on the dimensions of the sample, so that if each boundary moves at its maximum velocity, the strain rate will be isotropic (see e.g. :yref:`TriaxialStressController::max_vel1`)."))((Real, previousStress, 0,,""))((Real, previousMultiplier, 1,,""))((bool, internalCompaction, true,,"Switch between 'external' (walls) and 'internal' (growth of particles) compaction."))((Real, meanStress, 0,,"Mean stress in the packing."))((Real, volumetricStrain, 0,,"Volumetric strain (see :yref:`TriaxialStressController::strain`)."))((Real, externalWork, 0,,"Energy provided by boundaries.")),, first=true;stiffness.resize(6);previousTranslation.assign(Vector3r::Zero());for(int i=0;i< 6;++i){normal[i]=stress[i]=force[i]=Vector3r::Zero();stiffness[i]=0;}normal[wall_bottom].y()=1;normal[wall_top].y()=-1;normal[wall_left].x()=1;normal[wall_right].x()=-1;normal[wall_front].z()=-1;normal[wall_back].z()=1;porosity=1;,.def_readonly("strain",&TriaxialStressController::strain,"Current strain (logarithmic).").def_readonly("porosity",&TriaxialStressController::porosity,"Porosity of the packing.").def_readonly("boxVolume",&TriaxialStressController::boxVolume,"Total packing volume.").def_readonly("spheresVolume",&TriaxialStressController::spheresVolume,"Total volume pf spheres.").def_readonly("max_vel1",&TriaxialStressController::max_vel1,"see :yref:`TriaxialStressController::max_vel` |ycomp|").def_readonly("max_vel2",&TriaxialStressController::max_vel2,"see :yref:`TriaxialStressController::max_vel` |ycomp|").def_readonly("max_vel3",&TriaxialStressController::max_vel3,"see :yref:`TriaxialStressController::max_vel` |ycomp|").def("stress",&TriaxialStressController::getStress,(python::arg("id")),"Return the mean stress vector acting on boundary 'id', with 'id' between 0 and 5.")) DECLARE_LOGGER

Public Attributes

Real boxVolume
 Value of box volume.
bool DieCompaction
int FinalIterationPhase1
bool firstRun
 is this the beginning of the simulation, after reading the scene?
Vector3r force [6]
int Iteration
Real max_vel1
Real max_vel2
Real max_vel3
Vector3r normal [6]
bool Phase1
 is isotropicInternalCompactionFinished?
Real porosity
 Sample porosity.
Real position_back
Real position_bottom
Real position_front
Real position_left
Real position_right
Real position_top
boost::array< Vector3r, 6 > previousTranslation
 Stores the value of the translation at the previous time step, stiffness, and normal.
bool saveSimulation
Scenescene
Real spheresVolume
 Value of spheres volume (solid volume)
vector< Real > stiffness
 The value of stiffness (updated according to stiffnessUpdateInterval)
Vector3r strain
Vector3r stress [6]
 The values of stresses.
shared_ptr< TimingDeltastimingDeltas
 precise profiling information (timing of fragments of the engine)
TimingInfo timingInfo
 high-level profiling information; not serializable
Vector3r translationAxisx
Vector3r translationAxisz
int wall_id [6]
 real index values of walls in the Scene

Private Attributes

std::string Phase1End

Detailed Description

Class for controlling optional initial isotropic compaction and subsequent triaxial test with constant lateral stress and constant axial strain rate.

The engine is a state machine with the following states; transitions my be automatic, see below.

1. STATE_ISO_COMPACTION: isotropic compaction (compression) until the prescribed mean pressue sigmaIsoCompaction is reached and the packing is stable. The compaction happens either by straining the walls (!internalCompaction) or by growing size of grains (internalCompaction). 2. STATE_ISO_UNLOADING: isotropic unloading from the previously reached state, until the mean pressure sigmaLateralConfinement is reached (and stabilizes). NOTE: this state will be skipped if sigmaLateralConfinement == sigmaIsoCompaction. 3. STATE_TRIAX_LOADING: confined uniaxial compression: constant sigmaLateralConfinement is kept at lateral walls (left, right, front, back), while top and bottom walls load the packing in their axis (by straining), until the value of epsilonMax (deformation along the loading axis) is reached. At this point, the simulation is stopped. 4. STATE_FIXED_POROSITY_COMPACTION: isotropic compaction (compression) until a chosen porosity value (parameter:fixedPorosity). The six walls move with a chosen translation speed (parameter StrainRate). 5. STATE_TRIAX_LIMBO: currently unused, since simulation is hard-stopped in the previous state.

Transition from COMPACTION to UNLOADING is done automatically if autoUnload==true; Transition from (UNLOADING to LOADING) or from (COMPACTION to LOADING: if UNLOADING is skipped) is done automatically if autoCompressionActivation=true; Both autoUnload and autoCompressionActivation are true by default.

NOTE: This engine handles many different manipulations, including some save/reload with attributes modified manually in between. Please don't modify the algorithms, even if they look strange (especially test sequences) without notifying me and getting explicit approval. A typical situation is somebody generates a sample with !autoCompressionActivation and run : he wants a saved simulation at the end. He then reload the saved state, modify some parameters, set autoCompressionActivation=true, and run. He should get the compression test

Definition at line 45 of file TriaxialCompressionEngine.hpp.


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

Generated by  Doxygen 1.6.0   Back to index