Software Implementation of the discrete ordinates method in the problem of the Poiseuille flow in a plane channel with infinite parallel walls

The algorithm for calculating the gas macroparameters in a channel using the discrete ordinates method was considered. The system of finite-difference equations that determine the general solution of a homogeneous integro-differential equation after separation of variables was written in a matrix form. The coefficient matrix in the resulting system of equations was reduced to a symmetric one and then to a tridiagonal matrix using the Householder algorithm. The search for the eigenvalues of the tridiagonal matrix was performed using a QL algorithm with implicit shifts. The determination of the coefficients in the expansion of the solution of the required boundary value problem with allowance for the boundary conditions on the channel walls was reduced to a system of linear algebraic equations. The Gauss method with a permutation of the rows was used to solve it. The software implementation of the algorithm was carried out using the C++ programming language. The mass velocity profile of the gas and the flow rate through the cross section of the channel in the Poiseuille flow problem were calculated as an application. The comparison with similar results presented in the open press was performed.


Introduction
Technologies related to the design, manufacture and operation of micro and nano devices develop actively and require conducting systematic fundamental research of the processes taking place in such devices. Given that existing microelectromechanical systems (MEMS) have dimensions from a micrometer to several millimeters and nanoelectromechanical systems (NEMS) have submicron dimensions, conducting experimental studies is often difficult or even impossible. Therefore, the main direction of research is the use of mathematical modeling methods. The complexity of applying mathematical modeling methods to the description of transport processes in micro and nano devices is due to the fact that in practice most of them operate in a sufficiently wide range of Knudsen numbers. The latter circumstance leads to either using several models of gas flow for various flow regimes with «docking» them with each other, or using of universal approaches capable of describing all flow regimes [1]. Such universal approaches include the modeling of gas flows based on the Boltzmann kinetic equation or model kinetic equations using numerical methods and, in particular, the modified discrete ordinates method, which was implemented in [2] for the case of rarefied gas flows in channels with infinite parallel walls. Considering the high efficiency of the modified discrete ordinates method, it is of interest to generalize it for three-dimensional flows. The aim of the present work is to develop a software implementation of the discrete ordinates method and its application in the problem of the Poiseuille flow in a plane channel with infinite parallel walls.

Statement of the problem and mathematical model
Consider the flow of gas in a channel with walls located on the planes '' xa  in a rectangular Cartesian coordinate system. Assume that the temperature of the channel walls is constant everywhere and equals T , and the motion of the gas is due to a constant pressure gradient ' We direct the axis ' Oz of the Cartesian coordinate system along the pressure gradient. Then the BGK model of the Boltzmann kinetic equation in the chosen coordinate system is written in the form [1] v v ( ) Here ( ', ', ) f x y v -the gas molecules distribution function in coordinates and velocities, v x and v ythe projections of the gas molecules velocities, p и  -the pressure and the coefficient of dynamic viscosity of the gas, ( ', ', ) eq f x y v -the local equilibrium Maxwellian with parameters given on the channel walls. The relative pressure drop over the mean free path of the gas molecules g l is assumed to be small. This allows us to solve the problem in a linearized form. The distribution function may be represented in the form  r -the radius vector of the points of the channel walls,  -the accommodation coefficient of the tangential momentum of the gas molecules by the channel walls, n -the normal vector to the channel walls directed toward the gas [3]. Substituting (2) in (1) and (3) for finding ( ; ) x Z x C we arrive at the boundary-value problem ( The general solution of (4) may be written in the form (6) Substituting (6) into (4) to find ( , ) Yx we arrive at the homogeneous equation (7) Taking this into account, equation (7) can be rewritten in the form (9) Following [2], we pass from (8), (9) to the finite-difference equations in the velocity space Here k  -the weight coefficients of the quadrature formula used to find the value of the integrals in the right-hand sides of (8) and (9). In the present paper 6-point Newton-Cotes quadrature formulas were used to calculate the integrals.
. Similarly to the Case method [3], we seek the solution (10), (11) in the form (12) Here  -spectral parameter. The substitution of (12) into (10) and (11) leads to two matrix equations Here  (13) and (14), we obtain Transforming equation (17), we successively find   Thus, finding the values of the spectral parameter  , from expression (12) reduces to finding the eigenvalues of the system of equations (18). Since the matrix of the system of equations (18) is symmetric, its eigenvalues are real and different. In order to find them we have used the Householder algorithm, which made it possible to move from a symmetric matrix to a tridiagonal one. The search for the eigenvalues of the tridiagonal matrix was carried out using a QL algorithm with implicit shifts. Hence the problem of finding the spectral parameter values is solved. Now we turn to finding the eigenfunctions corresponding to the found spectral parameters. We use the normalization condition Substituting (12) into (10) and (11) with mentioned normalization condition, we find ( , ) Then the solutions of equations (8) and (9) can be written as a linear combination of the constructed solutions (20) A direct substitution shows that the constant A and the function ) ( (21) By virtue of condition (19), the values of the spectral parameter tend to zero for an infinite increase N and, as a consequence, the particular solutions corresponding to them in (20) and do not contribute With this in mind when writing (21), we excluded from (20) particular solutions that correspond to the minimum of the found values of the spectral parameter. Substituting (6), (21) into the boundary conditions (5), we arrive at a system of linear algebraic equations for determining the We have used the Gauss method with a permutation of the rows to solve the system of equations (22), (23). A solution of the system of equations (22), (23) completes the solution of the boundary value problem (4), (5). Proceeding from the statistical meaning of the distribution function [3], we finally find the mass velocity profile of the gas in the channel and then the flow rate through the cross section of the channel Q [1] Substituting the obtained results in (24) and (25), we finally find ) 3

Results and discussion
The software implementation for calculating the values of () qx and Q have been performed using the C ++ programming language. Since the integrand in (24) contains a factor proportional to

Conclusions
The algorithm for calculating the gas macroparameters in a channel using the discrete ordinates method is considered on the example of the Poiseuille flow problem. Software implementation using C ++ programming language is also presented. The BGK model of the Boltzmann kinetic equation is used as the basic equation describing the process kinetics, and Maxwell's diffusive reflection model is adapted as the boundary condition on the channel walls. The mass velocity profile of the gas and the flow rate through the cross section of the channel are calculated as an application.