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

Density as a function of Pressure

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 7, 2008, 16:03
Default Density as a function of Pressure
  #1
asder
Guest
 
Posts: n/a
Can anyone have a sample of a CEL function which defines liquid density as a function of pressure for compressible simulation.

Thanks in advance.
  Reply With Quote

Old   April 7, 2008, 18:20
Default Re: Density as a function of Pressure
  #2
cfd novice
Guest
 
Posts: n/a
Interesting! Please do let know if you find an answer for it. I need to use a similar function. Thanks
  Reply With Quote

Old   April 7, 2008, 20:33
Default Re: Density as a function of Pressure
  #3
Rogerio Fernandes Brito
Guest
 
Posts: n/a
Maybe you will find something at www.sciencedirect.com
  Reply With Quote

Old   April 7, 2008, 20:37
Default Re: Density as a function of Pressure
  #4
Rogerio Fernandes Brito
Guest
 
Posts: n/a
Setting Temperature Dependent Material Properties This section demonstrates how to set fluid properties that can vary with a variable. In this case, an expression is used to describe the dependence of viscosity on temperature. The properties of Water at 25 C are then modified to use this viscosity relationship. To create an expression for temperature dependent viscosity The first step is to create an expression for dynamic viscosity as a linear function of fluid temperature. You will use this expression to modify the properties of water so that its viscosity depends on temperature. The dependency is defined by, • at T=275.0 K, m=1.8E-03 N s m-2, • at T=325.0 K, m=5.45E-04 N s m-2,

and is assumed to vary linearly over this range. 1. From the Main menu select Tools > Expression Editor. • This lets you define, modify, evaluate and plot expressions for use within CFX-Pre. 2. Select the New icon to create a new expression: 3. In the Name databox, type Tupper and click OK. 4. In the Definition databox, enter 325.0 [K] and click Apply to create the expression. The expression is added to the list of existing expressions. Continue to create four more expressions using the same method: 5. Name as Tlower with Definition as 275.0 [K]. 6. Name as Visupper with Definition as 5.45E-04 [N s m^-2]. 7. Name as Vislower with Definition as 1.8E-03 [N s m^-2].

8. Name as VisT with Definition as: Vislower+(Visupper-Vislower)*(T-Tlower)/ (Tupper-Tlower)

The variable T (Temperature) is a CFX-5 System Variable recognised by CFX-Pre, denoting Static (thermodynamic) Temperature. All system variables, constants and functions can be viewed by right-clicking in the Definition window when entering an expression (you would have to edit an existing expression or create a new expression to see this). The expressions entered here must maintain consistency of units. The result of the VisT expression must yield units which are suitable for the quantity it will set, in this case viscosity. The dimensional result of the VisT expression gives units consistent with those of dynamic viscosity. You should be careful if using temperature in an expression with units other than [K]. See Use of Offset Temperature (p. 26 in CFX-5 Reference Guide) for details.

  Reply With Quote

Old   April 8, 2008, 10:23
Default Re: Density as a function of Pressure
  #5
cfd novice
Guest
 
Posts: n/a
Thats great! Thank you so much Rogerio.
  Reply With Quote

Old   April 9, 2008, 05:28
Default Re: Density as a function of Pressure
  #6
asder
Guest
 
Posts: n/a
Thanks Rogerio for your answer. It helps a lot.

After setting variable density, dependent on pressure, for a constant property liquid (eg. water), while the CFX-Solver iterates, I am getting the message that pressure and temperature went outside of the region while calculating Enthalpy and Entropy. After a few iterations, then the CFX-Solver crashes with the same error. Pressure at the inlet is 200 bar for my case and temperature should remain constant around 25C. Do you know any way to prevent this kind of error?
  Reply With Quote

Old   April 9, 2008, 10:29
Default Re: Density as a function of Pressure
  #7
Leonid Fromzel
Guest
 
Posts: n/a
It seems to me that if you want to set variable density dependent on pressure you shouldn't use a constant property liquid. Use instead "user" material.
  Reply With Quote

Old   April 9, 2008, 11:54
Default Re: Density as a function of Pressure
  #8
andy2O
Guest
 
Posts: n/a
Do the various ideas and suggestions in this thread help at all? In this case the problem was with variable Cp, but the same thing can occur with density too:

http://www.cfd-online.com/Forum/cfx.cgi?read=26023

Note the following posts too - not just the one I've linked to. The max and min temperatures mentioned in the post http://www.cfd-online.com/Forum/cfx.cgi?read=26027 might be worth a try.

It might be worth a read... but no promises!

Regards, Andy
  Reply With Quote

Old   April 10, 2008, 19:14
Default Re: Density as a function of Pressure
  #9
asder
Guest
 
Posts: n/a
Thank you all. I got the solution going on.
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
error using combination of step function xujjun CFX 1 January 15, 2008 17:46
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19


All times are GMT -4. The time now is 16:32.