sirus20x6 / stargen

Stargen is a program that generates random solar systems
4 stars 1 forks source link

Stargen Fake accretion process. #15

Open gabrielvelasquez opened 9 months ago

gabrielvelasquez commented 9 months ago

Stargen Fake accretion process. The other day I was looking at some of the Stargen code. I was looking for the file(s) that refer to the elements that are used in the accretion process, because the outputs never seem to show any gases other than the ones that you might find on a habitable or almost habitable world. Since I've known that Stargen uses only a handful of elements and molecules, I have believed that Stargen planets are made from nothing because of that, but it wasn't until I noticed this bit of code that decides a planet's density from the distance it is from the star, that I finally realized that the accretion model is completely phony. The list of elements should contain all 98 natural elements, plus another 300 or more molecules to a proper accretion simulation, and have outputs that have gone through a proper coalescing and differentiation, so that they have detailed atmospheres for all planets. https://en.wikipedia.org/wiki/Planetesimal https://en.wikipedia.org/wiki/Planetary_differentiation Even Mercury has an atmosphere, it's made mainly of Sodium gas. So many outputs have a 100% Neon atmosphere, but fall short of talking about the Neon oceans that would exist closer to the poles, only water oceans are bothered with. https://en.wikipedia.org/wiki/Extraterrestrial_atmosphere Sorry to sound so critical, but I can help with this if you ever decide you would like to create an accurate accretion model. I should add I don't know a modern programming language, and haven't done any code work in 35 years, but have studied a lot of astrophysics, planetology, climatology, and accretion theory, and hope to help that way. I will eventually expand this part of this code for myself, even if no one ever bothers to use it:

/ Now for a few molecular weights (used for RMS velocity calcs): / / This table is from Dole's book "Habitable Planets for Man", p. 38 /

define ATOMIC_HYDROGEN (1.0) /* H /

define MOL_HYDROGEN (2.0) / H2 /

define HELIUM (4.0) / He /

define ATOMIC_NITROGEN (14.0) / N /

define ATOMIC_OXYGEN (16.0) / O /

define METHANE (16.0) / CH4 /

define AMMONIA (17.0) / NH3 /

define WATER_VAPOR (18.0) / H2O /

define NEON (20.2) / Ne /

define MOL_NITROGEN (28.0) / N2 /

define CARBON_MONOXIDE (28.0) / CO /

define NITRIC_OXIDE (30.0) / NO /

define MOL_OXYGEN (32.0) / O2 /

define HYDROGEN_SULPHIDE (34.1) / H2S /

define ARGON (39.9) / Ar /

define CARBON_DIOXIDE (44.0) / CO2 /

define NITROUS_OXIDE (44.0) / N2O /

define NITROGEN_DIOXIDE (46.0) / NO2 /

define OZONE (48.0) / O3 /

define SULPH_DIOXIDE (64.1) / SO2 /

define SULPH_TRIOXIDE (80.1) / SO3 /

define KRYPTON (83.8) / Kr /

define XENON (131.3) / Xe */

// Atomic numbers, are used as a gas ID key

define AN_H 1

define AN_HE 2

define AN_C 6

define AN_N 7

define AN_O 8

define AN_F 9

define AN_NE 10

define AN_P 15

define AN_S 16

define AN_CL 17

define AN_AR 18

define AN_FE 26

define AN_NI 28

define AN_CU 29

define AN_BR 35

define AN_KR 36

define AN_I 53

define AN_XE 54

define AN_HG 80

define AN_AT 85

define AN_RN 86

define AN_FR 87

define AN_NH3 900

define AN_H2O 901

define AN_CO2 902

define AN_O3 903

define AN_CH4 904

define AN_SO2 905

define AN_CH3CH2OH 906

define AN_CO 907

gabrielvelasquez commented 9 months ago

https://en.wikipedia.org/wiki/Formation_and_evolution_of_the_Solar_System https://en.wikipedia.org/wiki/Nebular_hypothesis https://en.wikipedia.org/wiki/Protoplanetary_disk https://en.wikipedia.org/wiki/Accretion_disk https://en.wikipedia.org/wiki/Protoplanet https://en.wikipedia.org/wiki/Planetary_differentiation https://en.wikipedia.org/wiki/Planetary_migration https://en.wikipedia.org/wiki/Orbital_resonance https://en.wikipedia.org/wiki/Barycenter_(astronomy) https://en.wikipedia.org/wiki/Astrochemistry https://en.wikipedia.org/wiki/List_of_interstellar_and_circumstellar_molecules https://en.wikipedia.org/wiki/Abundance_of_the_chemical_elements https://en.wikipedia.org/wiki/Cosmochemistry https://en.wikipedia.org/wiki/Category:Meteorite_types https://en.wikipedia.org/wiki/List_of_meteorite_minerals https://en.wikipedia.org/wiki/Solar_irradiance

https://www.pnas.org/doi/10.1073/pnas.2022705118#:~:text=Previous%20work%20has%20shown%20that,the%20night%20side%20(16) https://worldbuilding.stackexchange.com/questions/57924/where-on-a-tidally-locked-planet-with-a-25-c-maximum-is-the-0-c-isotherm https://worldbuildingpasta.blogspot.com/2020/12/an-apple-pie-from-scratch-part-ivd.html https://www.aanda.org/articles/aa/full_html/2022/07/aa43099-22/aa43099-22.html https://www.annualreviews.org/doi/10.1146/annurev-fluid-010518-040516 https://exoplanetarchive.ipac.caltech.edu/images/help/hypatia-sysoverview-expanded.png

gabrielvelasquez commented 8 months ago

https://www.ncbi.nlm.nih.gov/books/NBK493219/

sirus20x6 commented 8 months ago

I would absolutely love help with this. even if you don't know a modern programming language if you can just write up pseudo-code I'm sure I can translate it to c++

gabrielvelasquez commented 8 months ago

I would be interested. check out my version here https://github.com/sirus20x6/stargen

I would absolutely love help with this. even if you don't know a modern programming language if you can just write up pseudo-code I'm sure I can translate it to c++

