www.mooseframework.org
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)
 

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...
 
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 23 of file PlasticHeatEnergy.h.

Constructor & Destructor Documentation

PlasticHeatEnergy::PlasticHeatEnergy ( const InputParameters &  parameters)

Definition at line 25 of file PlasticHeatEnergy.C.

26  : Kernel(parameters),
27  _coeff(getParam<Real>("coeff")),
28  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
29  _plastic_heat(getMaterialProperty<Real>(_base_name + "plastic_heat")),
31  getMaterialProperty<RankTwoTensor>(_base_name + "dplastic_heat_dstrain")),
32  _ndisp(coupledComponents("displacements")),
34 {
35  for (unsigned int i = 0; i < _ndisp; ++i)
36  _disp_var[i] = coupled("displacements", i);
37 
38  // Checking for consistency between mesh size and length of the provided displacements vector
39  if (_ndisp != _mesh.dimension())
40  mooseError("PlasticHeatEnergy: The number of displacement variables supplied must match the "
41  "mesh dimension.");
42 }
const MaterialProperty< Real > & _plastic_heat
stress * plastic_strain_rate
std::string _base_name
optional parameter that allows multiple mechanics models to be defined
Real _coeff
coefficient of stress * plastic_strain_rate
const MaterialProperty< RankTwoTensor > & _dplastic_heat_dstrain
d(plastic_heat)/d(total_strain)
unsigned int _ndisp
umber of coupled displacement variables
std::vector< unsigned int > _disp_var
MOOSE variable number for the displacement variables.

Member Function Documentation

Real PlasticHeatEnergy::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented in PorousFlowPlasticHeatEnergy.

Definition at line 51 of file PlasticHeatEnergy.C.

52 {
53  return computeQpOffDiagJacobian(_var.number());
54 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
Real PlasticHeatEnergy::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented in PorousFlowPlasticHeatEnergy.

Definition at line 57 of file PlasticHeatEnergy.C.

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

58 {
59  for (unsigned int i = 0; i < _ndisp; ++i)
60  if (jvar == _disp_var[i])
61  return -_test[_i][_qp] * _coeff * (_dplastic_heat_dstrain[_qp] * _grad_phi[_j][_qp])(i);
62 
63  return 0.0;
64 }
Real _coeff
coefficient of stress * plastic_strain_rate
const MaterialProperty< RankTwoTensor > & _dplastic_heat_dstrain
d(plastic_heat)/d(total_strain)
unsigned int _ndisp
umber of coupled displacement variables
std::vector< unsigned int > _disp_var
MOOSE variable number for the displacement variables.
Real PlasticHeatEnergy::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented in PorousFlowPlasticHeatEnergy.

Definition at line 45 of file PlasticHeatEnergy.C.

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

46 {
47  return -_test[_i][_qp] * _coeff * _plastic_heat[_qp];
48 }
const MaterialProperty< Real > & _plastic_heat
stress * plastic_strain_rate
Real _coeff
coefficient of stress * plastic_strain_rate

Member Data Documentation

std::string PlasticHeatEnergy::_base_name
protected

optional parameter that allows multiple mechanics models to be defined

Definition at line 37 of file PlasticHeatEnergy.h.

Real PlasticHeatEnergy::_coeff
protected

coefficient of stress * plastic_strain_rate

Definition at line 34 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

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

MOOSE variable number for the displacement variables.

Definition at line 49 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and PlasticHeatEnergy().

const MaterialProperty<RankTwoTensor>& PlasticHeatEnergy::_dplastic_heat_dstrain
protected

d(plastic_heat)/d(total_strain)

Definition at line 43 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

unsigned int PlasticHeatEnergy::_ndisp
protected

umber of coupled displacement variables

Definition at line 46 of file PlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and PlasticHeatEnergy().

const MaterialProperty<Real>& PlasticHeatEnergy::_plastic_heat
protected

stress * plastic_strain_rate

Definition at line 40 of file PlasticHeatEnergy.h.

Referenced by computeQpResidual().


The documentation for this class was generated from the following files: