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

Provides a heat source (J/m^3/s) from plastic deformation: (1 - porosity) * coeff * stress * plastic_strain_rate. More...

#include <PorousFlowPlasticHeatEnergy.h>

Inheritance diagram for PorousFlowPlasticHeatEnergy:
[legend]

Public Member Functions

 PorousFlowPlasticHeatEnergy (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

const PorousFlowDictator_dictator
 PorousFlowDictator UserObject. More...
 
const bool _strain_at_nearest_qp
 Whether the porosity uses the volumetric strain at the closest quadpoint. More...
 
const MaterialProperty< unsigned int > *const _nearest_qp
 The nearest qp to the node. More...
 
const MaterialProperty< Real > & _porosity
 Porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps. More...
 
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
 d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the nodes More...
 
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad PorousFlow variable) - remember these derivatives will be wrt grad(vars) at qps More...
 
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 (J/m^3/s) from plastic deformation: (1 - porosity) * coeff * stress * plastic_strain_rate.

Definition at line 25 of file PorousFlowPlasticHeatEnergy.h.

Constructor & Destructor Documentation

◆ PorousFlowPlasticHeatEnergy()

PorousFlowPlasticHeatEnergy::PorousFlowPlasticHeatEnergy ( const InputParameters &  parameters)

Definition at line 36 of file PorousFlowPlasticHeatEnergy.C.

37  : PlasticHeatEnergy(parameters),
38  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
39  _strain_at_nearest_qp(getParam<bool>("strain_at_nearest_qp")),
41  ? &getMaterialProperty<unsigned int>("PorousFlow_nearestqp_nodal")
42  : nullptr),
43  _porosity(getMaterialProperty<Real>("PorousFlow_porosity_nodal")),
44  _dporosity_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_nodal_dvar")),
46  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_porosity_nodal_dgradvar"))
47 {
48 }
const MaterialProperty< Real > & _porosity
Porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps...
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< unsigned int > *const _nearest_qp
The nearest qp to the node.
const bool _strain_at_nearest_qp
Whether the porosity uses the volumetric strain at the closest quadpoint.
PlasticHeatEnergy(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the nodes ...
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) - remember these derivatives will be wrt grad(vars) at qps ...

Member Function Documentation

◆ computeQpJacobian()

Real PorousFlowPlasticHeatEnergy::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from PlasticHeatEnergy.

Definition at line 57 of file PorousFlowPlasticHeatEnergy.C.

58 {
59  return computeQpOffDiagJacobian(_var.number());
60 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override

◆ computeQpOffDiagJacobian()

Real PorousFlowPlasticHeatEnergy::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented from PlasticHeatEnergy.

Definition at line 63 of file PorousFlowPlasticHeatEnergy.C.

Referenced by computeQpJacobian().

64 {
65  // If the variable is not a PorousFlow variable, the Jacobian terms are 0
67  return 0.0;
68 
69  const Real res_no_porosity = PlasticHeatEnergy::computeQpResidual();
70  const Real jac_no_porosity = PlasticHeatEnergy::computeQpOffDiagJacobian(jvar);
71 
72  const unsigned pvar = _dictator.porousFlowVariableNum(jvar);
73  const unsigned nearest_qp = (_strain_at_nearest_qp ? (*_nearest_qp)[_i] : _i);
74 
75  Real jac = (1.0 - _porosity[_i]) * jac_no_porosity -
76  _dporosity_dgradvar[_i][pvar] * _grad_phi[_j][nearest_qp] * res_no_porosity;
77  if (_i != _j)
78  return jac;
79 
80  return jac - _dporosity_dvar[_i][pvar] * res_no_porosity;
81 }
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
const MaterialProperty< Real > & _porosity
Porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps...
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real computeQpResidual() override
const bool _strain_at_nearest_qp
Whether the porosity uses the volumetric strain at the closest quadpoint.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the nodes ...
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) - remember these derivatives will be wrt grad(vars) at qps ...

◆ computeQpResidual()

Real PorousFlowPlasticHeatEnergy::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented from PlasticHeatEnergy.

Definition at line 51 of file PorousFlowPlasticHeatEnergy.C.

52 {
53  return (1.0 - _porosity[_i]) * PlasticHeatEnergy::computeQpResidual();
54 }
const MaterialProperty< Real > & _porosity
Porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps...
virtual Real computeQpResidual() override

Member Data Documentation

◆ _base_name

std::string PlasticHeatEnergy::_base_name
protectedinherited

optional parameter that allows multiple mechanics models to be defined

Definition at line 40 of file PlasticHeatEnergy.h.

◆ _coeff

Real PlasticHeatEnergy::_coeff
protectedinherited

coefficient of stress * plastic_strain_rate

Definition at line 37 of file PlasticHeatEnergy.h.

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

◆ _dictator

const PorousFlowDictator& PorousFlowPlasticHeatEnergy::_dictator
protected

PorousFlowDictator UserObject.

Definition at line 36 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

◆ _disp_var

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

MOOSE variable number for the displacement variables.

Definition at line 52 of file PlasticHeatEnergy.h.

Referenced by PlasticHeatEnergy::computeQpOffDiagJacobian(), and PlasticHeatEnergy::PlasticHeatEnergy().

◆ _dplastic_heat_dstrain

const MaterialProperty<RankTwoTensor>& PlasticHeatEnergy::_dplastic_heat_dstrain
protectedinherited

d(plastic_heat)/d(total_strain)

Definition at line 46 of file PlasticHeatEnergy.h.

Referenced by PlasticHeatEnergy::computeQpOffDiagJacobian().

◆ _dporosity_dgradvar

const MaterialProperty<std::vector<RealGradient> >& PorousFlowPlasticHeatEnergy::_dporosity_dgradvar
protected

d(porosity)/d(grad PorousFlow variable) - remember these derivatives will be wrt grad(vars) at qps

Definition at line 51 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

◆ _dporosity_dvar

const MaterialProperty<std::vector<Real> >& PorousFlowPlasticHeatEnergy::_dporosity_dvar
protected

d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the nodes

Definition at line 48 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

◆ _ndisp

unsigned int PlasticHeatEnergy::_ndisp
protectedinherited

umber of coupled displacement variables

Definition at line 49 of file PlasticHeatEnergy.h.

Referenced by PlasticHeatEnergy::computeQpOffDiagJacobian(), and PlasticHeatEnergy::PlasticHeatEnergy().

◆ _nearest_qp

const MaterialProperty<unsigned int>* const PorousFlowPlasticHeatEnergy::_nearest_qp
protected

The nearest qp to the node.

Definition at line 42 of file PorousFlowPlasticHeatEnergy.h.

◆ _plastic_heat

const MaterialProperty<Real>& PlasticHeatEnergy::_plastic_heat
protectedinherited

stress * plastic_strain_rate

Definition at line 43 of file PlasticHeatEnergy.h.

Referenced by PlasticHeatEnergy::computeQpResidual().

◆ _porosity

const MaterialProperty<Real>& PorousFlowPlasticHeatEnergy::_porosity
protected

Porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps.

Definition at line 45 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _strain_at_nearest_qp

const bool PorousFlowPlasticHeatEnergy::_strain_at_nearest_qp
protected

Whether the porosity uses the volumetric strain at the closest quadpoint.

Definition at line 39 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().


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