CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

A problem about density in liquid air definition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2013, 10:41
Default A problem about density in liquid air definition
  #1
eis
New Member
 
Join Date: Nov 2009
Posts: 6
Rep Power: 16
eis is on a distinguished road
I want to carry out a numerical simulation about an cryogenic liquid turbine which used the liquefied air as the working fluid.

Here i have to define a new material: liquid air at 95-105K, pressure:0.6-7MPa

There is a problem:when the density is set to a constant value or values dependent on pressure or Temperature,the solver can simulate it.

But if it is set to a function related to p and T, the solver make errors.

-----------------
the density definition is:
fluidairdensity(T,pabs,0)
-----------------

the error shows:
Fatal bounds error detected
---------------------------
Variable: Density Derivative wrt Pressure at Constant Temperature
Locale : R1
-----------------

I think the definition is right but I can't find where is wrong.


Thanks for any help. And I will be very gratitude if you give me more information. I am really need you help!!
eis is offline   Reply With Quote

Old   October 28, 2013, 17:53
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Debugging material properties is always tricky. But you have to look into the error message - it says your "density derivative wrt P at constant T is out of bounds", which means either a divide by zero or a badly behaved function at this condition.

I have had to deliberately distort material property curves at certain critical points so the derivative of the function remains bounded for all combinations. This is one way to get around this error, but obviously distorts the material properties a bit.
ghorrocks is offline   Reply With Quote

Old   October 28, 2013, 21:51
Default
  #3
eis
New Member
 
Join Date: Nov 2009
Posts: 6
Rep Power: 16
eis is on a distinguished road
ghorrocks,

Thanks for your help. I quite agree with you about that, and i tried to simply the density data as follows:
P T 0 density
0.51 94 0 723.81
0.52 94 0 723.86
0.53 94 0 723.91
0.54 94 0 723.96
0.55 94 0 724.01
0.56 94 0 724.05
0.57 94 0 724.1
0.58 94 0 724.15
0.59 94 0 724.2
0.6 94 0 724.25
0.61 94 0 724.29
0.62 94 0 724.34
0.63 94 0 724.39
0.64 94 0 724.44
0.65 94 0 724.48
0.66 94 0 724.53
0.67 94 0 724.58
0.68 94 0 724.63
0.69 94 0 724.67
0.7 94 0 724.72
0.71 94 0 724.77
0.72 94 0 724.82
0.73 94 0 724.86
0.74 94 0 724.91
0.75 94 0 724.96
0.76 94 0 725.01
0.77 94 0 725.05
0.78 94 0 725.1
0.79 94 0 725.15
0.8 94 0 725.2
0.81 94 0 725.24
0.82 94 0 725.29
0.83 94 0 725.34
0.84 94 0 725.38
0.85 94 0 725.43
0.86 94 0 725.48
0.87 94 0 725.53
0.88 94 0 725.57
0.89 94 0 725.62
0.9 94 0 725.67
0.91 94 0 725.71
0.92 94 0 725.76
0.93 94 0 725.81
0.94 94 0 725.85
0.95 94 0 725.9
0.96 94 0 725.95
0.97 94 0 725.99
0.98 94 0 726.04
0.99 94 0 726.09
1 94 0 726.13
1.01 94 0 726.18
1.02 94 0 726.23
1.03 94 0 726.27
1.04 94 0 726.32
1.05 94 0 726.37
1.06 94 0 726.41
1.07 94 0 726.46
1.08 94 0 726.51
1.09 94 0 726.55
1.1 94 0 726.6
1.11 94 0 726.65
1.12 94 0 726.69
1.13 94 0 726.74
1.14 94 0 726.78
1.15 94 0 726.83
1.16 94 0 726.88
1.17 94 0 726.92
1.18 94 0 726.97
1.19 94 0 727.02
1.2 94 0 727.06
1.21 94 0 727.11
1.22 94 0 727.15
1.23 94 0 727.2
1.24 94 0 727.25
1.25 94 0 727.29
1.26 94 0 727.34
1.27 94 0 727.38
1.28 94 0 727.43
1.29 94 0 727.48
1.3 94 0 727.52
1.31 94 0 727.57
1.32 94 0 727.61
1.33 94 0 727.66
1.34 94 0 727.7
1.35 94 0 727.75
1.36 94 0 727.8
1.37 94 0 727.84
1.38 94 0 727.89
1.39 94 0 727.93
1.4 94 0 727.98
1.41 94 0 728.02
1.42 94 0 728.07
1.43 94 0 728.11
1.44 94 0 728.16
1.45 94 0 728.21
1.46 94 0 728.25
1.47 94 0 728.3
1.48 94 0 728.34
1.49 94 0 728.39
1.5 94 0 728.43

But the error still occurs in the same way:

Fatal bounds error detected
---------------------------
Variable: Density Derivative wrt Pressure at Constant Temperature
Locale : R1

I think the "density derivative wrt P at constant T" is d(density)/dP at constant T, and it is used to calculate the total differential of d(x+dx,y+dy), x=pressure, y=temperature.

Similarly, the d(density)/dT at constant P is also needed, that is why we should import these data for FLUENT User-Defined Real Gas Model.

