suanPan
Loading...
Searching...
No Matches
MaterialExample Class Referencefinal

A MaterialExample material class. More...

#include <MaterialExample.h>

Inheritance diagram for MaterialExample:
Collaboration diagram for MaterialExample:

Public Member Functions

 MaterialExample (unsigned=0, double=2E5, double=400., double=.05, double=0., double=0.)
 The constructor of material model depends on the specific model to be implemented. But for the base Material class, it takes only three input arguments: More...
 
int initialize (const shared_ptr< DomainBase > &) override
 Unless the target material model involves other material models to compute responses, in general, it is not necessary to get additional information from other parts of the model. More...
 
unique_ptr< Materialget_copy () override
 The get_copy() method should always be implemented with make_unique. In case the model defines other memory management, developers may need to further provide a copy ctor to make make_unique work. More...
 
int update_trial_status (const vec &) override
 There are two states we are managing at any time point. The current state is the converged state from the last time substep. Since it is converged, all data shall be valid and accurate. The trial state stores the response computed based on converged state and new trial strain. It may be discarded, committed or overwritten with new trial values. More...
 
int clear_status () override
 Operations are required to achieve the following objective. More...
 
int commit_status () override
 Operations are required to achieve the following objective. More...
 
int reset_status () override
 Operations are required to achieve the following objective. More...
 
void print () override
 
- Public Member Functions inherited from Material
 Material (unsigned=0, MaterialType=MaterialType::D0, double=0.)
 
 Material (const Material &)=default
 
 Material (Material &&)=delete
 
Materialoperator= (const Material &)=delete
 
Materialoperator= (Material &&)=delete
 
 ~Material () override=default
 
int initialize_base (const shared_ptr< DomainBase > &)
 
virtual int initialize (const shared_ptr< DomainBase > &)=0
 
virtual void initialize_couple (const shared_ptr< DomainBase > &)
 
virtual void initialize_history (unsigned)
 
virtual void set_initial_history (const vec &)
 
void set_initialized (bool) const
 
void set_symmetric (bool) const
 
void set_support_couple (bool) const
 
bool is_initialized () const
 
bool is_symmetric () const
 
bool is_support_couple () const
 
void set_characteristic_length (double)
 
double get_characteristic_length () const
 
MaterialType get_material_type () const
 
virtual double get_parameter (ParameterType) const
 
virtual const vec & get_trial_strain ()
 
virtual const vec & get_trial_strain_rate ()
 
virtual const vec & get_trial_strain_acc ()
 
virtual const vec & get_trial_stress ()
 
virtual const mat & get_trial_stiffness ()
 
virtual const mat & get_trial_secant ()
 
virtual const mat & get_trial_damping ()
 
virtual const mat & get_trial_inertial ()
 
virtual const vec & get_current_strain ()
 
virtual const vec & get_current_strain_rate ()
 
virtual const vec & get_current_strain_acc ()
 
virtual const vec & get_current_stress ()
 
virtual const mat & get_current_stiffness ()
 
virtual const mat & get_current_secant ()
 
virtual const mat & get_current_damping ()
 
virtual const mat & get_current_inertial ()
 
virtual const vec & get_initial_history () const
 
virtual const mat & get_initial_stiffness () const
 
virtual const mat & get_initial_damping () const
 
virtual const mat & get_initial_inertial () const
 
virtual const vec & get_trial_curvature ()
 
virtual const vec & get_trial_couple_stress ()
 
virtual const mat & get_trial_couple_stiffness ()
 
virtual const vec & get_current_curvature ()
 
virtual const vec & get_current_couple_stress ()
 
virtual const mat & get_current_couple_stiffness ()
 
virtual const mat & get_initial_couple_stiffness () const
 
virtual unique_ptr< Materialget_copy ()=0
 
int update_incre_status (double)
 
int update_incre_status (double, double)
 
int update_incre_status (double, double, double)
 
int update_trial_status (double)
 
int update_trial_status (double, double)
 
int update_trial_status (double, double, double)
 
virtual int update_incre_status (const vec &)
 
virtual int update_incre_status (const vec &, const vec &)
 
virtual int update_incre_status (const vec &, const vec &, const vec &)
 
virtual int update_trial_status (const vec &)
 
virtual int update_trial_status (const vec &, const vec &)
 
virtual int update_trial_status (const vec &, const vec &, const vec &)
 
int update_couple_incre_status (double)
 
int update_couple_incre_status (double, double)
 
int update_couple_incre_status (double, double, double)
 
int update_couple_trial_status (double)
 
int update_couple_trial_status (double, double)
 
int update_couple_trial_status (double, double, double)
 
virtual int update_couple_incre_status (const vec &)
 
virtual int update_couple_incre_status (const vec &, const vec &)
 
virtual int update_couple_incre_status (const vec &, const vec &, const vec &)
 
virtual int update_couple_trial_status (const vec &)
 
virtual int update_couple_trial_status (const vec &, const vec &)
 
virtual int update_couple_trial_status (const vec &, const vec &, const vec &)
 
virtual int clear_status ()=0
 
virtual int commit_status ()=0
 
virtual int reset_status ()=0
 
virtual int clear_couple_status ()
 
virtual int commit_couple_status ()
 
virtual int reset_couple_status ()
 
virtual std::vector< vec > record (OutputType)
 
