fairyfly_therm.material.solid module

Solid THERM material.

class fairyfly_therm.material.solid.SolidMaterial(conductivity, emissivity=0.9, emissivity_back=None, density=None, porosity=None, specific_heat=None, vapor_diffusion_resistance=None, identifier=None)[source]

Bases: _ThermMaterialBase

Typical conductive material.

Parameters:
  • conductivity – Number for the thermal conductivity of the material [W/m-K].

  • emissivity – Number between 0 and 1 for the infrared hemispherical emissivity of the front side of the material. (Default: 0.9).

  • emissivity_back – Number between 0 and 1 for the infrared hemispherical emissivity of the back side of the material. If None, this will default to the same value specified for emissivity. (Default: None)

  • density – Optional number for the density of the material [kg/m3]. (Default: None).

  • porosity – Optional number between zero and one for the porosity of the material. (Default: None).

  • specific_heat – Optional number for the specific heat of the material [J/kg-K]. If None, it is not included in the export. (Default: None).

  • vapor_diffusion_resistance – Optional number for the water vapor diffusion resistance factor [Dimensionless]. (Default: None).

  • identifier – Text string for a unique object ID. Must be a UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. If None, a UUID will automatically be generated. (Default: None).

Properties:
  • identifier

  • display_name

  • conductivity

  • emissivity

  • emissivity_back

  • density

  • porosity

  • specific_heat

  • vapor_diffusion_resistance

  • resistivity

  • color

  • protected

  • user_data

ToString()

Overwrite .NET ToString.

duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Create a SolidMaterial from a dictionary.

Parameters:

data – A python dictionary in the following format

{
"type": 'SolidMaterial',
"identifier": 'f26f3597-e3ee-43fe-a0b3-ec673f993d86',
"display_name": 'Concrete',
"conductivity": 2.31,
"emissivity": 0.9,
"emissivity_back": 0.9,
"density": 2322,
"porosity": 0.24,
"specific_heat": 832,
"vapor_diffusion_resistance": 19
}
classmethod from_therm_xml(xml_element)[source]

Create a SolidMaterial from an XML element of a THERM Material.

Parameters:

xml_element – An XML element of a THERM material.

classmethod from_therm_xml_str(xml_str)[source]

Create a SolidMaterial from an XML text string of a THERM Material.

Parameters:

xml_str – An XML text string of a THERM material.

lock()
to_dict()[source]

SolidMaterial dictionary representation.

to_therm_xml(materials_element=None)[source]

Get an THERM XML element of the material.

Parameters:

materials_element – An optional XML Element for the Materials to which the generated objects will be added. If None, a new XML Element will be generated.

<Material>
    <UUID>1543f77f-e4aa-47d4-b7bf-2365d7bc0b9d</UUID>
    <Name>Polyurethane Foam</Name>
    <Protected>false</Protected>
    <Color>0xFFFFC1</Color>
    <Solid>
        <HygroThermal>
            <ThermalConductivityDry>0.05</ThermalConductivityDry>
        </HygroThermal>
        <Optical>
            <Integrated>
                <Infrared>
                    <Emissivity-Front>0.9</Emissivity-Front>
                    <Emissivity-Back>0.9</Emissivity-Back>
                </Infrared>
            </Integrated>
        </Optical>
    </Solid>
</Material>
to_therm_xml_str()[source]

Get an THERM XML string of the material.

unlock()
property color

Get or set an optional color for the material as it displays in THERM.

This will always be a Ladybug Color object when getting this property but the setter supports specifying hex codes. If unspecified, a radom color will automatically be assigned.

property conductivity

Get or set the conductivity of the material layer [W/m-K].

property density

Get or set the density of the material layer [kg/m3].

property display_name

Get or set a string for the object name without any character restrictions.

If not set, this will be equal to the identifier.

property emissivity

Get or set the hemispherical emissivity of the front side of the material.

property emissivity_back

Get or set the hemispherical emissivity of the back side of the material.

property identifier

Get or set a text string for the unique object identifier.

This must be a UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and it remains constant as the object is mutated, copied, and serialized to different formats (eg. therm XML). As such, this property is used to reference the object across a Model.

property porosity

Get or set a number between zero and one for the porosity.

property protected

Get or set a boolean for whether the material is protected in THERM.

property resistivity

Get or set the resistivity of the material layer [m-K/W].

property specific_heat

Get or set the specific heat of the material layer [J/kg-K].

property user_data

Get or set an optional dictionary for additional meta data for this object.

This will be None until it has been set. All keys and values of this dictionary should be of a standard Python type to ensure correct serialization of the object to/from JSON (eg. str, float, int, list, dict)

property vapor_diffusion_resistance

Get or set the vapor diffusion resistance of the material.