CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CFX Expressions (https://www.cfd-online.com/Forums/cfx/83099-cfx-expressions.html)

Pavelko December 14, 2010 12:20

CFX Expressions
 
Hello All,

I need to simulate a pressure impulse at inlet boundary condition:

for t<=0.01 I need:
Pin=Pmax*(sin(w*t)^2)
and for t>0.1
Pin=0
where Pmax and w are known.

Please help to write it using CFX expressions.

Thank you,
P.K.

ghorrocks December 14, 2010 16:25

In CFX V13 you can use if statements in CEL so this is easy. In previous versions you need to use the step function - still easy, but a bit weird. For instance Pin=step(t-0.01[s])*Pmax*(sin(w*t)^2) should do it.

I note your function is undefined for 0.01<t<0.1. I assume that is a typo.

Pavelko December 15, 2010 01:23

Yes, this is a typo :)
Thank you very much!


All times are GMT -4. The time now is 08:24.