angular momentum conservation
hi matt,
thank you so much for your help. it worked perfectly.
one more thing. for the conservation of angular momentum test, i can get the value of the angular_momentum_vector. but i need the angular_momentum_magnitude. although i can see it in the derived fields list of my simulation. but i am not being able to get its value.
any help with that?
http://paste.yt-project.org/show/6034/
cynthia
________________________________________
From: yt-users
Hi Cynthia,
If I understand what you are trying to do correctly, you can use
.total_quantity("angular_momentum_magnitude"). But I'd be careful how
you calculate that precisely, since the "center" field parameter will
need to be set on the object you're looking at. For instance:
sp = ds.sphere(...
sp.set_field_parameter("center", ds.domain_center)
sp.total_quantity("angular_momentum_magnitude")
Keep in mind also that this will sum up the magnitude of the angular
momentum *within each cell*, over the whole domain.
On Tue, Nov 10, 2015 at 1:55 AM, Cynthia Saad (Student)
hi matt, thank you so much for your help. it worked perfectly. one more thing. for the conservation of angular momentum test, i can get the value of the angular_momentum_vector. but i need the angular_momentum_magnitude. although i can see it in the derived fields list of my simulation. but i am not being able to get its value. any help with that? http://paste.yt-project.org/show/6034/
cynthia ________________________________________ From: yt-users
on behalf of yt-users-request@lists.spacepope.org Sent: Monday, November 9, 2015 9:04 PM To: yt-users@lists.spacepope.org Subject: yt-users Digest, Vol 93, Issue 6 Send yt-users mailing list submissions to yt-users@lists.spacepope.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org or, via email, send a message with subject or body 'help' to yt-users-request@lists.spacepope.org
You can reach the person managing the list at yt-users-owner@lists.spacepope.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of yt-users digest..."
Today's Topics:
1. mass conservation-enzo (Cynthia Saad (Student)) 2. Re: mass conservation-enzo (Matthew Turk)
----------------------------------------------------------------------
Message: 1 Date: Mon, 9 Nov 2015 10:25:38 +0000 From: "Cynthia Saad (Student)"
To: "yt-users@lists.spacepope.org" Subject: [yt-users] mass conservation-enzo Message-ID: Content-Type: text/plain; charset="iso-8859-1"
hello,
i am trying to test for mass conservstion in an enzo simulation.
would you please tell me what is wrong with this py script?
http://paste.yt-project.org/show/6030/
any alternative ideas would be highly appreciated.
thanks
Cynthia
Hi Cynthia,
Nathan IMmed me and pointed out that you probably want to do:
Lx, Ly, Lz = sp.total_quantity(["angular_momentum_x",
"angular_momentum_y", "angular_momentum_z"])
L = (Lx**2 + Ly**2 + Lz**2)**0.5
-Matt
On Tue, Nov 10, 2015 at 9:34 AM, Matthew Turk
Hi Cynthia,
If I understand what you are trying to do correctly, you can use .total_quantity("angular_momentum_magnitude"). But I'd be careful how you calculate that precisely, since the "center" field parameter will need to be set on the object you're looking at. For instance:
sp = ds.sphere(... sp.set_field_parameter("center", ds.domain_center) sp.total_quantity("angular_momentum_magnitude")
Keep in mind also that this will sum up the magnitude of the angular momentum *within each cell*, over the whole domain.
On Tue, Nov 10, 2015 at 1:55 AM, Cynthia Saad (Student)
wrote: hi matt, thank you so much for your help. it worked perfectly. one more thing. for the conservation of angular momentum test, i can get the value of the angular_momentum_vector. but i need the angular_momentum_magnitude. although i can see it in the derived fields list of my simulation. but i am not being able to get its value. any help with that? http://paste.yt-project.org/show/6034/
cynthia ________________________________________ From: yt-users
on behalf of yt-users-request@lists.spacepope.org Sent: Monday, November 9, 2015 9:04 PM To: yt-users@lists.spacepope.org Subject: yt-users Digest, Vol 93, Issue 6 Send yt-users mailing list submissions to yt-users@lists.spacepope.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org or, via email, send a message with subject or body 'help' to yt-users-request@lists.spacepope.org
You can reach the person managing the list at yt-users-owner@lists.spacepope.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of yt-users digest..."
Today's Topics:
1. mass conservation-enzo (Cynthia Saad (Student)) 2. Re: mass conservation-enzo (Matthew Turk)
----------------------------------------------------------------------
Message: 1 Date: Mon, 9 Nov 2015 10:25:38 +0000 From: "Cynthia Saad (Student)"
To: "yt-users@lists.spacepope.org" Subject: [yt-users] mass conservation-enzo Message-ID: Content-Type: text/plain; charset="iso-8859-1"
hello,
i am trying to test for mass conservstion in an enzo simulation.
would you please tell me what is wrong with this py script?
http://paste.yt-project.org/show/6030/
any alternative ideas would be highly appreciated.
thanks
Cynthia
participants (2)
-
Cynthia Saad (Student)
-
Matthew Turk