https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | 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 Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 HeatCapacityConductionTimeDerivative (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

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.
 
const MaterialProperty< Real > & _d_heat_capacity_dT
 
std::vector< const MaterialProperty< Real > * > _d_heat_capacity_dargs
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

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

Constructor & Destructor Documentation

◆ HeatCapacityConductionTimeDerivative()

HeatCapacityConductionTimeDerivative::HeatCapacityConductionTimeDerivative ( const InputParameters parameters)

Definition at line 30 of file HeatCapacityConductionTimeDerivative.C.

33 _heat_capacity(getMaterialProperty<Real>("heat_capacity")),
34 _d_heat_capacity_dT(getMaterialPropertyDerivative<Real>("heat_capacity", _var.name()))
35{
36 // get number of coupled variables
37 unsigned int nvar = _coupled_moose_vars.size();
38
39 // reserve space for derivatives
40 _d_heat_capacity_dargs.resize(nvar);
41
42 // iterate over all coupled variables
43 for (unsigned int i = 0; i < nvar; ++i)
45 &getMaterialPropertyDerivative<Real>("heat_capacity", _coupled_moose_vars[i]->name());
46}
const std::string name
Definition Setup.h:21
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
virtual unsigned int size() const override final

Member Function Documentation

◆ computeQpJacobian()

Real HeatCapacityConductionTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 55 of file HeatCapacityConductionTimeDerivative.C.

56{
57 // on-diagonal Jacobian with all terms that may depend on the kernel variable
60}
virtual Real computeQpResidual() override
virtual Real computeQpJacobian() override

◆ computeQpOffDiagJacobian()

Real HeatCapacityConductionTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 63 of file HeatCapacityConductionTimeDerivative.C.

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

◆ computeQpResidual()

Real HeatCapacityConductionTimeDerivative::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 49 of file HeatCapacityConductionTimeDerivative.C.

◆ validParams()

InputParameters HeatCapacityConductionTimeDerivative::validParams ( )
static

Definition at line 15 of file HeatCapacityConductionTimeDerivative.C.

16{
18 params.addClassDescription("Time derivative term $C_p \\frac{\\partial T}{\\partial t}$ of "
19 "the heat equation with the heat capacity $C_p$ as an argument.");
20
21 // Density may be changing with deformation, so we must integrate
22 // over current volume by setting the use_displaced_mesh flag.
23 params.set<bool>("use_displaced_mesh") = true;
24
25 params.addParam<MaterialPropertyName>(
26 "heat_capacity", "heat_capacity", "Property name of the heat capacity material property");
27 return params;
28}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
static InputParameters validParams()

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

Referenced by computeQpJacobian(), and computeQpResidual().


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