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

Creates temperature Materials. More...

#include <PorousFlowTemperature.h>

Inheritance diagram for PorousFlowTemperature:
[legend]

Public Member Functions

 PorousFlowTemperature (const InputParameters &parameters)
 

Protected Member Functions

virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 

Protected Attributes

const unsigned int _num_pf_vars
 Number of PorousFlow variables. More...
 
const VariableValue & _temperature_var
 Variable value of temperature at quadpoints or nodes. More...
 
const VariableGradient *const _grad_temperature_var
 Gradient(_temperature at quadpoints) More...
 
const bool _temperature_is_PF
 Whether the temperature coupled variable is a PorousFlow variable. More...
 
const unsigned int _t_var_num
 The PorousFlow variable number of the temperature. More...
 
MaterialProperty< Real > & _temperature
 Computed temperature at quadpoints or nodes. More...
 
MaterialProperty< std::vector< Real > > & _dtemperature_dvar
 d(computed temperature)/d(PorousFlow variable) More...
 
MaterialProperty< RealGradient > *const _grad_temperature
 Grad(temperature) at the quadpoints (not needed for nodal_materials) More...
 
MaterialProperty< std::vector< Real > > *const _dgrad_temperature_dgradv
 d(grad temperature)/d(grad PorousFlow variable) at the quadpoints More...
 
MaterialProperty< std::vector< RealGradient > > *const _dgrad_temperature_dv
 d(grad temperature)/d(PorousFlow variable) at the quadpoints More...
 

Detailed Description

Creates temperature Materials.

Definition at line 24 of file PorousFlowTemperature.h.

Constructor & Destructor Documentation

◆ PorousFlowTemperature()

PorousFlowTemperature::PorousFlowTemperature ( const InputParameters &  parameters)

Definition at line 26 of file PorousFlowTemperature.C.

27  : DerivativeMaterialInterface<PorousFlowMaterial>(parameters),
28 
29  _num_pf_vars(_dictator.numVariables()),
30  _temperature_var(_nodal_material ? coupledNodalValue("temperature")
31  : coupledValue("temperature")),
32  _grad_temperature_var(_nodal_material ? nullptr : &coupledGradient("temperature")),
33  _temperature_is_PF(_dictator.isPorousFlowVariable(coupled("temperature"))),
34  _t_var_num(_temperature_is_PF ? _dictator.porousFlowVariableNum(coupled("temperature")) : 0),
35 
36  _temperature(_nodal_material ? declareProperty<Real>("PorousFlow_temperature_nodal")
37  : declareProperty<Real>("PorousFlow_temperature_qp")),
39  _nodal_material ? declareProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")
40  : declareProperty<std::vector<Real>>("dPorousFlow_temperature_qp_dvar")),
41  _grad_temperature(_nodal_material
42  ? nullptr
43  : &declareProperty<RealGradient>("PorousFlow_grad_temperature_qp")),
44  _dgrad_temperature_dgradv(_nodal_material ? nullptr
45  : &declareProperty<std::vector<Real>>(
46  "dPorousFlow_grad_temperature_qp_dgradvar")),
47  _dgrad_temperature_dv(_nodal_material ? nullptr
48  : &declareProperty<std::vector<RealGradient>>(
49  "dPorousFlow_grad_temperature_qp_dvar"))
50 {
51 }
MaterialProperty< RealGradient > *const _grad_temperature
Grad(temperature) at the quadpoints (not needed for nodal_materials)
MaterialProperty< std::vector< Real > > *const _dgrad_temperature_dgradv
d(grad temperature)/d(grad PorousFlow variable) at the quadpoints
const bool _temperature_is_PF
Whether the temperature coupled variable is a PorousFlow variable.
const unsigned int _num_pf_vars
Number of PorousFlow variables.
MaterialProperty< std::vector< Real > > & _dtemperature_dvar
d(computed temperature)/d(PorousFlow variable)
MaterialProperty< Real > & _temperature
Computed temperature at quadpoints or nodes.
const VariableGradient *const _grad_temperature_var
Gradient(_temperature at quadpoints)
const VariableValue & _temperature_var
Variable value of temperature at quadpoints or nodes.
MaterialProperty< std::vector< RealGradient > > *const _dgrad_temperature_dv
d(grad temperature)/d(PorousFlow variable) at the quadpoints
const unsigned int _t_var_num
The PorousFlow variable number of the temperature.

