CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CEL function/Expression (https://www.cfd-online.com/Forums/cfx/25867-cel-function-expression.html)

MAB May 27, 2008 13:12

CEL function/Expression
 
is there any CEL Expression or Function which permits to define an expression or function such that (for example) [f(x)= 2x for x<3 or x=3], and [f(x)=0 for x>3]???

Thanks

Glenn Horrocks May 27, 2008 20:16

Re: CEL function/Expression
 
Hi,

You can use the step() CEL function to do if/then statements.

Glenn Horrocks

MAB May 28, 2008 04:58

Re: CEL function/Expression
 
but step(0)=0.5 whereas i want it to be 1. For example: Step(h-z)/1[m]) now for h=2(specified hieght) and z=3(vertical axis). this will give 0.5 at certain hiegt where h is equal to z. I want to specify [h=f(z) is 1 for z=2 or z<2] and [h=f(z) is 0 for z>2].

CycLone May 28, 2008 11:13

Re: CEL function/Expression
 
Hi MAB,

The step function only returns 0.5 at exactly zero.

Another way would be to create a profile function (see User Function's in Pre) and specify the appropriate coordinates and data pairs.

-CycLone

Rogerio Fernandes Brito May 28, 2008 21:10

Re: CEL function/Expression
 
i didnīt understand! Could you please send it (.ccl and .cfx files) for us? MSN: rogeriobrito2007@hotmail.com

CycLone May 29, 2008 10:22

Re: CEL function/Expression
 
No need. Just open the on-line help and go to: "ANSYS CFX-Pre User's Guide | User Functions | Interpolation Function |".

-CycLone


All times are GMT -4. The time now is 14:43.