コード例 #1
0
 public static double GValue(this TBD.buildingElement tbdBuildingElement, int decimals = 3)
 {
     TBD.Construction aConstruction = tbdBuildingElement.GetConstruction();
     if (aConstruction == null)
     {
         return(-1);
     }
     TBD.ConstructionTypes aConstructionTypes = aConstruction.type;
     if (aConstructionTypes == TBD.ConstructionTypes.tcdTransparentConstruction)
     {
         object       aObject    = aConstruction.GetGlazingValues();
         List <float> aValueList = Convert.ToFloatList(aObject);
         return(Math.Round(aValueList[5], decimals));
     }
     return(0);
 }
コード例 #2
0
        /// <summary>
        /// TAS Building Element Lighting Transmittance Value.
        /// </summary>
        /// <param name="BuildingElement">Building Element</param>
        /// <param name="Decimals">Decimals</param>
        /// <returns name="LT value">Lighting Trasmittance value</returns>
        /// <search>
        /// TAS, BuildingElement, Get LT Value, getltvalue, Building Element, LT, lt value, lighting Transmittace, lightingtransmittance
        /// </search>
        public static double LT(BuildingElement BuildingElement, int Decimals = 2)
        {
            TBD.Construction aConstruction = BuildingElement.pBuildingElement.GetConstruction();
            if (aConstruction == null)
            {
                return(0);
            }

            TBD.ConstructionTypes aConstructionTypes = aConstruction.type;
            if (aConstructionTypes == TBD.ConstructionTypes.tcdTransparentConstruction)
            {
                object       aObject    = aConstruction.GetGlazingValues();
                List <float> aValueList = Generic.Functions.GetList(aObject);
                return(Math.Round(aValueList[0], Decimals));
            }
            return(0);
        }
コード例 #3
0
        public static double TotalSolarEnergyTransmittance(this TBD.Construction construction, double tolerance = Core.Tolerance.MacroDistance)
        {
            if (construction == null)
            {
                return(double.NaN);
            }

            TBD.ConstructionTypes constructionTypes = construction.type;
            if (constructionTypes == TBD.ConstructionTypes.tcdTransparentConstruction)
            {
                object  @object = construction.GetGlazingValues();
                float[] values  = Array <float>(@object);
                if (values == null || values.Length <= 5)
                {
                    return(double.NaN);
                }

                return(Core.Query.Round(values[5], tolerance));
            }
            return(0);
        }
コード例 #4
0
        public static void GlazingValues(this TBD.Construction construction,
                                         out double lightTransmittance,
                                         out double lightReflectance,
                                         out double directSolarEnergyTransmittance,
                                         out double directSolarEnergyReflectance,
                                         out double directSolarEnergyAbsorptance,
                                         out double totalSolarEnergyTransmittance,
                                         out double pilkingtonShortWavelengthCoefficient,
                                         out double pilkingtonLongWavelengthCoefficient,
                                         double tolerance = Core.Tolerance.MacroDistance)
        {
            lightTransmittance                   = double.NaN;
            lightReflectance                     = double.NaN;
            directSolarEnergyTransmittance       = double.NaN;
            directSolarEnergyReflectance         = double.NaN;
            directSolarEnergyAbsorptance         = double.NaN;
            totalSolarEnergyTransmittance        = double.NaN;
            pilkingtonShortWavelengthCoefficient = double.NaN;
            pilkingtonLongWavelengthCoefficient  = double.NaN;

            if (construction == null)
            {
                return;
            }

            TBD.ConstructionTypes constructionTypes = construction.type;
            if (constructionTypes != TBD.ConstructionTypes.tcdTransparentConstruction)
            {
                return;
            }

            object @object = construction.GetGlazingValues();

            float[] values = Array <float>(@object);
            if (values == null || values.Length == 0)
            {
                return;
            }

            if (values.Length > 0)
            {
                lightTransmittance = Core.Query.Round(values[0], tolerance);
                if (values.Length > 1)
                {
                    lightReflectance = Core.Query.Round(values[1], tolerance);
                    if (values.Length > 2)
                    {
                        directSolarEnergyTransmittance = Core.Query.Round(values[2], tolerance);
                        if (values.Length > 3)
                        {
                            directSolarEnergyReflectance = Core.Query.Round(values[3], tolerance);
                            if (values.Length > 4)
                            {
                                directSolarEnergyAbsorptance = Core.Query.Round(values[4], tolerance);
                                if (values.Length > 5)
                                {
                                    totalSolarEnergyTransmittance = Core.Query.Round(values[5], tolerance);
                                    if (values.Length > 6)
                                    {
                                        pilkingtonShortWavelengthCoefficient = Core.Query.Round(values[6], tolerance);
                                        if (values.Length > 7)
                                        {
                                            pilkingtonLongWavelengthCoefficient = Core.Query.Round(values[7], tolerance);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }