Rebuilding Galaxy Simulator

Published on 15 September 2024 at 13:09

"Whatever Nature has in store for mankind, unpleasant as it may be, men must accept for ignorance is never better than knowledge " - Enrico Fermi (Sic)

 

 Introduction

 

A while back I wrote a galaxy simulator in Python and posted some screenshots on here and then ported it into C++. The one in C++ was gloriously fast allowing you to watch a contraction and a expansion phase of a fair few planets over a day and a system to take screenshots and a evolution of space empires and their collapse

And not only did I lose it to a errant hard disk crash and the dreaded blue screen of death but I kind of gave up for the slightly odd reason that I was not so good in building menus. That sounds odd but my plans was 

 

We can rebuild it we can make it better

 

So I rebuilt it and it pretty much in all cases then predicts the formation of planets with liquid water on their surface. Water is a universal solvent and probably the biggest long-term predictor for a chance . The universal solvent is important as you would need a liquid for chemical reactions to take place in. Now theoretically other liquids could be used Nitrogen at other temperatures, Sulphuric acids (Xenomorphs could be real?) or ammonia (an entire biosphere made of cleaning fluids noice!). I have put a link in references to alternative life types but I can take it the most likely places for life to be is where water is in a liquid form.

So I built 3 different test simulators they each have stars and planets and calculate gravity and therefore average stellar drift on a planet and calculates the heat on a planet from distance and suns nearby and then converts it into a kelvin temperature. I can then use that to work out if it falls within the temperature for liquid water  

1200 planets and stars

Galaxy Simulation (youtube.com)

2000 planets and stars

https://www.youtube.com/watch?v=mh-xkBEeb0s&t=13011s 

My favourite and therefore the best, 4000 planets or starts

Galaxy Simulation Try 3 (youtube.com) 

The density of stars and planets in our galaxy I think would put us around 10,000 for a 10

 

I am no Physicist but...

 

So short explanation of the simulation rules: Stars can spawn at a variety of types from small red dwarfs to large O types several thousand times the size of our sun. These are yellow.

Planets can spawn either as terrestrial where they have density of rock and can be up too 2 times the mass of our earth or gas giants that have 100-200 times earths mass. Terrestrial and gas giants have different densities that changes the planets radius and this is factored into temperature calculations. 

Planets are blueish grey until they meet the heat level to have liquid water on whence they turn green to show its a planet that life could evolve on. Liquid water uses illumination value of the star which is random but weighted to their type such that dwarfs put off very little light and O types may put out a few thousand times our sun.

Weather calculations take into account a random level of green house gas and initial Albedo. Albedo which changes the amount of light absorbed goes up over time slowly as assume ice forms on polar caps reflecting light and thicker atmospheres forms as stray gases in space are collected under gravity in the planets atmosphere. I have no data on rates of polar ice caps formation I googled it and there was not a easy answer so I guessed a rate of change from studies of global warming.

I have included calculations for atmospheric optical depth i.e. greenhouse gases but do not know how to estimate volcanic activity, and or the core to measure its often to do with gravitational forces. Therefore they are just assigned a random value at start in theory a planet might become too hot after life forms if green house gases are released faster than stripped by solar winds warming the planet then melting the ice caps which would then change the albedo but this is not modelled for.

Scale is 1 light year a pixel so around 1000x1000 light years and for speed 10 million years passes each full update cycle. 1100 planets/stars are in the simulation. The simulation would represent trillions of years of change in a watchable format and hopefully is interesting if you and illuminates ideas around Fermi paradox. A long term goal would to expand this into a Sci fi space opera galaxy history generator using plausible physics. I hope you enjoy this very simple tech demo.

But the following seems Axiomatic water can exist at between 273.15 K and 373.15 K. We also know what the calculations for the warming of a planet by the sun. 

The steps for calculating determine luminosity where 1 is about right for our sun but otherwise is based on stars spectral type. Then for each sun, calculate the energy received by the planet using the inverse square law:

where (E_i) is the energy received from the (i)-th sun, (L_i) is the luminosity of the (i)-th sun, and (d_i) is the distance from the (i)-th sun to the planet. To put it really simply the energy drops of at a exponential rate the further you are away from the sun. 

You then sum the energy received and adjust for Albedo. Albedo is how reflective the planet is and while no mirror planets do not exist ice planets with thick clouds  reflect a lot more heat back into space conversely rocky planets reflect less.  I spent a lot of time figuring out the exponent and right sizing to the scale of 1 light year, 10 million years and so I am keeping it to myself same with the gravity calculations to myself as they where harder to simplify and save a lot of time on the runtime. 

You can easily get all the calculation from Google if you want to build your own. 

 

Affect Of The Simulation

 

So the hypothesis is at the level of the Fermi paradox I do not need to know about precise orbital mechanics but rough placement of the orbit and the orbital drift and the likely time that a given orbit will produce liquid water to estimate an idea . In short its a gravity model in high detail but over millions of years and not precisely attempting to solve the 3 body problem.

You can see in the YouTube videos that the planets do tend to go from cold (blue) to green (habitable) and that in all simulations its enough for multiple habitable planets to appear over a lengthy amount of time. 

