I read the numerous threads here for example:
Lower limit of the size of the Universe? (WMAP)
Determining the size of the universe to calculate its age
But I would like to try a novel way to calculate this to illustrate it for middle schoolers.
I would start with the radius of a hydrogen atom calculate its volume then multiply by the number of calculated atoms in the universe.
At this point, the engaged students will point out that the whole universe is not hydrogen. I will point out that 90% of the universe is hydrogen and we are just approximating. (This teachable moment also introduces them to the utility of estimating) Once I have the volume of the universe, I calculate its radius.
I then use the following python code (again a teachable moment about the value of coding)
import math
Hv=math.pi*4/3*(53e-12**3)
print('current volume of hydrogen atom',Hv, 'cubic meters' )
print('number of atoms in the universe',1e+83)
print('current volume of the universe',1e+83*Hv, 'cubic meters' )
print('current radius of the universe',(1e+83*Hv*(3/4)/math.pi) ** (1. / 3), ' meters' )
print('meters in a light year ,',9.461e+15)
print('current radius of the universe',((1e+83*Hv*(3/4)/math.pi) ** (1. / 3))/9.461e+15, ' light years' )
the output is
current volume of hydrogen atom 6.236145193179834e-31 cubic meters
number of atoms in the universe 1e+83
current volume of the universe 6.236145193179834e+52 cubic meters
current radius of the universe 2.460042081814767e+17 meters
meters in a light year , 9461000000000000.0
current radius of the universe 26.001924551472012 light years
So my rough calculation of 26 million light years is way off. The really engaged students will point out that the hydrogen gas in the universe is not just a bunch of hydrogen atoms next to each other but there is empty space around each one. What they will try to grasp is the density of hydrogen in space. Some of the respondents here suggested using 1 atom/4 cc. So then I can calculate
import math
print (1e+83*4,'cc in the universe')
print ('current volume of the universe',1e+83*4/1e+6,'cubic meters')
print('current radius of the universe',(4e+83/1e+6*(3/4)/math.pi) ** (1. / 3), ' meters' )
print('meters in a light year ,',9.461e+15)
print('current radius of the universe',((4e+83/1e+6*(3/4)/math.pi) ** (1. / 3))/9.461e+15, ' light years' )
print('current radius of the universe',f'{(1e+83*4/1e+6*(3/4)/math.pi) ** (1. / 3)/9.461e+15:,}', ' light years' )
output
4e+83 cc in the universe
current volume of the universe 4e+77 cubic meters
current radius of the universe 4.570781497340817e+25 meters
meters in a light year , 9461000000000000.0
current radius of the universe 4831182218.941779 light years
current radius of the universe 4,831,182,218.941779 light years
So 4.8 billion light years. Still off by a factor of 10.
EDIT: So sad that I made typos that led to serious errors.
Anyway, if you want to guarantee the right answer, work backwards to figure out the numbers you need. R = 4.4e26 m = 46 billion light years. Then either choose the total number of atoms and calculate atom/volume, or choose atom/volume and calculate the total number of atoms.
– Alwin Sep 30 '21 at 03:55