Esempio n. 1
0
        private void AccreteDust(AccreteDisc Disc, ProtoPlanet p)
        {
            //ProtoStar star = p.Star;

            double startDustMass = p.DustMass;
            double startGasMass  = p.GasMass;
            //double minAccretion = 0.0001 * startMass;

            double gatherLast = 0.0;

            double rInner = 0;
            double rOuter = 0;

            do
            {
                //gatherLast = gatherNow;
                gatherLast = p.Mass;

                p.ReduceMass();
                rInner = p.InnerEffectLimit;
                rOuter = p.OuterEffectLimit;

                p.DustMass = startDustMass;
                p.GasMass  = startGasMass;

                //foreach (AccreteBand band in Disc.Bands)
                {
                    //if(band.Intersect(rInner, rOuter))
                    {
                        CollectDust(Disc, p, rInner, rOuter, gatherLast);
                    }
                    //band.CollectDust(rInner, rOuter, p, gatherLast);
                }
            }while ((p.Mass - gatherLast) >= (0.0001 * p.Mass));

            Disc.UpdateDust(p); // Clear dust only on reduced mass?
        }
Esempio n. 2
0
 public bool IsDustAvailable(ProtoPlanet p)
 {
     p.ReduceMass();
     return(IsDustLeftRange(p.InnerEffectLimit, p.OuterEffectLimit));
 }