- Public Member Functions inherited from Tag
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&)=default
 
Tagoperator= (const Tag &)=delete
 
Tagoperator= (Tag &&)=delete
 
virtual ~Tag ()=default
 
void set_tag (unsigned) const
 
unsigned get_tag () const
 
void enable ()
 
void disable ()
 
void guard ()
 
void unguard ()
 
bool is_active () const
 
bool is_guarded () const
 
virtual void print ()
 

Additional Inherited Members

- Protected Member Functions inherited from Tag
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&)=default
 
Tagoperator= (const Tag &)=delete
 
Tagoperator= (Tag &&)=delete
 
virtual ~Tag ()=default
 
void set_tag (unsigned) const
 
unsigned get_tag () const
 
void enable ()
 
void disable ()
 
void guard ()
 
void unguard ()
 
bool is_active () const
 
bool is_guarded () const
 
virtual void print ()
 
- Protected Attributes inherited from DataMaterial
const double tolerance = 1E-14
 
const double density = 0.
 
const MaterialType material_type = MaterialType::D0
 
vec current_strain
 
vec current_strain_rate
 
vec current_strain_acc
 
vec current_stress
 
vec trial_strain
 
vec trial_strain_rate
 
vec trial_strain_acc
 
vec trial_stress
 
vec incre_strain
 
vec incre_strain_rate
 
vec incre_strain_acc
 
vec incre_stress
 
vec initial_history
 
vec current_history
 
vec trial_history
 
mat initial_stiffness
 
mat current_stiffness
 
mat trial_stiffness
 
mat initial_damping
 
mat current_damping
 
mat trial_damping
 
mat initial_inertial
 
mat current_inertial
 
mat trial_inertial
 
- Protected Attributes inherited from DataCoupleMaterial
double characteristic_length = -1.
 
vec current_curvature
 
vec current_couple_stress
 
vec trial_curvature
 
vec trial_couple_stress
 
vec incre_curvature
 
vec incre_couple_stress
 
mat initial_couple_stiffness
 
mat current_couple_stiffness
 
mat trial_couple_stiffness
 

Detailed Description

A MaterialExample material class.

Author
tlc
Date
06/07/2018
Version
0.2.0

Constructor & Destructor Documentation

◆ MaterialExample()

MaterialExample::MaterialExample ( unsigned  T = 0,
double  E = 2E5,
double  Y = 400.,
double  H = .05,
double  B = 0.,
double  R = 0. 
)
explicit

The constructor of material model depends on the specific model to be implemented. But for the base Material class, it takes only three input arguments:

Here we are implementing a uniaxial bilinear hardening model, hence MaterialType::D1 is passed to the base. The material type will be used to validate with associated elements/sections to ensure the consistency of the sizes of data passed between objects.

Parameters
TUnique Material Tag
EElastic Modulus
YYield Stress
HHardening Ratio
BBeta
RDensity

Member Function Documentation

◆ clear_status()

int MaterialExample::clear_status ( )
overridevirtual

Operations are required to achieve the following objective.

current state -> 0 trial state -> 0

Returns
error flag

Implements Material.

Here is the call graph for this function:

◆ commit_status()

int MaterialExample::commit_status ( )
overridevirtual

Operations are required to achieve the following objective.

current state <- trial state

Returns
error flag

Implements Material.

◆ get_copy()

unique_ptr< Material > MaterialExample::get_copy ( )
overridevirtual

The get_copy() method should always be implemented with make_unique. In case the model defines other memory management, developers may need to further provide a copy ctor to make make_unique work.

!!!NEVER DO A MANUAL COPY OF DATA IN THIS METHOD!!!

Returns
a copy of material model

Implements Material.

◆ initialize()

int MaterialExample::initialize ( const shared_ptr< DomainBase > &  )
overridevirtual

Unless the target material model involves other material models to compute responses, in general, it is not necessary to get additional information from other parts of the model.

In general cases, history variables shall be initialised and initial stiffness (and initial damping if appropriate) shall be set to proper value.

To enable initial values for history variables, build-in trial_history and current_history shall be used, developers can initialise them via method initialise_history() so that initial values set by initial command will not be overwritten.

In this example, instead of using build-in history variables, we manage history variables, namely back stress and plastic strain, by ourselves.

Implements Material.

◆ print()

void MaterialExample::print ( )
overridevirtual

Reimplemented from Tag.

◆ reset_status()

int MaterialExample::reset_status ( )
overridevirtual

Operations are required to achieve the following objective.

current state -> trial state

Returns
error flag

Implements Material.

Here is the caller graph for this function:

◆ update_trial_status()

int MaterialExample::update_trial_status ( const vec &  t_strain)
overridevirtual

There are two states we are managing at any time point. The current state is the converged state from the last time substep. Since it is converged, all data shall be valid and accurate. The trial state stores the response computed based on converged state and new trial strain. It may be discarded, committed or overwritten with new trial values.

WE ALWAYS COMPUTE TRIAL STATE BASED ON CURRENT STATE AND NEW TRIAL STRAIN NEVER COMPUTE RESPONSE BASED ON ANY INFORMATION FROM UNCONVERGED STATE

Developers who are not familiar with classic plasticity theory may consult textbooks for details.

Parameters
t_straintrial strain
Returns
error flag

Reimplemented from Material.

Here is the call graph for this function:

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