dowlinglab / HFC-IL-thermodynamic-model-selection

MIT License
1 stars 0 forks source link

Next MBDoE Analyses #16

Closed bbefort closed 1 year ago

bbefort commented 1 year ago

Now that @jialuw96 was able to get Pyomo.DOE working and applied to the models in the R32/emimTF2N system, we can next do the following:

Goal Timeline:

Friday, 10/21: -information content analysis complete @dipperwang5 -heatmap complete @jialuw96 -Model Selection slides sent to @adowling2 by @bbefort

Wednesday, 10/26: -FIM analysis complete for the other systems @jialuw96 @bbefort

Friday, 10/28: -full paper draft sent to everyone by @bbefort

bbefort commented 1 year ago

@jialuw96 I just updated the parameter values for:

R125/emimTF2N https://github.com/dowlinglab/extractive-distillation2/tree/mbdoe/modsel/paramest/emimtf2n/R125/Final_Results/MBDoE

Initial values: T = 283 - 323 K P = 100000 - 399800 Pa x = 0.1-0.55, 0.45 should be good

R32/bmimPF6 https://github.com/dowlinglab/extractive-distillation2/tree/mbdoe/modsel/paramest/bmimPF6/R32/Final_Results/MBDoE

Initial values: T = 283 - 323 K P = 399800 Pa x = 0.3-0.55, 0.45 should be good

bbefort commented 1 year ago

To Do Updates after 10/20 meeting:

@dipperwang5 To Do by Friday, 10/21:

@jialuw96 To Do by Friday, 10/21:

@bbefort To Do by Friday, 10/21:

bbefort commented 1 year ago

@dipperwang5 Ke, you can add your information content results in: https://github.com/dowlinglab/extractive-distillation2/tree/mbdoe/modsel/paramest/emimtf2n/R32/Final_Results/MBDoE/InfoContent

Please let me know if you have questions, thanks!

dipperwang5 commented 1 year ago

@bbefort @adowling2

The kink occured in the six experiments:

image

The experiments with maximum D-optimality: (experiment count start with 0)

proposed experiment for 4 of experiment: (5, 8, 12, 26) proposed experiment for 5 of experiment: (4, 5, 12, 16, 25) proposed experiment for 6 of experiment: (2, 5, 12, 19, 23, 26) proposed experiment for 7 of experiment: (2, 5, 12, 16, 19, 23, 26) proposed experiment for 8 of experiment: (2, 3, 5, 12, 16, 19, 23, 26)

adowling2 commented 1 year ago

Thank you. We'll ask you to rerun with new FIMs once Jialu changes the scaling.

For now, can you remake the plot by first dividing all of the FIMs by 1E-10 before calculating the determinant?

adowling2 commented 1 year ago

@bbefort Once the FIM is rescaled, it will be sloppy until there are 6 experiments because there are 6 parameters. We should analyze the extra experiments (7th and 8th) and come up with a justification. Plotting the experiments in x vs T with dots and numbering them by order added may help.

dipperwang5 commented 1 year ago
image

@adowling2 finished

bbefort commented 1 year ago

@adowling2 So the first six experiments are at 283K, then the 7th and 8th experiments start the next isotherm at 298K. Is this what you mean by justification? Once we add another temperature we get more information?

adowling2 commented 1 year ago

Yes, but that does not make sense yet to me. My intuition is that the most informative experiments with be at the largest temperature or pressure differences.

adowling2 commented 1 year ago

"proposed experiment for 6 of experiment: (2, 5, 12, 19, 23, 26)"

@bbefort How are the experiments numbered? Are these all at the same temperature or are you saying that experiments 0 to 5 are the same temperature? Happy to chat on Zoom tonight. I've got another call 8 - 9pm ET.

adowling2 commented 1 year ago

@dipperwang5 Which branch contains your code?

adowling2 commented 1 year ago

@bbefort Based on this file, here is my interpretation.

Best set of six experiments: Row T P xR32
2 283.15 399300 0.448
5 283.15 849400 0.786
12 298.15 999700 0.643
19 323.15 1000400 0.417
23 348.05 550300 0.175
26 348.05 1000500 0.288
These are spread out in temperature and composition, which makes sense to me. Here in the best 7th experiment: Row T P xR32
16 323.15 549500 0.264
And here is the best 8th experiment: Row T P xR32
3 283.15 549300 0.57

What do you think?

