|
[Sponsors] |
![]() |
![]() |
#1 |
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 |
|
![]() |
![]() |
![]() |
#2 |
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 |
|
![]() |
![]() |
![]() |
#3 |
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 |
|
![]() |
![]() |
![]() |
#4 |
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 |
|
![]() |
![]() |
![]() |
#5 |
Guest
Posts: n/a
|
||
![]() |
![]() |
![]() |
#6 |
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 |
|
![]() |
![]() |
![]() |
#7 |
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 |
|
![]() |
![]() |
![]() |
#8 |
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 |
|
![]() |
![]() |
![]() |
#9 |
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 |
|
![]() |
![]() |
![]() |
#10 |
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? |
|
![]() |
![]() |
![]() |
#11 |
Guest
Posts: n/a
|
Hi,
If/then/else can be created out of step functions. Clunky but it does work. Glenn Horrocks |
|
![]() |
![]() |
![]() |
#12 |
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
|
|
![]() |
![]() |
![]() |
#13 |
Guest
Posts: n/a
|
Hey,
you are cheating cfx |
|
![]() |
![]() |
![]() |
#14 |
Guest
Posts: n/a
|
Not to mention this is coming in 12.0, finally.....
|
|
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Evaluate expression in CFX pro | Sara | CFX | 0 | January 7, 2009 12: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 10:03 |
CFX 4.4 installation problem | Pandu Sattvika | CFX | 1 | December 1, 2001 04:07 |