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

CFX Expression Language help

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

Like Tree1Likes
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Display Modes
Old   April 20, 2013, 08:43
Question CFX Expression Language help
  #1
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 312
Rep Power: 7
JuPa is on a distinguished road
Hi,

There is a well known condensation heat transfer coefficient formulated by Nusselt (you might be familiar with it):

\alpha = 0.5 \frac{\lambda_{L}}{D} \left[ \frac{g \rho_{L} \left(\rho_{L} - \rho_{G} \right) h_{FG} D^{3}}{\mu_{L}\lambda_{L}\left(T_{Steam}-T_{Wall}\right)}\right]^{0.25}

The subscripts L and G denote the liquid and gas phases, and the following symbols have their meanings:

\alpha is the heat transfer coefficient.
\lambda is the thermal conductivity.
g is the gravitational constant.
\rho is the density.
h_{FG} is the enthalpy of vaporisation from liquid to gas phases.
D is the characteristic dimension.
\mu is the viscosity.
T_{Steam} is the steam temperature.
T_{Wall} is the wall temperature.

Now inputting this into CFX at a boundary is dead easy in principle. You just enter it in at a boundary as a heat transfer coefficient (as a CEL expression) and select the steam temperature as the outside temperature.

However the problem I am having is the symbols are functions of the steam temperature.

Let's say for one simulation my steam temperature T_{Steam} is 400K. Then my density at the liquid phase is 937 kg/m^3 and at the gas phase is 1.37 kg/m^3.

Now I can enter each value for each property myself (density, viscosity, thermal conductivity etc) for my steam temperature of 400K. However I don't want to do this if I change my steam value from 400K to 500K 600K etc.

In CFX Expression Language, is there a way of telling CFX that I want viscosity, density etc as a function of some temperature that I specify?

I've read the CFX Reference Guide on CEL (CFX Expression Language) and it isn't very clear how this can be achieved.

Thank you for your help!
JuPa is offline   Reply With Quote

Old   April 20, 2013, 09:45
Default
  #2
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 475
Rep Power: 12
oj.bulmer will become famous soon enough
Unless am missing something, it's pretty easy.

1) Create expression for temperature, say FluidTemp.
2) Create expressions for density and a viscosity as a function of temperature, say FluidDensity=f(FluidTemp)
3) In the definition of your materials, use "expressions" to specify density and viscosity instead of the actual value with units.
4) Create Workbench parameter for FluidTemp

Once you change the value from say 400K to 800K, the density and viscosity values, since they are parameterised, should change according to your function.

OJ
oj.bulmer is offline   Reply With Quote

Old   April 20, 2013, 12:07
Default
  #3
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 312
Rep Power: 7
JuPa is on a distinguished road
OJ, I am using IAPWS water so the thermophysical properties are a function of temperature and pressure.

What I am referring to in my original post is making the thermophysical properties in the heat transfer coefficient a function of some known temperature.
JuPa is offline   Reply With Quote

Old   April 21, 2013, 07:46
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,570
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
You will have to define a function for this. It could be a CEL expression or 1D interpolation function or user fortran.

For the CEL expression you could put the IAPWS equations (simplified a bit as they are the full equations aer iterative if I remember correctly) or a simplified approximation.

For a 1D interpolation function you could just map out the property against temperature and use that as a 1D interpolation function.

For a user fortran routine you could use the full IAPWS equations in their full iterative glory, but of course you will have to code it.
wwjshirley likes this.
ghorrocks is offline   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
Problem About Running Fluent In Linux mitra FLUENT 14 February 16, 2016 13:07
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
Importing solutions in CFX. Alphonso CFX 1 August 1, 2008 14:01
cfx expression variables Manoj Kumar CFX 2 February 16, 2006 11:03
CFX 4.4 installation problem Pandu Sattvika CFX 1 December 1, 2001 05:07


All times are GMT -4. The time now is 20:17.