K_MATERIAL
Excel Usage
=K_MATERIAL(ID, T)
ID(str, required): Material ID or search term. Use list_materials to find valid IDs.T(float, optional, default: 298.15): Temperature (K). Default 298.15.
Returns (float): Thermal conductivity (W/m/K)
Examples
Example 1: Mineral fiber at 298K
Inputs:
| ID |
|---|
| Mineral fiber |
Excel formula:
=K_MATERIAL("Mineral fiber")
Expected output:
"Error: could not convert string to float: \"Error: could not convert string to float: 'Error: string is too long to generate repr'\""
Example 2: Asbestos cement board
Inputs:
| ID |
|---|
| Board, Asbestos/cement |
Excel formula:
=K_MATERIAL("Board, Asbestos/cement")
Expected output:
"Error: could not convert string to float: \"Error: could not convert string to float: 'Error: string is too long to generate repr'\""
Example 3: Temperature dependent k
Inputs:
| ID | T |
|---|---|
| Mineral fiber | 400 |
Excel formula:
=K_MATERIAL("Mineral fiber", 400)
Expected output:
"Error: could not convert string to float: \"Error: could not convert string to float: 'Error: string is too long to generate repr'\""
Example 4: Glass fiber
Inputs:
| ID |
|---|
| Blanket, Glass fiber |
Excel formula:
=K_MATERIAL("Blanket, Glass fiber")
Expected output:
"Error: could not convert string to float: \"Error: could not convert string to float: 'Error: string is too long to generate repr'\""
Python Code
from ht.insulation import k_material
def k_material(ID, T=298.15):
"""
Thermal conductivity of building, insulating, or refractory materials.
See: https://ht.readthedocs.io/en/latest/ht.insulation.html#ht.insulation.k_material
This example function is provided as-is without any representation of accuracy.
Args:
ID (str): Material ID or search term. Use list_materials to find valid IDs.
T (float, optional): Temperature (K). Default 298.15. Default is 298.15.
Returns:
float: Thermal conductivity (W/m/K)
"""
try:
return float(k_material(ID=ID, T=float(T)))
except Exception as e:
return f"Error: {str(e)}"