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