CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Bug in CEL? (https://www.cfd-online.com/Forums/cfx/65863-bug-cel.html)

Lance June 29, 2009 07:27

Bug in CEL?
 
Hi,
I have a CEL expression that looks like:

Code:

80[Pa]+30[Pa]*(1+sin(5[Hz]*pi*t-pi/2))
and if I plot the expression during 20 s it looks like:

http://img268.imageshack.us/img268/1055/celpressure.jpg
which isnt really what it should look like...rather, the waves should be equal in size.

Changing the time to 10 s gives the following plot:
http://img222.imageshack.us/img222/5...lpressure2.jpg

It seems like there is something strange with CFX when it plot the expression. Anyone else found the same thing?

Rui June 29, 2009 10:47

Increase the number of points in the plot

ckleanth June 29, 2009 15:09

Quote:

Originally Posted by Rui (Post 220830)
Increase the number of points in the plot

good one mate, didn't think of that one :D

Lance June 30, 2009 04:25

Quote:

Originally Posted by Rui (Post 220830)
Increase the number of points in the plot

d'oh, didnt think of that :)
Thanks

Rui June 30, 2009 06:01

It was evident from your 2nd plot (the vertices in the curve are well visible).

The frequency of your expression is 2.5 Hz, or T = 0.4s. CFX uses, by default, 100 points to make the plot.
In the 1st plot (20 s), the points will be spaced by 20 s/ 99 intervals = 0.202 s. So, the plot shows approximately only 2 points for each period of the sinusoidal expression.

ghorrocks June 30, 2009 07:52

Hi,

Yes, this is classic frequency aliasing. Remember the Nyquist critereon (http://en.wikipedia.org/wiki/Nyquist...ling_theorem)? In short to resolve a given frequency you need to sample it at least at twice the frequency you wish to resolve. Frequencies you do not have enough speed to resolve will result in aliased frequencies at lower frequencies which are spurious and not real. It usually manifests itself as beats in ampiltude of a high frequncy wave - see Lance's plots for a classic example.

Glenn Horrocks


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