User:Xenomancer/NRTL derivatives

The derivatives of the general NRTL equations are very useful for VLE calculations, but are incredibly cumbersome to perform by hand in the general form.

General NRTL equations
The general equation for $$\ln(\gamma_i)$$ for species $$i$$ in a mixture of $$n$$ components is :

with

For derivative calculations, it becomes convenient to further compartmentalize the general NRTL equation by abstracting the summation terms. While this does introduce an additional substitution for chain rule differentiation, it does make the final equation more readable.

with

Sum type 1:

Sum type 2:

Derivatives of system variables
The system variables are intrinsic to a system being observed or predicted. These include several directly measurable variables and many indirectly measurable variables. Only the directly measurable system variables need to be calculated for the NRTL model.
 * Directly measurable system variables:
 * $$T$$, temperature
 * $$P$$, pressure
 * $$\vec{x}$$, mixture composition

Temperature
These, along with the composition derivatives, are the primary derivatives of interest, the reason for which will become obvious when reading the pressure derivatives section.

Adjustable parameters
Since the adjustable parameters are treated as constants during typical VLE calculations, their derivatives are straight forward degenerate solutions:

Non-randomness term
The non randomness term has a similarly simple series of temperature derivatives, being linear with respect to temperature.

First order:

Second and higher order:

Interaction term
The interaction term can be conveniently expressed in terms of the derivative order, which becomes more or less obvious after a couple of iterations:

First order:

Second order:

Higher order: {{NumBlk||$$\left(\frac{\partial^{n}\tau_{ij}}{\partial T^{n}}\right)_{P,\vec{N}}=\left(-1\right)^{n}\left( n!\right)\frac{B_{ij}}{T^{n+1}}+\left(-1\right)^{n}\left( (n+1)!\right)\frac{C_{ij}}{T^{n+2}}+\left(-1\right)^{n+1}\left( (n-1)!\right)\frac{D_{ij}}{T^{n}}+E_{ij}T^{F_{ij}-n}\prod_{k=0}^{n-1}{\left( F_{ij}-k\right)}$$|$$}

Pressure
These are the least interesting, though still very important and useful, derivatives. Since the pressure derivatives are evaluated at constant temperature and composition and none of the terms involved are explicit functions of pressure, all of the derivative expressions are essentially derivatives of a constant scalar term, which is zero. All of the partial derivatives are listed below for sake of complete coverage of the topic.

Adjustable parameters
The pressure derivatives for the adjustable parameters are analogous to their respective temperature derivatives.

where $$\phi$$ is an adjustable parameter.

Non-randomness term
Unlike the temperature derivatives, the pressure derivatives of the non-randomness term are all zero.

Main equation
This is the most important derivative resulting from the pressure derivatives due to its use in simplifying calculations.

Adjustable parameters
where $$\phi$$ is an adjustable parameter.

Derivatives of adjustable parameters
The adjustable parameters are fit to experimental data for known compositions and are coefficients for temperature dependent parameters of the general NRTL equation. These parameters are considered variables during fit optimization calculations only. During the calculations for vapor-liquid equilibrium, these parameters are considered as constants.
 * Non-randomness parameters:
 * $$\alpha_{ij_0}$$, scalar
 * $$\alpha_{ij_1}$$, linearly proportional
 * Interaction parameters:
 * $$A_{ij}$$, scalar
 * $$B_{ij}$$, inversely proportional
 * $$C_{ij}$$, inverse square proportional
 * $$D_{ij}$$, logarithmically proportional
 * $$E_{ij}$$, power proportional
 * $$F_{ij}$$, power term exponent