- #1
matteo86bo
- 60
- 0
Hi, this might be a stupid question, but I was wondering how to computer the gradient of a quantity on a grid. I mean I have a grid made of cells (not necessarily of the same size) where the variable [itex]\rho[/itex] is defined at the center of every cell. How can I compute the gradient of this quantity?
It is wrong doing this:
[itex]\nabla\rho(i)=\frac{\rho(i)}{\Delta(i)}[/itex]
where [itex]\Delta(i)[/itex] is the size of cell i.
I can't come up with other methods ...
It is wrong doing this:
[itex]\nabla\rho(i)=\frac{\rho(i)}{\Delta(i)}[/itex]
where [itex]\Delta(i)[/itex] is the size of cell i.
I can't come up with other methods ...