#include <TrussMaterial.h>
Definition at line 20 of file TrussMaterial.h.
◆ TrussMaterial()
TrussMaterial::TrussMaterial |
( |
const InputParameters & |
parameters | ) |
|
Definition at line 37 of file TrussMaterial.C.
38 : Material(parameters),
39 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
46 const std::vector<VariableName> & nl_vnames(getParam<std::vector<VariableName>>(
"displacements"));
50 for (
unsigned int i = 0; i <
_ndisp; ++i)
51 _disp_var.push_back(&_fe_problem.getStandardVariable(_tid, nl_vnames[i]));
◆ computeProperties()
void TrussMaterial::computeProperties |
( |
| ) |
|
|
protectedvirtual |
Definition at line 63 of file TrussMaterial.C.
66 mooseAssert(_current_elem->n_nodes() == 2,
"Truss element needs to have exactly two nodes.");
69 std::vector<const Node *> node;
70 for (
unsigned int i = 0; i < 2; ++i)
71 node.push_back(_current_elem->node_ptr(i));
75 for (
unsigned int i = 0; i <
_ndisp; ++i)
76 dxyz(i) = (*node[1])(i) - (*node[0])(i);
80 NonlinearSystemBase & nonlinear_sys = _fe_problem.getNonlinearSystemBase();
81 const NumericVector<Number> & sol = *nonlinear_sys.currentSolution();
83 std::vector<Real> disp0, disp1;
84 for (
unsigned int i = 0; i <
_ndisp; ++i)
86 disp0.push_back(sol(node[0]->dof_number(nonlinear_sys.number(),
_disp_var[i]->number(), 0)));
87 disp1.push_back(sol(node[1]->dof_number(nonlinear_sys.number(),
_disp_var[i]->number(), 0)));
91 for (
unsigned int i = 0; i <
_ndisp; ++i)
92 dxyz(i) += disp1[i] - disp0[i];
95 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
◆ computeQpStrain()
virtual void TrussMaterial::computeQpStrain |
( |
| ) |
|
|
protectedpure virtual |
◆ computeQpStress()
virtual void TrussMaterial::computeQpStress |
( |
| ) |
|
|
protectedpure virtual |
◆ initQpStatefulProperties()
void TrussMaterial::initQpStatefulProperties |
( |
| ) |
|
|
protectedvirtual |
◆ validParams()
InputParameters TrussMaterial::validParams |
( |
| ) |
|
|
static |
Definition at line 23 of file TrussMaterial.C.
26 params.addParam<std::string>(
"base_name",
27 "Optional parameter that allows the user to define "
28 "multiple mechanics material systems on the same "
29 "block, i.e. for multiple phases");
30 params.addRequiredParam<std::vector<VariableName>>(
32 "The displacements appropriate for the simulation geometry and coordinate system");
33 params.addCoupledVar(
"youngs_modulus",
"Variable containing Young's modulus");
Referenced by LinearElasticTruss::validParams().
◆ _axial_stress
MaterialProperty<Real>& TrussMaterial::_axial_stress |
|
protected |
◆ _base_name
const std::string TrussMaterial::_base_name |
|
protected |
◆ _current_length
Real TrussMaterial::_current_length |
|
protected |
◆ _disp_var
std::vector<MooseVariable *> TrussMaterial::_disp_var |
|
protected |
◆ _e_over_l
MaterialProperty<Real>& TrussMaterial::_e_over_l |
|
protected |
◆ _elastic_stretch
MaterialProperty<Real>& TrussMaterial::_elastic_stretch |
|
protected |
◆ _ndisp
unsigned int TrussMaterial::_ndisp |
|
protected |
◆ _origin_length
Real TrussMaterial::_origin_length |
|
protected |
◆ _total_stretch
MaterialProperty<Real>& TrussMaterial::_total_stretch |
|
protected |
◆ _youngs_modulus
const VariableValue& TrussMaterial::_youngs_modulus |
|
protected |
The documentation for this class was generated from the following files: