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

Simple material with constant properties. More...

#include <AnisoHeatConductionMaterial.h>

Inheritance diagram for AnisoHeatConductionMaterial:
[legend]

Public Member Functions

 AnisoHeatConductionMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeProperties ()
 

Protected Attributes

const bool _has_temp
 
const VariableValue & _temperature
 
const Real _my_thermal_conductivity_x
 
const Real _my_thermal_conductivity_y
 
const Real _my_thermal_conductivity_z
 
const PostprocessorValue *const _thermal_conductivity_x_pp
 
const PostprocessorValue *const _thermal_conductivity_y_pp
 
const PostprocessorValue *const _thermal_conductivity_z_pp
 
const Real _my_specific_heat
 
MaterialProperty< Real > *const _thermal_conductivity_x
 
MaterialProperty< Real > *const _thermal_conductivity_x_dT
 
MaterialProperty< Real > *const _thermal_conductivity_y
 
MaterialProperty< Real > *const _thermal_conductivity_y_dT
 
MaterialProperty< Real > *const _thermal_conductivity_z
 
MaterialProperty< Real > *const _thermal_conductivity_z_dT
 
MaterialProperty< Real > & _specific_heat
 
Function *const _specific_heat_temperature_function
 

Detailed Description

Simple material with constant properties.

Definition at line 21 of file AnisoHeatConductionMaterial.h.

Constructor & Destructor Documentation

◆ AnisoHeatConductionMaterial()

AnisoHeatConductionMaterial::AnisoHeatConductionMaterial ( const InputParameters &  parameters)

Definition at line 43 of file AnisoHeatConductionMaterial.C.

44  : Material(parameters),
45 
46  _has_temp(isCoupled("temp")),
47  _temperature(_has_temp ? coupledValue("temp") : _zero),
48 
50  isParamValid("thermal_conductivity_x") ? getParam<Real>("thermal_conductivity_x") : -1),
52  isParamValid("thermal_conductivity_y") ? getParam<Real>("thermal_conductivity_y") : -1),
54  isParamValid("thermal_conductivity_z") ? getParam<Real>("thermal_conductivity_z") : -1),
55 
56  _thermal_conductivity_x_pp(isParamValid("thermal_conductivity_x_pp")
57  ? &getPostprocessorValue("thermal_conductivity_x_pp")
58  : NULL),
59  _thermal_conductivity_y_pp(isParamValid("thermal_conductivity_y_pp")
60  ? &getPostprocessorValue("thermal_conductivity_y_pp")
61  : NULL),
62  _thermal_conductivity_z_pp(isParamValid("thermal_conductivity_z_pp")
63  ? &getPostprocessorValue("thermal_conductivity_z_pp")
64  : NULL),
65 
66  _my_specific_heat(isParamValid("specific_heat") ? getParam<Real>("specific_heat") : 0),
67 
68  _thermal_conductivity_x(&declareProperty<Real>("thermal_conductivity_x")),
69  _thermal_conductivity_x_dT(&declareProperty<Real>("thermal_conductivity_x_dT")),
70  _thermal_conductivity_y(isParamValid("thermal_conductivity_y") ||
71  isParamValid("thermal_conductivity_y_pp")
72  ? &declareProperty<Real>("thermal_conductivity_y")
73  : NULL),
75  _thermal_conductivity_y ? &declareProperty<Real>("thermal_conductivity_y_dT") : NULL),
76  _thermal_conductivity_z(isParamValid("thermal_conductivity_z") ||
77  isParamValid("thermal_conductivity_z_pp")
78  ? &declareProperty<Real>("thermal_conductivity_z")
79  : NULL),
81  _thermal_conductivity_z ? &declareProperty<Real>("thermal_conductivity_z_dT") : NULL),
82 
83  _specific_heat(declareProperty<Real>("specific_heat")),
85  getParam<FunctionName>("specific_heat_temperature_function") != ""
86  ? &getFunction("specific_heat_temperature_function")
87  : NULL)
88 {
89  bool k_x = isParamValid("thermal_conductivity_x") || (NULL != _thermal_conductivity_x_pp);
90  bool k_y = isParamValid("thermal_conductivity_y") || (NULL != _thermal_conductivity_y_pp);
91  bool k_z = isParamValid("thermal_conductivity_z") || (NULL != _thermal_conductivity_z_pp);
92 
93  if (!k_x || (_subproblem.mesh().dimension() > 1 && !k_y) ||
94  (_subproblem.mesh().dimension() > 2 && !k_z))
95  {
96  mooseError("Incomplete set of orthotropic thermal conductivity parameters");
97  }
99  {
100  mooseError("Must couple with temperature if using specific heat function");
101  }
102  if (isParamValid("specific_heat") && _specific_heat_temperature_function)
103  {
104  mooseError("Cannot define both specific heat and specific heat temperature function");
105  }
106 
107  k_x = isParamValid("thermal_conductivity_x") && (NULL != _thermal_conductivity_x_pp);
108  k_y = isParamValid("thermal_conductivity_y") && (NULL != _thermal_conductivity_y_pp);
109  k_z = isParamValid("thermal_conductivity_z") && (NULL != _thermal_conductivity_z_pp);
110  if (k_x || k_y || k_z)
111  {
112  mooseError("Cannot define thermal conductivity value and Postprocessor");
113  }
114 }
MaterialProperty< Real > *const _thermal_conductivity_x_dT
const PostprocessorValue *const _thermal_conductivity_z_pp
MaterialProperty< Real > *const _thermal_conductivity_z
MaterialProperty< Real > *const _thermal_conductivity_x
const PostprocessorValue *const _thermal_conductivity_y_pp
MaterialProperty< Real > & _specific_heat
MaterialProperty< Real > *const _thermal_conductivity_z_dT
const PostprocessorValue *const _thermal_conductivity_x_pp
MaterialProperty< Real > *const _thermal_conductivity_y
MaterialProperty< Real > *const _thermal_conductivity_y_dT

