# Gas viscosity at high pressure, high temperature

I am wanting to model nitrogen gas viscosity as a function of pressure and temperature OR learn of an existing equation that models nitrogen viscosity for the pressure and temperature range that I am asking about. For me, modeling the viscosity can be achieved by any means, curve fitting the data, using first principles, etc. In the oil and gas industry the most common HPHT definition is when the pressure exceeds 10,000 psi and the temperature exceeds 300F. I based my title off this definition.

My dataset of nitrogen gas viscosity came from NIST.

I pulled viscosity data for a temperature range of 289 – 589 K (60 - 600°F) and pressure range of 14.7 – 20,000 psia. Isobar and isotherm plots of the data are shown below:

I searched online for information that may speak about gas viscosity models based on physical properties and their underlying theories. I decided to make my first attempt with the model provided by the Wikipedia website using the Sutherland Formula.

Since the Sutherland formula was only a function of the gas and temperature:

$$\mu =\mu_o \frac{T_o+C}{T+C}\left(\frac{T}{T_o}\right)^{3⁄2}$$

$$\lambda = \frac{\mu_o (T_o+C)}{T_o^{3/2}}$$

$$\mu = \lambda \frac{T^{3/2}}{T+C}$$

I assumed the Sutherland relationship would vary linearly with pressure as:

$$\mu = a + b \cdot \lambda \frac{T^{3/2}}{T+C} + cP$$

Using linear regression, I solved for parameters a, b, and c. My results were less than satisfactory. Below is a parity plot of my results.

Clearly my assumption that the Sutherland relationship would vary linearly with pressure was incorrect and/or my math was erroneous for the assumed linear equation:$$\mu = a + b \cdot \lambda \frac{T^{3/2}}{T+C} + cP$$

Using the article provided by user tpg2114 I attempted to calculate viscosity of nitrogen for the pressure and temperature range of interest. The viscosity equation given in the article was the summation of the dilute gas viscosity and residual fluid viscosity.

The transport property equations presented use the independent properties temperature and density as input conditions. Accurate equations of state for the pure fluid (nitrogen) must be used to obtain the required density. The article used this source for the EOS to calculate density for nitrogen. Currently, I do not understand how to get the density, even after reading the paper. Per this source I calculated the density using the ideal gas law and continued with the viscosity calculation -- which I know is incorrect because this density is supposed to be used as an initial guess to some interation that I am unaware of.

My current results are erroneous. Below is an example of my table of values, plots of the NIST viscosity data and calculated viscosity, and average absolute percent deviation in viscosity plot. I believe my error stems from the erroneous density calculation used in the residual fluid contribution.

• As it stands, I'm not sure what you're asking exactly. Are you looking for more advanced models? Models that are linear? Models that work at high temperature (600K isn't actually very high temperature)? Do you need only nitrogen? Or any species? And when you say based on the underlying physics, which physics exactly? Sutherland's law is just a curve fit and not really based on physics. – tpg2114 Oct 8 '14 at 13:47
• @tpg2114 Thank you for you comment. Please see my edit at the beginning of the post. – Armadillo Oct 8 '14 at 14:10
• I don't have time to summarize this article for a full answer at the moment (so if you figure it out before I do write an answer, then answer it yourself!) but this should give you what you need: boulder.nist.gov/div838/theory/refprop/NAO.PDF Including references and details on computing it from first principles using collision integrals and the like. – tpg2114 Oct 8 '14 at 14:11
• @tpg2114 Density at P and T is required for the residual fluid viscosity equation. The article you showed me used the EOS from this paper to calcuate the required density: nist.gov/data/PDFfiles/jpcrd593.pdf, which uses the Helmholtz energy as the fundamental property with independent variables of density and pressure. They say all thermodynamic properites can be calculated as derivatives of the Helmholtz energy. Can you show me how this can be done for density? – Armadillo Oct 8 '14 at 18:44

As an another attempt, I calculated the coefficients of the cubic regressions that describe the NIST data. I first calculated the cubic regression coefficients as a function of pressure for viscosity as a function of temperature. In other words, I calculated the coefficients for each isobar. In equation form that is, $$\mu (T)=\mu_o(P)+a(P)T+b(P)T^2+c(P)T^3,$$ I solved for $\mu_o$, $a$, $b$, and $c$. A visual representation is as follows,

I used the LINEST function in MS Excel to do this. I tabulated the coefficients and then plotted them against the isobar pressures. The resulting plots of these coefficients are show below.

I then calculated the viscosity of nitrogen for the pressure and temperature range of interest using these coefficients. Plots showing the resulting percent deviation as a function of temperature and as a function of pressure are shown below. The percentage deviation was calculated as $$\% \Delta \mu = \left(\frac{\mu_{calc}-\mu_{NIST}}{\mu_{NIST}}\right) \times 100$$

Following the same procedure, I calculated the cubic regression coefficients as a function of temperature for viscosity as a function of pressure. In equation form that is, $$\mu (P)=\mu_o(T)+a(T)P+b(T)P^2+c(T)P^3,$$ I solved for $\mu_o$, $a$, $b$, and $c$. Again, I used the LINEST function in MS Excel to do this. The resulting plots of these coefficients are show below.

Like before, I calculated the viscosity of nitrogen for the pressure and temperature range of interest using these coefficients. Plots showing the resulting percent deviation as a function of temperature and as a function of pressure are shown below.

Because the cubic regression coefficients as a function of temperature for viscosity as a function of pressure had better cubic fits to their curves, I found the cubic coefficients for these curves. I now have an equation for nitrogen viscosity as a function of pressure and temperature,

$$\mu (P,T)=\mu_o(T)+a(T)P+b(T)P^2+c(T)P^3,$$ where $P$ is pressure in psia and $T$ is in degrees Fahrenheit. $\mu_o$, $a$, $b$, and $c$ are cubic functions of temperature. For example $$c(T)=c_o+xT+yT^2+zT^3,$$ where $c_o$, $x$, $y$, and $z$ are the cubic regression coefficients that fit coefficient c, the coefficient for the $P^3$ term in the viscosity formula.

I calculated the viscosity of nitrogen for the pressure and temperature range of interest using this formula. Plots showing the resulting percent deviation as a function of temperature and as a function of pressure are shown below. The ranges for deviations on the plots span from -2.16 to 2.61%

Below is the parity plot showing the quality of fit these calculated values are to the NIST data. Maybe if I employ piecewise cubic splines I can get better results...

• There is a major misunderstanfing here. What I suggested is to build cubic splines for each isotherm not to use a fit with a cubic polynomial. – Claude Leibovici Oct 11 '14 at 7:11

I will quickly post an answer here and will edit/expand on the answer with time.

I used the model for nitrogen gas viscosity based on the PhD thesis by Kegang Ling from Texas A&M university, 2010

The model requires temperature and density. Density was calculated using the real gas law. The real gas law requires the compressibility factor of gas at pressure and temperature. This was calculated using the Redlich-Kwong equation of state following Peress, J.:"Working with Non-Ideal Gases," CEP Magazine March 2003 p. 39. The z-factor has to be iteratively solved for. The macro built to solve the z-factor breaks down at P = 10,000 psia.

Below is an example of my table of values, plots of the NIST viscosity data and calculated viscosity, average percent deviation in viscosity calculated, and the parity plot showing the quality of fit these calculated values are to the NIST data.