This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GlowScript 2.9 VPython | |
# https://www.wired.com/story/plant-a-tree-for-climate-change/?mod=djemTECH | |
na=6.022e23 | |
#diameter of tree | |
d=1.5 #m | |
#height of tree | |
h=15 # | |
#density of tree | |
rho=500 #kg/m^3 | |
V=pi*h*(d/2)**2 | |
mt=rho*V | |
#fraction carbon in tree | |
fcarbon=0.5 | |
mcarbon=fcarbon*mt | |
mucarbon=0.012 #kg/mole | |
ncarbon=mcarbon*na/mucarbon | |
#number of trees | |
Ntree=100e9 | |
NCO2=Ntree*ncarbon | |
muair=28.97e-3 #kg/mol | |
#mass of atmosphere | |
mair=5e18 #kg | |
Nair=mair*na/muair | |
fractionCO2=NCO2/Nair | |
ppmCO2=fractionCO2*1e6 | |
newppm=400-ppmCO2 | |
print("Starting CO2 Concentration = ",400," ppm") | |
print("CO2 with 1 Tree per Person = ",newppm," ppm") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment