Beispiel #1
0
            private Planet GetTestPlanetAtmosphere()
            {
                var planet = new Planet();

                planet.Star = GetTestStar();
                planet.Star.EcosphereRadiusAU = System.Math.Sqrt(planet.Star.Luminosity);
                planet.SemiMajorAxisAU        = 0.723332;
                planet.Eccentricity           = 0.0067;
                planet.AxialTiltDegrees       = 2.8;
                planet.OrbitZone         = Environment.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                = Environment.EmpiricalDensity(planet.MassSM, planet.SemiMajorAxisAU, planet.Star.EcosphereRadiusAU, true);
                planet.ExosphereTempKelvin       = GlobalConstants.EARTH_EXOSPHERE_TEMP / Utilities.Pow2(planet.SemiMajorAxisAU / planet.Star.EcosphereRadiusAU);
                planet.SurfaceAccelerationCMSec2 = Environment.Acceleration(planet.MassSM, planet.RadiusKM);
                planet.EscapeVelocityCMSec       = Environment.EscapeVelocity(planet.MassSM, planet.RadiusKM);

                planet.IsGasGiant = false;
                planet.Atmosphere.SurfacePressure = 92000;
                planet.DaytimeTempKelvin          = 737;
                planet.NighttimeTempKelvin        = 737;
                planet.SurfaceTempKelvin          = 737;
                planet.SurfaceGravityG            = 0.9;
                planet.MolecularWeightRetained    = Environment.MinMolecularWeight(planet);

                return(planet);
            }
Beispiel #2
0
            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);
            }