[yt-users] Athena units

Nathan Goldbaum nathan12343 at gmail.com
Tue Oct 22 09:39:21 PDT 2013


Ah, sorry for the misinformation!


On Tue, Oct 22, 2013 at 9:36 AM, John ZuHone <jzuhone at gmail.com> wrote:

> But, "z-velocity" is a defined derived field in the Athena frontend, and
> should give it in CGS units.
>
> On Oct 22, 2013, at 12:32 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
> Yes, velocity_z is in code units as well because it's an athena field.
>  You'll need to define a new x-velocity field (to match the naming scheme
> elsewhere in yt) that converts the athena velocity field to CGS.
>
> This is all being fixed with our new sympy powered units system and will
> be much easier in yt 3.0 or 3.1 (whichever version gets the new units
> support).
>
> -Nathan
>
>
> On Tue, Oct 22, 2013 at 9:23 AM, John ZuHone <jzuhone at gmail.com> wrote:
>
>> Hi Stephanie,
>>
>> First off, if I recall correctly we only support setting LengthUnits,
>> DensityUnits, and TimeUnits. Everything else (such as mass, velocity,
>> energy, etc.) should be derived from those.
>>
>> Secondly, the reason why you're seeing this for the grid "z" is that it
>> always defaults to the code units (as well as "x" and "y", and the cell
>> deltas). I don't think we have a built-in field for "z" in centimeters (or
>> anything else other than code units), so I think you might have to define a
>> field on your own for "z" in whatever units you want.
>>
>> Anyone else want to chime in?
>>
>> Best,
>>
>> John
>>
>> On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen <stonnes at gmail.com>
>> wrote:
>>
>> Hi John,
>>
>> Thanks for this.  So I now have this in, and it is being applied to my
>> SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using
>> code units.  There is an excerpt below.
>>
>> >pf =
>> load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6})
>> >pc = PlotCollection(pf)
>> >tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25",
>> "grid['z'] > 0.01"])
>>
>> >pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
>>
>> Can I force it to use physical units?
>>
>> Thanks,
>> Stephanei
>>
>>
>>
>>
>> On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone <jzuhone at gmail.com> wrote:
>>
>>> Stephanie,
>>>
>>> You can set it up like this:
>>>
>>> pf = load("virgo_weak_mag.0054.vtk",
>>>                  parameters={"TimeUnits":3.1557e13,
>>>                                          "LengthUnits":3.0856e24,
>>>
>>>  "DensityUnits":6.770424595218825e-27})
>>>
>>> Sorry, this is a little-documented feature.
>>>
>>> Best,
>>>
>>> John
>>>
>>> On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen <stonnes at gmail.com>
>>> wrote:
>>>
>>> > Hi Again, Everyone!
>>> >
>>> > So I would also like my figures to be in physical units, instead of in
>>> my code units.  I *think* the Athena frontend doesn't read in what the unit
>>> conversions are (and I am not sure how it would do that).  Can I just do
>>> something simple like:
>>> >
>>> > DensityUnits = 3.
>>> > density_physunits = grid['density'] * DensityUnits
>>> >
>>> > Then, of course, I don't know how I would do a SlicePlot,
>>> ProjectionPlot or phaseplot in physical units...
>>> >
>>> > Any help/advice/direction is appreciated!
>>> >
>>> > Thanks,
>>> > Stephanie
>>> > _______________________________________________
>>> > yt-users mailing list
>>> > yt-users at lists.spacepope.org
>>> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> 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/20131022/f4776d8e/attachment.htm>


More information about the yt-users mailing list