{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "a7dd02bc-0605-4adb-b979-ca14db58bf32",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9.857215336667391"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "CF = 0.25                      # capacity factor\n",
    "E_J_per_year = 1.6E20 * 0.34*3     # oil to electric using 34% efficiency\n",
    "E_kW = E_J_per_year / 365/24/3600/1000\n",
    "billion_panels = E_kW / 2.1 / 1E9 / CF            # 2.1 kw panels assumed\n",
    "billion_panels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "52879f53-08fb-429a-9bf6-787f01eb63b8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6035175"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "26823E12*3600/1.6E20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3c896d19-332a-4802-809e-287c18f45344",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5715"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "25400E9*3600*1000/1.6E20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "130220c4-2c42-440a-924a-c7e1db4d462a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6.514285714285714"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "19*0.6*40000/70000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "c169022a-c0e8-46f9-9456-c18510c0e53d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pint; u = pint.UnitRegistry()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "685c26a7-c0fc-4ca5-91a9-9cd928ce17eb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "1.2223362993383529 kilowatt"
      ],
      "text/latex": [
       "$1.2223362993383529\\ \\mathrm{kilowatt}$"
      ],
      "text/plain": [
       "1.2223362993383529 <Unit('kilowatt')>"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "E = 10715 * u.kWh / u.year\n",
    "E.to(u.kW)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "12bcdaf4-ee48-4bf5-b4a5-21d101257d1f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "61776.34536679134 mile<sup>2</sup>"
      ],
      "text/latex": [
       "$61776.34536679134\\ \\mathrm{mile}^{2}$"
      ],
      "text/plain": [
       "61776.34536679134 <Unit('mile ** 2')>"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A = 16 * 10E9 * u.m**2\n",
    "A.to(u.mile**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "4904526e-bab3-41dc-9da2-782012638194",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9.855"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1E6*365*27/1E9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "5f155646-6e54-45a9-a1e6-c3443bf19109",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "41666.666666666664"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1E6/24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3c9fa6c8-8d2b-4a31-9ed0-921e36d99e66",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
