
[Sponsors] 
July 23, 2013, 13:25 
density, viscosity expressions CFX

#1 
Member

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 

July 23, 2013, 16:58 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,534
Rep Power: 97 
And what do you get in CFX?
Are you sure you have CFX using the correct units? 

July 23, 2013, 18:22 

#3 
Senior Member
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 553
Rep Power: 11 
You are obviously not using enough decimals. format trendline and pick the equation and format it as text. you will get much more digits.


July 25, 2013, 08:45 
expressions in cfx

#4 
Member

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. Last edited by selvam2487; July 25, 2013 at 08:55. Reason: attaching picture 

July 25, 2013, 11:54 

#5 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 12 
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. 

July 25, 2013, 13:49 

#6 
Senior Member
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 553
Rep Power: 11 
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.41924E12x4  8.34074E09x3 + 4.82854E06x2  0.001248669x + 0.122192878 Not this: 5E12x4  8E09x3 + 5E06x2  0.0012x + 0.1222 Use this for density: 5.36279E06x3  0.008336901x2 + 3.261356376x + 624.9598808 

July 26, 2013, 12:12 
Importing MS Excel data in ANSYS CFX

#7 
Member
Jan
Join Date: Jul 2013
Location: Berlin  Germany
Posts: 35
Rep Power: 5 
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 

Tags 
les, t junction 
Thread Tools  
Display Modes  


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 