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

density, viscosity expressions CFX

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

Like Tree1Likes
  • 1 Post By Jan Smedseng

Reply
 
LinkBack Thread Tools Display Modes
Old   July 23, 2013, 13:25
Exclamation density, viscosity expressions CFX
  #1
Member
 
Karthick Selvam
Join Date: Oct 2012
Location: Germany
Posts: 48
Rep Power: 4
selvam2487 is on a distinguished road
Send a message via Skype™ to selvam2487
Hello Friends,

I wanted to give expressions for temperature dependent fluid properties (density, viscosity etc.) for T junction flows in CFX. I fitted the trendline and got polynomial equations for each fluid property as function of temperature in Excel. But when I substituted those equations in CFX and tried seeing the plot, it is completely wrong from what is shown in my excel sheet. I could not understand how this happens. I am attaching the excel sheet along with this post. Kindly guide me as to what is happening/ what is the mistake I am doing?

Thanks in advance.

Regards,
Karthick
Attached Files
File Type: xlsx Temperature dependent properties for CFX (1).xlsx (16.4 KB, 69 views)
selvam2487 is offline   Reply With Quote

Old   July 23, 2013, 16:58
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,824
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
And what do you get in CFX?

Are you sure you have CFX using the correct units?
ghorrocks is offline   Reply With Quote

Old   July 23, 2013, 18:22
Default
  #3
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 486
Rep Power: 9
evcelica is on a distinguished road
You are obviously not using enough decimals. format trendline and pick the equation and format it as text. you will get much more digits.
evcelica is offline   Reply With Quote

Old   July 25, 2013, 08:45
Default expressions in cfx
  #4
Member
 
Karthick Selvam
Join Date: Oct 2012
Location: Germany
Posts: 48
Rep Power: 4
selvam2487 is on a distinguished road
Send a message via Skype™ to selvam2487
Dear Glenn,

I tried again using the modified expressions in cfx. But it is not working. I am attaching a picture which shows the polynomial equations obtained from excel and implementing it in cfx. The results are drastically different. Visocsity becomes negative if I implement it in CFX. I don't understand how it works. Please give me suggestions as to what I am doing wrong.
Attached Images
File Type: jpg expressions.jpg (27.4 KB, 74 views)

Last edited by selvam2487; July 25, 2013 at 08:55. Reason: attaching picture
selvam2487 is offline   Reply With Quote

Old   July 25, 2013, 11:54
Default
  #5
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 10
singer1812 is on a distinguished road
I think something is wrong with your trendline eqn. Type that exact equation in a cell with the temp cells as the input.

I bet it doesnt match your actual data.
singer1812 is offline   Reply With Quote

Old   July 25, 2013, 13:49
Default
  #6
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 486
Rep Power: 9
evcelica is on a distinguished road
Wasn't I clear enough the first time?

YOU NEED TO USE MORE THAN 1 DIGIT when you use higher order polynomials:

Use This function for viscosity:
5.41924E-12x4 - 8.34074E-09x3 + 4.82854E-06x2 - 0.001248669x + 0.122192878
Not this:
5E-12x4 - 8E-09x3 + 5E-06x2 - 0.0012x + 0.1222

Use this for density:
5.36279E-06x3 - 0.008336901x2 + 3.261356376x + 624.9598808
evcelica is offline   Reply With Quote

Old   July 26, 2013, 12:12
Thumbs up Importing MS Excel data in ANSYS CFX
  #7
New Member
 
Jan Smedseng
Join Date: Jul 2013
Posts: 8
Rep Power: 4
Jan Smedseng is on a distinguished road
Hi.

I try to give you another solution.

If you have an array of values in MS Excel, you should save them in a CSV File (comma separated values).
The values of the columns are separated by a comma - values of different rows are separated by the line number.

You can import such a file in ANSYS CFX by defining a user function. Its not so complicated: CFX Pre >> "Expressions, Functions and Variables" >> "User Functions" *right click* "Insert" >> "User Function".

Now you have to define the units of the argument and the returned value of this function. If you want to calculate the density depending on temperature, the argument units are C or K (in CFX [C] or[K]).
The result units are kg/m (in CFX [kg/m^3]).

Now keep on with a right click in the large listbox and choose "import data".

Select the CSV File (just selecting, no double click), you exported in MS Excel (you have to change the selection filter to |all files *.*|).

In column selection you have to specify the column number of the argument- and result values. Now, click Ok!

In an expression, you can use the return value of this function by typing the name of the user function followed by brackets with the variablename of the depending value:

Expression_Density = User Function1(T)

In this example, the Function you defined is called "User Function1".
T is the short name of the temperature in CFX.

There are two disadvantages: You have no access to this data in CFD Post and you have no continuous function.
But the advantage is, that you got clipped, linear interpolated values of the function. A polynom of an high order may fit the values of the function inside the domain of its definition quite well. Exceeding this range, the polynom runs to large (pos/neg) values.

You also need to use much more positionis after devision in the coeffficient, when you multiply it with x^12 .

Regards,
Jan


----------------------------
Jan Smedseng
CFX Berlin Software GmbH
roman.gaspar likes this.
Jan Smedseng is offline   Reply With Quote

Reply

Tags
les, t junction

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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Variable values in CFX expressions saisanthoshm88 CFX 4 July 2, 2013 08:04
modelling solids viscosity in eulerian multiphase model derkaiser FLUENT 1 December 5, 2011 04:42
Variable density and viscosity ravibhadauria FLUENT 0 September 15, 2011 17:09
CFX 4.4 installation problem Pandu Sattvika CFX 1 December 1, 2001 05:07


All times are GMT -4. The time now is 09:35.