Sublattice site ratios for simple binary fluid system #242
-
Hey all, I'm trying to prepare a .tdb for a simple A-B binary fluid system with specific heat data at varying temperature and compositions. When trying run_espei(), the following error is raised:
what should the correct sublattice ratios be in the input.json and data.json files? I defaulted to [1] as per the examples found in https://espei.org/en/latest/input_data.html Here's the input.json (A is NH3): {
"components": ["A", "B"],
"phases": {
"LIQUID": {
"sublattice_model": [[ "A","B"]],
"sublattice_site_ratios": [1]
}
}
} And an example of the data.json: {
"reference": "test",
"components": ["A", "B"],
"phases": ["LIQUID"],
"solver": {
"mode": "manual",
"sublattice_site_ratios": [1],
"sublattice_configurations": [["A", "B"]],
"sublattice_occupancies": [[[0.311602715175133, 0.688397284824867]]],
"comment": "-"
},
"conditions": {
"P": 101325,
"T": 184.896586
},
"output": "CPM",
"values": [[[39.77684022357711]]]
} Attached is a reproducible example. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Short answerI believe the cause is that sublattice configurations should be a list of configurations. The simple fix is to change "sublattice_configurations": [["A", "B"]], to
The important thing to keep in mind is that the Longer answer
"sublattice_configurations": [
[["A", "B"]], # configuration 1
[["A", "B"]], # configuration 2
# ...
], and there's one historical piece of notation that you can specify a singly-occupied sublattice without using an extra pair of brackets. That is: "sublattice_configurations": [
[["A"]], # configuration 1, pure A
[["B"]], # configuration 2, pure B
[["A", "B"]], # configuration 3, mised
# ...
], is equivalent to: "sublattice_configurations": [
["A"], # configuration 1, pure A
["B"], # configuration 2, pure B
[["A", "B"]], # configuration 3, mised
# ...
], and so writing "sublattice_configurations": [["A", "B"]], actually gets parsed as a phase with two sublattices, causing this issue. Eventually I want to remove this behavior, but it'll be a breaking change so it will stay for the foreseeable future. |
Beta Was this translation helpful? Give feedback.
Short answer
I believe the cause is that sublattice configurations should be a list of configurations. The simple fix is to change
to
The important thing to keep in mind is that the
"sublattice_configurations"
and"sublattice_occupancies"
should have exactly the same shape, with configurations having the species names and occupancies having their site fractions.Longer answer
"sublattice_configurations"
is a list of configurations, soand there's one histor…