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 48 : ComputeVolumetricDeformGrad::validParams() 16 : { 17 48 : InputParameters params = Material::validParams(); 18 48 : params.addClassDescription( 19 : "Computes volumetric deformation gradient and adjusts the total deformation gradient"); 20 96 : params.addRequiredParam<MaterialPropertyName>( 21 : "pre_deform_grad_name", "Name of pre-adjusted deformation gradient variable"); 22 96 : params.addRequiredParam<MaterialPropertyName>("volumetric_deform_grad_name", 23 : "Name of volumetric deformation gradient variable"); 24 96 : params.addRequiredParam<MaterialPropertyName>("post_deform_grad_name", 25 : "Name of adjusted deformation gradient variable"); 26 48 : return params; 27 0 : } 28 : 29 36 : ComputeVolumetricDeformGrad::ComputeVolumetricDeformGrad(const InputParameters & parameters) 30 : : DerivativeMaterialInterface<Material>(parameters), 31 36 : _pre_deform_grad(getMaterialProperty<RankTwoTensor>("pre_deform_grad_name")), 32 36 : _volumetric_deform_grad(declareProperty<RankTwoTensor>( 33 36 : getParam<MaterialPropertyName>("volumetric_deform_grad_name"))), 34 36 : _post_deform_grad( 35 108 : declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("post_deform_grad_name"))) 36 : { 37 36 : } 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 15360 : ComputeVolumetricDeformGrad::computeQpProperties() 48 : { 49 15360 : createVolumetricDeformGrad(); 50 15360 : _post_deform_grad[_qp] = _volumetric_deform_grad[_qp].inverse() * _pre_deform_grad[_qp]; 51 15360 : } 52 : 53 : void 54 15360 : ComputeVolumetricDeformGrad::createVolumetricDeformGrad() 55 : { 56 15360 : _volumetric_deform_grad[_qp].setToIdentity(); 57 15360 : }