www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PlasticHeatEnergy Class Reference

Provides a heat source from plastic deformation: coeff * stress * plastic_strain_rate. More...

#include <PlasticHeatEnergy.h>

Inheritance diagram for PlasticHeatEnergy:
[legend]

Public Member Functions

 PlasticHeatEnergy (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 

Protected Attributes

Real _coeff
 coefficient of stress * plastic_strain_rate More...
 
const std::string _base_name
 optional parameter that allows multiple mechanics models to be defined More...
 
const MaterialProperty< Real > & _plastic_heat
 stress * plastic_strain_rate More...
 
const MaterialProperty< RankTwoTensor > & _dplastic_heat_dstrain
 d(plastic_heat)/d(total_strain) More...
 
unsigned int _ndisp
 umber of coupled displacement variables More...
 
std::vector< unsigned int > _disp_var
 MOOSE variable number for the displacement variables. More...
 

Detailed Description

Provides a heat source from plastic deformation: coeff * stress * plastic_strain_rate.

Definition at line 25 of file PlasticHeatEnergy.h.

Constructor & Destructor Documentation

◆ PlasticHeatEnergy()

PlasticHeatEnergy::PlasticHeatEnergy ( const InputParameters &  parameters)

Definition at line 30 of file PlasticHeatEnergy.C.

31  : Kernel(parameters),
32  _coeff(getParam<Real>("coeff")),
33  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
34  _plastic_heat(getMaterialProperty<Real>(_base_name + "plastic_heat")),
36  getMaterialProperty<RankTwoTensor>(_base_name + "dplastic_heat_dstrain")),
37  _ndisp(coupledComponents("displacements")),
39 {
40  for (unsigned int i = 0; i < _ndisp; ++i)
41  _disp_var[i] = coupled("displacements", i);
42 
43  // Checking for consistency between mesh size and length of the provided displacements vector
44  if (_ndisp != _mesh.dimension())
45  mooseError("PlasticHeatEnergy: The number of displacement variables supplied must match the "
46  "mesh dimension.");
47 }

Member Function Documentation

◆ computeQpJacobian()

Real PlasticHeatEnergy::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented in PorousFlowPlasticHeatEnergy.

Definition at line 56 of file PlasticHeatEnergy.C.

57 {
58  return computeQpOffDiagJacobian(_var.number());
59 }

◆ computeQpOffDiagJacobian()

Real PlasticHeatEnergy::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented in PorousFlowPlasticHeatEnergy.

Definition at line 62 of file PlasticHeatEnergy.C.

63 {
64  for (unsigned int i = 0; i < _ndisp; ++i)
65  if (jvar == _disp_var[i])
66  return -_test[_i][_qp] * _coeff * (_dplastic_heat_dstrain[_qp] * _grad_phi[_j][_qp])(i);
67 
68  return 0.0;
69 }

Referenced by computeQpJacobian(), and PorousFlowPlasticHeatEnergy::computeQpOffDiagJacobian().

◆ computeQpResidual()

Real PlasticHeatEnergy::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented in PorousFlowPlasticHeatEnergy.

Definition at line 50 of file PlasticHeatEnergy.C.

51 {
52  return -_test[_i][_qp] * _coeff * _plastic_heat[_qp];
53 }

Referenced by PorousFlowPlasticHeatEnergy::computeQpOffDiagJacobian(), and PorousFlowPlasticHeatEnergy::computeQpResidual().

◆ validParams()

InputParameters PlasticHeatEnergy::validParams ( )
static

Definition at line 19 of file PlasticHeatEnergy.C.

20 {
21  InputParameters params = Kernel::validParams();
22  params.addClassDescription("Plastic heat energy density = coeff * stress * plastic_strain_rate");
23  params.addRequiredCoupledVar("displacements",
24  "The string of displacements suitable for the problem statement");
25  params.addParam<std::string>("base_name", "Material property base name");
26  params.addParam<Real>("coeff", 1.0, "Heat energy density = coeff * stress * plastic_strain_rate");
27  return params;
28 }

Member Data Documentation

◆ _base_name

const std::string PlasticHeatEnergy::_base_name
protected

optional parameter that allows multiple mechanics models to be defined

Definition at line 41 of file PlasticHeatEnergy.h.

◆ _coeff

Real PlasticHeatEnergy::_coeff
protected

coefficient of stress * plastic_strain_rate

Definition at line 38 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _disp_var

std::vector<unsigned int> PlasticHeatEnergy::_disp_var
protected

MOOSE variable number for the displacement variables.

Definition at line 53 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and PlasticHeatEnergy().

◆ _dplastic_heat_dstrain

const MaterialProperty<RankTwoTensor>& PlasticHeatEnergy::_dplastic_heat_dstrain
protected

d(plastic_heat)/d(total_strain)

Definition at line 47 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

◆ _ndisp

unsigned int PlasticHeatEnergy::_ndisp
protected

umber of coupled displacement variables

Definition at line 50 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and PlasticHeatEnergy().

◆ _plastic_heat

const MaterialProperty<Real>& PlasticHeatEnergy::_plastic_heat
protected

stress * plastic_strain_rate

Definition at line 44 of file PlasticHeatEnergy.h.

Referenced by computeQpResidual().


The documentation for this class was generated from the following files:
PlasticHeatEnergy::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
Definition: PlasticHeatEnergy.C:62
PlasticHeatEnergy::_plastic_heat
const MaterialProperty< Real > & _plastic_heat
stress * plastic_strain_rate
Definition: PlasticHeatEnergy.h:44
PlasticHeatEnergy::_base_name
const std::string _base_name
optional parameter that allows multiple mechanics models to be defined
Definition: PlasticHeatEnergy.h:41
PlasticHeatEnergy::_coeff
Real _coeff
coefficient of stress * plastic_strain_rate
Definition: PlasticHeatEnergy.h:38
validParams
InputParameters validParams()
PlasticHeatEnergy::_dplastic_heat_dstrain
const MaterialProperty< RankTwoTensor > & _dplastic_heat_dstrain
d(plastic_heat)/d(total_strain)
Definition: PlasticHeatEnergy.h:47
PlasticHeatEnergy::_ndisp
unsigned int _ndisp
umber of coupled displacement variables
Definition: PlasticHeatEnergy.h:50
PlasticHeatEnergy::_disp_var
std::vector< unsigned int > _disp_var
MOOSE variable number for the displacement variables.
Definition: PlasticHeatEnergy.h:53