-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hello again,
Perhaps, I'm misunderstanding what the correct JSON format is for loading Peng-Robinson BIPs now, but prior to v0.9, the correct format was this:
[
{
"id1": {
...
},
"id2": {
...
},
"model_record": 0.0289
}
]
Seeing as the model_record field was dissolved in v0.9, I assumed that the correct format is now the following, though the only information regarding cubic EOS BIPs specifically that I can find is #91:
[
{
"id1": {
...
},
"id2": {
...
},
"k_ij": 0.0289
}
]
In any case, whatever field is included is successfully loaded into the Parameters object by Parameters.from_json, as confirmed by printing the Parameters object. The same is true for using Parameters.new_binary.
However, neither model_record nor k_ij is successfully loaded into the EquationOfState by peng_robinson = EquationOfState.peng_robinson(params_pr). Printing this object's parameters attribute produces the following:
print(peng_robinson.parameters)
> {'tc': array([190.56, 126.2 ]), 'pc': array([4599000., 3398000.]), 'acentric_factor': array([0.011, 0.037])}
with no mention of k_ij, which does appear here as a matrix when using another EOS such as PC-SAFT:
print(pcsaft.parameters)
> {'m': array([1. , 1.1879]), 'sigma': array([3.7039, 3.3353]), 'epsilon_k': array([150.03, 90.99]), 'q': array([0. , 1.1151]), 'k_ij': array([[0. , 0.03227],
[0.03227, 0. ]])}
Further evidence that the BIP is not being loaded is given by VLE calculations; results do not change before or after attempting to provide a BIP.
So, it seems to me that either I am misunderstanding/unaware of the correct way to load Peng-Robinson BIPs now in v>=0.9, or some part of the implementation has broken. I tried to examine the parameter loading source code, but unfortunately I couldn't find the information I'm looking for.
Any advice is appreciated, as always.