CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   build a expression in CFX (http://www.cfd-online.com/Forums/cfx/100042-build-expression-cfx.html)

payam.t April 19, 2012 02:26

build a expression in CFX
 
Hi to everyone :)
I want to build a expression in CFX that sets static pressure equal to 5MPa, where -1<x<1,-1<y<1 (x , y are location of domain in x,y direction in meter).
Any ideas welcome.
After building this expression, how I can use it in numerical solution as an initial value?

ghorrocks April 19, 2012 08:59

You could do this using interpolation functions, but I would use an expression for this as it is easy and allows you to parameterise things easily. A function something like this should do it:

output = 5 [MPa] * step(1-abs(x)/1[m]) * step(1-abs(y)/1[m])

Simply use this as the definition for an initial condition.

payam.t April 21, 2012 06:49

Quote:

Originally Posted by ghorrocks (Post 355607)
You could do this using interpolation functions, but I would use an expression for this as it is easy and allows you to parameterise things easily. A function something like this should do it:

output = 5 [MPa] * step(1-abs(x)/1[m]) * step(1-abs(y)/1[m])

Simply use this as the definition for an initial condition.

I am sorry to ask again...:o
Can you explain me how can I do this by interpolation function?

ghorrocks April 21, 2012 07:14

Look in the documentation or tutorials for tips on using interpolation functions.


All times are GMT -4. The time now is 18:56.