Itasca C++ Interface
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Enumerator | Functions
Joint Model interface specification

Namespaces

namespace  jmodels
 The Joint Constitutive Model interface library.
 

Classes

class  jmodels::JointModel
 The base class for joint constitutive model plug-ins. More...
 

Enumerations

enum  jmodels::JointModel::EnergyKeys { kwEStrainShear = 1 , kwEStrainCompression , kwEStrainTension , kwESlip }
 Default implementation 4 energies should be defined for each model (at least)
 

Functions

virtual string jmodels::JointModel::getName () const =0
 Must be unique, used to identify model in save/restore, on command line, filename.
 
virtual string jmodels::JointModel::getPluginName () const
 There should be no reason for an implementation to override the default behavior of this function.
 
virtual string jmodels::JointModel::getFullName () const =0
 The full name of the model.
 
virtual uint32 jmodels::JointModel::getMinorVersion () const
 Returns minor version of base implementation, override for actual model.
 
virtual string jmodels::JointModel::getProperties () const =0
 Returns a string containing the names of model properties.
 
virtual string jmodels::JointModel::getStates () const =0
 Returns a string containing state names.
 
virtual base::Property jmodels::JointModel::getProperty (uint32 index) const =0
 Return the value of the property of that index (base 1).
 
virtual void jmodels::JointModel::setProperty (uint32 index, const base::Property &p, uint32 restoreVersion=0)
 Sets the value of the property with index i (base 1).
 
virtual void jmodels::JointModel::save (std::ostream &o) const
 
virtual void jmodels::JointModel::restore (std::istream &i, uint32 restoreVersion)
 Allows data other than properties to be restored efficiently.
 
virtual JointModeljmodels::JointModel::clone () const =0
 Returns an instance this class.
 
virtual double jmodels::JointModel::getMaxNormalStiffness () const =0
 This is used by the code to compute the stable timestep or adjust inertial mass.
.
 
virtual double jmodels::JointModel::getMaxShearStiffness () const =0
 This is used by the code to compute the stable timestep or adjust inertial mass.
.
 
virtual void jmodels::JointModel::copy (const JointModel *mod)
 Copy property values and state from another constitutive model.
 
virtual void jmodels::JointModel::run (uint32 dim, State *s)
 Calculate force increments given a displacement increments.

 
virtual void jmodels::JointModel::initialize (uint32 dim, State *s)
 Initializes the constitutive model in preparation for calls to run().
 
virtual double jmodels::JointModel::getStrengthStressRatio (const State &) const
 Returns the ratio of the shear force to the current yield strength.
 
virtual void jmodels::JointModel::scaleProperties (const double &, const std::vector< uint32 > &)
 Scales failure property indices v by the factor f.
 
virtual bool jmodels::JointModel::supportsStrengthStressRatio () const
 Returns true if strength-stress ratio calculations are supported via getStrengthStressRatio().

 
virtual bool jmodels::JointModel::supportsPropertyScaling () const
 Returns true if property scaling is supported for factor-of-safety calculations via scaleProperties().
 
virtual void jmodels::JointModel::destroy ()
 There should be no reason for an implementation to change the default behavior of this function.
 
virtual bool jmodels::JointModel::isSliding (const State &)
 Return true if subcontact is sliding.
 
virtual bool jmodels::JointModel::isBonded (const State &)
 Return true if subcontact is bonced. Used in fragment calculations.
 
virtual string jmodels::JointModel::getEnergies () const
 
virtual double jmodels::JointModel::getEnergy (uint32) const
 
virtual bool jmodels::JointModel::getEnergyAccumulate (uint32) const
 
virtual void jmodels::JointModel::setEnergy (uint32, const double &)
 
virtual void jmodels::JointModel::activateEnergy ()
 
virtual bool jmodels::JointModel::getEnergyActivated () const
 
 jmodels::JointModel::JointModel ()
 The joint constitutive model constructor. The model is invald, and canFail is set to true.
 
virtual jmodels::JointModel::~JointModel ()
 The joint constitutive model destructor.
 
static uint32 jmodels::JointModel::getMajorVersion ()
 Major version changes when the interface changes - which is defined here.
 
static uint32 jmodels::JointModel::getLibraryMinorVersion ()
 Returns the minor version number of the constitutive model library.
 
bool jmodels::JointModel::isValid (uint32 dimVal) const
 Indicates whether initializion is necessary - by dimension.
 
void jmodels::JointModel::setValid (uint32 dimVal)
 Sets the current valid state to dimension dim.
 
bool jmodels::JointModel::canFail () const
 
void jmodels::JointModel::setIfCanFail (bool b)
 Specifies whether or not "failure" is being allowed for this instanced of the constitutive model.
 
bool jmodels::JointModel::getPlugIn () const
 Indicates whether the model was loaded as a plugin (defaults to false).
 
void jmodels::JointModel::setPlugIn (bool b)
 

Detailed Description

Function Documentation

◆ canFail()

bool jmodels::JointModel::canFail ( ) const
inline

Indicates whether failure should be allowed /// Constitutive models should honor this state, and not allow failure if it returns true.

◆ clone()

virtual JointModel * jmodels::JointModel::clone ( ) const
pure virtual

Returns an instance this class.

A new object, of the same class as the current object, must be created, and a pointer to it of type JointModel returned. This function is called whenever 3DEC installs the model in a subcontact.

◆ copy()

void jmodels::JointModel::copy ( const JointModel * mod)
virtual

Copy property values and state from another constitutive model.

This member function should first call the base class copy function, and then copy all essential data from the model object pointed to by cm (assumed to be of the same derived class as the current model).
It is not necessary to copy data members that are recomputed when the initialize() function is called.
Use dynamic cast<MyModel *>(cm) to upcast cm.