Member Function Documentation

◆ computeProperties()

void AnisoHeatConductionMaterial::computeProperties ( )
protectedvirtual

Definition at line 117 of file AnisoHeatConductionMaterial.C.

118 {
119  for (unsigned int qp(0); qp < _qrule->n_points(); ++qp)
120  {
121  (*_thermal_conductivity_x)[qp] =
123  (*_thermal_conductivity_x_dT)[qp] = 0;
125  {
126  (*_thermal_conductivity_y)[qp] =
128  (*_thermal_conductivity_y_dT)[qp] = 0;
129  }
131  {
132  (*_thermal_conductivity_z)[qp] =
134  (*_thermal_conductivity_z_dT)[qp] = 0;
135  }
136 
138  {
139  Point p;
141  }
142  else
143  {
145  }
146  }
147 }
const PostprocessorValue *const _thermal_conductivity_z_pp
MaterialProperty< Real > *const _thermal_conductivity_z
const PostprocessorValue *const _thermal_conductivity_y_pp
MaterialProperty< Real > & _specific_heat
const PostprocessorValue *const _thermal_conductivity_x_pp
MaterialProperty< Real > *const _thermal_conductivity_y

Member Data Documentation

◆ _has_temp

const bool AnisoHeatConductionMaterial::_has_temp
protected

Definition at line 29 of file AnisoHeatConductionMaterial.h.

Referenced by AnisoHeatConductionMaterial().

◆ _my_specific_heat

const Real AnisoHeatConductionMaterial::_my_specific_heat
protected

Definition at line 38 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _my_thermal_conductivity_x

const Real AnisoHeatConductionMaterial::_my_thermal_conductivity_x
protected

Definition at line 32 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _my_thermal_conductivity_y

const Real AnisoHeatConductionMaterial::_my_thermal_conductivity_y
protected

Definition at line 33 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _my_thermal_conductivity_z

const Real AnisoHeatConductionMaterial::_my_thermal_conductivity_z
protected

Definition at line 34 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _specific_heat

MaterialProperty<Real>& AnisoHeatConductionMaterial::_specific_heat
protected

Definition at line 47 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _specific_heat_temperature_function

Function* const AnisoHeatConductionMaterial::_specific_heat_temperature_function
protected

Definition at line 48 of file AnisoHeatConductionMaterial.h.

Referenced by AnisoHeatConductionMaterial(), and computeProperties().

◆ _temperature

const VariableValue& AnisoHeatConductionMaterial::_temperature
protected

Definition at line 30 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _thermal_conductivity_x

MaterialProperty<Real>* const AnisoHeatConductionMaterial::_thermal_conductivity_x
protected

Definition at line 40 of file AnisoHeatConductionMaterial.h.

◆ _thermal_conductivity_x_dT

MaterialProperty<Real>* const AnisoHeatConductionMaterial::_thermal_conductivity_x_dT
protected

Definition at line 41 of file AnisoHeatConductionMaterial.h.

◆ _thermal_conductivity_x_pp

const PostprocessorValue* const AnisoHeatConductionMaterial::_thermal_conductivity_x_pp
protected

Definition at line 35 of file AnisoHeatConductionMaterial.h.

Referenced by AnisoHeatConductionMaterial(), and computeProperties().

◆ _thermal_conductivity_y

MaterialProperty<Real>* const AnisoHeatConductionMaterial::_thermal_conductivity_y
protected

Definition at line 42 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _thermal_conductivity_y_dT

MaterialProperty<Real>* const AnisoHeatConductionMaterial::_thermal_conductivity_y_dT
protected

Definition at line 43 of file AnisoHeatConductionMaterial.h.

◆ _thermal_conductivity_y_pp

const PostprocessorValue* const AnisoHeatConductionMaterial::_thermal_conductivity_y_pp
protected

Definition at line 36 of file AnisoHeatConductionMaterial.h.

Referenced by AnisoHeatConductionMaterial(), and computeProperties().

◆ _thermal_conductivity_z

MaterialProperty<Real>* const AnisoHeatConductionMaterial::_thermal_conductivity_z
protected

Definition at line 44 of file AnisoHeatConductionMaterial.h.

Referenced by computeProperties().

◆ _thermal_conductivity_z_dT

MaterialProperty<Real>* const AnisoHeatConductionMaterial::_thermal_conductivity_z_dT
protected

Definition at line 45 of file AnisoHeatConductionMaterial.h.

◆ _thermal_conductivity_z_pp

const PostprocessorValue* const AnisoHeatConductionMaterial::_thermal_conductivity_z_pp
protected

Definition at line 37 of file AnisoHeatConductionMaterial.h.

Referenced by AnisoHeatConductionMaterial(), and computeProperties().


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