Title: How can the binary parameters _epsilon_k_ab_ and _kappa_ab_ be explicitly submitted for a mixture? · feos-org/feos · Discussion #326 · GitHub
Open Graph Title: How can the binary parameters _epsilon_k_ab_ and _kappa_ab_ be explicitly submitted for a mixture? · feos-org/feos · Discussion #326
X Title: How can the binary parameters _epsilon_k_ab_ and _kappa_ab_ be explicitly submitted for a mixture? · feos-org/feos · Discussion #326
Description: How can the binary parameters _epsilon_k_ab_ and _kappa_ab_ be explicitly submitted for a mixture?
Open Graph Description: Dear all, we are developing a Python program for calculating LLE using FeOs for PC-SAFT calculations of chemical potential. In our case: One component has both a negative and positive association s...
X Description: Dear all, we are developing a Python program for calculating LLE using FeOs for PC-SAFT calculations of chemical potential. In our case: One component has both a negative and positive association s...
Opengraph URL: https://github.com/feos-org/feos/discussions/326
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How can the binary parameters _epsilon_k_ab_ and _kappa_ab_ be explicitly submitted for a mixture?","text":"Dear all,
\nwe are developing a Python program for calculating LLE using FeOs for PC-SAFT calculations of chemical potential. In our case: One component has both a negative and positive association site. The other component only has a negative association site.
\nShort Python example:
\nhmf = PureRecord(identifier=Identifier(name=\"HMF\"), molarweight=126.11, model_record=PcSaftRecord(m=2.72266, sigma=3.83791, epsilon_k=433.125, kappa_ab=0.0052651, epsilon_k_ab=2524.61, na=1, nb=1))
\nmthf = PureRecord(identifier=Identifier(name=\"MTHF\"), molarweight=86.132, model_record=PcSaftRecord(m=2.7191, sigma=3.6567, epsilon_k=265.09, kappa_ab=0, epsilon_k_ab=0, na=0, nb=1))
\npures = [hmf, mthf]
\nIn order to take the induced association in the mixture into account, we would like to explicitly specify epsilon_k_ab and kappa_ab as parameters for the mixture between the two components. However, when creating the equation of state we were not able to find a way for submitting epsilon_k_ab and kappa_ab to the PcSaftParameters object.
\nShort Python example (unfortunately, this formulation didnt work and only adopts k_ij and not the other two parameters):
\nbinary = BinaryRecord(id1=Identifier(name=\"HMF\"),\tid2=Identifier(name=\"MTHF\"),model_record=PcSaftBinaryRecord(k_ij=0.015, kappa_ab=0.50, epsilon_k_ab=1800.0))
\nparams = PcSaftParameters.from_records(pures, [binary])
\neos = EquationOfState.pcsaft(params)
\nHow can we access the modelRecord constructor to submit the binary parameters epsilon_k_ab and kappa_ab for a mixture to the PC-SAFT EoS?
\nThanks for your help!
\nBest regards,
\nMoritz
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Hello Moritz,
\nthe parameter handling was revised a bit from going from feos 0.8 to 0.9. One aspect we added was to increase the flexibility of the association scheme so that any (well most I guess) kinds of hydrogen bonding arrangements can be modeled.
\nWith the current feos version the code would look like this:
\nimport feos\n\nhmf = feos.PureRecord(identifier=feos.Identifier(name=\"HMF\"), molarweight=126.11, m=2.72266, sigma=3.83791, epsilon_k=433.125, association_sites=[{\"kappa_ab\": 0.0052651, \"epsilon_k_ab\": 2524.61, \"na\": 1, \"nb\": 1}])\nmthf = feos.PureRecord(identifier=feos.Identifier(name=\"MTHF\"), molarweight=86.132, m=2.7191, sigma=3.6567, epsilon_k=265.09, association_sites=[{\"nb\": 1}])\npures = [hmf, mthf]\n\nbinary = feos.BinaryRecord(id1=feos.Identifier(name=\"HMF\"),\tid2=feos.Identifier(name=\"MTHF\"), k_ij=0.015, association_sites=[{\"kappa_ab\": 0.50, \"epsilon_k_ab\": 1800.0}])\nparams = feos.Parameters.from_records(pures, [binary])\neos = feos.EquationOfState.pcsaft(params)\ndisplay(params)\neos.parameters
\neos.parameters contains the fully assembled matrix of association parameters, so that you can check whether everything was read in correctly. I move this to a discussion, because it could be interesting for other users as well.
","upvoteCount":2,"url":"https://github.com/feos-org/feos/discussions/326#discussioncomment-15150844"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:457fc09d-ff33-5f2d-a886-d8772a0df613 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | E28C:95A95:8E755:B7F8C:698E96C8 |
| html-safe-nonce | 41e3705b81eb705950429979082e680215d1297637eb4c15bb91d30dbe65d907 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjhDOjk1QTk1OjhFNzU1OkI3RjhDOjY5OEU5NkM4IiwidmlzaXRvcl9pZCI6IjY3ODA3NDExMzI4NTI1NjU3MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2ea6ff691a2e34b198e5f52f256b3e2456493683d2d31c763d3daa8ec2c3e968 |
| hovercard-subject-tag | discussion:9204475 |
| github-keyboard-shortcuts | repository,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/Voltron::DiscussionsFragmentsController/show/feos-org/feos/326/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/f0909e621c52f4a52a32cd646f1b7a110c7de93706342e3b01a31d5decd9e165/feos-org/feos/discussions/326 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0909e621c52f4a52a32cd646f1b7a110c7de93706342e3b01a31d5decd9e165/feos-org/feos/discussions/326 |
| og:image:alt | Dear all, we are developing a Python program for calculating LLE using FeOs for PC-SAFT calculations of chemical potential. In our case: One component has both a negative and positive association s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| 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 | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width