Okay, two things, I am not a coder, I prefer not to have to use the command prompt, do you have a version compiled for Windows? second, do you know what file has the formulas that are used to calculate the final planet temperatures? That is the thing that bugs me the most, the output temperatures, except exosphere temperature, have no reference. Global average annual temperature is a real thing, but those day/night, max/min are for what? With the formulas I can figure out their relationships and what they are referring to. There is probably a better starting point, but that's the itch I have been wanting to scratch for the longest time.

If I did understand correctly, you are hoping that I help you redesign Stargen from scratch, but I believe it okay to start in the middle. I believe understanding the temperature formulas is a good first step. I could research and design temperature formulas and outputs on my own, but studying the Stargen's will make it easier. It's not the beginning of the program, I think it's the backbone of the program.

sirus20x6 commented 8 months ago

we don't have to redesign from scratch. I pick one thing to improve at a time. sometimes that means adding a new thing, but often it means replacing an existing thing.

I don't have a version compiled for windows, but I can try to make one. I have a virtual machine with windows on it.

for temperature you can start with https://github.com/sirus20x6/stargen/blob/master/enviro.cpp just search for the word temperature, and after you read all of those you can try just temp.

/*-----------------------------------------------------------------------*/
/* Given the surface temperature of a planet (in Kelvin), this function  */
/* returns the fraction of cloud cover available. This is Fogg's eq.23.  */
/* See Hart in "Icarus" (vol 33, pp23 - 39, 1978) for an explanation.    */
/* This equation is Hart's eq.3.                                         */
/* I have modified it slightly using constants and relationships from    */
/* Glass's book "Introduction to Planetary Geology", p.46.               */
/* The 'CLOUD_COVERAGE_FACTOR' is the amount of surface area on Earth    */
/* covered by one Kg. of cloud.                                          */
/*-----------------------------------------------------------------------*/
auto cloud_fraction(long double surf_temp,
                           long double smallest_MW_retained,
                           long double equat_radius,
                           long double hydro_fraction) -> long double
sirus20x6 commented 8 months ago

I have updated the github repo to have windows releases, I'm not sure if they work yet I haven't had a chance to test them. they might require mingw to be installed. in the future maybe I can bundle those libraries with it

gabrielvelasquez commented 7 months ago

I have updated the github repo to have windows releases, I'm not sure if they work yet I haven't had a chance to test them. they might require mingw to be installed. in the future maybe I can bundle those libraries with it

I do have Cygwin64 Terminal install on the laptop that I use most but I've still had to go on a hunt for "libgcc_s_eh-1.dll" and locate where a copy is supposed to be, I should be able to fix that to get the program running,

So far I have added copies of these files as the request have come up, back to a generic (0xc000007b) it won't run message:

...so far.

sirus20x6 commented 7 months ago

I'll take a look. when I run it on my vm I get no output, which isn't helpful. maybe I have to bundle the library files from the specific version I used to compile it

gabrielvelasquez commented 7 months ago

BTW, I'm looking through the enviro.cpp file for formulas related to temperature and it may be buried in too much code for me to figure out. I'll have to spread it between two monitors maybe, and try my best to ignore the code formatting. Okay, I made a helpful discovery, that loading the file in Microsoft Word takes care of the formatting code and it looks fairly normal.

sirus20x6 commented 7 months ago

image you might want to try visual studio code it's free and you can make a lot of tweaks to how code shows up and it lets you use hot keys to click on functions and go to their definitions and such

https://code.visualstudio.com/

gabrielvelasquez commented 7 months ago

you might want to try visual studio code it's free and you can make a lot of tweaks to how code shows up and it lets you use hot keys to click on functions and go to their definitions and such

https://code.visualstudio.com/

It's a good suggestion, I've also gotten into the habit of checking with this AI or another on different things, and if I can figure out a good dialogue with an AI that will help me flesh out some algorithms/subroutines it will make some of this go faster.

Nope, there is still far less code to sift through looking at the document in Microsoft Word, than in VisualStudio, unless there is some setting I don't know about.

Right away I'm noticing the way the program creates stars maybe wrong, you can't just slap together any spectral classification with any luminosity class, as stars don't all evolve the same way. For example there is no Giant Star class that are O, B, A, or F, only the spectral types G, K, M can be Giant Star class. http://astronomyonline.org/Stars/Evolution.asp

I'm impressed that they are using sub-brown-dwarf categories. Did you add this code?

