https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeElasticityBeam.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#include "Function.h"
12
14
17{
19 params.addClassDescription("Computes the equivalent of the elasticity tensor for the beam "
20 "element, which are vectors of material translational and flexural "
21 "stiffness.");
22 params.addParam<FunctionName>(
23 "elasticity_prefactor",
24 "Optional function to use as a scalar prefactor on the elasticity vector for the beam.");
26 "youngs_modulus",
27 "Young's modulus of the material. Can be supplied as either a number or a variable name.");
29 "poissons_ratio",
30 "Poisson's ratio of the material. Can be supplied as either a number or a variable name.");
31 params.addCoupledVar(
32 "shear_coefficient",
33 1.0,
34 "Scale factor for the shear modulus. Can be supplied as either a number or a variable name.");
35 return params;
36}
37
39 : Material(parameters),
40 _material_stiffness(declareProperty<RealVectorValue>("material_stiffness")),
41 _material_flexure(declareProperty<RealVectorValue>("material_flexure")),
42 _prefactor_function(isParamValid("elasticity_prefactor") ? &getFunction("elasticity_prefactor")
43 : nullptr),
44 _youngs_modulus(coupledValue("youngs_modulus")),
45 _poissons_ratio(coupledValue("poissons_ratio")),
46 _shear_coefficient(coupledValue("shear_coefficient"))
47{
48}
49
50void
52{
53 const Real shear_modulus = _youngs_modulus[_qp] / (2.0 * (1.0 + _poissons_ratio[_qp]));
54
55 // material_stiffness relates the translational strains to forces
57 _material_stiffness[_qp](1) = _shear_coefficient[_qp] * shear_modulus;
59
60 // material_flexure relates the rotational strains to moments
61 _material_flexure[_qp](0) = _shear_coefficient[_qp] * shear_modulus;
64
65 // Multiply by prefactor
67 {
70 }
71}
registerMooseObject("SolidMechanicsApp", ComputeElasticityBeam)
ComputeElasticityBeam computes the equivalent of the elasticity tensor for the beam element,...
const VariableValue & _shear_coefficient
Shear coefficient for the beam cross-section.
ComputeElasticityBeam(const InputParameters &parameters)
virtual void computeQpProperties() override
const Function *const _prefactor_function
Prefactor function used to modify (i.e., multiply) the material stiffness and flexure vectors.
const VariableValue & _poissons_ratio
Poisson's ratio of the beam material.
const VariableValue & _youngs_modulus
Young's modulus of the beam material.
static InputParameters validParams()
MaterialProperty< RealVectorValue > & _material_stiffness
Material stiffness vector that relates displacement strain increments to force increments.
MaterialProperty< RealVectorValue > & _material_flexure
Material flexure vector that relates rotational strain increments to moment increments.
virtual Real value(Real t, const Point &p) const
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
const MooseArray< Point > & _q_point
Real & _t