dynLattice
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ElasticRodMaterial Class Reference

Linear elastic rod material with configurable cross-sectional properties.

#include "ElasticRodMaterial.h"

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

Public Member Functions

 ElasticRodMaterial (const String &name, const Properties &conf, const Properties &props, const Properties &globdat)
 Constructor with configuration and global data.
 
virtual void configure (const Properties &props, const Properties &globdat) override
 Configure material properties including cross-sectional geometry.
 
virtual void getConfig (const Properties &conf, const Properties &globdat) const override
 Retrieve current material configuration.
 
virtual Matrix getMaterialStiff () const override
 Get the material stiffness matrix.
 
virtual Matrix getMaterialStiff (const idx_t &ielem, const idx_t &ip) const override
 Get the material stiffness matrix for specific element and integration point.
 
virtual Matrix getMaterialMass () const override
 Get the material mass matrix per unit length.
 
virtual Matrix getMaterialMass (const idx_t &ielem, const idx_t &ip) const override
 Get the material mass matrix for specific element and integration point.
 
virtual Matrix getLumpedMass (const double l) const override
 Get the lumped mass matrix for a given element length.
 
virtual Matrix getLumpedMass (const double l, const idx_t &ielem) const override
 Get the lumped mass matrix for specific element and length.
 
virtual void getStress (const Vector &stress, const Vector &strain) override
 Compute stress vector from strain vector.
 
virtual void getStress (const Vector &stress, const Vector &strain, const idx_t &ielem, const idx_t &ip, const bool inelastic=false) override
 Compute stress with element and integration point context.
 
virtual void getTable (const String &name, XTable &strain_table, const IdxVector &items, const Vector &weights) const override
 Populate strain table with material-specific data.
 
virtual void applyDeform () override
 Apply computed deformation to the material state.
 
virtual void rejectDeform () override
 Reject the current deformation and revert to previous state.
 
virtual double getDissipatedEnergy (const idx_t &ielem, const idx_t &ip) const override
 Get the dissipated energy at a specific integration point.
 
virtual double getPotentialEnergy (const idx_t &ielem, const idx_t &ip) const override
 Get the potential energy at a specific integration point.
 
virtual double getHardeningPotential (const idx_t &ielem, const idx_t &ip) const override
 Get the hardening potential energy at a specific integration point.
 
- Public Member Functions inherited from Material
 Material (const String &name, const Properties &conf, const Properties &props, const Properties &globdat)
 Constructs a new Material object.
 
virtual String getContext () const override
 Get the context string for error reporting and debugging.
 

Static Public Member Functions

static Ref< Material > makeNew (const String &name, const Properties &conf, const Properties &props, const Properties &globdat)
 Factory method for material creation.
 
static void declare ()
 Register material type with factory.
 

Static Public Attributes

Material type and property identifiers
static const char * TYPE_NAME = "ElasticRod"
 
static const char * STIFF_PREFIX = "C_"
 Prefix for direct stiffness-matrix input.
 
static const char * YOUNGS_MODULUS = "young"
 Young's modulus property key.
 
static const char * SHEAR_MODULUS = "shear_modulus"
 Shear modulus property key.
 
static const char * POISSON_RATIO = "poisson_ratio"
 Poisson's ratio property key.
 
static const char * AREA = "area"
 Cross-sectional area property key.
 
static const char * DENSITY = "density"
 Material density property key.
 
static const char * AREA_MOMENT = "area_moment"
 Area moment of inertia property key.
 
static const char * SHEAR_FACTOR = "shear_correction"
 Shear correction factor property key.
 
static const char * POLAR_MOMENT = "polar_moment"
 Polar moment of inertia property key.
 
static const char * CROSS_SECTION = "cross_section"
 Cross-section type property key (e.g., "square", "circle" "rectangle")
 
static const char * RADIUS = "radius"
 Radius for circular sections property key.
 
static const char * SIDE_LENGTH = "side_length"
 Side lengths for rectangular sections property key.
 
