I am learning Finite Volume method using the textbook "An Introduction to CFD: Finite Volume Method" by Veersteg and Malalasekera.

I would like to solve a heat conduction problem over a square grid $0.5m$ in length with all the boundaries maintained at $0°C$. For that, I need to discretize the Poisson equation:

$$ \frac{d^2 T}{d x^2} + \frac{d^2 T}{d y^2} = 32(x(x-1) + y(y-1)) $$

But I am confused about how to discretize the source term in this since the book does not deal with 2-D non-constant source term. My guess is that we separately integrate each of the terms by $ dxdy$ as below:

$$ \left (A_e \frac{\partial T}{\partial x} - A_w \frac{\partial T}{\partial x}\right) + \left (A_n \frac{\partial T}{\partial y} - A_s \frac{\partial T}{\partial y}\right) = 32x^2dxdy -32xdxdy + 32y^2dxdy - 32ydxdy$$

which becomes:

$$ \left(A_e \frac{T_e - T_p}{\delta x_{ep}} - A_w \frac{T_p - T_w}{\delta x_{pw}} \right) + \left(A_n \frac{T_n - T_p}{\delta y_{np}} - A_s \frac{T_p - T_s}{\delta y_{ps}} \right) = \frac{32}{3}(x^3y + y^3x) - 16(x^2y + y^2x)$$

But I am not sure if this is the right wat to go about it.

I tried to find resources on the internet about this but all I could find was a few academic papers that were not easy to understand.

So what is the correct way to discretize the Poisson equation?


1 Answer 1


The correct way is to average the source term which you can do easily in this case as you have a polynomial. In general you can do the average with a quadrature. For second order accuracy if the source term is smooth as in your case, you can also just evaluate it at the cell center, which is like mid-point quadrature. It should not matter much in your example which of these two you do. Try both and see how it affects the solution error.

  • $\begingroup$ Thanks! By averaging using a quadrature, do you mean performing a numerical integration using Simpson's rule or such? So if I do that i.e. numerically integrate from 0 to 0.5 (the length of the grid), I'll get a number, right? So the source term will become a constant? $\endgroup$
    – justauser
    Mar 3, 2021 at 15:27
  • $\begingroup$ Yes, do a numerical quadrature of source term over each cell. Here you can do it exactly since your source term is a polynomial $\endgroup$
    – cfdlab
    Mar 4, 2021 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.