Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Order/disorder model partitioning of physical properties in the Gibbs energy #318

Open
bocklund opened this issue Mar 25, 2021 · 0 comments
Labels

Comments

@bocklund
Copy link
Collaborator

bocklund commented Mar 25, 2021

This is a followup issue to track the partitioning of physical properties, brought up in #311:

Fixing the partitioning of the physical properties is going to be slightly more complicated. The changes here will partition the TC, BMAG and NT expressions and update the Model attributes appropriately (e.g. Model().TC will be correct). However, the AST expressions are different objects than the expressions in the attributes, so properly partitioning Model().TC in the ordered phase doesn't fix the Gibbs energy expression.

Using magnetic energy as an example: both the ordered energy and disordered energy need to have the partitioned TC, but there's currently no way for the ordered model to make the disordered magnetic energy use the partitioned TC because the values of the TC are inserted directly into the disordered magnetic energy expression and are not symbolically accessible later. This applies to all physical models, like the Einstein and two-state models.

Originally posted by @bocklund in #311 (comment)

#311 introduced a (skipped) test, test_order_disorder_magnetic_ordering, that illustrates this behavior and fails if the test is run currently. A proper fix will likely require some re-tooling in Model where we store the physical properties (like TC) in the Model so they can be modified programatically. Specifically, the atomic_ordering_method could partition the property and have the property substituted dynamically into the Gibbs energy just-in-time (for example, in Model.ast).

@bocklund bocklund added the bug label Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant