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

Improving flow rate calculation #71

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

daklauss
Copy link
Collaborator

@daklauss daklauss commented Nov 15, 2023

Optimized the calculation of the Flowrates in get_flow_rates( )of every unit operations by creating a matrix as described in the Forum and solving it by using numpy.linalg.solve.
Rewrote pretty much the whole function including generation of the return dict.

The former solve_flow_rates( ) got removed because it became unnecessary.

Also added a new testcase i used for implementing the new calculation method.

I was a little bit to greedy with black and pylint ....

PS. i added .vscode to .gitignore because my vscode created some weird files for testing i didn't want to comit

TODOS:

  • Review documentation
  • Cleanup commits @schmoelder
  • Check case where unit is only connected to itself (undefined solution if no given q_out)
    • Add check/raise exception
    • Add testcase

@daklauss daklauss linked an issue Nov 15, 2023 that may be closed by this pull request
Copy link
Contributor

@schmoelder schmoelder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @daklauss for this PR! Code looks good, just some minor formatting points. I'm looking forward to seeing some benchmarking results!

CADETProcess/processModel/flowSheet.py Outdated Show resolved Hide resolved
CADETProcess/processModel/flowSheet.py Outdated Show resolved Hide resolved
CADETProcess/processModel/flowSheet.py Outdated Show resolved Hide resolved
CADETProcess/processModel/flowSheet.py Outdated Show resolved Hide resolved
CADETProcess/processModel/flowSheet.py Outdated Show resolved Hide resolved
@schmoelder schmoelder force-pushed the 67-improving-flowrate-calculation branch 2 times, most recently from fbd20b7 to 78f053e Compare November 30, 2023 16:36
@schmoelder schmoelder force-pushed the 67-improving-flowrate-calculation branch from 78f053e to cea0452 Compare December 1, 2023 12:43
@schmoelder schmoelder merged commit bdb1fe0 into master Dec 1, 2023
6 checks passed
@schmoelder schmoelder mentioned this pull request Dec 5, 2023
5 tasks
@schmoelder schmoelder deleted the 67-improving-flowrate-calculation branch January 10, 2024 11:03
@schmoelder schmoelder changed the title 67 improving flowrate calculation Improving flowrate calculation Apr 11, 2024
@schmoelder schmoelder changed the title Improving flowrate calculation Improving flow rate calculation Apr 11, 2024
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

Successfully merging this pull request may close these issues.

Improving flowrate calculation
2 participants