Commit d885f120 authored by Elia Merzari's avatar Elia Merzari

Merge branch 'fix-heat-flux' into 'develop'

Corrected heat flux in user object. Refs #6

See merge request !17
parents 7ec414e8 f46c1709
...@@ -76,7 +76,10 @@ NekSideIntegralVariableUserObject::computeQpIntegral() ...@@ -76,7 +76,10 @@ NekSideIntegralVariableUserObject::computeQpIntegral()
// There is an added correction factor that accounts for the surface area of the pin // There is an added correction factor that accounts for the surface area of the pin
// The analytic expression is (2 / R / delta z) but we compute numerically as // The analytic expression is (2 / R / delta z) but we compute numerically as
// (2 / (Surf Area / (2*PI) ) ) = 4PI / Surf Area // (2 / (Surf Area / (2*PI) ) ) = 4PI / Surf Area
return -_diffusion_coefficient[_qp] * _coupled_grad[_qp].norm() * l_poly_val * f_poly_val * 4.0*M_PI / _surface_area_pp; RealVectorValue coupled_grad_vec(_coupled_grad[_qp](0), _coupled_grad[_qp](1),
_coupled_grad[_qp](2));
RealVectorValue normals_vec(_normals[_qp](0), _normals[_qp](1), _normals[_qp](2));
return -_diffusion_coefficient[_qp] * coupled_grad_vec * normals_vec * l_poly_val * f_poly_val * 4.0*M_PI / _surface_area_pp;
} }
void void
NekSideIntegralVariableUserObject::finalize() NekSideIntegralVariableUserObject::finalize()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment