27 #include "grins_config.h"
34 #include "libmesh/getpot.h"
35 #include "libmesh/fem_system.h"
36 #include "libmesh/quadrature.h"
56 #ifdef GRINS_USE_GRVY_TIMERS
57 this->_timer->BeginTimer(
"BoussinesqBuoyancy::element_time_derivative");
61 const unsigned int n_u_dofs = context.get_dof_indices(
_flow_vars.
u_var()).size();
62 const unsigned int n_T_dofs = context.get_dof_indices(
_temp_vars.
T_var()).size();
65 const std::vector<libMesh::Real> &JxW =
69 const std::vector<std::vector<libMesh::Real> >& vel_phi =
73 const std::vector<std::vector<libMesh::Real> >& T_phi =
77 libMesh::DenseSubVector<libMesh::Number> &Fu = context.get_elem_residual(
_flow_vars.
u_var());
78 libMesh::DenseSubVector<libMesh::Number> &Fv = context.get_elem_residual(
_flow_vars.
v_var());
79 libMesh::DenseSubVector<libMesh::Number>* Fw = NULL;
84 libMesh::DenseSubMatrix<libMesh::Number>* KwT = NULL;
98 unsigned int n_qpoints = context.get_element_qrule().n_points();
100 for (
unsigned int qp=0; qp != n_qpoints; qp++)
109 for (
unsigned int i=0; i != n_u_dofs; i++)
117 if (compute_jacobian)
119 for (
unsigned int j=0; j != n_T_dofs; j++)
121 KuT(i,j) += context.get_elem_solution_derivative() *
123 KvT(i,j) += context.get_elem_solution_derivative() *
127 (*KwT)(i,j) += context.get_elem_solution_derivative() *
136 #ifdef GRINS_USE_GRVY_TIMERS
137 this->_timer->EndTimer(
"BoussinesqBuoyancy::element_time_derivative");
libMesh::Point _g
Gravitational vector.
VariableIndex w_var() const
unsigned int _dim
Physical dimension of problem.
VariableIndex T_var() const
libMesh::Number _T_ref
reference temperature
PrimitiveFlowFEVariables _flow_vars
virtual void element_time_derivative(bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
Source term contribution for BoussinesqBuoyancy.
VariableIndex u_var() const
libMesh::Number _beta_T
coefficient of thermal expansion
VariableIndex v_var() const
libMesh::Number _rho_ref
reference density
PrimitiveTempFEVariables _temp_vars