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 22 of file PorousFlowTemperature.h.

Constructor & Destructor Documentation

PorousFlowTemperature::PorousFlowTemperature ( const InputParameters &  parameters)

Definition at line 21 of file PorousFlowTemperature.C.

22  : DerivativeMaterialInterface<PorousFlowMaterial>(parameters),
23 
24  _num_pf_vars(_dictator.numVariables()),
25  _temperature_var(_nodal_material ? coupledNodalValue("temperature")
26  : coupledValue("temperature")),
27  _grad_temperature_var(_nodal_material ? nullptr : &coupledGradient("temperature")),
28  _temperature_is_PF(_dictator.isPorousFlowVariable(coupled("temperature"))),
29  _t_var_num(_temperature_is_PF ? _dictator.porousFlowVariableNum(coupled("temperature")) : 0),
30 
31  _temperature(_nodal_material ? declareProperty<Real>("PorousFlow_temperature_nodal")
32  : declareProperty<Real>("PorousFlow_temperature_qp")),
34  _nodal_material ? declareProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")
35  : declareProperty<std::vector<Real>>("dPorousFlow_temperature_qp_dvar")),
36  _grad_temperature(_nodal_material
37  ? nullptr
38  : &declareProperty<RealGradient>("PorousFlow_grad_temperature_qp")),
39  _dgrad_temperature_dgradv(_nodal_material ? nullptr
40  : &declareProperty<std::vector<Real>>(
41  "dPorousFlow_grad_temperature_qp_dgradvar")),
42  _dgrad_temperature_dv(_nodal_material ? nullptr
43  : &declareProperty<std::vector<RealGradient>>(
44  "dPorousFlow_grad_temperature_qp_dvar"))
45 {
46 }
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

void PorousFlowTemperature::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 55 of file PorousFlowTemperature.C.

56 {
57  _temperature[_qp] = _temperature_var[_qp];
58  _dtemperature_dvar[_qp].assign(_num_pf_vars, 0.0);
60  // _temperature is a PorousFlow variable
61  _dtemperature_dvar[_qp][_t_var_num] = 1.0;
62 
63  if (!_nodal_material)
64  {
65  (*_grad_temperature)[_qp] = (*_grad_temperature_var)[_qp];
66  (*_dgrad_temperature_dgradv)[_qp].assign(_num_pf_vars, 0.0);
67  (*_dgrad_temperature_dv)[_qp].assign(_num_pf_vars, RealGradient());
69  (*_dgrad_temperature_dgradv)[_qp][_t_var_num] = 1.0;
70  }
71 }
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
void PorousFlowTemperature::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 49 of file PorousFlowTemperature.C.

50 {
51  _temperature[_qp] = _temperature_var[_qp];
52 }
MaterialProperty< Real > & _temperature
Computed temperature at quadpoints or nodes.
const VariableValue & _temperature_var
Variable value of temperature at quadpoints or nodes.

Member Data Documentation

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

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

Definition at line 56 of file PorousFlowTemperature.h.

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

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

Definition at line 59 of file PorousFlowTemperature.h.

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

d(computed temperature)/d(PorousFlow variable)

Definition at line 50 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

MaterialProperty<RealGradient>* const PorousFlowTemperature::_grad_temperature
protected

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

Definition at line 53 of file PorousFlowTemperature.h.

const VariableGradient* const PorousFlowTemperature::_grad_temperature_var
protected

Gradient(_temperature at quadpoints)

Definition at line 38 of file PorousFlowTemperature.h.

const unsigned int PorousFlowTemperature::_num_pf_vars
protected

Number of PorousFlow variables.

Definition at line 32 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

const unsigned int PorousFlowTemperature::_t_var_num
protected

the PorousFlow variable number of the temperature

Definition at line 44 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PorousFlowTemperature::_temperature
protected

Computed temperature at quadpoints or nodes.

Definition at line 47 of file PorousFlowTemperature.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

const bool PorousFlowTemperature::_temperature_is_PF
protected

Whether the temperature coupled variable is a PorousFlow variable.

Definition at line 41 of file PorousFlowTemperature.h.

Referenced by computeQpProperties().

const VariableValue& PorousFlowTemperature::_temperature_var
protected

Variable value of temperature at quadpoints or nodes.

Definition at line 35 of file PorousFlowTemperature.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().


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