[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Feb 23 07:54:12 PST 2017


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/baf5fe4c3b39/
Changeset:   baf5fe4c3b39
Branch:      yt
User:        jzuhone
Date:        2017-02-17 19:13:14+00:00
Summary:     Allow the field parameter mu to be set in the temperature definition
Affected #:  1 file

diff -r fb62830c163dff615a41314214a81e4e784155b1 -r baf5fe4c3b39ae53f5c900c5ac3aa005c89d49e2 yt/frontends/gadget/fields.py
--- a/yt/frontends/gadget/fields.py
+++ b/yt/frontends/gadget/fields.py
@@ -83,8 +83,11 @@
                 # Assume cosmic abundances
                 x_H = 0.76
                 gamma = 5.0/3.0
-                # Assume zero ionization
-                mu = 4.0 / (3.0 * x_H + 1.0)
+                if data.has_field_parameter("mu"):
+                    mu = data.get_field_parameter("mu")
+                else:
+                    # Assume zero ionization
+                    mu = 4.0 / (3.0 * x_H + 1.0)
                 ret = data[ptype, "InternalEnergy"]*(gamma-1)*mu*mp/kb
                 return ret.in_units(self.ds.unit_system["temperature"])
 


https://bitbucket.org/yt_analysis/yt/commits/408a6f43236f/
Changeset:   408a6f43236f
Branch:      yt
User:        jzuhone
Date:        2017-02-17 19:30:06+00:00
Summary:     More descriptive name
Affected #:  1 file

diff -r baf5fe4c3b39ae53f5c900c5ac3aa005c89d49e2 -r 408a6f43236f3268b603fdb4d30edeb3e5b391f0 yt/frontends/gadget/fields.py
--- a/yt/frontends/gadget/fields.py
+++ b/yt/frontends/gadget/fields.py
@@ -83,8 +83,8 @@
                 # Assume cosmic abundances
                 x_H = 0.76
                 gamma = 5.0/3.0
-                if data.has_field_parameter("mu"):
-                    mu = data.get_field_parameter("mu")
+                if data.has_field_parameter("mean_molecular_weight"):
+                    mu = data.get_field_parameter("mean_molecular_weight")
                 else:
                     # Assume zero ionization
                     mu = 4.0 / (3.0 * x_H + 1.0)


https://bitbucket.org/yt_analysis/yt/commits/ff20b94f7f7b/
Changeset:   ff20b94f7f7b
Branch:      yt
User:        xarthisius
Date:        2017-02-23 15:54:04+00:00
Summary:     Merged in jzuhone/yt (pull request #2523)

[bugfix] Allow mu to be set in the Gadget temperature definition via a field parameter Closes #1321

Approved-by: Nathan Goldbaum
Approved-by: Kacper Kowalik
Affected #:  1 file

diff -r 0150f2960194e9f105f4ff8063cc6735d35f9431 -r ff20b94f7f7b5bba93a0fa1f26beeebf82ecf8ae yt/frontends/gadget/fields.py
--- a/yt/frontends/gadget/fields.py
+++ b/yt/frontends/gadget/fields.py
@@ -83,8 +83,11 @@
                 # Assume cosmic abundances
                 x_H = 0.76
                 gamma = 5.0/3.0
-                # Assume zero ionization
-                mu = 4.0 / (3.0 * x_H + 1.0)
+                if data.has_field_parameter("mean_molecular_weight"):
+                    mu = data.get_field_parameter("mean_molecular_weight")
+                else:
+                    # Assume zero ionization
+                    mu = 4.0 / (3.0 * x_H + 1.0)
                 ret = data[ptype, "InternalEnergy"]*(gamma-1)*mu*mp/kb
                 return ret.in_units(self.ds.unit_system["temperature"])

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list