Title: Fix calculation of phase equilibria if one or more component has 0 composition by prehner · Pull Request #331 · feos-org/feos · GitHub
Open Graph Title: Fix calculation of phase equilibria if one or more component has 0 composition by prehner · Pull Request #331 · feos-org/feos
X Title: Fix calculation of phase equilibria if one or more component has 0 composition by prehner · Pull Request #331 · feos-org/feos
Description: This is based on the discussion in #254 This issue seems to affect most phase equilibrium algorithms in feos. We focus on the most important ones Critical points ✅ The issue is related to the eigenvectors of the 0 components, as well as their composition going to 0 which creates numerical problems. I did not find a way to circumvent this by rewriting the expressions, but we can simply catch the special case (although that might effect the calculation of derivatives) Fixed the evaluation of eigenvectors of 2x2 matrices in num-dual itt-ustutt/num-dual#98 Manually overrode the components which have 0 composition in the calculation of the 2nd criticality condition. Bubble and dew points ℹ️ There are actually a number of points where x_i=0 leads to failure: The definition of the residual in the outer loop |(k_i x_i)/y_i| -> could be changed to absolute error The residual in the newton step mu_i^L=mu_i^V due to to the divergence in the ideal gas term -> could be changed to isofugacity related: Other divisions by 0/divergences in the ideal gas term in the calculation of the Jacobian -> should be gone when switching to fugacities Tp flash ✅ An actual bug that set `ln(x/y)` to zero instead of the residual `ln(x phi_l/(y phi_v))`. Fixed by changing the residual (which is only used for determining convergence) from `ln(x phi_l/(y phi_v))` to `x phi_l/phi_v - y`.
Open Graph Description: This is based on the discussion in #254 This issue seems to affect most phase equilibrium algorithms in feos. We focus on the most important ones Critical points ✅ The issue is related to the eige...
X Description: This is based on the discussion in #254 This issue seems to affect most phase equilibrium algorithms in feos. We focus on the most important ones Critical points ✅ The issue is related to the eige...
Opengraph URL: https://github.com/feos-org/feos/pull/331
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:87e43e1c-68d5-9bab-06bd-6e0ffdbd588c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A4FC:13D4B0:98324:CAD0B:698F9A04 |
| html-safe-nonce | d22ab873bc713d97d68f4904b2ad62c2fb63fa440abb4d4e1b58c205d3728dea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEZDOjEzRDRCMDo5ODMyNDpDQUQwQjo2OThGOUEwNCIsInZpc2l0b3JfaWQiOiI1MTcyMTExNjkxMjUwMTQwMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1a8544d9eea3a2937d9020804d22c82c92b7bac928ded1aa307631ca86001def |
| hovercard-subject-tag | pull_request:3112807613 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/feos-org/feos/pull/331/files |
| twitter:image | https://avatars.githubusercontent.com/u/69816385?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69816385?s=400&v=4 |
| og:image:alt | This is based on the discussion in #254 This issue seems to affect most phase equilibrium algorithms in feos. We focus on the most important ones Critical points ✅ The issue is related to the eige... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f47eb8d0aaafbfcb6a8220a40bd81431acf688857c575e6489670c394cfa36f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 09a8136f6e8f8fd3078d54ce5f8b7adb493d44a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width