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?(adsbygoogle = window.adsbygoogle || []).push({});

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 ...

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Compute the gradient of a quantiy on a grid

**Physics Forums | Science Articles, Homework Help, Discussion**