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 "ComputeVolumetricDeformGrad.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", ComputeVolumetricDeformGrad); 13 : 14 : InputParameters 15 56 : ComputeVolumetricDeformGrad::validParams() 16 : { 17 56 : InputParameters params = Material::validParams(); 18 56 : params.addClassDescription( 19 : "Computes volumetric deformation gradient and adjusts the total deformation gradient"); 20 112 : params.addRequiredParam<MaterialPropertyName>( 21 : "pre_deform_grad_name", "Name of pre-adjusted deformation gradient variable"); 22 112 : params.addRequiredParam<MaterialPropertyName>("volumetric_deform_grad_name", 23 : "Name of volumetric deformation gradient variable"); 24 112 : params.addRequiredParam<MaterialPropertyName>("post_deform_grad_name", 25 : "Name of adjusted deformation gradient variable"); 26 56 : return params; 27 0 : } 28 : 29 42 : ComputeVolumetricDeformGrad::ComputeVolumetricDeformGrad(const InputParameters & parameters) 30 : : DerivativeMaterialInterface<Material>(parameters), 31 42 : _pre_deform_grad(getMaterialProperty<RankTwoTensor>("pre_deform_grad_name")), 32 42 : _volumetric_deform_grad(declareProperty<RankTwoTensor>( 33 42 : getParam<MaterialPropertyName>("volumetric_deform_grad_name"))), 34 42 : _post_deform_grad( 35 126 : declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("post_deform_grad_name"))) 36 : { 37 42 : } 38 : 39 : void 40 0 : ComputeVolumetricDeformGrad::initQpStatefulProperties() 41 : { 42 0 : _post_deform_grad[_qp].setToIdentity(); 43 0 : _volumetric_deform_grad[_qp].setToIdentity(); 44 0 : } 45 : 46 : void 47 19584 : ComputeVolumetricDeformGrad::computeQpProperties() 48 : { 49 19584 : createVolumetricDeformGrad(); 50 19584 : _post_deform_grad[_qp] = _volumetric_deform_grad[_qp].inverse() * _pre_deform_grad[_qp]; 51 19584 : } 52 : 53 : void 54 19584 : ComputeVolumetricDeformGrad::createVolumetricDeformGrad() 55 : { 56 19584 : _volumetric_deform_grad[_qp].setToIdentity(); 57 19584 : }