Adaptive Comfort recipe - failed to link CFD wind data

Hi @devang and @chris ,

thanks again for your help. I managed to set up my workflow right now.
But there´s still some errors with the Comfort Recipes when using a CSV as input for the wind speed.
For UTCI and PET it does work, but for AD and PMV it doesn´t. Could this be a bug in these two components?

I also tried to look at the codes and found some differences between them, but I´m unfortunately not familiar enough with this to find out what´s exactly wrong.

But at first sight I found these differences:

UTCI:

            #See if the data is hourly.
        if simStep == 'hourly' or simStep == 'Hourly': pass
        else:
            dataCheck6 = False
            warning = "Simulation data must be hourly."
            print warning
            ghenv.Component.AddRuntimeMessage(w, warning)

AD

missing

UTCI

#Run all of the EnergyPlus data through the check function.
if outdoorIsThere == False and srfIndoorTemp_.BranchCount > 0 and zoneAirTemp_.BranchCount > 0  and zoneAirFlowVol_.BranchCount > 0 and zoneAirHeatGain_.BranchCount > 0:
    #Indoor only calculation and everything is good.
    checkData1, checkData2, airTempUnits, airTempDataHeaders, airTempDataNumbers, analysisPeriod = checkCreateDataTree(zoneAirTemp_, "zoneAirTemp_", "Air Temperature")
    checkData3, checkData4, srfTempUnits, srfTempHeaders, srfTempNumbers, analysisPeriod = checkCreateDataTree(srfIndoorTemp_, "srfIndoorTemp_", "Inner Surface Temperature")
    checkData21, checkData22, flowVolUnits, flowVolDataHeaders, flowVolDataNumbers, analysisPeriod = checkCreateDataTree(zoneAirFlowVol_, "zoneAirFlowVol_", "Air Flow Volume")
    checkData23, checkData24, heatGainUnits, heatGainDataHeaders, heatGainDataNumbers, analysisPeriod = checkCreateDataTree(zoneAirHeatGain_, "zoneAirHeatGain_", "Air Heat Gain Rate")
    checkData17, checkData18, relHumidUnits, relHumidDataHeaders, relHumidDataNumbers, analysisPeriod = checkCreateDataTree(zoneRelHumid_, "zoneRelHumid_", "Relative Humidity")
    outdoorClac = False
    checkData29, checkData30, outSrfTempUnits, outSrfTempHeaders, outSrfTempNumbers = True, True, 'C', [], []
elif srfIndoorTemp_.BranchCount > 0 and zoneAirTemp_.BranchCount > 0  and zoneAirFlowVol_.BranchCount > 0 and zoneAirHeatGain_.BranchCount > 0:
    #All inputs are provided and it doesn't matter whether the indoor/outdoor is there.
    checkData1, checkData2, airTempUnits, airTempDataHeaders, airTempDataNumbers, analysisPeriod = checkCreateDataTree(zoneAirTemp_, "zoneAirTemp_", "Air Temperature")
    checkData3, checkData4, srfTempUnits, srfTempHeaders, srfTempNumbers, analysisPeriod = checkCreateDataTree(srfIndoorTemp_, "srfIndoorTemp_", "Inner Surface Temperature")
    checkData21, checkData22, flowVolUnits, flowVolDataHeaders, flowVolDataNumbers, analysisPeriod = checkCreateDataTree(zoneAirFlowVol_, "zoneAirFlowVol_", "Air Flow Volume")
    checkData23, checkData24, heatGainUnits, heatGainDataHeaders, heatGainDataNumbers, analysisPeriod = checkCreateDataTree(zoneAirHeatGain_, "zoneAirHeatGain_", "Air Heat Gain Rate")
    checkData17, checkData18, relHumidUnits, relHumidDataHeaders, relHumidDataNumbers, analysisPeriod = checkCreateDataTree(zoneRelHumid_, "zoneRelHumid_", "Relative Humidity")
    checkData29, checkData30, outSrfTempUnits, outSrfTempHeaders, outSrfTempNumbers, analysisPeriod = checkCreateDataTree(_srfOutdoorTemp, "__srfOutdoorTemp", "Outer Surface Temperature")
    outdoorClac = True