return tempK[lumIndex][sub_type]; } else if (strcmp(star_type.c_str(), "M") == 0) { return tempM[lumIndex][sub_type]; } else if (strcmp(star_type.c_str(), "L") == 0) { return tempL[sub_type]; } else if (strcmp(star_type.c_str(), "T") == 0) { return tempT[sub_type]; } else if (strcmp(star_type.c_str(), "Y") == 0) { return tempY[sub_type]; } else if (strcmp(star_type.c_str(), "H") == 0) { return tempH[sub_type]; } else if (strcmp(star_type.c_str(), "I") == 0) { return tempI[sub_type]; } else if (strcmp(star_type.c_str(), "E") == 0) { return tempE[sub_type]; } else {

One of the Jim Burrow fallices created by his program is that there is a small range of stars that can support life, which only factors in heat from the star, and this is false because there are other forms of heat that can support life. A brown dwarf that is not even really a star can have a planet outside of the goldilocks zone producing heat from flexing because of it's orbit around a gas giant. https://en.wikipedia.org/wiki/Habitability_of_natural_satellites#Tidal_effects

[edit] https://commons.wikimedia.org/wiki/File:Habitable_Moon_2.0.jpg After a little more reading I rememberd this image I made, using Celestia and a map program.

sirus20x6 commented 7 months ago

wasn't me. it looks like that spec type stuff has been in enviro.cpp since https://github.com/omega13a/stargen/blob/master/enviro.cpp which was 10 years ago. I'm not sure where he got his code for that.

When I first created this version I pulled from I want to say 3 different version of stargen that I found and tried to bring in everything I could.

gabrielvelasquez commented 7 months ago

https://commons.wikimedia.org/wiki/User:GabrielVelasquez#/media/File:Gliese_581_c_-_Sarah_Seagers_GAS_DWARF_Example.gif

This is another image I made, except this one is an animated gif for Stargen, I'd have to dig up the other one, I think I did Terrestrial, gasDwarf, and Jupiter. Maybe Mars, I can't remember. You just have to change the name to the original name after you rename the original as an old version to see it work.

https://commons.wikimedia.org/wiki/User:GabrielVelasquez#/media/File:Planet_Terrestrial_Earth_Animated.gif

gabrielvelasquez commented 7 months ago

Okay well, I thought I would try this out, since I found thr Bing app on my tablet and didn't remember installing it. I didn't have any expectations, but this surprised me, in a few ways. Now I'm curious if it is of any use to you? Is this little bit of code compilable on it's own with a simple GUI to test it? ‐------‐----------------------------------------‐-------------------------------------------------------

Hello, this is Copilot, an AI companion that can help you with various tasks and topics. 😊

I can try to generate some code in C++ for calculating the global annual average temperature of a planet, as well as the extreme high and low, based on some given parameters. However, please note that this is just an example and not a verified or optimized solution. You should always test and modify the code according to your needs and specifications.

Here is the code I generated:

// This program calculates the global annual average temperature of a planet, // as well as the extreme high and low, based on an albedo, an emissivity, // and the luminosity of the star, which is broken down into star radius and temperature.

include

include

using namespace std;

// Define some constants const double PI = 3.141592653589793; const double SIGMA = 5.670373e-8; // Stefan-Boltzmann constant in W/m^2/K^4 const double SOLAR_CONSTANT = 1361; // Solar constant in W/m^2

// Define a function to calculate the luminosity of a star, given its radius and temperature double luminosity(double star_radius, double star_temperature) { // Luminosity is proportional to the surface area and the fourth power of the temperature return 4 PI pow(star_radius, 2) SIGMA pow(star_temperature, 4); }

// Define a function to calculate the global annual average temperature of a planet, // given its albedo, emissivity, distance from the star, and the luminosity of the star double global_average_temperature(double albedo, double emissivity, double distance, double star_luminosity) { // Global average temperature is derived from the energy balance equation // Assuming the planet is a blackbody and has a uniform temperature return pow((star_luminosity (1 - albedo)) / (16 PI pow(distance, 2) SIGMA * emissivity), 0.25); }

// Define a function to calculate the extreme high and low temperatures of a planet, // given its albedo, emissivity, distance from the star, the luminosity of the star, and the obliquity void extreme_temperatures(double albedo, double emissivity, double distance, double star_luminosity, double obliquity, double& high, double& low) { // Extreme temperatures are derived from the energy balance equation // Assuming the planet is a blackbody and has a uniform temperature // Taking into account the variation of solar radiation due to the obliquity // Obliquity is the angle between the planet's rotational axis and its orbital plane // High temperature occurs at the summer solstice of the hemisphere tilted towards the star // Low temperature occurs at the winter solstice of the hemisphere tilted away from the star high = pow((star_luminosity (1 - albedo)) / (4 PI pow(distance, 2) SIGMA emissivity) (1 + 0.5 sin(obliquity)), 0.25); low = pow((star_luminosity (1 - albedo)) / (4 PI pow(distance, 2) SIGMA emissivity) (1 - 0.5 sin(obliquity)), 0.25); }

// Define a function to print the results in a formatted way void print_results(double albedo, double emissivity, double distance, double star_radius, double star_temperature, double obliquity, double global_average, double high, double low) { cout << "Given the following parameters:\n"; cout << "Albedo: " << albedo << "\n"; cout << "Emissivity: " << emissivity << "\n"; cout << "Distance from the star: " << distance << " m\n"; cout << "Star radius: " << star_radius << " m\n"; cout << "Star temperature: " << star_temperature << " K\n"; cout << "Obliquity: " << obliquity << " rad\n"; cout << "The global annual average temperature of the planet is: " << global_average << " K\n"; cout << "The extreme high temperature of the planet is: " << high << " K\n"; cout << "The extreme low temperature of the planet is: " << low << " K\n"; }

// Define the main function int main() { // Declare some variables to store the input parameters double albedo, emissivity, distance, star_radius, star_temperature, obliquity;

// Prompt the user to enter the input parameters
cout << "Please enter the following parameters for the planet and the star:\n";
cout << "Albedo (a dimensionless value between 0 and 1): ";
cin >> albedo;
cout << "Emissivity (a dimensionless value between 0 and 1): ";
cin >> emissivity;
cout << "Distance from the star (in meters): ";
cin >> distance;
cout << "Star radius (in meters): ";
cin >> star_radius;
cout << "Star temperature (in kelvins): ";
cin >> star_temperature;
cout << "Obliquity (in radians): ";
cin >> obliquity;

// Calculate the luminosity of the star
double star_luminosity = luminosity(star_radius, star_temperature);

// Calculate the global annual average temperature of the planet
double global_average = global_average_temperature(albedo, emissivity, distance, star_luminosity);

// Calculate the extreme high and low temperatures of the planet
double high, low;
extreme_temperatures(albedo, emissivity, distance, star_luminosity, obliquity, high, low);

// Print the results
print_results(albedo, emissivity, distance, star_radius, star_temperature, obliquity, global_average, high, low);

// End the program
return 0;

}

I hope this helps you with your task. If you have any questions or feedback, please let me know. 😊

------‐--------------------------------------------------------------------------------------------------------------------- I'm not sure how this ai got the solar constant, it looks wrong to me because I do my own calculation.

f= ((R^2) (sbc) (T^4)) /d^2 f= (((1 695500000)^2) (0.00000005670373) (5778^4)) / ((1 149597870690)^2) f= 1366.04568120504 W/m^2

gabrielvelasquez commented 7 months ago

Stargen Planet Ecc test temp.xlsx

