37 #include "libmesh/getpot.h"
38 #include "libmesh/system.h"
39 #include "libmesh/mesh.h"
45 (
const std::string & helper_name,
54 if (input.have_variable(
"Stabilization/tau_constant_T"))
56 (_C, input,
"Stabilization/tau_constant_T", _C );
59 (_C, input,
"Stabilization/tau_constant", _C );
61 if (input.have_variable(
"Stabilization/tau_factor_T"))
63 (_tau_factor, input,
"Stabilization/tau_factor_T", _tau_factor );
66 (_tau_factor, input,
"Stabilization/tau_factor", _tau_factor );
76 const libMesh::Real rho,
77 const libMesh::Real Cp,
78 const libMesh::Real k )
const
80 libMesh::Gradient grad_T = context.fixed_interior_gradient(this->
_temp_vars.
T(), qp);
81 libMesh::Tensor hess_T = context.fixed_interior_hessian(this->
_temp_vars.
T(), qp);
83 libMesh::RealGradient rhocpU( rho*Cp*context.fixed_interior_value(this->_flow_vars.u(), qp),
84 rho*Cp*context.fixed_interior_value(this->_flow_vars.v(), qp) );
86 rhocpU(2) = rho*Cp*context.fixed_interior_value(this->
_flow_vars.
w(), qp);
88 return rhocpU*grad_T - k*(hess_T(0,0) + hess_T(1,1) + hess_T(2,2));
94 const libMesh::Real rho,
95 const libMesh::Real Cp,
96 const libMesh::Real k,
98 libMesh::Real &d_res_dT,
99 libMesh::Gradient &d_res_dgradT,
100 libMesh::Tensor &d_res_dhessT,
101 libMesh::Gradient &d_res_dU
104 libMesh::Gradient grad_T = context.fixed_interior_gradient(this->_temp_vars.T(), qp);
105 libMesh::Tensor hess_T = context.fixed_interior_hessian(this->_temp_vars.T(), qp);
107 libMesh::RealGradient rhocpU( rho*Cp*context.fixed_interior_value(this->_flow_vars.u(), qp),
108 rho*Cp*context.fixed_interior_value(this->_flow_vars.v(), qp) );
109 if(this->_flow_vars.dim() == 3)
110 rhocpU(2) = rho*Cp*context.fixed_interior_value(this->_flow_vars.w(), qp);
112 res = rhocpU*grad_T - k*(hess_T(0,0) + hess_T(1,1) + hess_T(2,2));
114 d_res_dgradT = rhocpU;
116 d_res_dhessT(0,0) = -k;
117 d_res_dhessT(1,1) = -k;
118 d_res_dhessT(2,2) = -k;
119 d_res_dU = rho * Cp * grad_T;
125 const libMesh::Real rho,
126 const libMesh::Real Cp )
const
129 context.interior_rate(this->
_temp_vars.
T(), qp, T_dot);
138 const libMesh::Real rho,
139 const libMesh::Real Cp,
141 libMesh::Real &d_res_dTdot
145 context.interior_rate(this->_temp_vars.T(), qp, T_dot);
148 d_res_dTdot = rho*Cp;
libMesh::Real compute_res_energy_transient(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real Cp) const
static PhysicsName heat_transfer()
void compute_res_energy_transient_and_derivs(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real Cp, libMesh::Real &res, libMesh::Real &d_res_dTdot) const
void compute_res_energy_steady_and_derivs(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real Cp, const libMesh::Real k, libMesh::Real &res, libMesh::Real &d_res_dT, libMesh::Gradient &d_res_dgradT, libMesh::Tensor &d_res_dhessT, libMesh::Gradient &d_res_dU) const
static std::string velocity_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
const PrimitiveTempFEVariables & _temp_vars
static std::string press_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string temp_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
const VelocityVariable & _flow_vars
libMesh::Real compute_res_energy_steady(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real Cp, const libMesh::Real k) const
unsigned int dim() const
Number of components.
HeatTransferStabilizationHelper(const std::string &helper_name, const GetPot &input)
~HeatTransferStabilizationHelper()