Skip to content

Instantly share code, notes, and snippets.

@kkremitzki
Last active December 11, 2017 13:35
Show Gist options
  • Save kkremitzki/b7d0aa6ee8ed75e0c2afd8c07c264be9 to your computer and use it in GitHub Desktop.
Save kkremitzki/b7d0aa6ee8ed75e0c2afd8c07c264be9 to your computer and use it in GitHub Desktop.
Very rough calculation of how many years it would take current human energy needs to drop Earth's core temp by 1 °C.
# The objective is to find the number of years at current total human energy
# use it would take to decrease the temperature of the Earth's 'core' by one
# degree Celsius. The maximum depth of the crust is 100 km so we'll offset
# the average radius by that amount to get the volume, multiply by the
# average density to get the mass. Then we'll multiply by the mass-weighted
# average specific heat and then by 1 °C to cancel things out.
# Using the equation Q = m Cp ΔT, we find the total energy available from
# that one degree drop. Divide by the current total human energy use per year
# to arrive at the number of years it would take.
from math import pi
import pint
u = pint.UnitRegistry()
# World energy consumption per year. (2013)
# https://en.wikipedia.org/wiki/World_energy_consumption
Ehuman = 5.67e17 * u.kJ/u.year
# https://en.wikipedia.org/wiki/Earth
Ravg = 6371 * u.km
Rcrust = 100 * u.km # At most.
Ri = Ravg - Rcrust
Vi = 4/3 * pi * Ri**3
ρavg = 5.514e12 * u.kg/u.km**3 # Pre-converted from 5.514 g/cm³
Mi = Vi * ρavg
# https://en.wikipedia.org/wiki/Earth#Chemical_composition
# Iron, oxygen, silicon, magnesium, sulfur, nickel, calcium, and aluminum
# make up 98.9% of the mass.
MFe = .321
MO = .301
MSi = .151
MMg = .139
MS = .029
MNi = .018
MCa = .015
MAl = .014
mass_fractions = [MFe, MO, MSi, MMg, MS, MNi, MCa, MAl]
# Specific heat capacity at 25 °C (these will be huge underestimates because
# generally heat capacity increases when things change from solid to liquid as
# a result of the increase in degrees of freedom. Most of these are solid at
# 25 °C.) Units are J/g°C.
CpFe = 0.449
CpO = 0.918
CpSi = 0.705
CpMg = 1.023
CpS = 0.710
CpNi = 0.444
CpCa = 0.647
CpAl = 0.897
specific_heats = [CpFe, CpO, CpSi, CpMg, CpS, CpNi, CpCa, CpAl]
weighted_specific_heats = map(lambda m, Cp: m*Cp, mass_fractions, specific_heats)
Cpavg = sum(weighted_specific_heats)/8 * u.J/u.g
Cpavg.ito('kJ/kg')
Qearth = Mi * Cpavg #* 1*u.degC
t = Qearth/Ehuman
print(t)
# 904047.9051270644 year
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment