Beispiel #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)
        {
            int ageGroup = ageL.findCurrentAgeGroup(age);

            if (ageGroup == StarAgeLine.RET_MAINBRANCH && mass < .45) //if it's under .45 solar masses, it'll always be the minimum luminosity.
            {
                return(Star.getMinLumin(mass));
            }
            if (ageGroup == StarAgeLine.RET_MAINBRANCH && mass >= .45)  // now it's going to be somewhere between the minimum and maximum, given it's age.
            {
                return(Star.getMinLumin(mass) + ((age / ageL.getMainLimit()) * (Star.getMaxLumin(mass) - Star.getMinLumin(mass))));
            }
            if (ageGroup == StarAgeLine.RET_SUBBRANCH) //simply maxmium luminsoity
            {
                return(Star.getMaxLumin(mass));
            }
            if (ageGroup == StarAgeLine.RET_GIANTBRANCH)
            {
                return(Star.getMaxLumin(mass) * 10000); //IMPLEMENTED HOUSE RULE. Yeah. Uh.. Yeah.
            }
            if (ageGroup == StarAgeLine.RET_COLLASPEDSTAR)
            {
                return(1611047115.0 * mass * Math.Pow((ageL.getAgeFromCollapse(age) * 100000000), (-7.0 / 5.0))); //corrected from report.
            }
            return(0);
        }