[yt-users] B_div in enzo

Nathan Goldbaum nathan12343 at gmail.com
Wed Oct 7 13:15:25 PDT 2015


On Wed, Oct 7, 2015 at 2:03 PM, Cynthia Saad (Student) <crs07 at mail.aub.edu>
wrote:

> Hello all,
> I am using enzo for 3d mhd collapse. I need to check conservation of
> divB=0. So i turned on BAnyl in the parameter file. Now i need to use yt
> for B_Div. And i'm having trouble doing so.
> I tried using phaseplot, but it says could not find field B_Div.
>

Can you try using the field name ('enzo', 'DivB').  If BAnyl is turned on,
Enzo writes the divergence to disk as 'DivB'.

You can also check what on-disk fields are recognized for your dataset by
looking at ds.field_list.


>
> One more question how may i load several data files in the same .py script?
>

Simply call the load function multiple times in the same script. You can
have multiple datasets loaded at the same time.

You might also be interested in the DatasetSeries class, which lets you
load a time series or whole simulation of datasets. The easiest way to
create a DatasetSeries is by passing a glob pattern to load, like in the
following example:

time_series = yt.load('DD????/DD????)'

for ds in time_series:
    print ds

'ds' in this script is an individual simulation output. time_series is a
DatasetSeries instance.

hope that helps,

Nathan


>
> Thank you so much for taking the time to reply!
> Your input is really needed and mch appreciated.
>
> Cynthia Saad
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151007/05d9986e/attachment.htm>


More information about the yt-users mailing list