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

A class for defining the time derivative of the heat equation. More...

#include <HeatCapacityConductionTimeDerivative.h>

Inheritance diagram for HeatCapacityConductionTimeDerivative:
[legend]

Public Member Functions

 HeatCapacityConductionTimeDerivative (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

const MaterialProperty< Real > & _heat_capacity
 Heat capacity and its derivatives with respect to temperature and other coupled variables. More...
 
const MaterialProperty< Real > & _d_heat_capacity_dT
 
std::vector< const MaterialProperty< Real > * > _d_heat_capacity_dargs
 

Detailed Description

A class for defining the time derivative of the heat equation.

By default this Kernel computes: \( C_p * \frac{\partial T}{\partial t}, \) where \( C_p \) is material property for the "heat_capacity".

Definition at line 28 of file HeatCapacityConductionTimeDerivative.h.

Constructor & Destructor Documentation

HeatCapacityConductionTimeDerivative::HeatCapacityConductionTimeDerivative ( const InputParameters &  parameters)

Definition at line 27 of file HeatCapacityConductionTimeDerivative.C.

29  : DerivativeMaterialInterface<JvarMapKernelInterface<TimeDerivative>>(parameters),
30  _heat_capacity(getMaterialProperty<Real>("heat_capacity")),
31  _d_heat_capacity_dT(getMaterialPropertyDerivative<Real>("heat_capacity", _var.name()))
32 {
33  // get number of coupled variables
34  unsigned int nvar = _coupled_moose_vars.size();
35 
36  // reserve space for derivatives
37  _d_heat_capacity_dargs.resize(nvar);
38 
39  // iterate over all coupled variables
40  for (unsigned int i = 0; i < nvar; ++i)
42  &getMaterialPropertyDerivative<Real>("heat_capacity", _coupled_moose_vars[i]->name());
43 }
const MaterialProperty< Real > & _heat_capacity
Heat capacity and its derivatives with respect to temperature and other coupled variables.
std::vector< const MaterialProperty< Real > * > _d_heat_capacity_dargs

Member Function Documentation

Real HeatCapacityConductionTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 52 of file HeatCapacityConductionTimeDerivative.C.

53 {
54  // on-diagonal Jacobian with all terms that may depend on the kernel variable
55  return _heat_capacity[_qp] * TimeDerivative::computeQpJacobian() +
56  _d_heat_capacity_dT[_qp] * _phi[_j][_qp] * TimeDerivative::computeQpResidual();
57 }
const MaterialProperty< Real > & _heat_capacity
Heat capacity and its derivatives with respect to temperature and other coupled variables.
Real HeatCapacityConductionTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 60 of file HeatCapacityConductionTimeDerivative.C.

61 {
62  // get the coupled variable jvar is referring to
63  const unsigned int cvar = mapJvarToCvar(jvar);
64 
65  // off-diagonal contribution with terms that depend on coupled variables
66  return (*_d_heat_capacity_dargs[cvar])[_qp] * _phi[_j][_qp] * TimeDerivative::computeQpResidual();
67 }
std::vector< const MaterialProperty< Real > * > _d_heat_capacity_dargs
Real HeatCapacityConductionTimeDerivative::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented in ConsistentHeatCapacityTimeDerivative.

Definition at line 46 of file HeatCapacityConductionTimeDerivative.C.

47 {
48  return _heat_capacity[_qp] * TimeDerivative::computeQpResidual();
49 }
const MaterialProperty< Real > & _heat_capacity
Heat capacity and its derivatives with respect to temperature and other coupled variables.

Member Data Documentation

std::vector<const MaterialProperty<Real> *> HeatCapacityConductionTimeDerivative::_d_heat_capacity_dargs
protected
const MaterialProperty<Real>& HeatCapacityConductionTimeDerivative::_d_heat_capacity_dT
protected
const MaterialProperty<Real>& HeatCapacityConductionTimeDerivative::_heat_capacity
protected

Heat capacity and its derivatives with respect to temperature and other coupled variables.

Definition at line 40 of file HeatCapacityConductionTimeDerivative.h.

Referenced by computeQpJacobian(), ConsistentHeatCapacityTimeDerivative::computeQpResidual(), and computeQpResidual().


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