oemof / tespy

Thermal Engineering Systems in Python (TESPy). This package provides a powerful simulation toolkit for thermal engineering plants such as power plants, district heating systems or heat pumps.
https://tespy.readthedocs.io
MIT License
272 stars 85 forks source link

When using the characteristic line, a warning always appears, and it cannot operate normally! #241

Closed hangtianzhang closed 3 years ago

hangtianzhang commented 3 years ago

Hey Francesco, When I created my own thermal system, the gas turbine parameters were set by referring to the chp example, which is like this:com1.set_attr(pr=14,eta_s=0.91,design=['pr','eta_s'],offdesign=['eta_s_char']) However, when I run, the following warning always appears: @LREH4M%2KPYBV$(_YUTV~5 Currently I do not have my own data, and I need to use the default feature line. So I want to know whether the appearance of this warning will affect the calculation and the appropriate solution? Thank you! Looking forward to your reply!

fwitte commented 3 years ago

Hi @hangtianzhang, this has no effect on the results, disabling the warning does not change the outcome of your calculation. It is intended as information to the user, that the component is using default characteristics which can be looked up in the API documentation. This topic has been raised before and I think I will delete this warning message as the user should know what he is doing in any case. Also there is a new feature planned improving the documentation and the transparency of a tespy model. This will include characteristic line data, therefore the warning should be unnecessary. The new version will most likely be published within the next two or three weeks. Best regards Francesco

hangtianzhang commented 3 years ago

Hi ,Francesco.thanks for your quick reply! Your answer is very helpful. I am currently developing a combined cycle of gas turbine, Rankine cycle and heat pump,and intend to use Tespy to simulate the thermal process. However, after I set up the components and established the connections. There has been a problem that has not appeared in the document. Please help me analyze what caused this problem! Thank you! (72 BC0SHPI1)_J)@5)NEHC

fwitte commented 3 years ago

Can you share the python script and the version of tespy you are using?

BTW: You can simple add code or the terminal output here by using "``language" at the beginning of a block and three "" at the end. Replace language with python, bash, ..., e.g.

import tespy
hangtianzhang commented 3 years ago

Thank you! I understand the method of inserting the code you said. But the script content is a bit long, so I submit the script here. The version of Tespy I use is 0.3.4. script.zip

fwitte commented 3 years ago

In the definition of the network fluids you are missing the necessary air components. The component combustion_chamber (will be CombustionChamber in 0.4.0 API) requires air and fuel component wise (23 % O2, 76 % N2, ...). However, I fell there should be an appropriate error message. Best Francesco

hangtianzhang commented 3 years ago

Thank you for your answer, it is very helpful and it is currently running. You are really professional! But there is still a small question, that is, when adding bus, what does -1 mean? E.g:heat_bus.add_comps({'comp': chp, 'param': 'Q'}, {'comp': fgc, 'char': -1})

fwitte commented 3 years ago

It means that the input value (bus value of the component) is multiplied by -1, for more info see https://tespy.readthedocs.io/en/master/tespy_modules.html#busses.

fwitte commented 3 years ago

The seems resolved, feel free to reopen if not.