Element and edge properties
static const char * N_ELEM = "elemCount"
 Number of elements property key.
 
static const char * EDGE_FACTOR = "edge_factor"
 Edge factor for lattice materials property key.
 
static const char * EDGE_ELEMS = "edge_elements"
 Number of edge elements property key.
 
- Static Public Attributes inherited from Material
static const char * VERBOSITY_PROP = "verbosity"
 Property name for verbosity level control.
 

Protected Member Functions

 ~ElasticRodMaterial ()
 
void calcMaterialStiff_ ()
 Calculate material stiffness matrix.
 
void calcMaterialMass_ ()
 Calculate material mass matrix.
 
- Protected Member Functions inherited from Material
virtual ~Material ()
 Destroy the Material object.
 

Protected Attributes

Material properties
double young_
 Young's modulus.
 
double shearMod_
 Shear modulus.
 
double shearParam_
 Shear parameter.
 
double edgeFact_
 Edge factor for lattice materials.
 
idx_t edgeElems_
 Number of edge elements.
 
idx_t nElem_
 Total number of elements.
 
double area_
 Cross-sectional area.
 
Vector areaMoment_
 Area moments of inertia.
 
double polarMoment_
 Polar moment of inertia.
 
String crossSection_
 Cross-section type identifier.
 
double radius_
 Radius for circular sections.
 
Vector sideLength_
 Side lengths for rectangular sections.
 
double density_
 Material density.
 
Computed matrices and state
Matrix materialK_
 Material stiffness matrix.
 
Matrix materialM_
 Material mass matrix.
 
Cubix oldStrains_
 Strains from last converged step.
 
Cubix currStrains_
 Strains from current iteration.
 
Matrix energyPot_
 Potential energy storage.
 
String rodName_
 Material instance name.
 
- Protected Attributes inherited from Material
idx_t verbosity_
 Verbosity level for material output and debugging.
 

Constructor & Destructor Documentation

◆ ElasticRodMaterial()

ElasticRodMaterial::ElasticRodMaterial ( const String &  name,
const Properties &  conf,
const Properties &  props,
const Properties &  globdat 
)

◆ ~ElasticRodMaterial()

ElasticRodMaterial::~ElasticRodMaterial ( )
protected

Member Function Documentation

◆ applyDeform()

void ElasticRodMaterial::applyDeform ( )
overridevirtual

This method commits the current deformation state to the material's internal variables. It's typically called at the end of a successful load step to update the material's permanent state.

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ calcMaterialMass_()

void ElasticRodMaterial::calcMaterialMass_ ( )
protected

◆ calcMaterialStiff_()

void ElasticRodMaterial::calcMaterialStiff_ ( )
protected

◆ configure()

void ElasticRodMaterial::configure ( const Properties &  props,
const Properties &  globdat 
)
overridevirtual
Parameters
propsProperties containing configuration parameters
globdatGlobal data container with simulation context
Exceptions
jem::IllegalInputExceptionif negative material properties are provided

Reimplemented from Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ declare()

void ElasticRodMaterial::declare ( )
static

◆ getConfig()

void ElasticRodMaterial::getConfig ( const Properties &  conf,
const Properties &  globdat 
) const
overridevirtual
Parameters
confProperties object to store configuration in
globdatGlobal data container with simulation context

Reimplemented from Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ getDissipatedEnergy()

double ElasticRodMaterial::getDissipatedEnergy ( const idx_t &  ielem,
const idx_t &  ip 
) const
overridevirtual

Computes the energy dissipated through inelastic processes at the specified element and integration point location.

Parameters
ielemElement index
ipIntegration point index within the element
Returns
Total dissipated energy at the specified location

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ getHardeningPotential()

double ElasticRodMaterial::getHardeningPotential ( const idx_t &  ielem,
const idx_t &  ip 
) const
overridevirtual

Computes the energy stored in hardening variables for plasticity models. This represents the energy associated with the evolution of the yield surface.

