@@ -185,7 +185,7 @@ def __init__(self):
185185 """
186186 pass
187187
188- def excess_gibbs_free_energy (self , pressure , temperature , molar_fractions ):
188+ def excess_gibbs_energy (self , pressure , temperature , molar_fractions ):
189189 """
190190 Given a list of molar fractions of different phases,
191191 compute the excess Gibbs free energy of the solution.
@@ -205,9 +205,7 @@ def excess_gibbs_free_energy(self, pressure, temperature, molar_fractions):
205205 """
206206 return np .dot (
207207 np .array (molar_fractions ),
208- self .excess_partial_gibbs_free_energies (
209- pressure , temperature , molar_fractions
210- ),
208+ self .excess_partial_gibbs_energies (pressure , temperature , molar_fractions ),
211209 )
212210
213211 def excess_volume (self , pressure , temperature , molar_fractions ):
@@ -271,13 +269,11 @@ def excess_enthalpy(self, pressure, temperature, molar_fractions):
271269 :returns: The excess enthalpy of the solution.
272270 :rtype: float
273271 """
274- return self .excess_gibbs_free_energy (
272+ return self .excess_gibbs_energy (
275273 pressure , temperature , molar_fractions
276274 ) + temperature * self .excess_entropy (pressure , temperature , molar_fractions )
277275
278- def excess_partial_gibbs_free_energies (
279- self , pressure , temperature , molar_fractions
280- ):
276+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
281277 """
282278 Given a list of molar fractions of different phases,
283279 compute the excess Gibbs free energy for each endmember
@@ -375,7 +371,7 @@ def __init__(self, endmembers):
375371 self .n_endmembers = len (endmembers )
376372 self .site_formulae = [e [1 ] for e in endmembers ]
377373
378- def excess_gibbs_free_energy (self , pressure , temperature , molar_fractions ):
374+ def excess_gibbs_energy (self , pressure , temperature , molar_fractions ):
379375 return 0.0
380376
381377 def excess_volume (self , pressure , temperature , molar_fractions ):
@@ -387,9 +383,7 @@ def excess_entropy(self, pressure, temperature, molar_fractions):
387383 def excess_enthalpy (self , pressure , temperature , molar_fractions ):
388384 return 0.0
389385
390- def excess_partial_gibbs_free_energies (
391- self , pressure , temperature , molar_fractions
392- ):
386+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
393387 return np .zeros_like (molar_fractions )
394388
395389 def excess_partial_volumes (self , pressure , temperature , molar_fractions ):
@@ -440,9 +434,7 @@ def _calculate_endmember_configurational_entropies(self):
440434 )
441435 self .endmember_configurational_entropies = S_conf
442436
443- def excess_partial_gibbs_free_energies (
444- self , pressure , temperature , molar_fractions
445- ):
437+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
446438 return self ._ideal_excess_partial_gibbs (temperature , molar_fractions )
447439
448440 def excess_partial_entropies (self , pressure , temperature , molar_fractions ):
@@ -462,7 +454,7 @@ def entropy_hessian(self, pressure, temperature, molar_fractions):
462454 def volume_hessian (self , pressure , temperature , molar_fractions ):
463455 return np .zeros ((len (molar_fractions ), len (molar_fractions )))
464456
465- def _configurational_entropy (self , molar_fractions ):
457+ def configurational_entropy (self , molar_fractions ):
466458 site_noccupancies = np .einsum (
467459 "i, ij" , molar_fractions , self .endmember_noccupancies
468460 )
@@ -656,9 +648,7 @@ def _non_ideal_excess_partial_gibbs(self, pressure, temperature, molar_fractions
656648 Vint = self ._non_ideal_interactions (self .Wv , molar_fractions )
657649 return Eint - temperature * Sint + pressure * Vint
658650
659- def excess_partial_gibbs_free_energies (
660- self , pressure , temperature , molar_fractions
661- ):
651+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
662652 ideal_gibbs = IdealSolution ._ideal_excess_partial_gibbs (
663653 self , temperature , molar_fractions
664654 )
@@ -888,9 +878,7 @@ def _non_ideal_excess_partial_gibbs(self, pressure, temperature, molar_fractions
888878 Eint , Sint , Vint = self ._non_ideal_interactions (molar_fractions )
889879 return Eint - temperature * Sint + pressure * Vint
890880
891- def excess_partial_gibbs_free_energies (
892- self , pressure , temperature , molar_fractions
893- ):
881+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
894882 ideal_gibbs = IdealSolution ._ideal_excess_partial_gibbs (
895883 self , temperature , molar_fractions
896884 )
@@ -1031,9 +1019,7 @@ def volume_hess(pressure, temperature, molar_amounts):
10311019
10321020 self .volume_hessian = volume_hess
10331021
1034- def excess_partial_gibbs_free_energies (
1035- self , pressure , temperature , molar_fractions
1036- ):
1022+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
10371023 ideal_gibbs = IdealSolution ._ideal_excess_partial_gibbs (
10381024 self , temperature , molar_fractions
10391025 )
@@ -1251,8 +1237,11 @@ def _make_prefactors_and_exponents(self, a):
12511237
12521238 def _make_interaction_arrays (self , Ws , n ):
12531239 """
1254- A hidden convenience function that splits each
1255- excess term into _summary_
1240+ A hidden convenience function that splits the user-defined
1241+ excess interaction terms into an array of interaction values
1242+ and a list of Interaction dataclass objects that facilitate
1243+ fast computation of first and second compositional derivatives
1244+ of thermodynamic properties.
12561245
12571246 :param Ws: List of interactions in form input by the user.
12581247 :type Ws: list of lists
@@ -1488,9 +1477,7 @@ def _non_ideal_excess_partial_gibbs(self, pressure, temperature, molar_fractions
14881477 gibbs += np .einsum ("i, ij->j" , mbr_gibbs , mbr_gradients )
14891478 return gibbs
14901479
1491- def excess_partial_gibbs_free_energies (
1492- self , pressure , temperature , molar_fractions
1493- ):
1480+ def excess_partial_gibbs_energies (self , pressure , temperature , molar_fractions ):
14941481 ideal_gibbs = IdealSolution ._ideal_excess_partial_gibbs (
14951482 self , temperature , molar_fractions
14961483 )
0 commit comments