https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DerivativeMaterialInterfaceTHM.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
13
14template <class T>
16{
17public:
19
20protected:
31 template <typename U>
33 const std::string & var_name,
34 const unsigned int i = 0);
35
46 template <typename U>
47 const MaterialProperty<U> & getMaterialPropertyDerivativeTHM(const std::string & base,
48 const std::string & var_name,
49 const unsigned int i = 0);
50
70 template <typename U>
72 bool property_is_liquid,
73 const std::string & var_name,
74 bool var_is_liquid,
75 const unsigned int i = 0);
76};
77
78template <class T>
84
85template <class T>
86template <typename U>
89 const std::string & var_name,
90 const unsigned int i)
91{
92 return this->template declarePropertyDerivative<U>(base, this->coupledName(var_name, i));
93}
94
95template <class T>
96template <typename U>
99 const std::string & var_name,
100 const unsigned int i)
101{
102 // get the base property name
103 const std::string prop_name = this->getMaterialPropertyName(base);
104
105 // get the name of the variable which derivative is respect to
106 const std::string der_var_name = this->coupledName(var_name, i);
107
108 return this->template getMaterialPropertyByName<U>(
109 this->derivativePropertyNameFirst(prop_name, der_var_name));
110}
111
112template <class T>
113template <typename U>
116 const std::string & base,
117 bool property_is_liquid,
118 const std::string & var_name,
119 bool var_is_liquid,
120 const unsigned int i)
121{
122 if (property_is_liquid == var_is_liquid)
123 {
124 return getMaterialPropertyDerivativeTHM<U>(base, var_name, i);
125 }
126 else
127 {
128 const std::string prop_name = this->getMaterialPropertyName(base);
129 const std::string der_var_name = this->coupledName(var_name, i);
130 const std::string der_prop_name = this->derivativePropertyNameFirst(prop_name, der_var_name);
131 return this->template getZeroMaterialProperty<U>(der_prop_name);
132 }
133}
const double T
DerivativeMaterialInterfaceTHM(const InputParameters &parameters)
MaterialProperty< U > & declarePropertyDerivativeTHM(const std::string &base, const std::string &var_name, const unsigned int i=0)
Method for declaring derivative material properties.
const MaterialProperty< U > & getMaterialPropertyDerivativeTHMPhase(const std::string &base, bool property_is_liquid, const std::string &var_name, bool var_is_liquid, const unsigned int i=0)
Method for retrieving derivative material properties corresponding to phase-dependent derivatives.
const MaterialProperty< U > & getMaterialPropertyDerivativeTHM(const std::string &base, const std::string &var_name, const unsigned int i=0)
Method for retrieving derivative material properties.