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); }
public void GetOrbitalZone() { Luminosity luminosity = Luminosity.FromSolarLuminosities(1.0); Length orbitalRadius = Length.FromAstronomicalUnits(1.0); Assert.AreEqual(Env.OrbitalZone(luminosity.SolarLuminosities, orbitalRadius.AstronomicalUnits), _phy.Astronomy.GetOrbitalZone(luminosity, orbitalRadius) ); }