Parameters
ielemElement index
ipIntegration point index within the element
Returns
Hardening potential energy at the specified location

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ getLumpedMass() [1/2]

Matrix ElasticRodMaterial::getLumpedMass ( const double  l) const
overridevirtual

Computes a lumped (diagonal) mass matrix for the given element length.

Parameters
lElement length
Returns
Lumped mass matrix for the element

Reimplemented from Material.

◆ getLumpedMass() [2/2]

Matrix ElasticRodMaterial::getLumpedMass ( const double  l,
const idx_t &  ielem 
) const
overridevirtual

Default element-specific lumped mass.

Element-specific version of lumped mass computation.

Parameters
lElement length
ielemElement index for potential customization
Returns
Lumped mass matrix for the specified element

Reimplemented from Material.

◆ getMaterialMass() [1/2]

Matrix ElasticRodMaterial::getMaterialMass ( ) const
overridevirtual

Computes the material mass density matrix used in dynamic analysis. The translational part of the mass matrix is typically diagonal with density values.

Returns
Mass matrix per unit length

Implements Material.

◆ getMaterialMass() [2/2]

Matrix ElasticRodMaterial::getMaterialMass ( const idx_t &  ielem,
const idx_t &  ip 
) const
overridevirtual

Default element-specific mass matrix.

Enhanced version for element-specific mass computation.

Parameters
ielemElement index for potential state tracking
ipIntegration point index within the element
Returns
Material mass matrix for the specified location

Reimplemented from Material.

◆ getMaterialStiff() [1/2]

Matrix ElasticRodMaterial::getMaterialStiff ( ) const
overridevirtual

Computes the material stiffness matrix relating stress to strain. This matrix represents the tangent modulus of the material at the current state.

Returns
Material stiffness matrix

Implements Material.

◆ getMaterialStiff() [2/2]

Matrix ElasticRodMaterial::getMaterialStiff ( const idx_t &  ielem,
const idx_t &  ip 
) const
overridevirtual

Default element-specific stiffness matrix.

Enhanced version that allows state-dependent stiffness computation.

Parameters
ielemElement index for state tracking
ipIntegration point index within the element
Returns
Material stiffness matrix for the specified location
Note
Default implementation delegates to getMaterialStiff()

Reimplemented from Material.

◆ getPotentialEnergy()

double ElasticRodMaterial::getPotentialEnergy ( const idx_t &  ielem,
const idx_t &  ip 
) const
overridevirtual

Computes the stored elastic energy at the specified element and integration point location.

Parameters
ielemElement index
ipIntegration point index within the element
Returns
Elastic potential energy at the specified location
Note
0 for purely elastic materials

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ getStress() [1/2]

void ElasticRodMaterial::getStress ( const Vector &  stress,
const Vector &  strain 
)
overridevirtual

Fundamental constitutive relationship defining material response to deformation. All derived material classes must implement this method.

Parameters
[out]stressComputed stress vector at current state
[in]strainInput strain vector for stress computation
Note
For rod elements: 6-dimensional vectors (axial, shear, bending, torsion)

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ getStress() [2/2]

void ElasticRodMaterial::getStress ( const Vector &  stress,
const Vector &  strain,
const idx_t &  ielem,
const idx_t &  ip,
const bool  inelastic = false 
)
overridevirtual

Default element-specific stress computation.

Parameters
[out]stressComputed stress vector
[in]strainInput strain vector
[in]ielemElement index for state tracking
[in]ipIntegration point index
[in]inelasticEnable inelastic behavior (default: true)
Note
Default delegates to getStress(stress, strain) ElastoPlasticRodMaterial overrides for plastic state management

Reimplemented from Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ getTable()

void ElasticRodMaterial::getTable ( const String &  name,
XTable &  strain_table,
const IdxVector &  items,
const Vector &  weights 
) const
overridevirtual

This method fills an XTable with strain-related data for output or post-processing purposes. The specific data depends on the material type.

