www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LinearViscoelasticityManager Class Reference

This class manages a LinearViscoelasticityBase object. More...

#include <LinearViscoelasticityManager.h>

Inheritance diagram for LinearViscoelasticityManager:
[legend]

Public Member Functions

 LinearViscoelasticityManager (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void initialize () override
 
virtual void execute () override
 
virtual void threadJoin (const UserObject &) override
 
virtual void finalize () override
 

Protected Attributes

std::string _stress_name
 
const MaterialProperty< RankTwoTensor > & _stress
 
std::string _creep_strain_name
 
const MaterialProperty< RankTwoTensor > & _creep_strain
 Name of the creep strain variable used for the update of the viscoelastic strain. More...
 
std::string _elastic_strain_name
 
const MaterialProperty< RankTwoTensor > & _elastic_strain
 Name of the elastic strain variable used for the update of the viscoelastic strain. More...
 
std::string _viscoelastic_model_name
 Name of the viscoelastic model to update. More...
 
std::shared_ptr< LinearViscoelasticityBase_viscoelastic_model
 Pointer to the viscoelastic model to update. More...
 

Detailed Description

This class manages a LinearViscoelasticityBase object.

Its primary purpose is to initialize the internal MaterialProperties contained in the viscoelastic model at the beginning of each time step, and update those properties at the end of each time step.

Whenever a LinearViscoelasticityBase object is created, it must be associated to one LinearViscoelasticityManager user object, otherwise the viscoelastic creep strains and properties will not be computed accordingly.

See LinearViscoelasticityBase for more information.

Definition at line 33 of file LinearViscoelasticityManager.h.

Constructor & Destructor Documentation

◆ LinearViscoelasticityManager()

LinearViscoelasticityManager::LinearViscoelasticityManager ( const InputParameters &  parameters)

Definition at line 40 of file LinearViscoelasticityManager.C.

41  : ElementUserObject(parameters),
42  _stress_name(getParam<std::string>("stress_name")),
43  _stress(getMaterialPropertyByName<RankTwoTensor>(_stress_name)),
44  _creep_strain_name(getParam<std::string>("creep_strain_name")),
45  _creep_strain(getMaterialPropertyByName<RankTwoTensor>(_creep_strain_name)),
46  _elastic_strain_name(getParam<std::string>("elastic_strain_name")),
47  _elastic_strain(getMaterialPropertyByName<RankTwoTensor>(_elastic_strain_name)),
48  _viscoelastic_model_name(getParam<std::string>("viscoelastic_model")),
49  _viscoelastic_model(nullptr)
50 {
51 }

Member Function Documentation

◆ execute()

void LinearViscoelasticityManager::execute ( )
overrideprotectedvirtual

Definition at line 54 of file LinearViscoelasticityManager.C.

55 {
56  if (_mi_feproblem.getCurrentExecuteOnFlag() == EXEC_TIMESTEP_BEGIN)
57  {
58  for (unsigned int _qp = 0; _qp < _qrule->n_points(); ++_qp)
59  _viscoelastic_model->recomputeQpApparentProperties(_qp);
60  }
61 }

◆ finalize()

virtual void LinearViscoelasticityManager::finalize ( )
inlineoverrideprotectedvirtual

Definition at line 44 of file LinearViscoelasticityManager.h.

44 {};

◆ initialize()

void LinearViscoelasticityManager::initialize ( )
overrideprotectedvirtual

Definition at line 64 of file LinearViscoelasticityManager.C.

65 {
66  std::shared_ptr<MaterialBase> test =
67  _mi_feproblem.getMaterial(_viscoelastic_model_name, _material_data_type, _mi_tid, true);
68 
69  if (!test)
70  mooseError(_viscoelastic_model_name + " does not exist");
71 
72  _viscoelastic_model = std::dynamic_pointer_cast<LinearViscoelasticityBase>(test);
73 
75  mooseError(_viscoelastic_model_name + " is not a LinearViscoelasticityBase object");
76 }

◆ threadJoin()

virtual void LinearViscoelasticityManager::threadJoin ( const UserObject &  )
inlineoverrideprotectedvirtual

Definition at line 43 of file LinearViscoelasticityManager.h.

43 {};

◆ validParams()

InputParameters LinearViscoelasticityManager::validParams ( )
static

Definition at line 18 of file LinearViscoelasticityManager.C.

19 {
20  InputParameters params = ElementUserObject::validParams();
21  params.addClassDescription("Manages the updating of the semi-implicit "
22  "single-step first-order finite difference "
23  "time-stepping scheme");
24  params.addRequiredParam<std::string>("viscoelastic_model",
25  "name of the LinearViscoelasticityBase object to manage");
26  params.addParam<std::string>(
27  "stress_name", "stress", "name of the stress tensor used for the viscoelastic update");
28  params.addParam<std::string>("creep_strain_name",
29  "creep_strain",
30  "name of the creep strain tensor used for the viscoelastic update");
31  params.addParam<std::string>(
32  "elastic_strain_name",
33  "elastic_strain",
34  "name of the elastic strain tensor used for the viscoelastic update");
35  params.set<ExecFlagEnum>("execute_on") = {EXEC_TIMESTEP_BEGIN, EXEC_TIMESTEP_END};
36  params.suppressParameter<ExecFlagEnum>("execute_on");
37  return params;
38 }

Member Data Documentation

◆ _creep_strain

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityManager::_creep_strain
protected

Name of the creep strain variable used for the update of the viscoelastic strain.

Definition at line 55 of file LinearViscoelasticityManager.h.

◆ _creep_strain_name

std::string LinearViscoelasticityManager::_creep_strain_name
protected

Definition at line 53 of file LinearViscoelasticityManager.h.

◆ _elastic_strain

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityManager::_elastic_strain
protected

Name of the elastic strain variable used for the update of the viscoelastic strain.

Definition at line 59 of file LinearViscoelasticityManager.h.

◆ _elastic_strain_name

std::string LinearViscoelasticityManager::_elastic_strain_name
protected

Definition at line 57 of file LinearViscoelasticityManager.h.

◆ _stress

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityManager::_stress
protected

Definition at line 51 of file LinearViscoelasticityManager.h.

◆ _stress_name

std::string LinearViscoelasticityManager::_stress_name
protected

Definition at line 44 of file LinearViscoelasticityManager.h.

◆ _viscoelastic_model

std::shared_ptr<LinearViscoelasticityBase> LinearViscoelasticityManager::_viscoelastic_model
protected

Pointer to the viscoelastic model to update.

Definition at line 64 of file LinearViscoelasticityManager.h.

Referenced by execute(), and initialize().

◆ _viscoelastic_model_name

std::string LinearViscoelasticityManager::_viscoelastic_model_name
protected

Name of the viscoelastic model to update.

Definition at line 62 of file LinearViscoelasticityManager.h.

Referenced by initialize().


The documentation for this class was generated from the following files:
LinearViscoelasticityManager::_creep_strain_name
std::string _creep_strain_name
Definition: LinearViscoelasticityManager.h:53
LinearViscoelasticityManager::_viscoelastic_model_name
std::string _viscoelastic_model_name
Name of the viscoelastic model to update.
Definition: LinearViscoelasticityManager.h:62
LinearViscoelasticityManager::_elastic_strain
const MaterialProperty< RankTwoTensor > & _elastic_strain
Name of the elastic strain variable used for the update of the viscoelastic strain.
Definition: LinearViscoelasticityManager.h:59
LinearViscoelasticityManager::_stress
const MaterialProperty< RankTwoTensor > & _stress
Definition: LinearViscoelasticityManager.h:51
validParams
InputParameters validParams()
LinearViscoelasticityManager::_viscoelastic_model
std::shared_ptr< LinearViscoelasticityBase > _viscoelastic_model
Pointer to the viscoelastic model to update.
Definition: LinearViscoelasticityManager.h:64
LinearViscoelasticityManager::_elastic_strain_name
std::string _elastic_strain_name
Definition: LinearViscoelasticityManager.h:57
LinearViscoelasticityManager::_creep_strain
const MaterialProperty< RankTwoTensor > & _creep_strain
Name of the creep strain variable used for the update of the viscoelastic strain.
Definition: LinearViscoelasticityManager.h:55
LinearViscoelasticityManager::_stress_name
std::string _stress_name
Definition: LinearViscoelasticityManager.h:44