Edit: Can you make a plot in T vs xR32 space that uses 'o' for the first best 6, 'x' for the 7th, and 's' for the 8th. That will help us understand/interpret the results. You can then show all of the other experiments not included in this sets with a grey '.' with alpha=0.5 (50% transparency).

dipperwang5 commented 1 year ago

@dipperwang5 Which branch contains your code?

mbdoe

bbefort commented 1 year ago

@adowling2 Best of six experiments:

Row T P xR32
2 283.15 250300 0.306
5 283.15 700400 0.672
12 298.15 849500 0.57
19 323.15 700300 0.32
23 348.05 49700 0.084
26 348.05 850400 0.254

Yes to the general idea here, I think the numbers you showed are a bit off for some reason, but that's okay.

I will make the plot by tomorrow.

Talk to you soon. Thanks!

adowling2 commented 1 year ago

@dipperwang5 I think there is a division or multiplication mistake. I expect rescaling will change log10 D-optimality from ~60 to ~1 or ~10. It increased the other way. Can you check the scaling?

jialuw96 commented 1 year ago

@adowling2 @bbefort Here are heatmaps after scaling the pressure by 10^-5 (The prior information FIM is scaled by 10^-10): image image image image

The pressure is recorded and forms a heatmap:

image

Thank you!

adowling2 commented 1 year ago

Can you exclude anything above 60 xR32 and post these plots? Those pressures are really high. Please also check the pressure units.

jialuw96 commented 1 year ago

@adowling2 Yes, the pressure units are all in bar, it goes up for corner cases; For e.g., at the left bottom corner, the pressure is around: {"0": 0.60210417450390145, "1": 1.2341963962007638, "2": 1.9029835968426114}, while for the right upper corner, the pressure goes up to: {"123": 342.2220523455179, "124": 9505.802148693202, "125": 9363.331806334534}

I ploted the heatmap under x_R32 = 60%: image image image image

Pressure: image

adowling2 commented 1 year ago

@bbefort Do these pressures makes sense? How do they compare with the experiment data? These pressures seem high.

adowling2 commented 1 year ago

@jialuw96 can you overlay all of the experimental data in the prior as black 'o' markers on the plots? That will help us interpret the results.

adowling2 commented 1 year ago

@jialuw96 can you add a toggle that when plotting the FIM metrics you overwrite NaN if the pressure is above 10 bar (1 MPa)? My concern is that the contour plots show nothing interesting in the practical experimental region.

jialuw96 commented 1 year ago

@adowling2 The heatmaps with experimental data overlapping: image image image image

There is a blank region in x = [0, 10%], this is because we start from 10%.

The NaN figures are:

image image image image

Pressure: image

adowling2 commented 1 year ago

@jialuw96 Thank you, this is very informative.

Today (Friday), please do the following:

Please work on this later next week (by today is great, but I can do an approximate job in PowerPoint if needed):

After finalizing the formatting for the above requested plots:

bbefort commented 1 year ago

@adowling2 The pressures Jialu shows at the temperatures and pressures for which we have data. I agree that the pressures become very high quickly beyond these regions and I think that's because the model will trend towards infinity. I think setting nan values about 20 bar should be reasonable per my conversation with Kalin. She said they are able to go a bit above 10 bar, but try not to exceed the HFC's vapor pressure, so 20 bar would push this a bit without being unreasonable.

adowling2 commented 1 year ago

Let's also update the axes. "Temperature [K]" and "R-32 in Liquid [mol%]". @bbefort Please confirm if mol% or wt%.

adowling2 commented 1 year ago

@bbefort I expect the heatmaps with all of the data to be fairly flat; adding another experiment nearby an existing experiment is not helpful. In contrast, I expect heatmaps made with only 6 experiments considered will be much more informative/interesting.

bbefort commented 1 year ago

@jialuw96 R-32 in Liquid [mol%]

jialuw96 commented 1 year ago

@adowling2 @bbefort Heatmaps filling the blanks under 10% for x_R32, and increase the NaN bar to 20 bar:

image image image image image

adowling2 commented 1 year ago

@dipperwang5 see comments on this thread

dipperwang5 commented 1 year ago

Thank you. We'll ask you to rerun with new FIMs once Jialu changes the scaling.

For now, can you remake the plot by first dividing all of the FIMs by 1E-10 before calculating the determinant?

Hi Alex, I just want to double-check here. Dividing all of FIM by 1E-10 or 1E10?

adowling2 commented 1 year ago

Divide by 1E10.