◆ getFullName()

virtual string jmodels::JointModel::getFullName ( ) const
pure virtual

The full name of the model.

Returns a string containing the name of the joint constitutive model that is to be used on printout
(e.g., resulting from the BLOCK CONTACT LIST command).
The name may or may not be the same as that given by the getName() member function,
but note that the code may truncate long strings on printout.
An example of a valid string is "Linearly elastic".

◆ getLibraryMinorVersion()

uint32 jmodels::JointModel::getLibraryMinorVersion ( )
static

Returns the minor version number of the constitutive model library.

This indicates the minor version of the constitutive model library routines.
This will be updated to indicate bug fixes, and minor changes that do not affect binary compatibility.

◆ getMaxNormalStiffness()

virtual double jmodels::JointModel::getMaxNormalStiffness ( ) const
pure virtual

This is used by the code to compute the stable timestep or adjust inertial mass.
.

The model object must return a value for its best estimate of the maximum normal stiffness.

◆ getMaxShearStiffness()

virtual double jmodels::JointModel::getMaxShearStiffness ( ) const
pure virtual

This is used by the code to compute the stable timestep or adjust inertial mass.
.

The model object must return a value for its best estimate of the shear stiffness.

◆ getMinorVersion()

uint32 jmodels::JointModel::getMinorVersion ( ) const
virtual

Returns minor version of base implementation, override for actual model.

The version number of the constitutive model should be returned.
This may be used to deal with the case of restoring files containing objects of earlier versions of the model, which perhaps omit certain variables.

◆ getName()

virtual string jmodels::JointModel::getName ( ) const
pure virtual

Must be unique, used to identify model in save/restore, on command line, filename.

Returns a string containing the name of the joint constitutive model as the user will refer to it with the JMODEL command.
For example, "elastic" would be a valid string in C++.
This must be a unique name, and is used for synchronizing Save/Restore.
This name is also used in the file name of the DLL.

◆ getProperties()

virtual string jmodels::JointModel::getProperties ( ) const
pure virtual

Returns a string containing the names of model properties.

The following string is a valid example: "shear, bulk".
The given names will be those recognized by the BLOCK CONTACT PROPERTY command.
Property names are delimited by commas, synonyms of the same property may be provided within one entry, separated by spaces.

◆ getProperty()

virtual base::Property jmodels::JointModel::getProperty ( uint32 index) const
pure virtual

Return the value of the property of that index (base 1).

A value should be returned for the model property of sequence number n
(previously defined by a getProperties() call, with n=1 denoting the first property). Return real/0.0 if property doesn't exist.

Note
Property indices start with 1!

◆ getStates()

virtual string jmodels::JointModel::getStates ( ) const
pure virtual

Returns a string containing state names.

The names are used on printout and in plotting to identify user-defined internal states of the model (e.g., shear-n).
The following string is a valid example: "yielding, tension".
See the variable State::state_.
State names are delimited by commas

◆ getStrengthStressRatio()

virtual double jmodels::JointModel::getStrengthStressRatio ( const State & ) const
inlinevirtual

Returns the ratio of the shear force to the current yield strength.

Returns the ratio of the passed shear forces to the shear yield strength of the subcontact properties.
Implementing this function is optional.
By convention, 10.0 is the maximum value returned.

◆ initialize()

void jmodels::JointModel::initialize ( uint32 dim,
State * s )
virtual

Initializes the constitutive model in preparation for calls to run().

This function is called once for each model object (i.e., for each subcontact) when the
SOLVE/Step/CYCLE command is given when the large-strain update is performed, and at the beginning of the run() method if isValid() returns false.
The model object may perform initialization of its property or state variables, or it may do nothing.
The dimensionality (e.g., this is 3 for 3DEC ) is given as dim, and structure s contains current information for the subcontact containing the model object.
Note that displacements may be undefined when initialize() is called.
The average force components for the full zone are available in the state structure; they should not be changed by the initialize() member function.
The base class implementation calls setValid(dim).

◆ run()

void jmodels::JointModel::run ( uint32 dim,
State * s )
virtual

Calculate force increments given a displacement increments.

This function is called for each subcontact at each cycle.
The model must update the normal and shear forces from displacement increments.
The structure State s contains the current force components and the computed displacement components for the subcontact being processed.
dim will be either 2 or 3, depending on the dimension of the calling program. The base class implementation will call initialize() if isValid() returns false.

◆ save()

void jmodels::JointModel::save ( std::ostream & o) const
virtual

Allows data other than properties to be saved efficiently. Note that you are responsible for adding data to allow multiple version compatibility yourself. Also note that you should use BINARY output (os.write, is.read) not formatted IO <<.

◆ scaleProperties()

virtual void jmodels::JointModel::scaleProperties ( const double & ,
const std::vector< uint32 > &  )
inlinevirtual

Scales failure property indices v by the factor f.

This function is used to set scaled properties for the Safety Factor calculation. Implementing this function is optional.

  • f is the factor to scale. Some properties may not scale linearly.
  • v is the list of properties (by index) that are requested to be scaled.

◆ setProperty()

void jmodels::JointModel::setProperty ( uint32 index,
const base::Property & p,
uint32 restoreVersion = 0 )
virtual

Sets the value of the property with index i (base 1).

The value of val supplied by the call comes from a command of the form BLOCK CONTACT PROP name=val; the supplied value of n is the sequence number (starting with 1) of the property name previously specified by means of a getProperties() call.
The model object is required to store the supplied value in an appropriate private member variable.
The third argument, restoreVersion, is currently only used to distinguish between calls made while processing data files versus values set during a restore of a save file.
It will be zero for command processing, and 1 in a restore. The base class implementation calls setValid(0), invalidating the object.