@@ -301,22 +301,24 @@ class ExcessEnthalpyRedlichKister(Function):
301301 Computes the molar excess enthalpy using a Redlich-Kister polynomial
302302 expansion. This is a flexible, empirical model for representing binary
303303 excess properties. For a multi-component mixture, the excess enthalpy
304- is computed as a sum of binary pair contributions :
304+ is summed over the unique binary pairs supplied :
305305
306306 .. math::
307307
308- h^E = \frac{1}{2} \sum_i \sum_j h^E_{ij}
308+ h^E = \sum_{(i,j)} h^E_{ij}
309309
310- Each binary pair contribution:
310+ Each binary pair contribution follows the standard Redlich-Kister form
311311
312312 .. math::
313313
314314 h^E_{ij} = \frac{x_i x_j}{x_i + x_j}
315- \left(A (T) x_d + B (T) x_d^2 + C (T) x_d^3 + \ldots\right)
315+ \left(A_0 (T) + A_1 (T) x_d + A_2 (T) x_d^2 + \ldots\right)
316316
317- where :math:`x_d = x_i - x_j` and the coefficients :math:`A(T)`,
318- :math:`B(T)`, ... are temperature-dependent polynomials:
319- :math:`A(T) = a_0 + a_1 T + a_2 T^2 + \ldots`
317+ where :math:`x_d = x_i - x_j` and each :math:`A_k(T)` is a temperature
318+ polynomial :math:`A_k(T) = a_{k,0} + a_{k,1} T + a_{k,2} T^2 + \ldots`.
319+ For a true binary system :math:`x_i + x_j = 1` and the prefactor
320+ reduces to :math:`x_i x_j`; in multicomponent mixtures the
321+ :math:`/(x_i+x_j)` term provides the symmetric extension.
320322
321323 **Input port:** ``T`` -- temperature [K].
322324
@@ -328,12 +330,15 @@ class ExcessEnthalpyRedlichKister(Function):
328330 Mole fractions [N].
329331 coeffs : dict
330332 Redlich-Kister coefficients keyed by binary pair ``(i, j)`` as tuples.
331- Each value is a list of polynomial coefficient arrays, one per
332- Redlich-Kister term. Example for a single pair (0,1) with 3 terms::
333+ Provide each unordered pair only once (e.g. ``(0, 1)``, not also
334+ ``(1, 0)``). Each value is a list of polynomial coefficient arrays,
335+ one per Redlich-Kister term. Example for a single pair (0,1) with
336+ 3 terms::
333337
334338 {(0, 1): [[a0, a1], [b0, b1], [c0]]}
335339
336- This gives A(T)=a0+a1*T, B(T)=b0+b1*T, C(T)=c0.
340+ This gives A_0(T)=a0+a1*T, A_1(T)=b0+b1*T, A_2(T)=c0, where
341+ :math:`A_k` multiplies :math:`x_d^k`.
337342 """
338343
339344 input_port_labels = {"T" : 0 }
@@ -358,9 +363,9 @@ def _eval(self, T):
358363
359364 xd = xi - xj
360365
361- # evaluate each Redlich-Kister term
366+ # evaluate Redlich-Kister polynomial: A_0 + A_1*xd + A_2*xd^2 + ...
362367 pair_hE = 0.0
363- xd_power = xd
368+ xd_power = 1.0
364369 for poly_coeffs in terms :
365370 # temperature polynomial: c0 + c1*T + c2*T^2 + ...
366371 coeff_val = 0.0
@@ -373,7 +378,7 @@ def _eval(self, T):
373378
374379 hE += xi * xj / x_sum * pair_hE
375380
376- return 0.5 * hE
381+ return hE
377382
378383
379384# ENTHALPY DEPARTURE FROM EOS (9.7) =====================================================
0 commit comments