elif outdoorIsThere == True:
    #Do a check to see if all of the zone lists are empty (except for the last one, which contains outdoor info.
    allListsEmpty = True
    for zoneList in testPtViewFactor[:-1]:
        if zoneList == []: pass
        else:allListsEmpty = False
    if allListsEmpty == True:
        #The user has input only outdoor srf temperature and only an outdoor mesh.  We can run the calculation just for the outdoors.
        checkData29, checkData30, outSrfTempUnits, outSrfTempHeaders, outSrfTempNumbers, analysisPeriod = checkCreateDataTree(_srfOutdoorTemp, "__srfOutdoorTemp", "Outer Surface Temperature")
        outdoorClac = True
        checkData1, checkData2, checkData3, checkData4, checkData21, checkData22, checkData23, checkData24, checkData17, checkData18 = True, True, True, True, True, True, True, True, True, True
        emptyLists = testPtViewFactor[:-1] + [[]]
        airTempDataHeaders, airTempDataNumbers, srfTempHeaders, srfTempNumbers, flowVolDataHeaders, heatGainDataHeaders, relHumidDataHeaders, relHumidDataNumbers = emptyLists, emptyLists, emptyLists, emptyLists, emptyLists, emptyLists, emptyLists, emptyLists
        numberLists = []
        for zoneCount, zoneList in enumerate(emptyLists):
            numberLists.append(range(len(outSrfTempNumbers[0])))
        flowVolDataNumbers, heatGainDataNumbers = numberLists, numberLists
        flowVolUnits = "m3/s"
        heatGainUnits = "W"
        airTempUnits = srfTempUnits = "C"
        relHumidUnits = "%"
    else:
        checkData1, checkData2, checkData3, checkData4, checkData21, checkData22, checkData23, checkData24, checkData17, checkData18 = False, False, False, False, False, False, False, False, False, False
        warning = 'If you have connected a viewFactorMesh that includes regions on the indoors, you must connect up energy simulation data for zoneAirTemp, srfIndoorTemp, zoneAirFlowVol, zoneAirHeatGain, and zoneRelHumid.'
        print warning
        ghenv.Component.AddRuntimeMessage(gh.GH_RuntimeMessageLevel.Warning, warning)
else:
    checkData1, checkData2, checkData3, checkData4, checkData21, checkData22, checkData23, checkData24, checkData17, checkData18 = False, False, False, False, False, False, False, False, False, False
    warning = 'If you have connected a viewFactorMesh that includes regions on the indoors, you must connect up energy simulation data for zoneAirTemp, srfIndoorTemp, zoneAirFlowVol, zoneAirHeatGain, and zoneRelHumid.'
    print warning
    ghenv.Component.AddRuntimeMessage(gh.GH_RuntimeMessageLevel.Warning, warning)

AD

    #Run all of the EnergyPlus data through the check function.
checkData1, checkData2, airTempUnits, airTempDataHeaders, airTempDataNumbers, analysisPeriod = checkCreateDataTree(_zoneAirTemp, "_zoneAirTemp", "Air Temperature")
checkData3, checkData4, srfTempUnits, srfTempHeaders, srfTempNumbers, analysisPeriod = checkCreateDataTree(_srfIndoorTemp, "_srfIndoorTemp", "Inner Surface Temperature")
checkData21, checkData22, flowVolUnits, flowVolDataHeaders, flowVolDataNumbers, analysisPeriod = checkCreateDataTree(_zoneAirFlowVol, "_zoneAirFlowVol", "Air Flow Volume")
checkData23, checkData24, heatGainUnits, heatGainDataHeaders, heatGainDataNumbers, analysisPeriod = checkCreateDataTree(_zoneAirHeatGain, "_zoneAirHeatGain", "Air Heat Gain Rate")

Here my file, where the error occures and a screenshot of it. Sorry it is still pretty messy.

180606_ComfRecipe_Error_CSV.gh (1.1 MB)

https://syncandshare.lrz.de/dl/fiGqmNRorQHXxeroqgTJveZn/THESIS_PtWindSpeed.csv

Thank you so much!

Cheers David