I have a programme built in python and rust, procedurally generating stars, planets, etc.
I have come to a point where I have to work on atmospheric characteristics, hopefully managing to get a pseudo-realistic outcome in terms of:
- composition/constituents in terms of substance
- surface pressure
- equilibrium temperature
- surface temperature
- total mass of atmosphere
- etc
Where pressure and temperature determine the states of the atmosphere constituents.
For example, I have just generated an atmosphere composed on the following approximate percentages:
- Methane 51%
- Ammonia 38%
- Nitrogen (N2) 4%
- Water 4%
- and negligible traces of other gases
And with the following characteristics outcome:
- equilibrium temperature: 152 K
- surface temperature: 200 K
- surface pressure: 21497.75 Pa, 0.21 atm
For a terrestrial planet ~0.55 the radius of earth and ~0.23 the mass of earth. Bond albedo is assumed to be 0.3.
Now to try and determine the state of the constituents, (solid/liquid/gas) I try and use Clausius-Clapeyron equation, shuffled around a bit so I can find the fusion and vaporisation points of each constituent under the given pressure and temperature:
Tf2 = 1 / (1/T1 - R . ln(P2/P1) / ΔHfus)
and
T2v = 1 / (1/T1 - R . ln(P2/P1) / ΔHvap)
where:
- T1 is the fusion/vaporisation temperature at pressure P1 = 101325 Pa for the given substance
- P2 is the "simulated" surface pressure for the planet
- T2f: is the fusion point for the substance given the "environment"
- T2v: is the vaporisation point for the substance given the "environment"
In the example above, this results (for water) as the following:
T2f = 172.18K
T2v = 333.55K
which means water will be liquid at the surface of this planet.
And while I am not looking for absolutely correct numbers (speed is more important than absolute correctness), I once in a while get the numbers for the following other example planet:
- planet radius: 1.82 earth
- planet mass: 4.14 earth (so some kind of super earth)
- T2 = 350 K
- P2 = 12538738.28 Pa, 123.75 atm
- T1 = 273.0 K / 373 K
- P1 = 101325 Pa
- Water heat of fusion: 6010.0 J/mol (at 273 K)
- Water heat of vaporisation: 40657.0 J/mol (at 373 K)
and then these values
- water melts at
-333.02 K
(yes! negative Kelvin) - water boils at
589.75 K
(probably more realistic given the huge pressure!)
Obviously, getting negative K is far beyond the level of "pseudo" in "pseudorealistic".
So my question is; what am I forgetting and handling badly? Critical temperature? Critical pressure? Both? Variable heat of fusion and heat of vaporisation?
I have read that
Note that the enthalpies of fusion and vaporization change with temperature.
I am thinking to take that into account, assuming it would be the right thing to do? But is it?
Edit: I am not a physicist/chemist by trade or training... just a coder with a side project :-)