<br><br>On Wednesday, June 22, 2016, tazkera haque <<a href="mailto:h.tazkera@gmail.com">h.tazkera@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi people,<br><br></div>I have a physics question which comes from adding the gradient of gravitational potential. I want to use <img alt="g = -\nabla \phi" title="g = -\nabla \phi" src="https://latex.codecogs.com/gif.latex?%5Cdpi%7B300%7D%5Cinline%09g%09=%09-%5Cnabla%09%5Cphi" style="display:inline;vertical-align:-3.3px" height="15" width="67"> , where <img alt="\phi" title="\phi" src="https://latex.codecogs.com/gif.latex?%5Cdpi%7B300%7D%5Cinline%09%5Cphi" style="display:inline;vertical-align:-3.3px" height="15" width="8"> stands for grav. potential. <br><div><br></div><div>I see in yt cookbook they add gradient to grav. potential</div><div><br></div><div> <b><span>ds</span> <span>=</span> <span>yt</span><span>.</span><span>load</span><span>(</span><span>"~/path to folder"</span><span>)</span></b></div><div><b><span> </span><span>grad_fields</span> <span>=</span> <span>ds</span><span>.</span><span>add_gradient_fields</span><span>((</span><span>"gas"</span><span>,</span><span>"gravitational_potential"</span><span>))</span></b></div><div><span><br></span></div><div><span> now if I want to calculate the "g", do I just add </span></div><div><span> </span></div><div><span><b>dd= ds.all_data()<br></b></span></div><div><span><b><br></b></span></div><div><b><span> g_x = - dd</span><span>[</span><span>"gravitational_potential_gradient_x"</span><span>] </span></b></div><div><b><span><br></span></b></div><div><b>I was wondering if that last line does stand for <img alt="g_{x} = -\nabla_{x} \phi" title="g_{x} = -\nabla_{x} \phi" src="https://latex.codecogs.com/gif.latex?%5Cdpi%7B300%7D%5Cinline%09g%5F%7Bx%7D%09=%09-%5Cnabla%5F%7Bx%7D%09%5Cphi" height="15" style="display:inline;vertical-align:-3.3px" width="82"> </b></div><div></div></div></blockquote><div><br></div>Yes, that's right.<span></span><br><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><b><br></b></div><div><b>thanks</b></div><div><b>Tazkera</b></div></div>
</blockquote>