ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
257 stars 41 forks source link

https://github.com/pyansys/pyfluent/discussions/546 #634

Open seanpearsonuk opened 2 years ago

seanpearsonuk commented 2 years ago

Further commentary from Krishnan

There are multiple components to the units support. Maybe we can break them down. Overall, I feel it is a fairly straightforward feature to implement.

The units module -- something that will parse units strings, provide dimensions from units, units from dimensions, conversion factors, combination of units etc. Handling temperature vs. temperature difference will be tricky but can be managed if we say that any constant is temperature (unless explicitly stated as temperature difference), and solver returned values are also temperature. Then any direct addition/subtraction will result in temperature difference, but other operations will not change the type.

RealWithUnits class -- maybe this can be part of the units library. This will support various mathematical operators

Including unit information in settings API -- will every real value be returned with units?

Linking the settings API to the units library.

I think writing a standalone units module that can be used by other products as well would be the main challenge. I wonder if we should use the cfx units library as backend or just reimplement the whole thing in Python. (is there too much IP in it to make it open source?)

acarvalh-work commented 1 year ago

@seanpearsonuk I see that this has been implemented within the quantity module. Is there anything outstanding?

seanpearsonuk commented 1 year ago

@acarvalh-work this work is still incomplete although a lot of the framework is in place. If you look in tests, it could give an indication of what is covered. One big thing for 24R1 is proper integration with the APIs.

We can discuss further.

@hpohekar