RHO_MATERIAL
Excel Usage
=RHO_MATERIAL(ID)
ID(str, required): Material ID or search term.
Returns (float): Density (kg/m^3)
Examples
Example 1: Density of Asbestos cement
Inputs:
| ID |
|---|
| Board, Asbestos/cement |
Excel formula:
=RHO_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 2: Density of Mineral fiber
Inputs:
| ID |
|---|
| Mineral fiber |
Excel formula:
=RHO_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 3: Density of Glass fiber
Inputs:
| ID |
|---|
| Blanket, Glass fiber |
Excel formula:
=RHO_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'\""
Example 4: Density of Cork
Inputs:
| ID |
|---|
| Cork, regranulated |
Excel formula:
=RHO_MATERIAL("Cork, regranulated")
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 rho_material
def rho_material(ID):
"""
Density of building, insulating, or refractory materials.
See: https://ht.readthedocs.io/en/latest/ht.insulation.html#ht.insulation.rho_material
This example function is provided as-is without any representation of accuracy.
Args:
ID (str): Material ID or search term.
Returns:
float: Density (kg/m^3)
"""
try:
return float(rho_material(ID=ID))
except Exception as e:
return f"Error: {str(e)}"