Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Add units to ComponentProperties container #330

Open
BenPortner opened this issue Apr 28, 2022 · 4 comments
Open

[enhancement] Add units to ComponentProperties container #330

BenPortner opened this issue Apr 28, 2022 · 4 comments

Comments

@BenPortner
Copy link
Contributor

Dear Tespy developers,

first of all, thanks for developing Tespy! I am only a beginner but I already feel like it will become a valuable part of my research.

Problem description

Right now it is not immediately clear, which units some of the outputs have. The documentation clearly states that SI units will be used if not otherwise specified during creation of the Network object. However, I think it is better to be explicit than implicit.

Proposed solution

You already have a container object which stores calculated fluid properties (ComponentProperties). Why not add the units? E.g.:

compressor.P.val # this returns the value, e.g. 9000
compressor.P.unit # this returns the unit e.g. W

I think this would facilitate the interpretation of the results a great bit, especially for beginners like me.

@fwitte
Copy link
Member

fwitte commented Apr 28, 2022

Dear @BenPortner,

I am pleased to hear, that you are interested in using TESPy, thank you for reaching out and pointing to this issue.

A proper unit system should definitely be set up for the component properties as well some time in the future. Unfortunately, I am currently only working on TESPy in my free time, so these kind of things do take more time.

I had an idea already somewhere in my mind, where the network class covers general unit systems, like power, heat, length, … and the component properties will have the information which of the units is applicable. Then add a process in pre and postprocessing converting from and to SI. I‘ll put this on my todo list :).

If you have something in mind, please let me know!

Appart from that, a major overhaul of the software would be quite nice I feel.

Best regards

Francesco

@fwitte
Copy link
Member

fwitte commented Apr 28, 2022

I also started a very low effort collection of ideas for package restructuring: #295

If you have any architectural design ideas etc. you would like to see changed, you can also comment there.

@kaern
Copy link

kaern commented Dec 13, 2023

I made a quick and dirty unit conversion for components in my latest commit IPUdk/tespy@640a77b

@fwitte
Copy link
Member

fwitte commented Dec 13, 2023

@kaern! Thanks a lot for your start on this, I will put this on my schedule for the holiday season. I really would like to get your developments merged!

Have a good night!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants