[yt-users] adding gradient of gravitational potential and calculating gravitational acceleration

tazkera haque h.tazkera at gmail.com
Wed Jun 22 21:03:43 PDT 2016


Hi people,

I have a physics question which comes from adding the gradient of
gravitational potential. I want to use [image: g = -\nabla \phi] ,
where [image:
\phi] stands for grav. potential.

I see in yt cookbook they add gradient to grav. potential

 *ds = yt.load("~/path to folder")*
* grad_fields = ds.add_gradient_fields(("gas","gravitational_potential"))*

 now if I want to calculate the "g", do I just add


*dd= ds.all_data()*

* g_x = - dd["gravitational_potential_gradient_x"] *

*I was wondering if that last line does stand for [image: g_{x} =
-\nabla_{x} \phi] *

*thanks*
*Tazkera*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160623/e88ac63f/attachment.htm>


More information about the yt-users mailing list