Esempio n. 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);
            }
Esempio n. 2
0
            public void GetEscapeVelocity()
            {
                Mass   massSM = Mass.FromEarthMasses(2.0);
                Length radius = Length.FromKilometers(10000.0);

                Assert.AreEqual(Env.EscapeVelocity(massSM.SolarMasses,
                                                   radius.Kilometers) / 1e5,
                                _phy.Dynamics.GetEscapeVelocity(massSM,
                                                                radius).KilometersPerSecond,
                                VeryHighDelta);
            }