fairyfly_therm.material.cavity module¶
Cavity THERM material.
- class fairyfly_therm.material.cavity.CavityMaterial(gas=THERM Gas: Air, cavity_model='CEN', emissivity=0.9, emissivity_back=None, identifier=None)[source]¶
Bases:
_ThermMaterialBaseTypical cavity material.
- Parameters:
gas – A Gas material object for the gas that fills the cavity. (Default: air).
cavity_model –
Text for the type of cavity model to be used to determine the thermal resistance of the material. Choose from the following:
CEN
NFRC
ISO15099
ISO15099Ventilated
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)
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
therm_uuid
gas
cavity_model
emissivity
emissivity_back
color
protected
user_data
- ToString()¶
Overwrite .NET ToString.
- duplicate()¶
Get a copy of this object.
- classmethod from_dict(data)[source]¶
Create a CavityMaterial from a dictionary.
- Parameters:
data – A python dictionary in the following format
{ "type": 'CavityMaterial', "identifier": '0b46bbd7-0dbc-c148-3afe87431bf0', "display_name": 'Frame Cavity - CEN Simplified', "gas": {}, # dictionary definition of a gas "cavity_model": "CEN", "emissivity": 0.9, "emissivity_back": 0.9 }
- classmethod from_dict_abridged(data, gases)[source]¶
Create a Gas from an abridged dictionary.
- Parameters:
data – An GasAbridged dictionary.
gases – A dictionary with Gas identifiers as keys and Gas object instances as values. These will be used to reassign the gas that fills this cavity.
{ "type": 'CavityMaterial', "identifier": '0b46bbd7-0dbc-c148-3afe87431bf0', "display_name": 'Frame Cavity - CEN Simplified', "gas": '6c2409e9-5296-46c1-be11-9029b59a549b', "cavity_model": "CEN", "emissivity": 0.9, "emissivity_back": 0.9 }
- classmethod from_therm_xml(xml_element, gases)[source]¶
Create a CavityMaterial from an XML element of a THERM Material.
- Parameters:
xml_element – An XML element of a THERM material.
gases – A dictionary with gas names as keys and Gas object instances as values. These will be used to reassign the gas that fills this cavity.
- classmethod from_therm_xml_str(xml_str, gases)[source]¶
Create a CavityMaterial from an XML text string of a THERM Material.
- Parameters:
xml_str – An XML text string of a THERM material.
gases – A dictionary with gas names as keys and Gas object instances as values. These will be used to reassign the gas that fills this cavity.
- 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>0b46bbd7-0dbc-c148-3afe87431bf0</UUID> <Name>Frame Cavity - CEN Simplified</Name> <Protected>false</Protected> <Color>0xB3FFB3</Color> <Cavity> <CavityStandard>CEN</CavityStandard> <Gas>Air</Gas> <EmissivitySide1>0.9</EmissivitySide1> <EmissivitySide2>0.9</EmissivitySide2> </Cavity> </Material>
- CAVITY_MODELS = ('CEN', 'NFRC', 'ISO15099', 'ISO15099Ventilated')¶
- property cavity_model¶
Get or set text for the convection model to be used in the cavity.
- 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 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 gas¶
Get or set a Gas object used to denote the gas in the cavity.
- 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 protected¶
Get or set a boolean for whether the material is protected in THERM.
- property therm_uuid¶
Get the UUID of this object as it would appear in a THERM XML or thmz file.
This is always derived from the object identifier but this is slightly different than standard UUIDs, which have 4 more values in a 8-4-4-4-12 structure instead of a 8-4-4-12 structure used by THERM.
- 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)