jfreissmann / heatpumps Goto Github PK
View Code? Open in Web Editor NEWCollection of TESPy heat pump models and additional Streamlit dashboard.
License: MIT License
Collection of TESPy heat pump models and additional Streamlit dashboard.
License: MIT License
Maintaining the offdesign_simulation
method of each heat pump class, as well as extending it, is a huge hassle, as it has to be changed in all classes. Most of the code is pretty repetitive, so it could and should be generalized into a method of the HeatPumpBase
parent class.
A generalized version of the offdesign_simulation
method has to be added to the HeatPumpBase
parent class. The heat pump specific code has to be off loaded into respective functions, that each heat pump class implements individually. That containts the part load parametrization of the components and/or connections and the possible recalculation of intermediate pressure levels or temperatures.
This task ensures easier maintainablility and reduces boilerplate code. Additionally, bugs in the code duplication, like the ones fixed in PR #10, can likely be avoided all together.
The model classes HeatPumpFlash
and HeatPumpFlashTrans
miss the desuperheating process step of the compressed gas exiting the first compressor stage. This issue stems from the fact, that the get_plotting_data
method of the Drum
component (used within these heat pumps as a flash tank) only return a line from the saturated liquid outlet to the saturated vapor outlet.
I created a Pull Request (see: oemof/tespy#521) to fix this issue by adding more process lines to be returned from the get_plotting_data
method, so that the state diagrams can be fixed. Therefore the issue persists until the PR is merged and we bump the tespy version. This means we should prioritize issue #2 and get the tespy models up to date.
Hi,
I have been using the heat pump simulation with the web GUI and really enjoy trying out different design configurations. However, switching to Mac/Linux-based operating systems, I encountered the following problem.
When running heatpumps under Mac/Linux, the usage of paths as follows is not feasible and causes the program to crash instantly (example):
cd example_directory/example_file.txt/../
whereas on Windows-based machines the directory would be changed to example_directory. This kind of formulation is used heavily in combination with various functions from the os module, e. g.
src_path = os.path.join(root_path, '..', 'src')
or
os.mkdir(os.path.join(__file__, '..', 'stable'))
Consider replacing the aforementioned combinations, maybe sth. like os.path.dirname(__file__)
might ensure platform independent compatibility.
Best regards
Niklas
In all models when the the Sink temperature goes beyond particular temperature system fails to solve. For example, when the working fluid is NH3, if Temperature Rücklauf
is greater than or equal to 100°C
, solver fails to find the solution. Here, Teperature Vorlauf
is not an issue. It can be any value less than T_crit
.
The model data base already has a lot of subcritical heat pump processes. The task in this issue is to create more transcritical versions of the existing heat pump models. This mainly concers changing the condenser to a normal heat exchanger and setting the heat output pressure.
hp_models
dictionairy of variables.py
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).
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.
Inspiration for key parameters and exergy analysis plots can be found in the Teaching Exergy using TESPy Jupyter Book and its corresponding GitHub Repository.
All heat pump model classes are using TESPy
version 0.6.3
. Since their creation, there has been a large refactoring of the TESPy
back end, which should result in faster and maybe more stable solutions, which is an obvious enhancement for the dashboard. These changes also concern its API, so the model classes should be adapted to it.
The adaption should use the most recent TESPy
version (as of now that is 0.7.2.post2
). An overview of the changes since version 0.6.3
can be found in the What's new section of the online documentation. It mostly concerns how the fluids are set within the network. In addition to what is said in the change log, trying out the new version showed that using the .res
attribute of the Network
class has been renamed to .residual
.
Since the update, TESPy
should be better equipped to handle setting temperature and pressure pairs instead of enthalpy and pressure. This could mean that there would not be a need for initial simulations anymore. This would be a structural enhancement and could save a lot of time, as every design simulation would only need one run. As far as I know, there could remain a need for starting value simulations for setting states with Ref
, which is used to set superheating temperature after an internal heat exchanger.
The model data base already contains a lot of single cycle heat pump processes. The task in this issue is to create more true two cycle (that is "cascading") heat pump model classes. The variants of the single cycle heat pumps could be used as orientation.
HeatPumpBase
that implements all relevant methodshp_models
dictionairy of variables.py
The name of the python file is different from the Heat pump class code. So when we do simulation, it picks correct topology image but wrong heat pump class.
For example, python file name is HeatPumpEconIHX.py, but the Heat pump class code in it is for the HeatPumpIHXEcon.
The simulation dashboard was not built for a wider audience from the start. That is reason a lot of text still is in german. On the other hand, the heap pump model classes are mostly using english, so we are not even consistent with german. The task for this issue is to implement a user selectable language, which is the dynamically applied to all text within the dashboard.
Since there are a lot of components in a heat pump, there are a lot of ways to arrange them. The gist of this task is to add more combinations of the exisiting component pool.
HeatPumpBase
that implements said setuphp_models
dictionairy of variables.py
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.