private Data.Planet GetTestPlanetAtmosphereStarform() { var planet = new Data.Planet(); planet.Star = GetTestStarStarform(); planet.Star.EcosphereRadiusAU = System.Math.Sqrt(planet.Star.Luminosity); planet.SemiMajorAxisAU = 0.723332; planet.Eccentricity = 0.0067; planet.AxialTiltDegrees = 2.8; planet.OrbitZone = Env.OrbitalZone(planet.Star.Luminosity, planet.SemiMajorAxisAU); planet.DayLengthHours = 2802; planet.OrbitalPeriodDays = 225; planet.MassSM = 0.000002447; planet.GasMassSM = 2.41E-10; planet.DustMassSM = planet.MassSM - planet.GasMassSM; planet.RadiusKM = 6051.8; planet.DensityGCC = Env.EmpiricalDensity(planet.MassSM, planet.SemiMajorAxisAU, planet.Star.EcosphereRadiusAU, true); planet.ExosphereTempKelvin = GlobalConstants.EARTH_EXOSPHERE_TEMP / Extensions.Pow2(planet.SemiMajorAxisAU / planet.Star.EcosphereRadiusAU); planet.SurfaceAccelerationCMSec2 = Env.Acceleration(planet.MassSM, planet.RadiusKM); planet.EscapeVelocityCMSec = Env.EscapeVelocity(planet.MassSM, planet.RadiusKM); planet.Atmosphere.SurfacePressure = 92000; planet.DaytimeTempKelvin = 737; planet.NighttimeTempKelvin = 737; planet.SurfaceTempKelvin = 737; planet.SurfaceGravityG = 0.9; planet.MolecularWeightRetained = Env.MinMolecularWeight(planet); return(planet); }
public void GetInitialMolecularWeightRetained() { SatelliteBody p1 = GetTestPlanetAtmosphere(); Data.Planet p2 = GetTestPlanetAtmosphereStarform(); Assert.AreEqual(Env.MoleculeLimit(p2.MassSM, p2.RadiusKM, p2.ExosphereTempKelvin), _phy.Physics.GetInitialMolecularWeightRetained(p1.Mass, p1.Radius, p1.ExosphereTemperature).Grams, VeryHighDelta); }
public void GetMolecularWeightRetained() { SatelliteBody p1 = GetTestPlanetAtmosphere(); Data.Planet p2 = GetTestPlanetAtmosphereStarform(); Assert.AreEqual(Env.MinMolecularWeight(p2), _phy.Physics.GetMolecularWeightRetained(p1.SurfaceAcceleration, p1.Mass, p1.Radius, p1.ExosphereTemperature, p1.Parent.Age).Grams, UnitDelta); }