Пример #1
0
        /// <summary>
        ///     This updates the star to what the current should be given no alterations.
        /// </summary>
        /// <param name="ageL">the age line of the star</param>
        /// <param name="age">The age of the star</param>
        /// <param name="mass">The current mass of the star</param>
        /// <returns>The current lumonsity of the star</returns>
        public static double GetCurrLumin( StarAgeLine ageL, double age, double mass )
        {
            var ageGroup = ageL.FindCurrentAgeGroup(age);

            if (ageGroup == StarAgeLine.RetMainbranch && mass < .45) //if it's under .45 solar masses, it'll always be the minimum luminosity.
            {
                return GetMinLumin(mass);
            }
            if (ageGroup == StarAgeLine.RetMainbranch && mass >= .45) // now it's going to be somewhere between the minimum and maximum, given it's age.
            {
                return GetMinLumin(mass) + age / ageL.GetMainLimit() * ( GetMaxLumin(mass) - GetMinLumin(mass) );
            }
            if (ageGroup == StarAgeLine.RetSubbranch) //simply maxmium luminsoity
            {
                return GetMaxLumin(mass);
            }
            if (ageGroup == StarAgeLine.RetGiantbranch)
            {
                return GetMaxLumin(mass) * 10000; //IMPLEMENTED HOUSE RULE. Yeah. Uh.. Yeah.
            }
            if (ageGroup == StarAgeLine.RetCollaspedstar)
            {
                return 1611047115.0 * mass * Math.Pow(ageL.GetAgeFromCollapse(age) * 100000000, -7.0 / 5.0); //corrected from report.
            }

            return 0;
        }
Пример #2
0
 /// <summary>
 ///     This updates the star to the current surface temperature given no alterations
 /// </summary>
 /// <param name="ageL">the age line of the star</param>
 /// <param name="lumin">The current luminosity of the star (used for White Dwarfs)</param>
 /// <param name="age">The age of the star</param>
 /// <param name="mass">The current mass of the star</param>
 /// <param name="ourDice">Ddice (due to randomization of the temperature)</param>
 /// <returns>The current temperature of the star</returns>
 public static double GetCurrentTemp( StarAgeLine ageL, double lumin, double age, double mass, Dice ourDice )
 {
     if (ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetMainbranch)
     {
         return GetInitTemp(mass);
     }
     if (ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetSubbranch)
     {
         return GetInitTemp(mass) - ageL.CalcWithInSubLimit(age) * ( GetInitTemp(mass) - 4800 );
     }
     if (ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetGiantbranch)
     {
         return 3000 + ourDice.Rng(2, 6, -2) * 200;
     }
     return ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetCollaspedstar ? Math.Pow(lumin / Math.Pow(GetRadius(mass, 0, lumin, StarAgeLine.RetCollaspedstar), 2) * ( 5.38937375 * Math.Pow(10, 26) ), 1.00 / 4) : 0;
 }