I also read the post named "Bounds error for an EOS specified via an interpolation table" in CFD online.

http://www.cfd-online.com/Forums/cfx...ion-table.html

The poster met the same problem, but he just reordered the table so that pressure varies first then temperature in the table. The problem was solved.

I tried but failed.

Part of the CFX Command Language for Run is as follows:

LIBRARY:
CEL:
EXPRESSIONS:
liquidcp = lcp(T,pabs,0)
liquidk = lk(T,pabs,0)
liquidrou = lrou(pabs,T,0)
liquidvis = lvis(T,pabs,0)
mfr = massFlow()@V1 Inlet + massFlow()@e1 outlet + massFlow()@G2 outlet
sat = sattable(T)
ten = tentable(T)
vaporcp = vcp(T,pabs,0)
vapork = vk(T,pabs,0)
vaporrou = vrou(pabs,T,0)
vaporvis = vvis(T,pabs,0)
END

FUNCTION: lrou
Argument Units = MPa,K,[]
Option = Interpolation
Result Units = kg m^-3
INTERPOLATION DATA:
Data = \
0.51,94,0,723.81,0.52,94,0,723.86,0.53,94,0,723.91 ,0.54,94,0,723.96\
,0.55,94,0,724.01,0.56,94,0,724.05,0.57,94,0,724.1 ,0.58,94,0,724.15\
,0.59,94,0,724.2,0.6,94,0,724.25,0.61,94,0,724.29, 0.62,94,0,724.34,\
0.63,94,0,724.39,0.64,94,0,724.44,0.65,94,0,724.48 ,0.66,94,0,724.53\
,0.67,94,0,724.58,0.68,94,0,724.63,0.69,94,0,724.6 7,0.7,94,0,724.72\
,0.71,94,0,724.77,0.72,94,0,724.82,0.73,94,0,724.8 6,0.74,94,0,724.9\
1,0.75,94,0,724.96,0.76,94,0,725.01,0.77,94,0,725. 05,0.78,94,0,725.\
1,0.79,94,0,725.15,0.8,94,0,725.2,0.81,94,0,725.24 ,0.82,94,0,725.29\
,0.83,94,0,725.34,0.84,94,0,725.38,0.85,94,0,725.4 3,0.86,94,0,725.4\
8,0.87,94,0,725.53,0.88,94,0,725.57,0.89,94,0,725. 62,0.9,94,0,725.6\
7,0.91,94,0,725.71,0.92,94,0,725.76,0.93,94,0,725. 81,0.94,94,0,725.\
85,0.95,94,0,725.9,0.96,94,0,725.95,0.97,94,0,725. 99,0.98,94,0,726.\
04,0.99,94,0,726.09,1,94,0,726.13,1.01,94,0,726.18 ,1.02,94,0,726.23\
,1.03,94,0,726.27,1.04,94,0,726.32,1.05,94,0,726.3 7,1.06,94,0,726.4\
1,1.07,94,0,726.46,1.08,94,0,726.51,1.09,94,0,726. 55,1.1,94,0,726.6\
,1.11,94,0,726.65,1.12,94,0,726.69,1.13,94,0,726.7 4,1.14,94,0,726.7\
8,1.15,94,0,726.83,1.16,94,0,726.88,1.17,94,0,726. 92,1.18,94,0,726.\
97,1.19,94,0,727.02,1.2,94,0,727.06,1.21,94,0,727. 11,1.22,94,0,727.\
15,1.23,94,0,727.2,1.24,94,0,727.25,1.25,94,0,727. 29,1.26,94,0,727.\
34,1.27,94,0,727.38,1.28,94,0,727.43,1.29,94,0,727 .48,1.3,94,0,727.\
52,1.31,94,0,727.57,1.32,94,0,727.61,1.33,94,0,727 .66,1.34,94,0,727\
.7,1.35,94,0,727.75,1.36,94,0,727.8,1.37,94,0,727. 84,1.38,94,0,727.\
89,1.39,94,0,727.93,1.4,94,0,727.98,1.41,94,0,728. 02,1.42,94,0,728.\
07,1.43,94,0,728.11,1.44,94,0,728.16,1.45,94,0,728 .21,1.46,94,0,728\
.25,1.47,94,0,728.3,1.48,94,0,728.34,1.49,94,0,728 .39,1.5,94,0,728.\
43
Option = Three Dimensional
END
END
MATERIAL: LN2
Material Group = User
Option = Pure Substance
Thermodynamic State = Liquid
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = liquidrou
Molar Mass = 28.013 [g mol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = liquidcp
Specific Heat Type = Constant Pressure
END
REFERENCE STATE:
Option = Specified Point
Reference Pressure = 1 [MPa]
Reference Specific Enthalpy = -86164 [J kg^-1]
Reference Specific Entropy = 3239.4 [J kg^-1 K^-1]
Reference Temperature = 94.2 [K]
END
TABLE GENERATION:
Error Tolerance = 0.01
Maximum Absolute Pressure = 1.8 [MPa]
Maximum Temperature = 105 [K]
Minimum Absolute Pressure = 0.1 [MPa]
Minimum Temperature = 85 [K]
Pressure Extrapolation = On
Temperature Extrapolation = Yes
END
DYNAMIC VISCOSITY:
Dynamic Viscosity = liquidvis
Option = Value
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = liquidk
END
THERMAL EXPANSIVITY:
Option = Value
Thermal Expansivity = 0.0076741 [K^-1]
END
END
END
MATERIAL: VN2
Material Group = User
Option = Pure Substance
Thermodynamic State = Gas
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = vaporrou
Molar Mass = 28.013 [g mol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = vaporcp
Specific Heat Type = Constant Pressure
END
REFERENCE STATE:
Option = Specified Point
Reference Pressure = 0.50808 [MPa]
Reference Specific Enthalpy = 86588 [J kg^-1]
Reference Specific Entropy = 5080.5 [J kg^-1 K^-1]
Reference Temperature = 94.2 [K]
END
TABLE GENERATION:
Error Tolerance = 0.01
Maximum Absolute Pressure = 1.8 [MPa]
Maximum Temperature = 105 [K]
Minimum Absolute Pressure = 0.1 [MPa]
Minimum Temperature = 85 [K]
Pressure Extrapolation = On
Temperature Extrapolation = Yes
END
DYNAMIC VISCOSITY:
Dynamic Viscosity = vaporvis
Option = Value
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = vapork
END
THERMAL EXPANSIVITY:
Option = Value
Thermal Expansivity = 0.0164 [K^-1]
END
END
END
END

Thanks for any help.
eis is offline   Reply With Quote

Old   October 29, 2013, 02:03
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You appear to have defined your function only at a single temperature. Doesn't this make the derivative WRT temperature undefined? So I would add a second temperature to the table and then the derivatives are defined.
ghorrocks is offline   Reply With Quote

Old   October 29, 2013, 02:50
Default
  #5
eis
New Member
 
Join Date: Nov 2009
Posts: 6
Rep Power: 16
eis is on a distinguished road
In order to test whether the data is suitable for the calculation, i defined the function only at a single temperature for simplification at this time.

In the past simulation, the density function is defined as follows in the range of 90-100K,0.3-1.5MPa:

90K, 0.3MPa, density
90K, 0.35MPa,density
...
90K, 1.5MPa,density

90.5K,0.3MPa,density
90.5K,0.35MPa,density
...

100K,0.3MPa,density
...
100K,1.5MPa,density

Obviously, some vapor data points were taken out from the table to guarantee all the data points were in the liquid region.

In addition, i just tried to add a second temperature to the table, but it doesn't work.

The attachment is my ccl in the calculation, could you please help me to check the definition.

Thanks a lot for your help!



Quote:
Originally Posted by ghorrocks View Post
You appear to have defined your function only at a single temperature. Doesn't this make the derivative WRT temperature undefined? So I would add a second temperature to the table and then the derivatives are defined.
Attached Files
File Type: txt LN2.txt (5.8 KB, 8 views)
eis is offline   Reply With Quote

Old   October 29, 2013, 06:00
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Two suggestions:
1) Your table limits are 0.1-1.8MPa, but your expression is only defined for 0.5-1.5MPa. You have turned on the extrapolation option. So it is going to be extrapolating to your top and bottom limits, and that could easily go bezerk. I would make your table limits inside your table of values to stop extrapolation.
2) If that does not work I would simplify this further and make density a linear function of pressure. If that does not work then just use constant properties. Keep simplifying until it works. Once you have something which works add the complexity one little bit at a time. Then you know exactly what the problems are.
ghorrocks is offline   Reply With Quote

