Title: Fix Python compatible `StateHD
Open Graph Title: Fix Python compatible `StateHD
X Title: Fix Python compatible `StateHD
Description: For the python equation of state, users can define their own helmholtz_energy function that takes a StateHD object as input. In the function, properties of the state can be accessed, e.g. one can write state.moles. To make this work, the...
Open Graph Description: For the python equation of state, users can define their own helmholtz_energy function that takes a StateHD object as input. In the function, properties of the state can be accessed, e.g. one can w...
X Description: For the python equation of state, users can define their own helmholtz_energy function that takes a StateHD object as input. In the function, properties of the state can be accessed, e.g. one can w...
Opengraph URL: https://github.com/feos-org/feos/issues/92
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix Python compatible `StateHD\u003cD\u003e`s and respective dual numbers","articleBody":"For the `python` equation of state, users can define their own `helmholtz_energy` function that takes a `StateHD` object as input. In the function, properties of the state can be accessed, e.g. one can write `state.moles`.\r\nTo make this work, there has to be a non-generic state object for each (hyper) dual number.\r\n\r\nCurrently, missing dual numbers are [simply defined](https://github.com/feos-org/feos/blob/main/feos-core/src/python/user_defined.rs#L154-L202) in `feos-core`. Using these definitions, for each a non-generic `StateHD` version is built.\r\nThere are currently two issues:\r\n\r\n1. simply defining the dual numbers is not enough - we need arithmetic operations, etc. from `num-dual` (which currently does not export all variants we need to Python)\r\n2. we do not call `impl_state_hd!` (which implement the getters) for all states that are built. Hence, there will be errors in Python when one tries to call the getters.\r\n\r\nTo fix this, we\r\n\r\n1. have to properly export all dual numbers that are needed from `num-dual`. (Check class names in macros!)\r\n2. properly build all state definitions\r\n3. build state definition and implementation for `HelmholtzEnergyDual` in single macro?","author":{"url":"https://github.com/g-bauer","@type":"Person","name":"g-bauer"},"datePublished":"2022-12-19T18:33:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/92/feos/issues/92"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:10d9b395-46c0-4a1e-cb91-f131c096708f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A894:23D0A4:6F531A:7A4C3A:698FA1EF |
| html-safe-nonce | 8df0116549a0326d2bae3ff35693b02be8df83f52be13e717e1ac7a05ef07528 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODk0OjIzRDBBNDo2RjUzMUE6N0E0QzNBOjY5OEZBMUVGIiwidmlzaXRvcl9pZCI6IjU0MzkzNDAzNzQzNDk4MTYzMDMiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ== |
| visitor-hmac | cde0e221cf11838424bf807335f741b40d1ecca332bc3d6a8fd92789d8f306df |
| hovercard-subject-tag | issue:1503391679 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feos-org/feos/92/issue_layout |
| twitter:image | https://opengraph.githubassets.com/596fa88d355712f82963a672ccb78199641ad464123bde21ccc6a69dabc0d3a9/feos-org/feos/issues/92 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/596fa88d355712f82963a672ccb78199641ad464123bde21ccc6a69dabc0d3a9/feos-org/feos/issues/92 |
| og:image:alt | For the python equation of state, users can define their own helmholtz_energy function that takes a StateHD object as input. In the function, properties of the state can be accessed, e.g. one can w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | g-bauer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f47eb8d0aaafbfcb6a8220a40bd81431acf688857c575e6489670c394cfa36f |
| turbo-cache-control | no-preview |
| go-import | github.com/feos-org/feos git https://github.com/feos-org/feos.git |
| octolytics-dimension-user_id | 87855701 |
| octolytics-dimension-user_login | feos-org |
| octolytics-dimension-repository_id | 424905104 |
| octolytics-dimension-repository_nwo | feos-org/feos |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 424905104 |
| octolytics-dimension-repository_network_root_nwo | feos-org/feos |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 17aba3d160d69b8c2b37695ebd174d8101af8896 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width