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

Expression in cfx

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 30, 2007, 06:23
Default Expression in cfx
  #1
selim
Guest
 
Posts: n/a
Hi I have a problem with expression

I want to define a variable that depends on temprature

Q=6.11549e-6*(1+4.8297E-3*(T/1[C])+1.663E-6*((T)/1[C])^2)

What I calculate for a tempr. of 1000C is totally different what CFX Evalute option gives

What is wrong? I want to get a dimensionless expression in CFX that is why I use (T)/1[C] in the expression. But I am not sure about that.Probably error comes from that

Any help,suggestions

Thanks a lot

Selim

  Reply With Quote

Old   August 30, 2007, 07:07
Default Re: Expression in cfx
  #2
Claudia
Guest
 
Posts: n/a
Do you have any errors in CFX-pre? Have you tried to evaluate or to plot your expression in CFX-Pre?

Claudia
  Reply With Quote

Old   August 30, 2007, 07:12
Default Re: Expression in cfx
  #3
selim
Guest
 
Posts: n/a
Hi, I can plot it but what I obtain for example is different for 27 C and for 300 K

I think there is a problem with 1T/{K] with non dimensionalizing

I dont know how can do that properly?

Thanks in advance, selim
  Reply With Quote

Old   August 30, 2007, 07:17
Default Re: Expression in cfx
  #4
Claudia
Guest
 
Posts: n/a
I tried it and you are right. The result is not the same. Then I changed 1[C] into 1[K] and calculated the expression with T=1000 K. Then the CFX result and my result is almost the same.

Claudia
  Reply With Quote

Old   August 30, 2007, 08:28
Default Re: Expression in cfx
  #5
selim
Guest
 
Posts: n/a
Hi

My e-mail: fthsel@yahoo.com :)

  Reply With Quote

Old   August 30, 2007, 10:11
Default Re: Expression in cfx
  #6
opaque
Guest
 
Posts: n/a
Dear Selim,

Would you mind explaining why are you using 1 [C] instead of 1[K]?.. They are complete different things..

The ANSYS CFX solver uses absolute temperature for T, that is either [K] or [R]

Thanks, Opaque

  Reply With Quote

Old   August 30, 2007, 10:30
Default Re: Expression in cfx
  #7
selim
Guest
 
Posts: n/a
The expression I entered is for T in Celsius. I also tried to write as for T-273 and non dimensionalized with K ,but doesnt work

My question is simply? How can I write an expression that has a polynomial type dependence on Temprature? I cannot write simply : Q=1+1E-3*T+2*T^2 as an expression since dimensions dont match

Thanks Selim

  Reply With Quote

Old   August 30, 2007, 15:01
Default Re: Expression in cfx
  #8
opaque
Guest
 
Posts: n/a
Dear Selim,

A polynomial expression with dimensional quantities cannot have dimensionless coefficients. Therefore, you are missing the units for your coefficients:

Also, you must keep in mind that you cannot divide a temperature in empirical units by another temperature and expect any physical consistency (due to the offset). You can divide temperature differences by temperature differences and you will be OK.

If your input temperature is in C or F, you must convert them to K or R and continue from there. It is very important to know what kind of temperature dimensions are used in a denominator, either temperature values, or temperature differences.

Opaque
  Reply With Quote

Old   August 30, 2007, 15:12
Default Re: Expression in cfx
  #9
Brendan
Guest
 
Posts: n/a
I assume your pulling info from the simulation like follows?

T = areaAve(Total Temperature in Stn Frame)@location1

In that case the default units will be Kelvin (i.e. CFX will be using Kelvin).

So for your eqn, I would define another expression:

Tnd = 1 [k]

where [k] is defining the unit as you tried inside the equation.

Then I'd write the eqn as:

Q = 6.11549E-06 * (1 + 4.8297E-03*(T/Tnd) + 1.663E-06*(T^2/Tnd^2)

With CFX using degrees Kelvin, you will get the wrong answer if you derived your equation from a degrees celsius trendline (or similar).

Hope this helps
  Reply With Quote

Old   August 30, 2007, 15:14
Default Re: Expression in cfx
  #10
Brendan
Guest
 
Posts: n/a
As an add on to the thread...

Does anyone know if it is possible to use logical (if/for/elseif etc) statements in expressions, if so, what is the syntax?
  Reply With Quote

Old   August 30, 2007, 18:44
Default Re: Expression in cfx
  #11
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

If/then/else can be created out of step functions. Clunky but it does work.

Glenn Horrocks
  Reply With Quote

Old   September 4, 2007, 09:41
Default Re: Expression in cfx
  #12
KB
Guest
 
Posts: n/a
What result do you expect for the expression 0[C]/1[C]? It's not zero, as you might expect, since CFX internally converts it into [K], i.e. 0[C]/1[C] = 273.15[K]/274.15[K] = 0.996352

  Reply With Quote

Old   September 4, 2007, 09:46
Default Re: Expression in cfx
  #13
selim
Guest
 
Posts: n/a
Hey,

you are cheating cfx
  Reply With Quote

Old   September 5, 2007, 13:09
Default Re: Expression in cfx
  #14
HekLer
Guest
 
Posts: n/a
Not to mention this is coming in 12.0, finally.....
  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
Evaluate expression in CFX pro Sara CFX 0 January 7, 2009 13:34
Relief Plots in CFX Michael CFX 15 June 30, 2006 08:01
CFX Expression Statement Ivan CFX 3 June 5, 2006 11:42
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 02:12.