https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Compute1DSmallStrain.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
12#include "libmesh/quadrature.h"
13
16{
18 params.addClassDescription("Compute a small strain in 1D problem");
19 return params;
20}
21
26
27void
29{
30 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
31 {
32 _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
33 _total_strain[_qp](1, 1) = computeStrainYY();
34 _total_strain[_qp](2, 2) = computeStrainZZ();
35
37
38 // Remove the eigenstrain
39 for (auto es : _eigenstrains)
40 _mechanical_strain[_qp] -= (*es)[_qp];
41 }
42}
Compute1DSmallStrain(const InputParameters &parameters)
virtual Real computeStrainZZ()=0
Computes the strain_zz; as a virtual function, this function is overwritten for the specific geometri...
void computeProperties() override
virtual Real computeStrainYY()=0
Computes the strain_yy; as a virtual function, this function is overwritten for the specific geometri...
static InputParameters validParams()
ComputeSmallStrain defines a strain tensor, assuming small strains.
static InputParameters validParams()
std::vector< const VariableGradient * > _grad_disp
Gradient of displacements.
MaterialProperty< RankTwoTensor > & _mechanical_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
MaterialProperty< RankTwoTensor > & _total_strain
void addClassDescription(const std::string &doc_string)