jfreissmann / heatpumps

Collection of TESPy heat pump models and additional Streamlit dashboard.
MIT License
12 stars 3 forks source link

Add exergy analysis to dashboard #3

Closed jfreissmann closed 2 months ago

jfreissmann commented 2 months ago

Description of task

The HeatPumpBase class implements the method perform_exergy_analysis for all child classes. This should work already to perform a component-wise exergy analysis. This task concerns the depiction of results gathered from the analysis. That includes key parameters, such as the exergetic efficiency, as well as meaningful plots (e.g. waterfall or Grashoff diagrams).

Necessary steps

The implemented analysis method already calculates the epsilon value. In addition, other key parameters have to be calculated and plots created. The corresponding methods have to be implemented -- ideally in the base class, if possible. Finally, the user should be able to set the ambient state (temperature and pressure), with default values analog to other parameters.

Additional information

Inspiration for key parameters and exergy analysis plots can be found in the Teaching Exergy using TESPy Jupyter Book and its corresponding GitHub Repository.

jfreissmann commented 2 months ago

This issue was solved with PR #8.

bilwint commented 2 months ago

I have a doubt regarding the environmental temperature and pressure used for exergy analysis in the model. Currently, T_env is set to 25°C and p_env to 1.013 bar, regardless of the model's operational conditions. Does this approach make sense? Alternatively, should we adjust the environmental conditions based on the temperature of the heat source feed flow? Or perhaps it would be beneficial to implement a slider for environmental conditions in the streamlit dashboard, with default values matching those of the heat source feed flow, so that users can define the environmental conditions if needed.

jfreissmann commented 2 months ago

Hey @bilwint, thanks for bringing that up. I think I referred in a different PR to a commit of yours, which containt this slider, which did not end up in the final code base that was merged. I agree with you that the ambient state should be a user specified option.

As we model water sourced heat pumps, I am not sure if the ambient state should be equivalent to the heat source. If sources like lakes, river etc. are used as a heat source, their respective temperatures often can be below ambient air temperature and therefore have some exergy and gain even more with subcooling. If you are still unsure, I think Mr. Hofmann would be the best person to contact about that.

bilwint commented 2 months ago

ok, Hoffmann has the same perspective like you. I will do the slider again.

jfreissmann commented 2 months ago

Great, thank you.