Clo-met value adjustments on Psychro Chart

Hi @mostapha, and @chriswmackey,

I was trying to add an option to insert clo-met values to modify the comfort polygon on the chart but it seems it doesnt work for me in addition to PMVParameter object. any thoughts?

this is how I tried to modify the inputs:


epw_file = 'sample.epw'
global_epw = EPW(epw_file)

def get_fields() -> dict:
    # A dictionary of EPW variable name to its corresponding field number
    return {EPWFields._fields[i]['name'].name: i for i in range(6, 34)}
fields = get_fields()

lb_lp = LegendParameters(colors=Colorset.original())
lb_psy = PsychrometricChart(global_epw.dry_bulb_temperature,
                                global_epw.relative_humidity, legend_parameters=lb_lp)

pmv_param = ladybug_comfort.parameter.pmv.PMVParameter(20,humid_ratio_upper = 0.1, humid_ratio_lower=0.005)
    
    
        
pmv = PolygonPMV(lb_psy,met_rate=[1],clo_value=[0.5],comfort_parameter = pmv_param )



figure = lb_psy.plot(data=global_epw.import_data_by_field(fields['Dry Bulb Temperature']), polygon_pmv=pmv,title='PSYCHROMETRIC CHART', show_title=True)

figure

Thanks

Hi @amirtabadkani - Can you share a little bit more information on what doesn’t work? A screenshot of what you see versus what you expect to see will be helpful.

@devang might also be able to help with this case.

Hey @amirtabadkani ,

Your ladybug_comfort code looks correct and those values would influence the PMV polygon if you were plotting it in Grasshopper. It’s possible that this is an issue in the ladybug-charts package or perhaps it’s a caching issue with streamlit.

We would know for sure if the pmv.comfort_polygons are changing as you change the PMV inputs but the figure is unchanged.

@mostapha
It does not adjust the PMV polygon when changes are applied.

@chriswmackey,
Thanks, I am using Jupyter Notebook, not the Streamlit atm, so caching issue shouldn’t be the case. True, it changes when we plot in GH, but this is the output of the above code which obviously shouldn’t be correct since it doesn’t follow the min/max humidity ratios and any other changes to the inputs won’t impact the PMV Polygon.

Thanks, @amirtabadkani .

That pretty definitively confirms that it’s a bug in ladybug-charts, then. @mostapha , what do you think is the best way to get this fixed? I know that I could eventually figure it out but it’s going to be a while before my plate gets clear enough for this.

@dev , do you think you might be able to push a fix for this at some point when you get the chance?

I’ll double-check the source code and report back.

Hey @mostapha, I know you are busy with hundreds of questions/reviews :smiley: please let me know if you had time to update the back-end codes on this query. Thanks

Hey @devang, can you please advise on this? thanks