CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Confusing units in CFD-Post (https://www.cfd-online.com/Forums/cfx/156244-confusing-units-cfd-post.html)

Jonathan July 6, 2015 08:53

Confusing units in CFD-Post
 
Dear All,

I wonder if someone can clear this up for me: I find the units in CFD-Post confusing, particularly wrt flow angles etc:

For instance:

1) You seem to be able to 'set' the units for the various flow angles (imported Fluent quantities as well as native / calculated CFD-Post quantities) in the Variables tab. This would lead me to assume that whatever unit you choose in the Variables tab (i.e. radians or degrees), is what is used throughout the remainder of the software.

2) However, if i define a custom variable, say alpha, using Velocity in Stn Frame Flow Angle (set in degrees) in the Variables tab, as

Code:

alpha = 90 - Velocity in Stn Frame Flow Angle
in the Expressions tab, i will still end up CFD-Post telling me my Expression alpha is defined in radians in the Details panel for that Expression.

Further, if i take say:

Code:

Velocity Angle
defined in Variables as radians, and i do something like:

Code:

aveangle = massFlowAve(Velocity Angle)@X3
in the Details tab for that expression, i will end up with it being defined as degrees ...

3) There is also a Set units pane in the Options / Preferences menu, but i'm not sure how this affects everything else.

4) Finally, do the trig functions in CFD-Post want the angles defined as radians or degrees ...


THen despite everything, it seems that contours etc are always display as DEGREES, so i actually have no idea how CFD-Post imports / works with variables, especially flow angles ... so despite whatever units your variables are set / defined as, it will display them as Degrees.

This is all very confusing, and since i am working with secondary flows in turbines, getting the flow angles in the various reference frames correct is very important.

Any help from CFX gurus would be much appreciated - many thanks
Cheers
Jonathan

PS I am importing my solutions from Fluent data files, if that makes any difference. Jon

Jonathan July 6, 2015 10:24

ok, so after some reading i have some additional clarity, but not totally solved! :)

So for the benefit of anybody else reading:

1) If importing solutions from any non-CFX solver source, use:

Code:

Edit -> Options -> Solution units ... to set the units of the data quantities which come from your solver. CFX includes the type of unit in its data files automatically, and these are automatically read in by CFD-Post
2) You can set your preferred CFD-Post Display units which will then cause CFD-Post to convert from the units above to the Preferred display units listed in the following tab:

Code:

Edit -> Options -> Common -> Units
(Perhaps they could have indicated these were the preferred display units to make it more obvious!)

3) If you check the following checkbox:

Code:

Always convert units to Preferred Units
CFD-Post will convert any quantities you input in Expressions etc to the Preferred Display Units in 2) above:

i.e.

Code:

3.1415 [rad] - Velocity Flow Angle
If you have specified your Preferred display units to Degrees, in the expression above, 3.1415 [rad] will be converted to 180[deg] as the expression is being calculated (at least this is how i read the explanation in the User Guide). Gurus please correct me if i'm wrong! :)

I am still a little confused by the following:

1) If i set the correct solution file units, and then specified my preferred display units in the Options tabs, when i am defining a custom Expression, ie. alpha like so:

Code:

alpha = 90 [deg] - Velocity in Stn Frame Flow Angle
the Details pane still indicates the value of this expression is in [rads] even though Velocity in Stn Frame Flow Angle is a CFX/CFD_Post variable and is set to [degree] in the Preferred Display Units tab as discussed above ... ????

Confusing! Does anyone understand this?

2) Finally, can anyone tell me which angular units i should use for the trig functions (degrees or radians) or do you think this is consistent with the set Preferred Display Units as above?

Many thanks and kind regards in advance,
cheers
jonathan

Opaque July 6, 2015 11:39

Not sure about the confusion. The documentation is very clear stating the units used for every built-in mathematical function in CEL (see CFX Reference Guide/Functions in ANSYS CFX/CEL Mathematical Functions - Table 15.1)

In any case, since you are doing trial and error, I would create an expression (not a variable), and input (for example) sin(30 [deg]) and evaluate to see the output. Try again by input sin( pi [rad] / 6) and compare.

My initial test indicates the input is irrelevant since CFD-Post will convert it to [rad], evaluate and display. Your mileage may vary though.

Hope the above helps,

Jonathan July 6, 2015 14:07

Hi, thanks for your reply, however, i am still confused by this ...


Quote:

1) If i set the correct solution file units, and then specified my preferred display units in the Options tabs, when i am defining a custom Expression, ie. alpha like so:

Code:

    alpha = 90 [deg] - Velocity in Stn Frame Flow Angle
the Details pane still indicates the value of this expression is in [rads] even though Velocity in Stn Frame Flow Angle is a CFX/CFD_Post variable and is set to [degree] in the Preferred Display Units tab as discussed above ...
which i think is a valid question.

Why does it evaluate to [radians] when preferred units are specified as [degrees]. This seems counter what even the CFD-Post manual seems to suggest about how it works.

This tends to make me unsure as to whether my interpretation as posted above is correct, hence the question on the expert CFX user forum for clarification ...

best regards
Jon

navi August 31, 2016 02:15

i think similar doubt i have,,

how ansys will take if i give just sin((omega*t)-90)
90 degree is for phase difference (and omega is in rad/sec)

my question that 90 what it will consider as degree or radian, which i should give in degree or radian to get phase difference 90degree

Opaque August 31, 2016 11:27

The expression you are proposing is syntactically incorrect. Why ?

Quote:

sin((omega*t)-90)
For the formula above, I assume you have another expression

omega = omega_value [rad s^-1]

Since t is time, omega x t = omega_value x time_value_in_s [rad]

The next step in the expression is

omega_value x time_value_in_s [rad] - 90

which has units/dimensions mismatch, and the software will complain. However, if you write as

sin((omega*t)-90 [deg])

The evaluation step becomes

omega_value x time_value_in_s [rad] - 90 [deg]

which can be evaluated w/o issues.

Summary, if you use the units in your expressions consistently (regardless of units systems), the software will convert them as needed to whichever system it requires, and display the results in the "display" units requested.

Hope the above helps,


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