The present investigation concerns the numerical solution of elliptic partial differential equations (PDEs) governing physical phenomena in heat transfer and fluid flow by the lattice Boltzmann method (LBM). A general form of dimensionless conservation equations and appropriate source terms to be included in the elliptic PDE are identified. Specific problems considered in this article include heat conduction in a composite domain characterised by a very high thermal conductivity ratio between components and the presence of a partially inclined interface between them. With respect to this problem, the influence of representing oblique interfaces by the simple staircase approximation is studied. On the other hand, hydrodynamically as well as thermally fully-developed laminar flow through rectangular duct and shrouded array of fins is also investigated, where the aspect ratio of the duct cross-section and the height of fins along with the ratio of thermal conductivities of the fin and the fluid are varied. Dimensionless quantities characterising considered problems are determined by LBM and compared with either analytical solutions (if available) or reference data obtained from the finite volume method (FVM). The two relaxation times (TRT) collision scheme with the specific eigenvalue combination fixed to a constant value within a typical range of validity is employed for solving the present problems. The appropriate implementation of boundary conditions and, if required, interface conditions is essential in order to maintain second order accuracy of LBM. It is observed that the accuracy of determination depends strongly on the employed specific eigenvalue combination and relatively weakly on the discrete velocity stencil. As a result, in most of the cases for a considered physical condition, an optimum (range of) specific eigenvalue combination(s) could be detected. Nevertheless, from the acquired results, the potential of LBM with the simple D2Q4 stencil for solving considered problems becomes evident. Therefore, the method proves to be promising for optimisation of duct cross-sections and fin shapes in channels with useful applications in the design of heat exchangers.