www.mooseframework.org
Public Member Functions | Static 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)
 

Static Public Member Functions

static InputParameters validParams ()
 

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

Constructor & Destructor Documentation

◆ HeatCapacityConductionTimeDerivative()

HeatCapacityConductionTimeDerivative::HeatCapacityConductionTimeDerivative ( const InputParameters &  parameters)

Definition at line 33 of file HeatCapacityConductionTimeDerivative.C.

35  : DerivativeMaterialInterface<JvarMapKernelInterface<TimeDerivative>>(parameters),
36  _heat_capacity(getMaterialProperty<Real>("heat_capacity")),
37  _d_heat_capacity_dT(getMaterialPropertyDerivative<Real>("heat_capacity", _var.name()))
38 {
39  // get number of coupled variables
40  unsigned int nvar = _coupled_moose_vars.size();
41 
42  // reserve space for derivatives
43  _d_heat_capacity_dargs.resize(nvar);
44 
45  // iterate over all coupled variables
46  for (unsigned int i = 0; i < nvar; ++i)
48  &getMaterialPropertyDerivative<Real>("heat_capacity", _coupled_moose_vars[i]->name());
49 }

Member Function Documentation

◆ computeQpJacobian()

Real HeatCapacityConductionTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 58 of file HeatCapacityConductionTimeDerivative.C.

59 {
60  // on-diagonal Jacobian with all terms that may depend on the kernel variable
61  return _heat_capacity[_qp] * TimeDerivative::computeQpJacobian() +
62  _d_heat_capacity_dT[_qp] * _phi[_j][_qp] * TimeDerivative::computeQpResidual();
63 }

◆ computeQpOffDiagJacobian()

Real HeatCapacityConductionTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 66 of file HeatCapacityConductionTimeDerivative.C.

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

◆ computeQpResidual()

Real HeatCapacityConductionTimeDerivative::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 52 of file HeatCapacityConductionTimeDerivative.C.

53 {
54  return _heat_capacity[_qp] * TimeDerivative::computeQpResidual();
55 }

◆ validParams()

InputParameters HeatCapacityConductionTimeDerivative::validParams ( )
static

Definition at line 17 of file HeatCapacityConductionTimeDerivative.C.

18 {
19  InputParameters params = TimeDerivative::validParams();
20  params.addClassDescription("Time derivative term $C_p \\frac{\\partial T}{\\partial t}$ of "
21  "the heat equation with the heat capacity $C_p$ as an argument.");
22 
23  // Density may be changing with deformation, so we must integrate
24  // over current volume by setting the use_displaced_mesh flag.
25  params.set<bool>("use_displaced_mesh") = true;
26 
27  params.addParam<MaterialPropertyName>(
28  "heat_capacity", "heat_capacity", "Property name of the heat capacity material property");
29  params.addCoupledVar("args", "Vector of additional arguments of the heat capacity");
30  return params;
31 }

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

Referenced by computeQpJacobian(), and computeQpResidual().


The documentation for this class was generated from the following files:
HeatCapacityConductionTimeDerivative::_d_heat_capacity_dargs
std::vector< const MaterialProperty< Real > * > _d_heat_capacity_dargs
Definition: HeatCapacityConductionTimeDerivative.h:46
validParams
InputParameters validParams()
name
const std::string name
Definition: Setup.h:21
HeatCapacityConductionTimeDerivative::_d_heat_capacity_dT
const MaterialProperty< Real > & _d_heat_capacity_dT
Definition: HeatCapacityConductionTimeDerivative.h:45
HeatCapacityConductionTimeDerivative::_heat_capacity
const MaterialProperty< Real > & _heat_capacity
Heat capacity and its derivatives with respect to temperature and other coupled variables.
Definition: HeatCapacityConductionTimeDerivative.h:44