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 31 of file HeatCapacityConductionTimeDerivative.h.

Constructor & Destructor Documentation

◆ HeatCapacityConductionTimeDerivative()

HeatCapacityConductionTimeDerivative::HeatCapacityConductionTimeDerivative ( const InputParameters &  parameters)

Definition at line 32 of file HeatCapacityConductionTimeDerivative.C.

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

Member Function Documentation

◆ computeQpJacobian()

Real HeatCapacityConductionTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 57 of file HeatCapacityConductionTimeDerivative.C.

58 {
59  // on-diagonal Jacobian with all terms that may depend on the kernel variable
60  return _heat_capacity[_qp] * TimeDerivative::computeQpJacobian() +
61  _d_heat_capacity_dT[_qp] * _phi[_j][_qp] * TimeDerivative::computeQpResidual();
62 }
const MaterialProperty< Real > & _heat_capacity
Heat capacity and its derivatives with respect to temperature and other coupled variables.

◆ computeQpOffDiagJacobian()

Real HeatCapacityConductionTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 65 of file HeatCapacityConductionTimeDerivative.C.

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

◆ computeQpResidual()

Real HeatCapacityConductionTimeDerivative::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 51 of file HeatCapacityConductionTimeDerivative.C.

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

Member Data Documentation

◆ _d_heat_capacity_dargs

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

◆ _d_heat_capacity_dT

const MaterialProperty<Real>& HeatCapacityConductionTimeDerivative::_d_heat_capacity_dT
protected

Definition at line 44 of file HeatCapacityConductionTimeDerivative.h.

Referenced by computeQpJacobian().

◆ _heat_capacity

const MaterialProperty<Real>& HeatCapacityConductionTimeDerivative::_heat_capacity
protected

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

Definition at line 43 of file HeatCapacityConductionTimeDerivative.h.

Referenced by computeQpJacobian(), and computeQpResidual().


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