www.mooseframework.org
ComputeThermalExpansionEigenstrainBeamBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
32 void
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 }
auto norm() const -> decltype(std::norm(Real()))
RealGradient _initial_axis
Initial orientation of the beam.
virtual void computeQpEigenstrain() override
Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain.
MaterialProperty< RealVectorValue > & _rot_eigenstrain
Stores the current rotational eigenstrain.
unsigned int _qp
MaterialProperty< RealVectorValue > & _disp_eigenstrain
Stores the current displacement eigenstrain.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ComputeEigenstrainBeamBase is the base class for beam eigenstrain vectors.
ComputeThermalExpansionEigenstrainBeamBase(const InputParameters &parameters)
const Elem *const & _current_elem