Hi again, 

Thanks for all the responses. As Corentin suggested, I tried a ProfilePlot for just the particles using phi component of the velocity, but I still don't get a rotational curve atleast close to what is expected. Also, the velocity seems unreasonably high (10^4 km/s). Any other possible ideas? 
"
filename="SIM001/output_00030/info_00030.txt"
ds=yt.load(filename)
sp = ds.sphere('c', 100*kpc)
plot = yt.ProfilePlot(sp, "particle_radius", ["particle_spherical_velocity_phi"], weight_field=None)
plot.set_unit("particle_spherical_velocity_phi", "km/s")
plot.set_unit("particle_radius", "kpc")
plot.save()
"
Inline image 1

On Sun, Jan 28, 2018 at 4:59 PM, Eric Gentry <egentry@ucsc.edu> wrote:
Remember that v_c generally depends on mass at larger radii too; it's only a few special cases where you only need to know the mass enclosed in a sphere (e.g. spherical mass distribution, or a Mestel disk).  This is discussed in Binney & Tremaine's book in section 2.6.1.

Unfortunately I don't know a good, general way for calculating v_c off the top of my head.


--
Eric Gentry
PhD Candidate
ISB 159 | ericsgentry.com
Astronomy and Astrophysics
University of California, Santa Cruz


On Sun, Jan 28, 2018 at 3:58 AM, Vadlamani Samhitha <vadlamani.samhitha@gmail.com> wrote:
Hey again, 
I thought of a simpler way to get the rotational curves, basically using the mass enclosed in a sphere to calculate the circular velocity. To be more precise, I do the following:

filename="output_00010/info_00010.txt" 
ds=yt.simulation(filename)
G=yt.YTArray(4*np.pi**2,'au**3/yr**2/Msun')
temp=np.arange(0.5, 40, 0.1)
x=yt.YTArray(temp,'kpc')
V_c = np.array([])
for i in x: 
sp = ds.sphere("c", (i, "kpc"))
print(i)
# This recipe constructs a sphere and then sums the total mass in particles and fluids in the sphere

baryon_mass, particle_mass = sp.quantities.total_quantity(["cell_mass", "particle_mass"])
M_total=(baryon_mass+particle_mass).in_units('Msun')
circular=np.sqrt(G*M_total/i).in_units('km/s')
V_c=np.append(V_c, circular)
plt.plot(temp,V_c)
plt.show()

but ended up with a curve attached in the link below. But we expect a flat rotation curve and not keplerian decrease. Is this a valid approach to get the rotation curves in YT?

Thanks!

On Fri, Jan 26, 2018 at 2:22 PM, Vadlamani Samhitha <vadlamani.samhitha@gmail.com> wrote:
Hey thanks, then, are these derived fields computed automatically and available to access when the data is loaded or does the user have to manually compute as in 

On Thu, Jan 25, 2018 at 6:06 PM, Contact <contact@cphyc.me> wrote:
From what I see from your mail, it looks like you're only listing the field_list. You can get a much more comprehensive list using 'ds.derived_field_list' which include e.g. the angular velocity. These fields aren't directly read from your output but are computed (or derived) quantities, such as the entropy, the dynamical time, … and you an use them for 1D profiles too.

Corentin Cadiou

On 25 janv. 2018, at 16:16, Vadlamani Samhitha <vadlamani.samhitha@gmail.com> wrote:

Sorry, I didn't get what you meant.

On Thu, Jan 25, 2018 at 4:04 PM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
You’re looking for the “particle_radius” field.

On Thu, Jan 25, 2018 at 9:01 AM Vadlamani Samhitha <vadlamani.samhitha@gmail.com> wrote:
I see, How about obtaining the rotational curves for gas and matter separately and then adding them up? Would that be simpler (even if its an approximate) instead of considering the potential directly? I modelled stars and dark matter under particles and gas as fluid on the mesh and I have the following my fields_list: ( I am dealing with cartesian coordinates. So, I don't have the spherical coordinates in my fields_list)

" ('all', 'particle_extra_field_1')
('all', 'particle_extra_field_2')
('all', 'particle_extra_field_3')
('all', 'particle_extra_field_4')
('all', 'particle_extra_field_5')
('all', 'particle_identifier')
('all', 'particle_mass')
('all', 'particle_position_x')
('all', 'particle_position_y')
('all', 'particle_position_z')
('all', 'particle_refinement_level')
('all', 'particle_velocity_x')
('all', 'particle_velocity_y')
('all', 'particle_velocity_z')
('io', 'particle_extra_field_1')
('io', 'particle_extra_field_2')
('io', 'particle_extra_field_3')
('io', 'particle_extra_field_4')
('io', 'particle_extra_field_5')
('io', 'particle_identifier')
('io', 'particle_mass')
('io', 'particle_position_x')
('io', 'particle_position_y')
('io', 'particle_position_z')
('io', 'particle_refinement_level')
('io', 'particle_velocity_x')
('io', 'particle_velocity_y')
('io', 'particle_velocity_z')
('ramses', 'Density')
('ramses', 'Metallicity')
('ramses', 'Pressure')
('ramses', 'var6')
('ramses', 'x-velocity')
('ramses', 'y-velocity')
('ramses', 'z-velocity') "

So, I am thinking that the highlighted fields in the type 'all' could be used to compute circular velocity [sqrt(particle_velocity_x^2+particle_velocity_y^2)] and the radius [sqrt(particle_position_x^2+particle_position_y^2)] for particles. And for gas, 'ramses' fields could be used. However, I am not sure how to get the radius for the gas in this case. Would this be a right approach at all to begin with?
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org

_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org


_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org

_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org




_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org



_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org