Member Function Documentation

◆ computeQpProperties()

void PorousFlowTemperature::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 60 of file PorousFlowTemperature.C.

Referenced by initQpStatefulProperties().

61 {
62  _temperature[_qp] = _temperature_var[_qp];
63  _dtemperature_dvar[_qp].assign(_num_pf_vars, 0.0);
65  // _temperature is a PorousFlow variable
66  _dtemperature_dvar[_qp][_t_var_num] = 1.0;
67 
68  if (!_nodal_material)
69  {
70  (*_grad_temperature)[_qp] = (*_grad_temperature_var)[_qp];
71  (*_dgrad_temperature_dgradv)[_qp].assign(_num_pf_vars, 0.0);
72  (*_dgrad_temperature_dv)[_qp].assign(_num_pf_vars, RealGradient());
74  (*_dgrad_temperature_dgradv)[_qp][_t_var_num] = 1.0;
75  }
76 }
const bool _temperature_is_PF
Whether the temperature coupled variable is a PorousFlow variable.
const unsigned int _num_pf_vars
Number of PorousFlow variables.
MaterialProperty< std::vector< Real > > & _dtemperature_dvar
d(computed temperature)/d(PorousFlow variable)
MaterialProperty< Real > & _temperature
Computed temperature at quadpoints or nodes.
const VariableValue & _temperature_var
Variable value of temperature at quadpoints or nodes.
const unsigned int _t_var_num
The PorousFlow variable number of the temperature.

◆ initQpStatefulProperties()

void PorousFlowTemperature::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 54 of file PorousFlowTemperature.C.

55 {
57 }
virtual void computeQpProperties() override

Member Data Documentation

◆ _dgrad_temperature_dgradv

MaterialProperty<std::vector<Real> >* const PorousFlowTemperature::_dgrad_temperature_dgradv
protected

d(grad temperature)/d(grad PorousFlow variable) at the quadpoints

Definition at line 58 of file PorousFlowTemperature.h.

◆ _dgrad_temperature_dv

MaterialProperty<std::vector<RealGradient> >* const PorousFlowTemperature::_dgrad_temperature_dv
protected

d(grad temperature)/d(PorousFlow variable) at the quadpoints

Definition at line 61 of file PorousFlowTemperature.h.

◆ _dtemperature_dvar

MaterialProperty<std::vector<Real> >& PorousFlowTemperature::_dtemperature_dvar
protected

d(computed temperature)/d(PorousFlow variable)

Definition at line 52 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

◆ _grad_temperature

MaterialProperty<RealGradient>* const PorousFlowTemperature::_grad_temperature
protected

Grad(temperature) at the quadpoints (not needed for nodal_materials)

Definition at line 55 of file PorousFlowTemperature.h.

◆ _grad_temperature_var

const VariableGradient* const PorousFlowTemperature::_grad_temperature_var
protected

Gradient(_temperature at quadpoints)

Definition at line 40 of file PorousFlowTemperature.h.

◆ _num_pf_vars

const unsigned int PorousFlowTemperature::_num_pf_vars
protected

Number of PorousFlow variables.

Definition at line 34 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

◆ _t_var_num

const unsigned int PorousFlowTemperature::_t_var_num
protected

The PorousFlow variable number of the temperature.

Definition at line 46 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

◆ _temperature

MaterialProperty<Real>& PorousFlowTemperature::_temperature
protected

Computed temperature at quadpoints or nodes.

Definition at line 49 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

◆ _temperature_is_PF

const bool PorousFlowTemperature::_temperature_is_PF
protected

Whether the temperature coupled variable is a PorousFlow variable.

Definition at line 43 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

◆ _temperature_var

const VariableValue& PorousFlowTemperature::_temperature_var
protected

Variable value of temperature at quadpoints or nodes.

Definition at line 37 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().


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