ORNL-CEES / thermochimica

Computational library for chemical thermodynamics and phase equilibrium calculation. Multiphysics and standalone estimations of chemical state and constitutive and transport properties.
BSD 3-Clause "New" or "Revised" License
43 stars 25 forks source link

Flat Miscibility Gap Tops #126

Open maxposchmann opened 1 year ago

maxposchmann commented 1 year ago

Description Near the tops of miscibility gap regions, Thermochimica pretty consistently converges incorrectly. These are difficult cases, as the energies of systems with 1 and 2 copies of the miscibility gap phase approach one another. Since Thermochimica doesn't cache any phase compositions, it will change the composition of the first copy while comparing one assemblage versus another.

Two distinct cases have been observed:

  1. More commonly, the end of the miscibility gap is at approximately the correct temperature, but the phase compositions are more different from each other than they ought to be. See example provided.
  2. Sometimes the miscibility gap ends at too low a temperature. In this case,Thermochimica correctly finds a negative driving force for the second copy of the miscibility gap phase, but that value is smaller than the relevant tolerance (dTolerance(4)).

To Reproduce Look at the miscibility gap in the IONIC_LIQ phase on the O-Sn binary phase diagram at 10000 atm using the ZIRC_no_liq.dat database. The top should be around 2450 K.

Alternatively, consider the input provided below. The last calculation resulting in a miscibility gap has a 7% difference in the composition of the two liquid phases.

Input temperature = 2450.0:2452.0:1.0 pressure = 10000.0 mass(8) = 0.33333 mass(50) = 0.66667 temperature unit = 'K' pressure unit = 'atm' mass unit = 'moles' step together = .FALSE. data file = data/ZIRC_no_liq.dat print mode = 2 write json = .TRUE.