Ejemplo n.º 1
0
        public bool gas; // true if gas available in current working band

        #endregion Fields

        #region Constructors

        /// <summary> Public constructor.</summary>
        /// <param name="inner_limit_of_dust">Innermost limit of dust
        /// </param>
        /// <param name="outer_limit_of_dust">Outermost limit of dust
        /// </param>
        /// <param name="inner_bound">Innermost limit of planetary orbits
        /// </param>
        /// <param name="outer_bound">Outermost limit of planetary orbits
        /// </param>
        public DustDisc(double inner_limit_of_dust, double outer_limit_of_dust, double inner_bound, double outer_bound)
        {
            dust_head = new DustBand(inner_limit_of_dust, outer_limit_of_dust);
            body_inner_bound = inner_bound;
            body_outer_bound = outer_bound;
            dust_left = true;
        }
Ejemplo n.º 2
0
 /// <summary> Public constructor.</summary>
 /// <param name="inner_limit_of_dust">Innermost limit of dust
 /// </param>
 /// <param name="outer_limit_of_dust">Outermost limit of dust
 /// </param>
 /// <param name="inner_bound">Innermost limit of planetary orbits
 /// </param>
 /// <param name="outer_bound">Outermost limit of planetary orbits
 /// </param>
 public DustDisc(double inner_limit_of_dust, double outer_limit_of_dust, double inner_bound, double outer_bound)
 {
     dust_head        = new DustBand(inner_limit_of_dust, outer_limit_of_dust);
     body_inner_bound = inner_bound;
     body_outer_bound = outer_bound;
     dust_left        = true;
 }
Ejemplo n.º 3
0
 /// <summary> Public constructor.</summary>
 /// <param name="inner_limit_of_dust">Inner edge of the dust band (in AU)
 /// </param>
 /// <param name="outer_limit_of_dust">Outer edge of the dust band (in AU)
 /// </param>
 public DustBand(double inner_limit_of_dust, double outer_limit_of_dust)
 {
     next_band    = null;
     outer_edge   = outer_limit_of_dust;
     inner_edge   = inner_limit_of_dust;
     dust_present = true;
     gas_present  = true;
 }
Ejemplo n.º 4
0
 /// <summary> Public constructor.</summary>
 /// <param name="inner_limit_of_dust">Inner edge of the dust band (in AU)
 /// </param>
 /// <param name="outer_limit_of_dust">Outer edge of the dust band (in AU)
 /// </param>
 public DustBand(double inner_limit_of_dust, double outer_limit_of_dust)
 {
     next_band = null;
     outer_edge = outer_limit_of_dust;
     inner_edge = inner_limit_of_dust;
     dust_present = true;
     gas_present = true;
 }
Ejemplo n.º 5
0
 /// <summary> Copy constructor.</summary>
 /// <param name="db">Parent DustBand from which to extract values.
 /// </param>
 public DustBand(DustBand db)
 {
     if (db == null)
         return;
     inner_edge = db.inner_edge;
     outer_edge = db.outer_edge;
     dust_present = db.dust_present;
     gas_present = db.gas_present;
     next_band = db.next_band;
 }
Ejemplo n.º 6
0
        /// <summary> Removes inner portion of the specified DustBand, preceding it
        /// with a new band.
        /// </summary>
        /// <param name="node1">Band from which dust has been removed
        /// </param>
        /// <param name="inner">Outer limit of cleared lane (in AU)
        /// </param>
        /// <returns>s Next band in disc, outside affected band 'node1'.
        /// </returns>
        public virtual DustBand splitlow(DustBand node1, double inner)
        {
            DustBand node2 = new DustBand(node1);

            node1.next_band    = node2;
            node2.dust_present = false;
            node2.gas_present  = node1.gas_present && gas;
            node2.inner_edge   = inner;
            node1.outer_edge   = inner;
            return(node2.next_band);
        }
Ejemplo n.º 7
0
 /// <summary> Copy constructor.</summary>
 /// <param name="db">Parent DustBand from which to extract values.
 /// </param>
 public DustBand(DustBand db)
 {
     if (db == null)
     {
         return;
     }
     inner_edge   = db.inner_edge;
     outer_edge   = db.outer_edge;
     dust_present = db.dust_present;
     gas_present  = db.gas_present;
     next_band    = db.next_band;
 }
