<div dir="ltr">Hi Turhan,<div><br></div><div>If you have a copy of the yt source, I suggest having a look the file yt/fields/vector_operations.py.  In there, you will find a function called _divergence which illustrates how to create a divergence field.  Additionally, I recommend looking for where that function is put to use in that file for an example of how to add such a field to the list of known fields.</div><div><br></div><div>Britton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 2:32 PM, turhan nasri <span dir="ltr"><<a href="mailto:turhannasri@gmail.com" target="_blank">turhannasri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi people, <br><br></div>I wish to see the sliceplots of "divergence of velocity" fields in yt. I see yt has an example of how to derive gradient of a scalar field , is there any example to show how to derive  new field for divergence too ? <br><br></div>Best<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Turhan<br></font></span></div>
<br>______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>