def _get_material(materials, thermal_materials, mid):
    """gets a structural or thermal material"""
    try:
        mat = materials[mid]
    except KeyError:
        mat = thermal_materials[mid]
    return mat
