You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows me to both vectorize calculation of the property across a P-T grid, and fill the result with nan's should the query lie outside of the database bounds. However, for large (200x200) P-T grids, this operation can be quite slow, probably because of the try/except block. I can see two possible ways to improve code execution:
propagate nan's in a manner which simply return nan if any of the input is invalid.
allow implicit vectorization of numpy arrays P & T data over the internal coolprop calls.
I'm not sure how this would work behind the scenes, its possible it might break the OOP structure to implement these fixes.
Considering im currently getting runtimes of a few minutes to 30min or more, I figure id bring it up anyways.
The text was updated successfully, but these errors were encountered:
However, for large (200x200) P-T grids, this operation can be quite slow, probably because of the try/except block.
I don't think it's related to the try-except block, it's not that expensive. To identify the cause for sure, you should use a profiler. Before adopting a strategy to solve the problem, you should make sure that this is the reason.
propagate nan's in a manner which simply return nan if any of the input is invalid.
It's always impossible to return nan for sure, this will break the code for PyFluids users. This is only necessary in your particular case, most simply don't need it.
allow implicit vectorization of numpy arrays P & T data over the internal coolprop calls.
I don't think this is within the PyFluids' area of responsibility (I can't even imagine how this can be implemented yet).
For use of a specific fluid property, I currently do the following:
This allows me to both vectorize calculation of the property across a P-T grid, and fill the result with nan's should the query lie outside of the database bounds. However, for large (200x200) P-T grids, this operation can be quite slow, probably because of the
try/except
block. I can see two possible ways to improve code execution:propagate nan's in a manner which simply return nan if any of the input is invalid.
allow implicit vectorization of numpy arrays P & T data over the internal coolprop calls.
I'm not sure how this would work behind the scenes, its possible it might break the OOP structure to implement these fixes.
Considering im currently getting runtimes of a few minutes to 30min or more, I figure id bring it up anyways.
The text was updated successfully, but these errors were encountered: