Open Katniss218 opened 4 years ago
Current Venus atmosphere height of 145km doesn't match the results I've calculated. Should be ~333km
The threshold ('e') is set so that the iteration stops when the Earth's atmosphere reaches 144km, otherwise results won't be correct for RSS.
using System;
public class Program { public static void Atmo( double scaleHeight, double pressure, double e ){
double cE = pressure; double currentHeight = 0; while( cE > e ) { cE /= Math.E; currentHeight += scaleHeight; } Console.WriteLine( currentHeight ); } public static void Main() { Atmo( 8.5, 1, 0.0000001 ); // earth ScaleHeight = 8.5 (wikipedia), pressure = 1 atm Atmo( 15.9, 92, 0.0000001 ); // venus ScaleHeight = 15.9 (wikipedia), pressure = 92 atm
// value epsilon = 0.0000001 makes the threshold stop when the Earth's atmosphere reaches 144km - close enough for comparison. } }
outputs
144.5 333.9
Edit 333km value is probably incorrect too. Appears that ScaleHeight can change with altitude, and the value of 15.9 only applies to the lower parts of Venusian atmo.
Current Venus atmosphere height of 145km doesn't match the results I've calculated. Should be ~333km
The threshold ('e') is set so that the iteration stops when the Earth's atmosphere reaches 144km, otherwise results won't be correct for RSS.
using System;
public class Program { public static void Atmo( double scaleHeight, double pressure, double e ){
// value epsilon = 0.0000001 makes the threshold stop when the Earth's atmosphere reaches 144km - close enough for comparison. } }
outputs
144.5 333.9