Old   October 29, 2013, 11:27
Default
  #7
eis
New Member
 
Join Date: Nov 2009
Posts: 6
Rep Power: 16
eis is on a distinguished road
ghorrocks,thanks a lot for your suggestions.

I tried to make the table limits inside the table values to stop extrapolation, but the error still occurs.

In the past, i just made the density a linear function of pressure or temperature for simplification, and these all worked well. Moreover, i also defined the cp,thermal conductivity and viscosity as the function of P & T, but only the density defined as a linear function of P or T. That is also feasible. The error occurs when the density is defined as function of P or T.

I was so cofused about this.

Thanks again for your kind help.


Quote:
Originally Posted by ghorrocks View Post
Two suggestions:
1) Your table limits are 0.1-1.8MPa, but your expression is only defined for 0.5-1.5MPa. You have turned on the extrapolation option. So it is going to be extrapolating to your top and bottom limits, and that could easily go bezerk. I would make your table limits inside your table of values to stop extrapolation.
2) If that does not work I would simplify this further and make density a linear function of pressure. If that does not work then just use constant properties. Keep simplifying until it works. Once you have something which works add the complexity one little bit at a time. Then you know exactly what the problems are.
eis is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Center Air conditioning Boundary Condition problem jaypatel OpenFOAM 9 April 8, 2020 16:04
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Air entrainment Problem Jing_min FLOW-3D 1 September 11, 2012 11:24
A problem about density in liquid air definition alloveyou CFX 2 June 14, 2012 15:20
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 21:40.