https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeThermalExpansionEigenstrainBeamBase.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
14{
16 params.addRequiredCoupledVar("temperature", "Coupled temperature");
17 params.addRequiredCoupledVar("stress_free_temperature",
18 "Reference temperature at which there is no "
19 "thermal expansion for thermal eigenstrain "
20 "calculation");
21 return params;
22}
23
25 const InputParameters & parameters)
26 : ComputeEigenstrainBeamBase(parameters),
27 _temperature(coupledValue("temperature")),
28 _stress_free_temperature(coupledValue("stress_free_temperature"))
29{
30}
31
32void
34{
35 // fetch the two end nodes for current element
36 std::vector<const Node *> node;
37 for (unsigned int i = 0; i < 2; ++i)
38 node.push_back(_current_elem->node_ptr(i));
39
40 // calculate initial axis of the beam element
41 for (unsigned int i = 0; i < 2; ++i)
42 _initial_axis(i) = (*node[1])(i) - (*node[0])(i);
43
45
46 Real thermal_strain = computeThermalStrain();
47
48 _disp_eigenstrain[_qp].zero();
49 _rot_eigenstrain[_qp].zero();
50 _disp_eigenstrain[_qp] = _initial_axis * thermal_strain;
51}
ComputeEigenstrainBeamBase is the base class for beam eigenstrain vectors.
MaterialProperty< RealVectorValue > & _disp_eigenstrain
Stores the current displacement eigenstrain.
MaterialProperty< RealVectorValue > & _rot_eigenstrain
Stores the current rotational eigenstrain.
static InputParameters validParams()
virtual void computeQpEigenstrain() override
Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
const Elem *const & _current_elem