[cig-commits] [commit] master: Update text output and some comments (8c3843e)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Jan 13 18:02:50 PST 2015
Repository : https://github.com/geodynamics/burnman
On branch : master
Link : https://github.com/geodynamics/burnman/compare/ad730f0db078eb2ba673ed712a86c8a64c3529ee...9422ec507c1a8dfaa6745252962af04a4a149b78
>---------------------------------------------------------------
commit 8c3843e5af6aa2e70f7014c876092b3a440e212d
Author: Ian Rose <ian.r.rose at gmail.com>
Date: Thu Jan 8 11:40:38 2015 -0800
Update text output and some comments
>---------------------------------------------------------------
8c3843e5af6aa2e70f7014c876092b3a440e212d
examples/example_build_planet.py | 11 +++++++++--
misc/ref/example_build_planet.py.out | 4 ++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/examples/example_build_planet.py b/examples/example_build_planet.py
index 5e5642a..de1adb4 100644
--- a/examples/example_build_planet.py
+++ b/examples/example_build_planet.py
@@ -203,9 +203,16 @@ if __name__ == "__main__":
# the total mass of the planet and
# the moment of inertia factor,
# or C/MR^2
- print "Total mass of the planet: ", merc.mass
- print "Moment of inertia factor of the planet: ", merc.moment_of_inertia_factor
+ observed_mass = 3.02e23
+ observed_moment = 0.346 #From Margot. et al, 2012
+ print ("Total mass of the planet: %.2e, or %.0f%% of the observed mass" % (merc.mass, merc.mass/observed_mass*100. ) )
+ print ("Moment of inertia factor of the planet: %.3g, or %0.f%% of the observed factor" % (merc.moment_of_inertia_factor, merc.moment_of_inertia_factor/observed_moment*100.))
+
+ # As we can see by running this, the calculated mass of the planet is much too large.
+ # One could do a better job of fitting this by using a more complicated interior model,
+ # with a liquid outer core, light alloying elements in the core, and a more realistic
+ # temperature profile. That, however, is outside of the scope of this example.
import matplotlib.gridspec as gridspec
diff --git a/misc/ref/example_build_planet.py.out b/misc/ref/example_build_planet.py.out
index 86a459f..784135d 100644
--- a/misc/ref/example_build_planet.py.out
+++ b/misc/ref/example_build_planet.py.out
@@ -1,2 +1,2 @@
-Total mass of the planet: 4.13030342478e+23
-Moment of inertia factor of the planet: 0.344234122029
+Total mass of the planet: 4.13e+23, or 137% of the observed mass
+Moment of inertia factor of the planet: 0.344, or 99% of the observed factor
More information about the CIG-COMMITS
mailing list