Expression in cfx
Hi I have a problem with expression
I want to define a variable that depends on temprature Q=6.11549e6*(1+4.8297E3*(T/1[C])+1.663E6*((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 
Re: Expression in cfx
Do you have any errors in CFXpre? Have you tried to evaluate or to plot your expression in CFXPre?
Claudia 
Re: Expression in cfx
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 
Re: Expression in cfx
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 
Re: Expression in cfx

Re: Expression in cfx
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 
Re: Expression in cfx
The expression I entered is for T in Celsius. I also tried to write as for T273 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+1E3*T+2*T^2 as an expression since dimensions dont match Thanks Selim 
Re: Expression in cfx
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 
Re: Expression in cfx
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.11549E06 * (1 + 4.8297E03*(T/Tnd) + 1.663E06*(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 
Re: Expression in cfx
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? 
Re: Expression in cfx
Hi,
If/then/else can be created out of step functions. Clunky but it does work. Glenn Horrocks 
Re: Expression in cfx
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

Re: Expression in cfx
Hey,
you are cheating cfx 
Re: Expression in cfx
Not to mention this is coming in 12.0, finally.....

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