Beispiel #1
0
        public double[] GetDollar(int LifeTime, double area)
        {
            double[] dollar = new double[LifeTime];
            foreach (var lay in this.Layers)
            {
                // if (lay.GasType == "GasMaterial") continue;
                OpaqueMaterial glmat = lay.Material;
                var            dd    = lay.Thickness * glmat.Cost;

                //dd += c.Cost;

                for (int lft = 0; lft < LifeTime; lft += glmat.Life)
                {
                    dollar[lft] += dd * area;
                }
            }
            for (int lft = 0; lft < LifeTime; lft += this.Life)
            {
                dollar[lft] += this.Cost * area;
            }
            return(dollar);
        }
Beispiel #2
0
        public double[] GetEC(int LifeTime, double area)
        {
            double[] ec = new double[LifeTime];
            foreach (var lay in this.Layers)
            {
                //  if (lay.GasType == "GasMaterial") continue;
                OpaqueMaterial glmat = lay.Material;
                var            dd    = lay.Thickness * glmat.Density * glmat.EmbodiedCarbon;

                // dd += c.EmbodiedCarbon;

                for (int lft = 0; lft < LifeTime; lft += glmat.Life)
                {
                    ec[lft] += dd * area;
                }
            }
            for (int lft = 0; lft < LifeTime; lft += this.Life)
            {
                ec[lft] += this.EmbodiedCarbon * area;
            }
            return(ec);
        }
 public OpaqueMaterial Add(OpaqueMaterial obj)
 {
     if (obj == null)
     {
         return(null);
     }
     if (OpaqueMaterials == null)
     {
         OpaqueMaterials = new List <OpaqueMaterial>();
     }
     if (!OpaqueMaterials.Any(i => i.Name == obj.Name))
     {
         OpaqueMaterials.Add(obj);
         return(obj);
     }
     else
     {
         var oc = OpaqueMaterials.Single(o => o.Name == obj.Name);
         CopyObjectData(obj, oc, "", BindingFlags.Public | BindingFlags.Instance);
         return(oc);
     }
 }