public bool CalThermalValues(ModelEnergyProperties libSource)
        {
            var mats = new List <Energy.IMaterial>();

            foreach (var id in this.Materials)
            {
                var mat = libSource.MaterialList?.FirstOrDefault(m => m.Identifier == id);
                if (mat == null)
                {
                    throw new ArgumentException($"Failed to find the {id} in the library source");
                }
                mats.Add(mat);
            }

            // R value,  R factor
            ConstrucitonThermalCalculator.CalWindowValues(mats, out var rv, out var rf, out var solarT, out var shgc, out var vt);
            this.RValue  = rv;
            this.RFactor = rf;

            // U value
            this.UValue  = 1 / this.RValue;
            this.UFactor = 1 / this.RFactor;

            this.SHGC = shgc;
            this.SolarTransmittance   = solarT;
            this.VisibleTransmittance = vt;
            return(true);
        }
        public bool CalThermalValues(ModelEnergyProperties libSource = default)
        {
            // R value,  R factor
            var mats = this.Materials.OfType <Energy.IMaterial>().ToList();

            ConstrucitonThermalCalculator.CalWindowValues(mats, out var rv, out var rf, out var solarT, out var shgc, out var vt);
            this.RValue  = rv;
            this.RFactor = rf;
            // U value
            this.UValue  = 1 / this.RValue;
            this.UFactor = 1 / this.RFactor;

            this.SHGC = shgc;
            this.SolarTransmittance   = solarT;
            this.VisibleTransmittance = vt;

            return(true);
        }