Simulating a Black Hole

I’ve just recently finished a big round of black hole simulation prototypes. Check out my latest work and dive into the complexities of black hole physics by visiting the Github link below:

Lately, I have been spending a lot of time learning about physics and the mathematics that power A.I., especially matrix multiplication. Matrix math, once you understand it, feels kind of like a superpower. You see the world differently after taking a proper linear algebra class. I have been really captivated by A.I. for the specific reason of automating scripting. Coding is for sure one of the most tedious and also precise sciences out there and it is also very difficult. I have decided to get back into it and use AI to prototype idea quickly. I have gotten a lot of python, some R, and a lot of SQL under my belt in the last 8 months, so the fact that this is a javascript project is pretty cool!

AI makes coding a lot more fun for me and specifically dealing with syntax and debugging much much. It’s also a great research tool for libraries and capabilities and debugging; I feel like the best computer developers will always be ahead of AI because of the efficiency of the human mind, and also its creativity and sparse encoding abilities. Our brains are truly incredible. And together with A.I. our intelligence will be significantly augmented.

This was a great chance for me to learn to use Java Script; normally I use python for development and little tasks here and there, but at the beginning of this year I started programming every day in one language or another. I’ve also picked up Java and am learning C++ both of which I am excited to start implementing. Javascript is a good time, especially with three.js! Wow, what a powerful library!

How the heck do we even start a simulation like this? Well first we have to consider what a black hole is; a region of space where spacetime is altered because of the intensity of gravity in that area. It’s essentially negative pressure for energy that seems to process it into hadronic jets and probably a lot of other functions that we don’t really understand yet because the amount of energy required to simulate these kinds of interactions are beyond us. String theory probably points us in the right direction; time will tell.

Learning Advanced physics with AI

So First things first, collect some data. We have these magnetic field lines which influence the orbits of the stars around the black hole; we can model in inner horizon line as a 3D sphere from which light cannot escape. This requires quarternion coding for the objects in orbit to be able to interact with the inner horizon line, or the black hole. Three.js is the library I decided to use for this and it turned out to be an awesome and super robust choice for the simulation.

The Event Horizon Telescope is a primary source of data for this project as it evolves. It involved analyzing Fits data which I am just getting into. Its super fun. As I perform data analysis I will update the site and enable as much visibility into the code as possible. It should be fun to analyze the movement of the disc, though its a big challenge because of gravitational lensing. It’s hard to measure because you have to use relativity.

Then we have to model the stars; which I am also still working on, but I have a few real time models of the orbital paths of some of the closest stars to Sagittarius A. Let’s just say that their orbits are wacky and very elliptical, sometimes off center in a huge way. But for now, we can use particles. There are 100 billion stars in the milky way (orbiting the black hole Sagittarius A) so we obviously have to scale this down a lot. Earth is about 1/4 of the way out from the center, so placing the sun is definitely possible. I’m generally going for about 10,000 stars; but adding collision detection and properties of magnetism, gravity, etc, and calculating fields for each object would be very computationally intensive so its going to take some work to modularize. So yeah, you start running into performance issues pretty much right away when doing this kind of computation; great for learning!

However, GPU processing is off the hook and we can still get visual understandings of the various properties of a black hole. The process of layering the data and creating interactivity needs to be extremely intelligent and well thought out to be able to use a simulation like this with real data. But I think I am getting pretty close.

Learning JavaScript and Three.js

JavaScript has been a joy honestly. I have used CSS and HTML like a fool for over a decade and never even thought to look further, probably just because of the curly brackets honestly. They still kind of cause me to flinch a little. But hey, you get used to it I guess cause I’m starting to really enjoy coding in JavaScript; its fun to be able to visualize what you are working on in a web browser. And in the last 10 years libraries have come a long way; python has been great also, whoever invented -pip is a saint.

JavaScript is just because I can just format an HTML document: Header, body, and just script in those spaces. Its awesome for fast prototyping. For the project I import THREE.JS and I experimented with a few other libraries but without too much success yet.

Then you start to add the constants mostly according to screen size; one of the best features of three.js is the camera and the ability to zoom in and out of the simulation.

These are the adjustable settings:

// Adjustable settings
const numParticles = 500; // 10x fewer particles for testing
const radiusMin = 100;
const radiusMax = boundaryRadius;
const discThickness = 60;
const particleSize = 5 + Math.random() * 10; // Fixed size for points
const trailLength = 8; // Number of points in the trail

const velocityScale = 0.01 + Math.random() * 0.9;

particleMaterial = new THREE.PointsMaterial({
color: 0xffffff,
size: 2.5,
transparent: true,
opacity: 1
});

