Skip to content

This program classifies the universe as flat, open, or closed based on the matter density parameter (Ωₘ) and dark energy density parameter (ΩΛ). The user enters the Hubble constant, Ωₘ, and ΩΛ, and the program uses these to determine the universe’s geometry.

License

Notifications You must be signed in to change notification settings

Codewolf404/universe-simulation

Repository files navigation

Expansion of Universe Simulation Project

This program classifies the universe as flat, open, or closed based on cosmological parameters.
It also estimates the age of the universe and generates detailed numerical data for further analysis.

The program uses the Hubble constant (H₀), the matter density parameter (Ωₘ), and the dark energy density parameter (ΩΛ) to determine the universe’s geometry, expansion history, and fate.


Features

  • Classifies the universe as flat, open, or closed.
  • Estimates the age of the universe based on cosmological inputs.
  • Provides quick results in the console.
  • Saves a detailed dataset to a .txt file, which can be used for plotting or further research.
  • Explains what each classification means in terms of cosmic shape, density, and long-term evolution.
  • Includes a note about our actual universe based on current cosmological data.

Usage

  1. Clone the repository:
    git clone https://github.com/Codewolf404/universe-simulation.git
    

Example Output:

A Simulation for the Expansion of Universe by Atufa Vora

Enter the Hubble constant (H0) in km/s/Mpc: 67.4 Enter the matter density parameter (omega_m): 0.31 Enter the dark energy density parameter (omega_lambda): 0.695 The universe is flat. It has exactly the critical density needed to make space geometrically flat. Expansion slows over time but never stops entirely.

Our actual universe is very close to flat, with accelerated expansion due to dark energy. This allows galaxies, stars, and life to exist for billions of years into the future.

Estimated age of the universe: 13.880 billion years

a=0.00006 t=0.000000 Gyr a=0.00006 t=0.000200 Gyr a=0.00006 t=0.000447 Gyr a=0.00006 t=0.000739 Gyr a=0.00006 t=0.001078 Gyr a=0.00006 t=0.001464 Gyr a=0.00006 t=0.001899 Gyr a=0.00006 t=0.002383 Gyr a=0.00006 t=0.002918 Gyr a=0.00006 t=0.003505 Gyr a=0.00006 t=0.004144 Gyr a=0.00006 t=0.004837 Gyr a=0.00006 t=0.005584 Gyr a=0.00006 t=0.006387 Gyr a=0.00006 t=0.007247 Gyr a=0.00006 t=0.008164 Gyr a=0.00006 t=0.009141 Gyr a=0.00006 t=0.010178 Gyr a=0.00006 t=0.011277 Gyr a=0.00006 t=0.012439 Gyr a=0.00006 t=0.013665 Gyr a=0.00006 t=0.014956 Gyr a=0.00006 t=0.016314 Gyr a=0.00006 t=0.017741 Gyr a=0.00006 t=0.019236 Gyr a=0.00006 t=0.020802 Gyr a=0.00006 t=0.022440 Gyr a=0.00006 t=0.024150 Gyr a=0.00006 t=0.025934 Gyr a=0.00006 t=0.027793 Gyr a=0.00006 t=0.029729 Gyr a=0.00006 t=0.031741 Gyr a=0.00006 t=0.033832 Gyr a=0.00006 t=0.036003 Gyr a=0.00006 t=0.038255 Gyr a=0.00006 t=0.040590 Gyr a=0.00006 t=0.043008 Gyr

Data saved to t_vs_a.txt for plotting.


License

MIT License
Copyright (c) 2025 Atufa Vora

Permission is granted to use, copy, modify, and distribute this code freely.
Provided "as is" without any warranty.

About

This program classifies the universe as flat, open, or closed based on the matter density parameter (Ωₘ) and dark energy density parameter (ΩΛ). The user enters the Hubble constant, Ωₘ, and ΩΛ, and the program uses these to determine the universe’s geometry.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published