This was my incomplete attempt to see if stargen was factoring in the eccentricity of the planet in the temperature ranges.

gabrielvelasquez commented 7 months ago

Hey, I've been thinking about star stuff now enough that I remembered a simple program no one has written yet, that I think you could make a little bit of money from. I know it will sell, and I know who it will sell to. I won't mention it here. I don't know how to DM on this platform but if you want me to pass on the idea you can message me at gabe 69 velasquez (at) hotmail com

gabrielvelasquez commented 7 months ago

So Roche limits and Hillspheres. If you get used to Stargen outputs you loose sight of how far, and how empty, the spaces between planets in our solar system are. It is quite amazing. This video is one of two examples of how empty this entire solar system is when you look at the massive distances between objects. For a program like Stargen to incorporate this scientific perspective into it's accretion modeling is very important, you can't force planetoids/planetesimals to collide without a very good factoring of Roshe Limits and Hillsphere Radius.

(Nearly) Scale Model of the Solar System on the LAX Field https://www.youtube.com/watch?v=Rt7FPpUvQMU

*The reason for the use of "(Nearly)" in the title is that he's had to exaggerate the size of the planets.

sirus20x6 commented 7 months ago

I'm going on vacation this week, but I'll try and take a look at all this stuff soon

gabrielvelasquez commented 7 months ago

Starting point of the program. Two angles: (a) https://astronomy.swin.edu.au/cosmos/a/Abundance+Ratio

(b) https://en.wikipedia.org/wiki/Meteorite_classification https://en.wikipedia.org/wiki/List_of_comets_by_type

This is where you start the program. All 98 elements in ratio. One sec while I find the file or website with the full list.... My version is old and has only the 93 elements.. but the remaining 5 are miniscule:

Stellar Abundance of Elements.xlsx

Start with something like 10 times the amount of hydrogen and the other elements on the list, and use mass to create a ping pong ball like simulation where they can clump together. This would be a test, a mini-version, two dimensional: location (distance from star) and column like accumulation of elements. But the column would have to sort the elements by mass.

I opened Visual Studio to look at files, and I discovered the Elements file. It will be easier to study as a CSV file in excel. Or not, I couldn't sperate columns properly. The data in brackets suggest to me it is an array, correct?

// An sym HTML symbol name Aw melt boil dens p0 c n ABUNDe ABUNDs Rea Max inspired pp Min inspired pp Chemical c( 6, "C", "C", "Carbon", 12.0110, 3823.20, 5103.00, 2.62, 2250, 0.00350, 0.514, 0.000199526, 10.0925, 0, 0.0, 0.0);

Data on Elements in New Stargen

gabrielvelasquez commented 7 months ago

PERPLEXITY.ai

Me: ``The database has all the elements of the periodic table, some of the dimensions of the table are obvious, like melting point or density, but others are unclear. Can you identify what these dimension of the array are by checking what they are mean for example for Carbon. Sources "file" Answer: The dimensions of the array for chemical elements in the periodic table include various properties such as atomic weight, melting point, boiling point, density, and more. For example, looking at Carbon (C), its properties are as follows: Atomic Weight: 12.0110 Melting Point: 3823.20 K Boiling Point: 5103.00 K Density: 2.62 g/cm³ Specific Heat Capacity: 2250 J/(kg·K) Electronegativity: 2.55 Abundance in Earth's Crust: 0.18% Abundance in the Universe: 0.5 ppm These properties provide essential information about the characteristics of Carbon and are crucial for understanding its behavior and applications in various fields.

Me: I don't see Electronegativity for carbon of 2.55 is not part of the array. I still don't know what for of the variable are... p0 c n rea

Answer: The abbreviations used in the array such as "p0," "c," "n," and "rea" are not standard representations of chemical properties and would require further clarification from the source or context to determine their exact meanings

Data on Elements in New Stargen 2

sirus20x6 commented 7 months ago

Chat gpt is usually a bit better at this stuff

The columns in the initGases function of the elements.cpp file from the Stargen project are as follows:

