public static Core.OpaqueMaterial ToSAM(this EnergyMaterial energyMaterial)
        {
            if (energyMaterial == null)
            {
                return(null);
            }

            Core.OpaqueMaterial result = Create.OpaqueMaterial(
                energyMaterial.Identifier,
                energyMaterial.GetType().Name,
                energyMaterial.DisplayName,
                null,
                energyMaterial.Conductivity,
                energyMaterial.SpecificHeat,
                energyMaterial.Density,
                energyMaterial.Thickness,
                double.NaN,
                1 - energyMaterial.SolarAbsorptance,
                1 - energyMaterial.SolarAbsorptance,
                1 - energyMaterial.VisibleAbsorptance,
                1 - energyMaterial.VisibleAbsorptance,
                energyMaterial.ThermalAbsorptance,
                energyMaterial.ThermalAbsorptance,
                false
                );

            return(result);
        }
Esempio n. 2
0
        public static Core.GasMaterial ToSAM_GasMaterial(this EnergyMaterial energyMaterial)
        {
            if (energyMaterial == null)
            {
                return(null);
            }

            DefaultGasType defaultGasType = Analytical.Query.DefaultGasType(energyMaterial.Identifier, energyMaterial.DisplayName);

            Core.GasMaterial result = Create.GasMaterial(
                energyMaterial.Identifier,
                energyMaterial.GetType().Name,
                energyMaterial.DisplayName,
                null,
                energyMaterial.Thickness,
                double.NaN,
                energyMaterial.Thickness / energyMaterial.Conductivity,
                defaultGasType
                );

            return(result);
        }