I think its axiomatic to say that unless the planet gets thrown off that over time it will creep towards its closest star therefore unless some instability sends it flying the amount of planets its logical the amount of planets that are habitable will increase over time and my simulation would seem to agree with this assessment.

Further the planets in the simulation do not look to be wholly unstable in orbit, the planets are only marked green if they would have had liquid water for two cycles i.e. 20 million years (10 million to mark a planet with worker and next cycle to confirm and mark it green). To put this into context I reference this visual from Wikipedia that 20 million years you have flowers, birds, primates and possibly the start of dinosaurs and Mammals. I mean that time might vary I am going to do a deep dive later on the details but its a substantial amount of time in simulation that you might accept something could have happened and life could have started its ascent.

 

 

I noticed something interesting predicted from this simulation in that you can get planets further away from a star than ours if you factor in albedo and green house gases. I have set these to plausible (0.2-0.9) values of albedo and the estimated atmospheric optical density I could get for AOD both for gas giants and terrestrial planets respectively. But it is given the differences in cloud cover can mean that planets in the simulation a greater distance than you expect would be warm and have water.

 

Drakes Equation

 

To critique this Fermi Paradox simulation lets look at the Drake equation.

 

 

  • R = the average rate of star formation in our Galaxy.
  • fp = the fraction of those stars that have planets.
  • ne = the average number of planets that can potentially support life per star that has planets.
  • fl = the fraction of planets that could support life that actually develop life at some point.
  • fi = the fraction of planets with life that go on to develop intelligent life (civilizations).
  • fc = the fraction of civilizations that develop a technology that releases detectable signs of their existence into space.
  • L = the length of time for which such civilizations release detectable signals into space.[6][7]

 

Now I have the following critiques of the Drakes equation  that arises from my simulation if you factor in AOD and Albedo you can get planets further away from star than you might initially expect. If a planet is far away but big and therefore able to have a big surface area, has thicker clouds and lower polar ice formed it might be that habitable worlds pop up more frequently in odd places. It might also explain why we struggle to find them in that we are looking for planets circling stars.

We have a problem that we assume the goldilocks zone is like earth, we are looking for earth like planets not cloud worlds far away from the star and terrestrial worlds closer in and some differences in between. It might be challenging but we assume a binary star would be hugely unstable in orbit but a cloudy planet could circle it in a much longer orbit be warmer and might at a longer orbit you fit in more planets that are stable for longer periods of history to let life evolve.

This simulation got me thinking in that direction and even if its wrong its at least interesting as a toy model. But the maths seems right but I have no data to compare to our galaxy and or no idea how you'd start to do that.

Ri is rate of star formation in our galaxy and my research says about two suns are created a year in the milky way and 1 dies out. That is another manner. I also feel people underestimate how small L is for us in the Drake equation assuming other alien civilisations are perfect at detecting our signals we have been transmitting for 100 years at best that is only 100 light years of space that those signals will have passed through. Its enough that we might say we are alone and no type 3 mega civilisation exists on our doorstep but its a blink of an eye for anything else. 

 

Conclusion

 

The point here though is if you take the Fermi Paradox seriously then genuinely there should be more stars every year, gravity means over millions of years nearby stars should settle into some distance where liquid water exists on it

There is a really simple explanation for the Fermi paradox if you wake up in a cold galaxy with little water then you are probably 

Further axiomatically when collapsing the galaxy forms arms as shown in the simulation of the slower moving objects and pulls in around the edges your region of space is probably collapsing under local gravity. All those things would make it more likely put you at a early point of time in my simulation and not a late point.

Therefore we live in a cold collapsing galaxy its not a stretch to say we are first or very early evolved lifeforms. Therefore there's a possibility from things we can observe about our galaxy that you should be moved to think we are early and there is no Fermi paradox. We are simply first and that might be arrogant to think but we also will not be the last to evolve.

A number of simulations do evolve 1 initial planet with water and then a lot of time on its own. It could be the simplest explanation is we are that planet.

You also could drive yourself crazy that a randomly assigned starting point for a bunch of planets with no initial inertia from a big bang in a simulation forms galaxy arms and why that works at all. I don't believe we live in a simulation as I am sure it could be explained by larger universe blowing up and then local areas collapsing down in local gravity but sorry if you do not sleep at night now and worry your in a simulation...

I want to then create a system for doing the emergence of intelligent life so will implement something for life to randomly evolve on stable habitable planets. I am going to use the ideas from the drake equation and allow a menu to set the values of what you feel is right. I then might try and expand it into a game around the various proposed "great filters" hypothesised.

 

  • fl = the fraction of planets that could support life that actually develop life at some point.
  • fi = the fraction of planets with life that go on to develop intelligent life (civilizations).
  • fc = the fraction of civilizations that develop a technology that releases detectable signs of their existence into space.
  • L = the length of time for which such civilizations release detectable signals into space.[6][7]

 

I think that might make a cool sandbox for looking at deciding for yourself what you think about the Fermi paradox. I might then try to build up systems for building stories in generated galaxies and exploring them. 

 

References

Hypothetical other life

Hypothetical types of biochemistry - Wikipedia

Timeline of evolutionary life

Timeline of the evolutionary history of life - Wikipedia

Drakes Equation

Drake equation - Wikipedia 

Add comment

Comments

There are no comments yet.

Create Your Own Website With Webador