An (Atomic Number): The atomic number of the element or compound.
Sym (Symbol): The chemical symbol of the element or compound.
HTML Symbol: The HTML representation of the chemical symbol, which may include subscripts for clarity in web presentations.
Name: The common name of the element or compound.
Aw (Atomic Weight): The atomic mass of the element or molecular mass of the compound.
Melt (Melting Point): The melting point of the substance in Kelvin.
Boil (Boiling Point): The boiling point of the substance in Kelvin.
Dens (Density): The density of the substance in g/cm³.
P0: Not explicitly defined in the provided context, but typically represents a standard pressure or a reference value for calculations.
C: Not explicitly defined, possibly a specific heat capacity or another characteristic constant.
N: Not explicitly defined, could represent a valence or bonding information.
ABUNDe (Abundance in Earth's crust): The abundance of the element in Earth's crust.
ABUNDs (Abundance in the Sun): The abundance of the element in the Sun.
Rea (Reactivity): A qualitative measure of the element's reactivity.
Max inspired pp (Maximum Inspired Partial Pressure): The maximum partial pressure of the gas that is safe to breathe.
Min inspired pp (Minimum Inspired Partial Pressure): The minimum partial pressure of the gas that is safe to breathe.
These columns are used to initialize the properties of various chemical elements and compounds in the simulation, providing essential data for the program's calculations related to planetary atmospheres and other phenomena.
are there any insights you can glean from the original paper the code is based on https://www.rand.org/content/dam/rand/pubs/papers/2005/P4226.pdf

ChatGPT
The original paper from which the code is based, "The Evolution of the Earth's Atmosphere," by Stephen H. Dole, published by the RAND Corporation in 1964 (as per the provided link), offers a comprehensive analysis of how Earth's atmosphere has evolved over geological time scales. From this foundational work, several key insights can be gleaned that likely influenced the development of the stargen code, particularly in how it models planetary atmospheres and the presence of various gases. Here are some insights and themes from Dole's paper that are relevant to the simulation of planetary atmospheres:

Atmospheric Composition and Evolution: Dole's work discusses the composition of Earth's primitive atmosphere and how it has changed due to geological and biological processes. This evolution is critical for understanding the presence and concentration of gases like nitrogen, oxygen, carbon dioxide, and water vapor, which are essential for modeling habitable environments in the stargen project.

The Role of Life in Atmospheric Composition: The paper highlights the significant impact of biological processes, such as photosynthesis and respiration, on the atmospheric composition. This insight is crucial for simulating planets where life could alter the atmosphere in ways that might be detectable from afar or affect habitability.

Temperature and Pressure Conditions: Dole discusses the importance of temperature and pressure in determining the state (solid, liquid, gas) of various substances and their presence in the atmosphere. These factors are essential for accurately modeling atmospheres in the stargen code, as they affect the boiling and melting points of compounds and, consequently, their phase in the atmosphere.

Volcanic Gases and Outgassing: The contribution of volcanic activity to the atmosphere's composition, through the release of gases like water vapor, carbon dioxide, and ammonia, is another point covered. This process is a key consideration for simulating young planets or those with active geology in the stargen project.

Solar Radiation and Atmospheric Loss: The paper likely touches on the effects of solar radiation on the atmosphere, including the photodissociation of water vapor and the loss of hydrogen to space. These processes are critical for understanding how atmospheres evolve over time and how they might be stripped away from planets close to their stars.

Greenhouse Effect: The greenhouse effect, caused by gases like carbon dioxide and water vapor, is essential for maintaining a planet's warmth but can also lead to runaway heating under certain conditions. This balance is crucial for modeling habitable zones around stars.

Atmospheric Escape: Dole's paper discusses mechanisms through which a planet's atmosphere can escape into space, which is vital for understanding the long-term stability of atmospheres and their composition.

These insights from Dole's paper are foundational for any simulation that aims to model planetary atmospheres and their evolution, especially in the context of habitability and the search for extraterrestrial life. The stargen project, by incorporating these principles, aims to simulate realistic planetary environments based on our understanding of Earth's atmosphere and its development.
gabrielvelasquez commented 7 months ago

It looks like ChatGPT got one more than PERPLEXITY.ai but ChatGPT missed one that PERPLEXITY.ai got. I'll have to check the possible/could/typically results. Looking at the elements file is not easy. I've tried to covert it to a CVS file a couple of times, and each time there's a lot of misalignment. I can't move every piece of data into it's correct column by hand, it's a mess I can't fix, too much work. Do you know a way to put this into an Excel spreadsheet without a lot of fiddling to align all of it. I think it is important to understand this data, and I think it needs a major revision.

I have a copy of Habitable Planets for man by Stephen H. Dole that I printed out, single side, and it is a large tome. I didn't know that Stephen H. Dole also wrote a more specific piece on "The Evolution of the Earth's Atmosphere." And believe it or not, I have never looked for a copy of "Formation of Planetary System by Aggregation: A Computer Simulation." I just read it referred to and never imagined that I would be able to find and read a copy. I should have search for other Dole books: https://www.rand.org/content/dam/rand/pubs/papers/2005/P4226.pdf I did copy the ChatGPT insights into a MSword document for easier reading.

What do you think of my atom/particle clumping simulation idea? I think i missed describing that I meant one side of the middle. very one dimensional, except for the tracking of the amount of atoms per element per space. When I say 10 times the abudance ration I mean for example:

Hydrogen 10x 3,099,999,999,969.0 = 30,999,999,999,690.0 atoms used in simulation Neon 10x 382,222,222.2 = 382,222,2222 atoms used in the simulation Krypton 10x 5,000.0 = 5,0000 atoms used in the simulation Xenon 10x 522.2 = 5222 atoms used in the simulation Platinum 10x 148.9 = 1489 atoms used in the simulation Silver 10x 54.0 = 540 atoms used in the simulation Gold 10x 20.8 = 208 atoms used in the simulation Uranium 10x 1 =10 atoms used in the simulation

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

Element | Ratio Si=1 | Ratio U92=1 -- | -- | -- hydrogen | 27900.000 | 3,099,999,999,969.0 helium | 2720.000 | 302,222,222,219.2 oxygen | 23.800 | 2,644,444,444.4 carbon | 10.100 | 1,122,222,222.2 neon | 3.440 | 382,222,222.2 nitrogen | 3.130 | 347,777,777.8 magnesium | 1.074 | 119,333,333.3 silicon | 1.000 | 111,111,111.1 iron | 0.900 | 100,000,000.0 sulfur | 0.515 | 57,222,222.2 argon | 0.101 | 11,222,222.2 aluminium | 0.0849 | 9,433,333.3 calcium | 6.11E-02 | 6,788,888.9 sodium | 5.74E-02 | 6,377,777.8 nickel | 4.93E-02 | 5,477,777.8 chromium | 1.35E-02 | 1,500,000.0 phosphorus | 1.04E-02 | 1,155,555.6 manganese | 9.55E-03 | 1,061,111.1 chlorine | 5.24E-03 | 582,222.2 potassium | 3.77E-03 | 418,888.9 titanium | 2.40E-03 | 266,666.7 27 Co cobalt | 2.25E-03 | 250,000.0 30 Zn zinc | 1.26E-03 | 140,000.0 09 F fluorine | 8.43E-04 | 93,666.7 29 Cu copper | 5.22E-04 | 58,000.0 23 V vanadium | 2.93E-04 | 32,555.6 32 Ge germanium | 1.19E-04 | 13,222.2 34 Se selenium | 6.21E-05 | 6,900.0 03 Li lithium | 5.71E-05 | 6,344.4 36 Kr krypton | 4.50E-05 | 5,000.0 31 Ga gallium | 3.78E-05 | 4,200.0 21 Sc scandium | 3.42E-05 | 3,800.0 38 Sr strontium | 2.35E-05 | 2,611.1 05 B boron | 2.12E-05 | 2,355.6 35 Br bromine | 1.18E-05 | 1,311.1 40 Zr zirconium | 1.14E-05 | 1,266.7 37 Rb rubidium | 7.09E-06 | 787.8 33 As arsenic | 6.56E-06 | 728.9 52 Te tellurium | 4.81E-06 | 534.4 54 Xe xenon | 4.70E-06 | 522.2 39 Y yttrium | 4.64E-06 | 515.6 56 Ba barium | 4.49E-06 | 498.9 50 Sn tin | 3.82E-06 | 424.4 82 Pb lead | 3.15E-06 | 350.0 42 Mo molybdenum | 2.55E-06 | 283.3 44 Ru ruthenium | 1.86E-06 | 206.7 48 Cd cadmium | 1.61E-06 | 178.9 46 Pd palladium | 1.39E-06 | 154.4 78 Pt platinum | 1.34E-06 | 148.9 58 Ce cerium | 1.14E-06 | 126.2 53 I iodine | 9.00E-07 | 100.0 60 Nd neodymium | 8.28E-07 | 92.0 04 Be beryllium | 7.30E-07 | 81.1 41 Nb niobium | 6.98E-07 | 77.6 76 Os osmium | 6.75E-07 | 75.0 77 Ir iridium | 6.61E-07 | 73.4 47 Ag silver | 4.86E-07 | 54.0 57 La lanthanum | 4.46E-07 | 49.6 66 Dy dysprosium | 3.94E-07 | 43.8 55 Cs caesium | 3.72E-07 | 41.3 45 Rh rhodium | 3.44E-07 | 38.2 80 Hg mercury | 3.40E-07 | 37.8 64 Gd gadolinium | 3.30E-07 | 36.7 51 Sb antimony | 3.09E-07 | 34.3 62 Sm samarium | 2.58E-07 | 28.7 68 Er erbium | 2.51E-07 | 27.9 70 Yb ytterbium | 2.48E-07 | 27.5 79 Au gold | 1.87E-07 | 20.8 49 In indium | 1.84E-07 | 20.4 81 Tl thallium | 1.84E-07 | 20.4 59 Pr praseodymium | 1.67E-07 | 18.5 72 Hf hafnium | 1.54E-07 | 17.1 83 Bi bismuth | 1.44E-07 | 16.0 74 W tungsten | 1.33E-07 | 14.8 63 Eu europium | 9.73E-08 | 10.8 67 Ho holmium | 8.89E-08 | 9.9 65 Tb terbium | 6.03E-08 | 6.7 75 Re rhenium | 5.17E-08 | 5.7 69 Tm thulium | 3.78E-08 | 4.2 71 Lu lutetium | 3.67E-08 | 4.1 90 Th thorium | 3.35E-08 | 3.7 73 Ta tantalum | 2.07E-08 | 2.3 92 U uranium | 9.00E-09 | 1.0 43 Tc technetium |   |   61 Pm promethium |   |   84 Po polonium |   |   85 At astatine |   |   86 Rn radon |   |   87 Fr francium |   |   88 Ra radium |   |   89 Ac actinium |   |   91 Pa protactinium |   |   93 Np neptunium |   |   94 Pu plutonium |   |  

This link is for the images: https://github.com/Sphinkie/StarGen-II/issues/2

https://www.jstor.org/stable/26973237?seq=1

gabrielvelasquez commented 7 months ago

I'm looking at the enviro file in Visual Studio Code doesn't help. I wondering if you would be willing to use the file to create a stand alone program with only that file with an inputs and out GUI? I would like to test the input/output results, see if it works okay or it should be upgraded. Each subroutine, or I think these says they say algorithm should get this treatment.

Dune: We simulated the desert planet of Arrakis to see if humans could survive there... https://phys.org/news/2021-11-dune-simulated-planet-arrakis-humans.html

gabrielvelasquez commented 7 months ago

Mt. Everest = 8,848.86 m peak https://www.mide.com/air-pressure-at-altitude-calculator

https://fast-times.eldacur.com/cgi-bin/StarGen.pl?Catalog=none&Dole=0&SolStation=0&Mass=1.086&Output=all&Seed=2020&Count=1&Incr=1&Gas=on&Moon=on&SVG=off#5 Altitude calculator

gabrielvelasquez commented 5 months ago

https://web.archive.org/web/20120716190212/http://www.extrasolar.net/starlisttour.asp?StarcatID=normal This was great to see when it was still up, I'm glad someone archived it.

sirus20x6 commented 3 weeks ago

I think your abundance idea is a good one. I don't fully yet have a handle on how it decides what elements it uses or at what stage, but I had some time to work on the app again. I'm going through and trying to improve things. when I have a better handle on it I might tackle that one. I will have to think on pulling parts out to make them stand alone. that might be a lot of work.

gabrielvelasquez commented 3 weeks ago

So what I imagine for a simulation using element abundance has to do with tracking locations. At each location you would have each of the 98 elements, and each would be in the ratio that I described, (eg. 3,099,999,999,969.0 Hydrogen to 1 Uranium) but that would be just for the start. Then add in the iterations the effect of gravity, and let the accretion process do it's thing. I know that would be a massive amount of tracking, but that's why I suggested a one dimensional array to try for a proof of concept test.

sirus20x6 commented 3 weeks ago

that does make sense. can you look at elements.cpp? it has tables for elements and some molecules. of particular interest is ABUNDe and ABUNDs. I wasn't sure how they related to abundance so I asked chatgpt

In the context of your planetary accretion model "stargen," it looks like the `ABUNDe` and `ABUNDs` columns refer to the elemental and solar abundances of each chemical or element. Here’s a breakdown of what they might represent:

- **ABUNDe**: This likely refers to the abundance of the element in the universe or a system, often normalized to a reference element (such as hydrogen or oxygen). It could represent the cosmic or galactic abundance of the element in environments like stellar nebulae or interstellar space.

- **ABUNDs**: This might indicate the solar abundance of the element, i.e., its relative abundance in the Sun or a typical star similar to the Sun. Solar abundances are often used as benchmarks for comparing how common an element is in stellar atmospheres.

Both of these are key in models of planetary formation, as they impact the composition of planets based on the gas and dust available in the protoplanetary disk. Does this match your expectations for these variables?

does that make sense based on the values in that column for those elements?

Let's analyze the values in the `ABUNDe` and `ABUNDs` columns and see if they align with the idea that they represent elemental and solar abundances.

Looking at a few elements:

1. **Hydrogen (H)**  
   - `ABUNDe`: `0.00125893`  
   - `ABUNDs`: `27925.4`  
   Hydrogen is the most abundant element in the universe. The `ABUNDe` value is relatively small, but the `ABUNDs` value is extremely high, which makes sense, as hydrogen is by far the most abundant element in stars like the Sun.

2. **Helium (He)**  
   - `ABUNDe`: `7.94328e-09`  
   - `ABUNDs`: `2722.7`  
   Helium is the second most abundant element in stars, and the large `ABUNDs` value reflects this. The `ABUNDe` value being much smaller could relate to helium's cosmic abundance outside of stellar environments.

3. **Carbon (C)**  
   - `ABUNDe`: `0.000199526`  
   - `ABUNDs`: `10.0925`  
   Carbon is relatively abundant in stars, and the `ABUNDs` value of `10.0925` aligns with this. Its lower `ABUNDe` value suggests that it is not as abundant universally (compared to hydrogen and helium), but still significant.

4. **Oxygen (O)**  
   - `ABUNDe`: `0.501187`  
   - `ABUNDs`: `23.8232`  
   Oxygen is one of the most abundant elements after hydrogen and helium in stars and the universe, and these values reflect that.

5. **Nitrogen (N)**  
   - `ABUNDe`: `1.99526e-05`  
   - `ABUNDs`: `3.13329`  
   Nitrogen is less abundant than oxygen and carbon, but still significant. The values here seem to align with this expectation.

From this pattern, it does seem that `ABUNDe` and `ABUNDs` follow the expected trend for cosmic and solar abundances. The cosmic abundance values (`ABUNDe`) are typically smaller compared to solar abundances (`ABUNDs`), and the ratio seems consistent with our knowledge of element distributions in space.

This makes sense based on how abundances are usually represented in astrophysical models. Would you agree based on your understanding of the model?

I think the most obvious win is to tweak the ABUNDe and ABUNDs values with modern observations and theories, the next obvious win would be adding more molecules and their abundances. The harder part will be to make sure the simulation is accurate. so it looks like the code spawns dust lanes with inner and outer edges and some lanes have gas in them and those gasses have chemicals populated from the chemical table. haven't had a chance yet to dig in to see if all the gasses are the same or if they shuffle the elements up in the solar system a little

sirus20x6 commented 3 weeks ago

also have you seen Abundance gradients in the Milky Way for α elements, iron peak elements, barium, lanthanum, and europium* https://www.aanda.org/articles/aa/pdf/2007/06/aa5403-06.pdf

table 4 shows variances in the distance to the galactic center. I do want this program to eventually be able to generate galaxies, so stars should have a 3d position in that galaxy and take on properties from that location before the solar system generation takes place

sirus20x6 commented 3 weeks ago

Gas accretion as the origin of chemical abundance gradients in distant galaxies https://arxiv.org/pdf/1010.2534

sirus20x6 commented 3 weeks ago

please take a look at the newly created https://github.com/sirus20x6/stargen/blob/master/data/elements.yaml I used a python script to convert the elements.cpp file into yaml. this should make it easier to read and udpate.

gabrielvelasquez commented 2 weeks ago

This is my analysis of your ChatGPT answer... I have verified that ABUNDs is the stellar abundance, and ABUNDe is the Earth's crust This is the link is to my excel spread sheet:

https://1drv.ms/x/c/fa9c75dc9d8c88ad/Ea2IjJ3cdZwggPpJAwAAAAAB2qxMevvbrZcs14TJoNYRIw?e=embgnb

In case you haven't come across this yet, it will eventually become relevant... https://en.wikipedia.org/wiki/List_of_interstellar_and_circumstellar_molecules

sirus20x6 commented 2 weeks ago

why is it all relative to silicon?

gabrielvelasquez commented 2 weeks ago

why is it all relative to silicon?

I'm going to look at the peer reviewed papers, they seem really involved and thorough, but I have to concentrate more there, and I have other distractions I have to put aside. For instance my 5 year old and 3 year old boys are watching a lot of Minecraft videos, and they never played and I never told them I played years ago, so I surprised them by reinstalling it on my computer, and now they watch videos and they want to try what they learned, they want to play every day now. I installed a resource pack, and I've been editing the block textures, really good oak plank for the Galleon I am making for them, amazing looking gem blocks (lapis, red stone, diamond, emerald), more realistic sand and dirt, etcetera, etcetera. I mention that because I just noticed, coincidentally that there is an Educational version of Minecraft, and it uses all of the elements of the periodic table, which is pretty cool, I'm going to have to look into downloading that one. But yeah, the Silicon ratio, I don't remember why they do it that way, I'll have to look it up.... https://www.perplexity.ai/search/why-are-stellar-abundance-of-e-xb8JryzKT1aaLaslmv4iaA

https://minecraft.wiki/w/Element _Compare Old new WIP

gabrielvelasquez commented 2 weeks ago

table 4 shows variances in the distance to the galactic center. I do want this program to eventually be able to generate galaxies, so stars should have a 3d position in that galaxy and take on properties from that location before the solar system generation takes place

This is ambitious, but if you want to go this far then I recommend that you begin with POP3 stars, and make your way to neutron stars, metalicity being key. A proper table of elements made to highlight how each of the elements was created will reference neutron stars, and of course the earliest stars were simply Hydrogen and Helium when they first formed in a system of Hydrogen and Helium only, but for pop 2 stars created SOME elements to spray out when they went nova. https://en.wikipedia.org/wiki/Stellar_population https://svs.gsfc.nasa.gov/vis/a010000/a013800/a013873/PeriodicTableOrigins2_print.jpg

gabrielvelasquez commented 1 week ago

why is it all relative to silicon?

I'm going to look at the peer reviewed papers, they seem really involved and thorough, but I have to concentrate more there, and I have other distractions I have to put aside. For instance my 5 year old and 3 year old boys are watching a lot of Minecraft videos, and they never played and I never told them I played years ago, so I surprised them by reinstalling it on my computer, and now they watch videos and they want to try what they learned, they want to play every day now. I installed a resource pack, and I've been editing the block textures, really good oak plank for the Galleon I am making for them, amazing looking gem blocks (lapis, red stone, diamond, emerald), more realistic sand and dirt, etcetera, etcetera. I mention that because I just noticed, coincidentally that there is an Educational version of Minecraft, and it uses all of the elements of the periodic table, which is pretty cool, I'm going to have to look into downloading that one. But yeah, the Silicon ratio, I don't remember why they do it that way, I'll have to look it up.... https://www.perplexity.ai/search/why-are-stellar-abundance-of-e-xb8JryzKT1aaLaslmv4iaA

Incidentally, I hope you noticed that I converted it to 1 Uranium atom in the columns I use, the 1 silicon was the original.

I am browsing the papers now. It models abundance gradients for 18 elements (O, Mg, Si, S, Ca, Sc, Ti, Co, V, Fe, Ni, Zn, Cu, Mn, Cr, Ba, La, Eu) from 4-22 kpc galactocentric radius. For reference: The diameter of the Milky Way galaxy is estimated to be approximately 100,000 to 120,000 parsecs (pc) or 100-120 kiloparsecs (kpc). 50-60 kpc radius, Earth at 8 kpc from the center, or 13% to 16% percent of the distance from the center to the edge. It adopts new empirical stellar yields to best fit solar vicinity abundances.

Metallicity is an importance concept in the paper, unfortunately you have to put up with the definition that's contradictory... https://en.wikipedia.org/wiki/Metallicity You might miss this, but the article says they use the term for all elements heavier than Hydrogen and Helium, when I thought it was a ratio of H to Fe, and sure enough later on in the article they use H/Fe. for me this ratio concept has for a long time seemed like a good way to get element abundance random solar systems. For contrast the first solar systems would only have had Hydrogen and Helium, in different states of matter (hyper-solid, solid, liquid, gas, plasma), difference size bodies, strange differentiations, Moons, Gas Giants, Ice/Asteroid belts, all made of only H/He. When I use the term hyper-solid, I'm thinking of Hot water ice 7. But really any element under super-high pressure, eg. hot Diamond rather than powdery Graphite. The best ratios for unique solar systems to toy with are the high Carbon ratios, high Iron ratios. "Young population I stars have significantly higher iron-to-hydrogen ratios than older population II stars. Primordial (Population_III_stars) stars are estimated to have metallicity less than −6, a millionth of the abundance of iron in the Sun." This of course matters (npi) because the rest of that solar system will follow the same ratio. You have probably heard of the planets of stars with a higher Carbon ratio than Iron, that they are suppose to have planets that have mountain ranges spilling over with diamonds, and a hot diamond core. https://en.wikipedia.org/wiki/Carbon_planet Check out the 5 Earth-mass planet chart for interesting ratio results.

gabrielvelasquez commented 1 week ago

(shareable) https://www.perplexity.ai/search/why-is-it-that-some-elements-f-DMXb.8WDSsCQWmRwT8sglQ "Q: Why is it that some elements form as ores and have to be extracted, like Iron, while others form as nuggets, like gold." Would you believe this is research for Minecraft. image

gabrielvelasquez commented 1 week ago

Started reading this, to much to summarize for perplexity, by more than double the limit.... https://www.sciencedirect.com/science/article/pii/S0019103514005545

sirus20x6 commented 1 week ago

n-body instead of the dust lanes approach would be interesting. I'm thinking of adding some optional visualization to the process now so I can see what's going on

gabrielvelasquez commented 1 week ago

n-body instead of the dust lanes approach would be interesting. I'm thinking of adding some optional visualization to the process now so I can see what's going on

Okay, I was trying to make things simpler to make thing easier, if you think in the end that approach is feasible, not needing a huge amount of CPU/RAM or GPU for that matter, then great. Aren't you talking about a massive array of data? You don't think you could expand one dimension at a time, as you get one going add another etc. or am I missing something?

sirus20x6 commented 1 week ago

the simulation right now only runs on a single thread, this can eventually be fixed. the simulation also doesn't use any single instruction multiple data acceleration which would speed things up. I also have plans on removing all memory allocations from the running loops and to only do allocation at the beginning. these things would massively speed up the application. that should leave plenty of performance on the table to have some optional runs with visualizations.

On Thu, Oct 10, 2024 at 1:59 PM Gabriel D Velasquez < @.***> wrote:

n-body instead of the dust lanes approach would be interesting. I'm thinking of adding some optional visualization to the process now so I can see what's going on

Okay, I was trying to make things simpler to make thing easier, if you think in the end that approach is feasible, not needing a huge amount of CPU/RAM or GPU for that matter, then great. Aren't you talking about a massive array of data? You don't think you could expand one dimension at a time, or am I missing something?

— Reply to this email directly, view it on GitHub https://github.com/sirus20x6/stargen/issues/15#issuecomment-2405831869, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55X7ODKEJHMLRE5MYL63Z23FALAVCNFSM6AAAAABBKXF4NSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBVHAZTCOBWHE . You are receiving this because you commented.Message ID: @.***>

gabrielvelasquez commented 1 week ago

the simulation right now only runs on a single thread, this can eventually be fixed. the simulation also doesn't use any single instruction multiple data acceleration which would speed things up. I also have plans on removing all memory allocations from the running loops and to only do allocation at the beginning. these things would massively speed up the application. that should leave plenty of performance on the table to have some optional runs with visualizations.

Well I'll be glad if you getting anything to test compiled to run on Windows.

sirus20x6 commented 1 week ago

I would love to, but getting software to work on windows is pretty hard. I'll see if I can figure out why it's not compiling, but no promises