Ejemplo n.º 8
0
 /// <summary> Merge a dust band with its successor, allowing the successor to be
 /// garbage collected.
 /// </summary>
 /// <returns>s true is the merge was successful
 /// </returns>
 public virtual bool mergeNext()
 {
     if (next_band != null)
     {
         if (isCompatibleWith(next_band))
         {
             outer_edge = next_band.outer_edge;
             next_band  = next_band.next_band;
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 9
0
        /// <summary> Removes a band of dust from the specified DustBand, supplementing it
        /// with 2 new bands.
        /// </summary>
        /// <param name="node1">Band from which dust has been removed
        /// </param>
        /// <param name="min">Inner limit of cleared lane (in AU)
        /// </param>
        /// <param name="max">Outer limit of cleared lane (in AU)
        /// </param>
        /// <returns>s Next band in disc, outside affected band 'node1'.
        /// </returns>
        public virtual DustBand splitband(DustBand node1, double min, double max)
        {
            DustBand node2 = new DustBand(node1);
            DustBand node3 = new DustBand(node1);

            node2.dust_present = false; // dust sucked up by planetesimal
            node2.gas_present  = node1.gas_present && gas;
            node2.inner_edge   = min;
            node2.outer_edge   = max;
            node3.inner_edge   = max;
            node1.outer_edge   = min;
            node1.next_band    = node2;
            node2.next_band    = node3;
            return(node3.next_band);
        }
Ejemplo n.º 10
0
 /// <summary> Removes inner portion of the specified DustBand, preceding it
 /// with a new band.
 /// </summary>
 /// <param name="node1">Band from which dust has been removed
 /// </param>
 /// <param name="inner">Outer limit of cleared lane (in AU)
 /// </param>
 /// <returns>s Next band in disc, outside affected band 'node1'.
 /// </returns>
 public virtual DustBand splitlow(DustBand node1, double inner)
 {
     DustBand node2 = new DustBand(node1);
     node1.next_band = node2;
     node2.dust_present = false;
     node2.gas_present = node1.gas_present && gas;
     node2.inner_edge = inner;
     node1.outer_edge = inner;
     return node2.next_band;
 }
Ejemplo n.º 11
0
 /// <summary> Removes a band of dust from the specified DustBand, supplementing it
 /// with 2 new bands.
 /// </summary>
 /// <param name="node1">Band from which dust has been removed
 /// </param>
 /// <param name="min">Inner limit of cleared lane (in AU)
 /// </param>
 /// <param name="max">Outer limit of cleared lane (in AU)
 /// </param>
 /// <returns>s Next band in disc, outside affected band 'node1'.
 /// </returns>
 public virtual DustBand splitband(DustBand node1, double min, double max)
 {
     DustBand node2 = new DustBand(node1);
     DustBand node3 = new DustBand(node1);
     node2.dust_present = false; // dust sucked up by planetesimal
     node2.gas_present = node1.gas_present && gas;
     node2.inner_edge = min;
     node2.outer_edge = max;
     node3.inner_edge = max;
     node1.outer_edge = min;
     node1.next_band = node2;
     node2.next_band = node3;
     return node3.next_band;
 }
Ejemplo n.º 12
0
 /// <summary> Merge a dust band with its successor, allowing the successor to be
 /// garbage collected.
 /// </summary>
 /// <returns>s true is the merge was successful 
 /// </returns>
 public virtual bool mergeNext()
 {
     if (next_band != null)
     {
         if (isCompatibleWith(next_band))
         {
             outer_edge = next_band.outer_edge;
             next_band = next_band.next_band;
             return true;
         }
     }
     return false;
 }
Ejemplo n.º 13
0
 /// <summary> Compares two dust bands for compatibility.</summary>
 /// <returns>s true if the two bands agree on the presence of dust and gas.
 /// </returns>
 /// <param name="db">DustBand to be compared to this one.
 /// </param>
 public virtual bool isCompatibleWith(DustBand db)
 {
     return (dust_present == db.dust_present) && (gas_present == db.gas_present);
 }
Ejemplo n.º 14
0
 /// <summary> Compares two dust bands for compatibility.</summary>
 /// <returns>s true if the two bands agree on the presence of dust and gas.
 /// </returns>
 /// <param name="db">DustBand to be compared to this one.
 /// </param>
 public virtual bool isCompatibleWith(DustBand db)
 {
     return((dust_present == db.dust_present) && (gas_present == db.gas_present));
 }