CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Passing Values in Multiple points by 1 CEL Function (https://www.cfd-online.com/Forums/cfx/88022-passing-values-multiple-points-1-cel-function.html)

Araz May 5, 2011 16:06

Passing Values in Multiple points by 1 CEL Function
 
Hello,

Does anyone know haw we can pass multiple values from CFX to a compiled subroutine using one function?
In CFX documentation I can only find cFX expressions which pass only a single value to a subroutine.

For example, consider that we need to pass the values of static pressure, Temperature and X,Y,Z coordinates of all nodes located on a boundary to the subroutine (named TEST) using 1 function.
Is it right to define the arguments in the subroutine as following?

P=ARGS(1:NLOC,1)
T=ARGS(1:NLOC,2)
X=ARGS(1:NLOC,3)
Y=ARGS(1:NLOC,4)
Z=ARGS(1:NLOC,5)
NCLOOP = INT(ARGS(1:NLOC,6)+0.1)
Output= RET(1:NLOC,1)
Do these statements include the corresponding variable at all nodes?
if yes,
Then I will create a User CEL Function in cfx and also write this function as an expression in our ccl file:
TEST= Blade Function (P,T,X,Y,Z,aitern)
and now I need to define these arguments in cfx (this part is the main problem) : can I write something like this:
P=Pressure@Blade
T=Temperature@Blade
X=XGlobal@Blade
Y=YGlobal@Blade
Z=ZGlobal@blade ???

and since my output is displacement of nodes in Y direction, then I can write:
Ydisp= TEST,
and when it comes to specify my boundary conditions for the blade I will put this expression in the place where I specify the mesh motion in Y direction.
if this procedure is not correct, please provide me with some guidance.
Thank you,
Araz


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