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
 holds info on the PorousFlow variables 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(porous-flow variable) - these derivatives will be wrt variables at the nodes More...
 
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad porous-flow 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 23 of file PorousFlowPlasticHeatEnergy.h.

Constructor & Destructor Documentation

PorousFlowPlasticHeatEnergy::PorousFlowPlasticHeatEnergy ( const InputParameters &  parameters)

Definition at line 33 of file PorousFlowPlasticHeatEnergy.C.

34  : PlasticHeatEnergy(parameters),
35  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
36  _strain_at_nearest_qp(getParam<bool>("strain_at_nearest_qp")),
38  ? &getMaterialProperty<unsigned int>("PorousFlow_nearestqp_nodal")
39  : nullptr),
40  _porosity(getMaterialProperty<Real>("PorousFlow_porosity_nodal")),
41  _dporosity_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_nodal_dvar")),
43  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_porosity_nodal_dgradvar"))
44 {
45 }
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
holds info on the PorousFlow variables
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(porous-flow variable) - these derivatives will be wrt variables at the nodes ...
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable) - remember these derivatives will be wrt grad(vars) at qps ...

Member Function Documentation

Real PorousFlowPlasticHeatEnergy::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from PlasticHeatEnergy.

Definition at line 54 of file PorousFlowPlasticHeatEnergy.C.

55 {
56  return computeQpOffDiagJacobian(_var.number());
57 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
Real PorousFlowPlasticHeatEnergy::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

If the variable is not a PorousFlow variable, the Jacobian terms are 0

Reimplemented from PlasticHeatEnergy.

Definition at line 60 of file PorousFlowPlasticHeatEnergy.C.

Referenced by computeQpJacobian().

61 {
64  return 0.0;
65 
66  const Real res_no_porosity = PlasticHeatEnergy::computeQpResidual();
67  const Real jac_no_porosity = PlasticHeatEnergy::computeQpOffDiagJacobian(jvar);
68 
69  const unsigned pvar = _dictator.porousFlowVariableNum(jvar);
70  const unsigned nearest_qp = (_strain_at_nearest_qp ? (*_nearest_qp)[_i] : _i);
71 
72  Real jac = (1.0 - _porosity[_i]) * jac_no_porosity -
73  _dporosity_dgradvar[_i][pvar] * _grad_phi[_j][nearest_qp] * res_no_porosity;
74  if (_i != _j)
75  return jac;
76 
77  return jac - _dporosity_dvar[_i][pvar] * res_no_porosity;
78 }
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
holds info on the PorousFlow variables
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(porous-flow variable) - these derivatives will be wrt variables at the nodes ...
bool notPorousFlowVariable(unsigned int moose_var_num) const
returns true if moose_var_num is not a porous flow variabe
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable) - remember these derivatives will be wrt grad(vars) at qps ...
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
the PorousFlow variable number
Real PorousFlowPlasticHeatEnergy::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented from PlasticHeatEnergy.

Definition at line 48 of file PorousFlowPlasticHeatEnergy.C.

49 {
50  return (1.0 - _porosity[_i]) * PlasticHeatEnergy::computeQpResidual();
51 }
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

std::string PlasticHeatEnergy::_base_name
protectedinherited

optional parameter that allows multiple mechanics models to be defined

Definition at line 37 of file PlasticHeatEnergy.h.

Real PlasticHeatEnergy::_coeff
protectedinherited

coefficient of stress * plastic_strain_rate

Definition at line 34 of file PlasticHeatEnergy.h.

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

const PorousFlowDictator& PorousFlowPlasticHeatEnergy::_dictator
protected

holds info on the PorousFlow variables

Definition at line 34 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

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

MOOSE variable number for the displacement variables.

Definition at line 49 of file PlasticHeatEnergy.h.

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

const MaterialProperty<RankTwoTensor>& PlasticHeatEnergy::_dplastic_heat_dstrain
protectedinherited

d(plastic_heat)/d(total_strain)

Definition at line 43 of file PlasticHeatEnergy.h.

Referenced by PlasticHeatEnergy::computeQpOffDiagJacobian().

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

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

Definition at line 49 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

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

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

Definition at line 46 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().

unsigned int PlasticHeatEnergy::_ndisp
protectedinherited

umber of coupled displacement variables

Definition at line 46 of file PlasticHeatEnergy.h.

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

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

the nearest qp to the node

Definition at line 40 of file PorousFlowPlasticHeatEnergy.h.

const MaterialProperty<Real>& PlasticHeatEnergy::_plastic_heat
protectedinherited

stress * plastic_strain_rate

Definition at line 40 of file PlasticHeatEnergy.h.

Referenced by PlasticHeatEnergy::computeQpResidual().

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 43 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const bool PorousFlowPlasticHeatEnergy::_strain_at_nearest_qp
protected

whether the porosity uses the volumetric strain at the closest quadpoint

Definition at line 37 of file PorousFlowPlasticHeatEnergy.h.

Referenced by computeQpOffDiagJacobian().


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