Line data Source code
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 : 10 : #include "ComputeCosseratLinearElasticStress.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", ComputeCosseratLinearElasticStress); 13 : 14 : InputParameters 15 440 : ComputeCosseratLinearElasticStress::validParams() 16 : { 17 440 : InputParameters params = ComputeCosseratStressBase::validParams(); 18 440 : params.addClassDescription( 19 : "Compute Cosserat stress and couple-stress elasticity for small strains"); 20 440 : return params; 21 0 : } 22 : 23 330 : ComputeCosseratLinearElasticStress::ComputeCosseratLinearElasticStress( 24 330 : const InputParameters & parameters) 25 : : ComputeCosseratStressBase(parameters), 26 330 : _elasticity_tensor_name(_base_name + "elasticity_tensor"), 27 330 : _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_elasticity_tensor_name)) 28 : { 29 330 : } 30 : 31 : void 32 324 : ComputeCosseratLinearElasticStress::initialSetup() 33 : { 34 648 : if (hasBlockMaterialProperty<RankTwoTensor>(_base_name + "strain_increment")) 35 0 : mooseError("This linear elastic stress calculation only works for small strains"); 36 324 : } 37 : 38 : void 39 112464 : ComputeCosseratLinearElasticStress::computeQpStress() 40 : { 41 112464 : _stress[_qp] = _elasticity_tensor[_qp] * _mechanical_strain[_qp]; 42 112464 : _stress_couple[_qp] = _elastic_flexural_rigidity_tensor[_qp] * _curvature[_qp]; 43 : 44 112464 : _elastic_strain[_qp] = _mechanical_strain[_qp]; 45 : 46 112464 : _Jacobian_mult[_qp] = _elasticity_tensor[_qp]; 47 112464 : _Jacobian_mult_couple[_qp] = _elastic_flexural_rigidity_tensor[_qp]; 48 112464 : }