trails.forEach(trail => {
trail.geometry.setFromPoints(trail.points);
const trailMaterial = new THREE.LineBasicMaterial({
color: 0x00ffff,
transparent: true,
opacity: 0.3

These are the primary Variables to adjust the visualization.

Building the Simulation for Adjustment

This can all be adjusted if you have a good computer. If you have a decent GPU you can probably ramp up the particle amounts as well.

So we have our: function createAccretionDisc() which will act a the inner event horizon sphere, but we also need an outer edge. Now how this works in particle physics I don’t think we really understand yet, but there is some outer force that seems to hold galaxies together; most likely its dark energy, which I think of as being the opposite of the cosmological constant. There is light, but there is also shadow. And instead of shadow just being the absence of light, perhaps there is something there. Maybe its just really really really small.

Screenshot of my Elliot’s Simulator

Dark Matter Outer Boundaries

actual trajectories of Stars orbiting Sagittarius A. You can create this effect if you increase the ‘trails’ integer and lessen the particle count.

Then you can see a red ring along the outer boundary and this is the dark matter postulate; it might just be a ring of highly magnetized particles or maybe just gravitation oriented particles. Perhaps energy and negative energy are polarized somehow?

In any case the outer boundary works well with the simulation, even for faster particle movement. The outer horizon seems to be a thing even for the highly irregular orbits of stars close to Sagittarius A; there seems to be a negative energy field on the outside edges of galaxies holding them together.

Challenges and Next Steps: Stars and Jets

I have gotten a few code bases with jets running, but I am trying to figure out accretion transformation functions, which may take a while; I think I have to star with star fusion processes and move upwards in magnitude; anyways, the next step in this project is to start mapping real starts into this. Here is an image of some of the trajectories that would be fun to analyze.

The Star Cluster at the center of the Milky Way

Jets are a challenge; there is still so much that is unknown about these energy mechanisms; the corkscrew effects are tough to simulate well; lots of hydrodynamics and plasma dynamics involved in understanding those. It will take quite a bit more particles physics on my end, and advanced in compute to really start to understand what hadronic jets even are! But perhaps one day, if we do start to understand them, we can use them to travel to distant galaxies.

Conclusion – Modularize the code going forwards

Going forward, I’ll focus on modularizing the code to maintain performance while integrating real data. Stay tuned for more updates!

-ET

The Creation of Planet Earth

Planetary Accretion - Dall-E

Nothing is more fascinating than the origins of the immeasurably vast gravitational landscape of the cosmos. Where in the heck did all this stuff come from? The Earth is like a little bubble of life buoying in the unknowably large tides of the nebulae, adrift in endless waves of stars and their ruthless creators, the black holes, supernova and even more immense cosmic events, that remain a mystery at the heart of the beginning of the universe. Cosmic Radiowave Background Emissions and redshift are a good reason to think that there is an expansion happening, and that perhaps all of this that we experience and can observe was unified, before the “big bang”. But to settle on one hypothesis is surely a downfall until it is proven; even Hawking himself admitted that he didn’t think it was likely a single event in his book, “A Brief Histoy in Time” (by Stephen Hawking, duh). But it is mostly just a giant mystery and these are the explanations we’ve created to understand it that fits within our mathematical models for prediction.

In other words, we are in the midst of discovering so much about how the universe, that we must be open minded and ready to learn and discover the possibilities, rather than force our own perspective on the nature of the cosmos. It is a release of ego, to scale the heights of knowledge.

The Sun’s Beginnings

About 4.6 billion years ago, the sun formed from a molecular cloud through a process called accretion. Generally it is thought that gravitation waves from a nearby supernova caused the collapse of the this molecular cloud to begin to form a proto-star.

Introduction – Proto-Planetary Genesis

Studying the creation of solar systems, or stars, is relatively complicated. But with modern advanced in science, especially orbital satellites, it seems that all of the objects in a system are birthed in relatively close timelines, then the celestial object migrate into orbital paths that suspends them in the gravity of the star with the angular momentum to create an orbit. In other words, there is an event that allows for the coagulation of matter into a spherical mass of hydrogen and helium fusion. Jupiter and the sun and the rest of the planets probably formed at similar times, starting with the sun. The star and a gas giant combination is a normal result of a star’s formation, it seems from the celestial data, but our data is biased because of our inability to see objects smaller than Earth with current light sensing technologies (most planets are inferred from transits, or eclipses of the planet in front of the star, and the specific frequencies of the subsequent redshift, or sometimes blueshift, tells about the size and density, perhaps a little about the atmospherics of the planet).

Jets, Molecular Clouds, Hydrostatic Cores, and Magnetospheric Accretion

Lets visualize this; a immense cloud of gas and dust gravitationally attracts to a black hole or massively disrupted by a supernova and due to the massive gravity wells of these objects, create stability for the fusion processes in the star. Now we just have to imagine this on a massive scale with a supenova; or other massive objects such as quasars and black holes, and we begin to understand why quasars and redshift are such giant topics of debate to the modern astrophysicist. These are likely at the root of the creation of our own solar system, however it is hard to see this event happening in the massiveness of the galaxy, let alone in other galaxies.

There are now 5,000 confirmed exoplanets. Some are likely habitable. We should send satellites to their systems! However for now, they are only inferred via the Doppler method, the transit method, the radial velocity method, and the new and exciting gravitational micro-lensing,

  • Every planet forms around a star; planets and stars cannot form independently of the clouds of dust and gas that clump and coagulate when systems are formed and generally they densify together; however we don’t know a lot about this process; its hard to see and model in space. Its has also historically been challenging to simulate; however recent advancements in matrix compuation and GPU/TPU computing are making us much better at simulating the magneto hydrodynamics of these events. So we must use all of the tools at our disposal to explore the subject matter. Mostly, some giant computers, data-bases and telescopes. Also, being able to overlay different data types has been extremely powerful for understanding how these events function.
  • The exploration of exoplanets, exobiology, and the formation of planets and systems such as the one we are a part of demands an interdisciplinary nature of the study, including biology, chemistry, geology, and astronomy, as well as math. We’ll need everything.

Hadean Era to Late Bombardment Phase

So back to the proto-star of the sun. The dust collapses and forms a nuclear hydrogen core. As the fusion happens, the star releases helium, which emits tremendous amounts of energy into the surrounding materials as it accretes. The cosmic dust, in combination with this high energy helium and ice begins to stick together and collide to form planetesimals. They merge and collide to form larger objects and eventually form embryos. There is a differentiation in these embryos based on how far they are from the central fusion process; those that form closer to the star are coagulations rock and metals due to the high temperatures that vaporize more volatile substances. I like to visualize super hot lava globules spinning and orbiting a massive fusion reaction core.

This secondary core of iron produced by the accretion process of the star created our planet; atmosphere was eventually accumulated and the denser materials formed the earth’s core, the lighter materials the crust and mantle of the earth. It is likely that the water present on earth helped to created massive cooling of the planet as it formed to help to created the dynamic hydration and dehydration processed we know as weather.

HOW DID THE EARTH AND SUN AND JUPITER FORM FROM a cloud of GAS?

Jupiter and Saturn formed in a few million years (Haisch et al. 2001) from a gas-dominated protoplanetary disk, and were susceptible to gas-driven migration of their orbits on timescales of only ~100,000 years (A low mass for Mars from Jupiter’s early gas-driven migration).

This is the least known period of the planet; its initial accretion from a giant ball of highly magnetized and molten iron with a solid core and all of the huge amounts of trace elements that you see on Earth today. The Earth is thought to have been a molten rock of lava that also had tremendous amount of water in its atmosphere; some scientists think that there was more water here originally, some less; but most agree that large amount of water and ice bombarded the planet to create the water in the atmosphere and oceans that exists on Earth today. This period of heavy comet and asteroids impacts is called the Late Heavy Bombardment eon. Earth found an incredible equilibrium during the formation of our solar system. It is close enough to the sun to retain its atmosphere, but far enough way to allow for a cooling of the surface and most scientists believe that water was retained during the accretion process, probably in the form of steam and perhaps some exotic states of water. We have proven that there is ice on Mars so its not too weird to think that a lot of carbon and hydrogen. Its also interesting to think that the Earth’s atmosphere was very dynamic as it formed with meteors and impact objects playing a role in both the magnetic resonances and atmospherics of the planet. The amount of potential extinction events seems to be around 10, as of the moment. One was a giant plankton bloom.

  • Early Earth was volcanic; its surface is estimated to have been 446 degrees F. There was also volcanic eruptions on a scale that does not existing today; ouch, that doesn’t sound very hospitable.
  • A lot of the planetary accretion history of the Earth is still unknown, due to probabilities of massive meteorite impacts during the heavy bombardment era.
  • The grand Tack hypothesis is the best explanation currently for the accretion of our solar system. It describes Jupiter and Saturn as migratory, having vast influences upon the inner terrestrial planets and the formation of the asteroid belt. This theory is the most consistent with the creation of Earth and Mars within a simulation.

Late Bombardment Era

The LHB theory is based on studies of the Moon’s crater record and lunar material returned to Earth by Apollo astronauts. Isotopic dating of moon rock samples showed that the rocks were last molten during impact events in a narrow time interval, suggesting that many craters were formed during this period.

Somehow, the moon became a part of the Earth’s gravitational well. When this happened, is under debate, however most scientist accept the giant impact hypothesis, that the moon impacted the earth right after the formation of the Sun and Jupiter. The resulting molten debris coalesced into the moon. Accoring to the theory, a body called Theia impacted the earth and the result was the moon. Alternative hypotheses include multiple smaller impacts or the fission hypothesis (where the Moon split off from a rapidly spinning Earth), have been proposed, but they do not match the evidence as well as the giant impact hypothesis. So at some point, the moon was somehow captured by Earth’s gravity and this probably protected Earth in a big way as life began under the veil of the ocean.

2. Chemical Evolution

  • The Miller-Urey experiment proved that life can be created in Earth’s atmosphere using simple chemical compounds so it is very likely that Earth in its proximity to the sun has evolved over time to support life; it seems like Earth is in a very cozy zone between the sun and the gas giants that stabilize the solar system’s orbits. Life spontaneously forms here; yes the daisies just pop out of the ground and life, obviously, is prevalent.

3. Formation of Complex Molecules through the ocean and volcanism

  • Life most likely began in hydrothermal vents in the ocean. These are similar to underwater volcanoes, but instead of erupting magma onto the surface of the earth or ocean; vents split and release magma into the ocean floor to create:
  • Water (H₂O): Superheated and rich in dissolved minerals.
  • Hydrogen Sulfide (H₂S): Vital for chemosynthesis, supporting life forms at the vent.
  • Methane (CH₄): Another crucial compound for chemosynthetic organisms.
  • Minerals and Metals: Iron (Fe), manganese (Mn), zinc (Zn), and copper (Cu), clay minerals…
  • Carbon Dioxide (CO₂): A source of carbon for many biological processes.
  • Silica (SiO₂): Often found precipitated around vents.

There was also a very powerful shielding mechanism for the chemical evolution of life to begin, the ocean. And these environments continue to exist and form a model for early earth; here are some likely candidates for the emergence of life on the planet due to their complex chemistry:

  1. Mid-Atlantic Ridge
  2. East Pacific Rise
  3. Indian Ocean Ridges

4. Protocells and Early Life Forms

The Real hero that originated life on Earth was membranes. Scientists like David Deamer (UC Santa Cruz) have discovered the ability of fatty acids to form from simple hydrocarbons from carbon and nitrogen which formed membranes to eventually housed amino acids, phosphates, and a sugar like ribose that created the first vesticles, microcapsules, and cells. The formation of the nucleic acids marks the beginning of self-replication and RNA, meaning cellular reproduction. This evolution is thought to have taken 2 billion years. This could be the largest bottleneck in finding life elsewhere in the universe.

Conclusion

The cosmos hints at its origins through the whispers background radiation and the tales told by redshifts across the galaxy. Our journey through understanding celestial genesis—from the fiery birth of our sun to the assembly and migration of Jupiter and Saturn, our knowledge of the formation of planetary systems is far from complete. Our voyage is marked by brilliant bursts of discovery and long stretches of mystery. The ongoing research into how our own solar system came to be, from the conductive movements of Jupiter and Saturn, the terrestrial planets: Mercury, Venus, the Earth, and Mars, and the giant impact of the moon to the subtle influences of cosmic dust, and ice, underscores a fundamental truth: we are still at the very beginning of understanding our place in the vast, dynamic universe.

Helium and Hydrogen dynamics will undoubtedly lead the future models of planetary accretion; particle and fluid dynamics will become more comprehensive and powerful to help us to explain the behavior of these massive energy, by diving down in the depths of their detailed characteristics.

As we puzzle on planetary formation and the conditions that may harbor life, we must remain open to the potential. Our models are only as good as the data we gather, and every new observation with GOOD data can challenge decades of assumptions. The exploration of exoplanets and the study of ancient lunar rocks are not merely academic pursuits; they are crucial in piecing together the narrative of our universe—a narrative in which we are not merely observers, but participants. It will help us to survive.

In the grand tapestry of the cosmos, we are both the weavers of the threads of fate, entwined in the infinite paths of knowledge.

References

  1. Earth Magazine – Lunar isotopes suggest early water on Earth
  2. Oxygen isotopic evidence for accretion of Earth’s water before a high-energy Moon-forming giant impact
  3. usra.edu – Late Veneer Evidence
  4. Stanford Department of Geophysics – The Hadean-Archaean Environment
  5. The First Cell Membranes – David Deamer
  6. The potential and challenges of nanopore sequencing – David Deamer
  7. The Lipid WorldDaniel Segré, Dafna Ben-Eli, David W. Deamer & Doron Lancet
  8. Transitions from non-living to living matter – David Deamer
  9. Local Models of two-temperature accretion disc – 12 Apr 2023  ·  Christopher J. Bambic, Eliot Quataert, Matthew W. Kunz
  10. Molecular outflows identified in the FCRAO CO survey of the Taurus Molecular Cloud – Gopal Narayanan, Ronald Snell, Ashley Bemis
  11. A low mass for Mars from Jupiter’s early gas-driven migration – Grand Tack Theory Paper
  12. Giant Impact Hypothesis – Wikipedia
  13. Research assisted by Chat GPT, Perplexity, Google and Arxiv