View Issue Details

IDProjectCategoryView StatusLast Update
0003136OpenFOAMBugpublic2019-01-28 17:40
Reportergs78 Assigned Tohenry  
Status resolvedResolutionfixed 
PlatformlinuxOSUbuntuOS Version18.04
Summary0003136: Wrong dynamic viscosity computed for the liquid nitrogen
DescriptionI am using the sprayFoam solver to investigate the liquid nitrogen injection into a chamber.
Thus I am using the tutorial available for the sprayFoam solver by setting up the liquid nitrogen (N2) instead of the n-heptane (C7H16) initially.
After running the simulation, I have a dynamic viscosity in a range of 1e+24 Pa.s whereas this from the NIST database for instance is in a range of 1e-6 Pa.s

Thus I have checked the dynamic viscosity computed in the liquid library in OpenFOAM. To compute this physical variable, OpenFOAM uses a function related to the temperature and also related to 5 coefficients from a to e. Afterwards, I have compared these coefficients to those from other fluids to see if there is any difference. The only difference I have seen is for the coefficient "a" which is always negative except for the liquid nitrogen.
Thus I have corrected the coefficient a by adding a minus. (-32.165 instead of 32.165 initially).

After recompiling the library and running again the simulation I have the dynamic viscosity in a good range. Thus I suggest to change the coefficient a (32.165) to -32.165
Additional InformationI have provided two graphs. The first graph on the left side is the original dynamic viscosity computed by OpenFOAM by using the NRSDS function number 1 (mu=exp(a+(b/T)+c*ln(T)+d(T^e)) for a temperature range from 100K to 126.1 K.

The second graph on the right side is the corrected dynamic viscosity for the same temperature range by changing the coefficient a and by comparing the values with the NIST database. The only gap between both curves is that I do not know at which pressure the initial dynamic viscosity in OpenFOAM has been computed.
TagsNo tags attached.



2018-12-18 12:46


Dynamic viscosity report.png (21,545 bytes)   
Dynamic viscosity report.png (21,545 bytes)   


2018-12-18 14:53

manager   ~0010224

Do you have access to the NSRDS tables to check the coefficients?


2018-12-18 15:22

reporter   ~0010225

Are you talking about those from the following books: “NSRDS - AICHE Data Compilation Table of Properties of Pure Compounds – T.E Daubert, R.P. Danner” ? If yes, no I don't have access.


2018-12-18 16:29

manager   ~0010227


                  NSRDS - AICHE
             Data Compilation Tables
                of Properties of
                 Pure Compounds

    Design Institute for Physical Property Data
      American Institute of Chemical Engineers
              345 East 47th Street
            New York, New York 10017

     National Standard Reference Data System
     American Institute of Chemical Engineers

      T.E. Daubert - R.P. Danner

        Department of Chemical Engineering
        The Pennsylvania State University
            University Park, PA 16802

Or a more recent version or the online equivalents.


2018-12-18 17:00

reporter   ~0010228

No I don't have access to this book. But I plotted the graph on the left with the coefficient initially set in OpenFOAM which causes this high dynamic viscosity.


2018-12-18 17:28

manager   ~0010229

It is clear that there is a problem with the current coefficients but what is not clear is what the coefficients should be.


2018-12-18 17:37

reporter   ~0010230

Yes for sure, I have checked with the other liquids to see if there is a difference regarding the sign or the order of the coefficients for the dynamic viscosity. The only difference I saw is that every coefficient "a" is negative whereas in the liquid nitrogen it is positive. Maybe this correction is valid because it provides me the good range.


2018-12-18 17:50

manager   ~0010231

I agree, the error may only be the sign, but because there is an error in the sign there may well also be an error in one or more of the coefficient values.


2018-12-19 12:58

reporter   ~0010233

I am in contact with someone who works at the College Imperial of London. Actually they have this book so I will keep you up to date as soon as possible.


2019-01-24 09:39

reporter   ~0010262


Sorry for the delay, I finally get two screenshots from the book, Please see attach the coefficients for the liquid nitrogen properties.
IMG_2204.JPG (1,656,697 bytes)
IMG_2205.JPG (1,771,903 bytes)


2019-01-24 10:39

reporter   ~0010263

We can see the minus missing for the liquid viscosity but there is some coefficients for the others properties that do not match those in OpenFoam. Maybe it is because the book I have is the 1982 version.


2019-01-24 14:26

manager   ~0010264

Do you have a preference for which set of coefficients to use? How do the two compare with the NIST data you plotted?


2019-01-25 14:53

reporter   ~0010265

I figured out why there is some discrepancies, some properties in the book are not provided with the same units.
For instance the density is in mol/m^3 whereas in OpenFOAM it is in kg/m^3.

So my conclusion is that the coefficients provided by OpenFOAM are in accordance with the book excepted for the liquid viscosity that I had mentionned before.
I just need to look after the coefficients for the heat of vapourization and the one for the surface tension.

I have attached some of the properties that are also in accordance with the NIST database
Liquid density comparison.png (31,415 bytes)   
Liquid density comparison.png (31,415 bytes)   


2019-01-28 17:40

manager   ~0010267

Thanks for checking the coefficients

Resolved in OpenFOAM-dev by commit f070388e5b9824bb48303ca0569907940e917fec
Resolved in OpenFOAM-6 by commit bdc14dcd3de41a6faa3f6a69270d7dccb3f3ac23

Issue History

Date Modified Username Field Change
2018-12-18 12:46 gs78 New Issue
2018-12-18 12:46 gs78 File Added: Dynamic viscosity report.png
2018-12-18 14:53 henry Note Added: 0010224
2018-12-18 15:22 gs78 Note Added: 0010225
2018-12-18 16:29 henry Note Added: 0010227
2018-12-18 17:00 gs78 Note Added: 0010228
2018-12-18 17:28 henry Note Added: 0010229
2018-12-18 17:37 gs78 Note Added: 0010230
2018-12-18 17:50 henry Note Added: 0010231
2018-12-19 12:58 gs78 Note Added: 0010233
2019-01-24 09:39 gs78 File Added: IMG_2204.JPG
2019-01-24 09:39 gs78 File Added: IMG_2205.JPG
2019-01-24 09:39 gs78 Note Added: 0010262
2019-01-24 10:39 gs78 Note Added: 0010263
2019-01-24 14:26 henry Note Added: 0010264
2019-01-25 14:53 gs78 File Added: Liquid density comparison.png
2019-01-25 14:53 gs78 File Added: Liquid dynamic viscosity comparison.png
2019-01-25 14:53 gs78 File Added: Liquid heat capacity comparison.png
2019-01-25 14:53 gs78 File Added: Liquid thermal conductivity comparison.png
2019-01-25 14:53 gs78 Note Added: 0010265
2019-01-28 17:40 henry Assigned To => henry
2019-01-28 17:40 henry Status new => resolved
2019-01-28 17:40 henry Resolution open => fixed
2019-01-28 17:40 henry Fixed in Version => 6
2019-01-28 17:40 henry Note Added: 0010267