Evaluation of the Bulk Temperature in 2D Models
In 2D models, the evaluation disk of the diskint operator is oriented in-plane, so this operator is not suitable for an integration over the cross section, and the integrate(expr,var,lower,upper,tol) operator should be used instead. This operator computes the integral of expr for the integration variable var over an interval specified by expressions lower and upper. A relative tolerance tol may be specified as well.
See integrate in the COMSOL Multiphysics Reference Manual for details about the operators.
In order to integrate over the cross section of the flow, the cross section line is parameterized as follows:
where (nx,ny) is the normal vector to the boundary, and hence the vector tangent to the cross section.
The at2 operator, which is the spatial evaluation operator in 2D, should be used to evaluate the expression expr on this parameterization of the cross section.
See at in the COMSOL Multiphysics Reference Manual for details about the operators.
In practice, the integral is performed over a larger interval [-R,R], where R should be chosen large enough to encompass the cross section of the tube, but not too large regarding numerical precision. The isnan operator can be used to ensure that the solution is defined at the prescribed coordinates, and as in 3D models, the dom variable may be used to identify the domain of interest.
See isinf and isnan in the COMSOL Multiphysics Reference Manual for details about the operators.
As in 3D models, the evaluation of the tangential velocity over the cross section requires to access the vector tangent to the boundary, in the computational domain. However, the tangent vector t is defined on boundaries only. By applying the general extrusion operator genext1 on the boundary, with a mapping to the domain, the tangential vector genext1(t) is defined all over the cross section, and can be used in the integrate operator expression.
See General Extrusion in the COMSOL Multiphysics Reference Manual for details about the operators.
Finally, the bulk temperature can be expressed as:
Tb = A/B
where
A = integrate(if(isnan(at2(x+s*nx,y+s*ny,ut*T)),0,at2(x+s*nx,y+s*ny,ut*T)),s,-R,R,tol)
B = integrate(if(isnan(at2(x+s*nx,y+s*ny,ut*T)),0,at2(x+s*nx,y+s*ny,ut)),s,-R,R,tol)
and ut = u*genext1(tx)+v*(genext1(ty), i is the domain entity number, and the tolerance tol should be specified.