Parameters
nameName identifier for the table data
strain_tableOutput table to populate with strain data
itemsIndex vector specifying which items to include
weightsWeight vector for data averaging or integration

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

◆ makeNew()

Ref< Material > ElasticRodMaterial::makeNew ( const String &  name,
const Properties &  conf,
const Properties &  props,
const Properties &  globdat 
)
static

◆ rejectDeform()

void ElasticRodMaterial::rejectDeform ( )
overridevirtual

This method reverts the material to its state before the current load step. It's called when a load step fails to converge or needs to be repeated.

Implements Material.

Reimplemented in ElastoPlasticRodMaterial.

Member Data Documentation

◆ AREA

const char * ElasticRodMaterial::AREA = "area"
static

◆ area_

double ElasticRodMaterial::area_
protected

◆ AREA_MOMENT

const char * ElasticRodMaterial::AREA_MOMENT = "area_moment"
static

◆ areaMoment_

Vector ElasticRodMaterial::areaMoment_
protected

◆ CROSS_SECTION

const char * ElasticRodMaterial::CROSS_SECTION = "cross_section"
static

◆ crossSection_

String ElasticRodMaterial::crossSection_
protected

◆ currStrains_

Cubix ElasticRodMaterial::currStrains_
protected

◆ DENSITY

const char * ElasticRodMaterial::DENSITY = "density"
static

◆ density_

double ElasticRodMaterial::density_
protected

◆ EDGE_ELEMS

const char * ElasticRodMaterial::EDGE_ELEMS = "edge_elements"
static

◆ EDGE_FACTOR

const char * ElasticRodMaterial::EDGE_FACTOR = "edge_factor"
static

◆ edgeElems_

idx_t ElasticRodMaterial::edgeElems_
protected

◆ edgeFact_

double ElasticRodMaterial::edgeFact_
protected

◆ energyPot_

Matrix ElasticRodMaterial::energyPot_
protected

◆ materialK_

Matrix ElasticRodMaterial::materialK_
protected

◆ materialM_

Matrix ElasticRodMaterial::materialM_
protected

◆ N_ELEM

const char * ElasticRodMaterial::N_ELEM = "elemCount"
static

◆ nElem_

idx_t ElasticRodMaterial::nElem_
protected

◆ oldStrains_

Cubix ElasticRodMaterial::oldStrains_
protected

◆ POISSON_RATIO

const char * ElasticRodMaterial::POISSON_RATIO = "poisson_ratio"
static

◆ POLAR_MOMENT

const char * ElasticRodMaterial::POLAR_MOMENT = "polar_moment"
static

◆ polarMoment_

double ElasticRodMaterial::polarMoment_
protected

◆ RADIUS

const char * ElasticRodMaterial::RADIUS = "radius"
static

◆ radius_

double ElasticRodMaterial::radius_
protected

◆ rodName_

String ElasticRodMaterial::rodName_
protected

◆ SHEAR_FACTOR

const char * ElasticRodMaterial::SHEAR_FACTOR = "shear_correction"
static

◆ SHEAR_MODULUS

const char * ElasticRodMaterial::SHEAR_MODULUS = "shear_modulus"
static

◆ shearMod_

double ElasticRodMaterial::shearMod_
protected

◆ shearParam_

double ElasticRodMaterial::shearParam_
protected

◆ SIDE_LENGTH

const char * ElasticRodMaterial::SIDE_LENGTH = "side_length"
static

◆ sideLength_

Vector ElasticRodMaterial::sideLength_
protected

◆ STIFF_PREFIX

const char * ElasticRodMaterial::STIFF_PREFIX = "C_"
static

◆ TYPE_NAME

const char * ElasticRodMaterial::TYPE_NAME = "ElasticRod"
static

◆ young_

double ElasticRodMaterial::young_
protected

◆ YOUNGS_MODULUS

const char * ElasticRodMaterial::YOUNGS_MODULUS = "young"
static