CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)

 owet.L December 16, 2005 17:51

hi, guys,

Two parts are placed along Z axis. I loop the part A and get the perfermance of A, FA=fa(x,y,z). In part B, there is a function related to the result of FA. FB(x,y,zb)=fb(fa(x,y,za)). It means the value FB at one point (assume that the point is "C2") is deducted from FA at point C1. The values of x and y in points C1 and C2 are same, and there is only different in values of z. How to write a UDF to get the FB? In the problem, some parameters in part B are recalled in function fb, such as the concentration of B at point (x,y,zb). I should write a looping code, but how do I write it, and the parameters in Part A and Part B (in which x and y are same) can be got at the same time?

Thank you.

Owet L

 Rucy December 16, 2005 20:49

Dear Owet,

Could you describe the case that you are simulating in detail, and also paste your UDF in this forum? So that we could find whats' wrong.

Good luck!

Rucy

 Sumedh December 17, 2005 10:16

Hi, I understood your problem. In fact i was alos doing the same thing. There is no way you can access the values of part A in loop of part B. I am accessing the parameters of the same part. that I am doing by using nested loop statement, take care to rename the thread passes to inner loop, otherwise inner loop will not get executed. The problem with this approach is, the code becomes very slow. But this seems to be the only way out.

Sumedh

 owet.L December 17, 2005 11:51

I can not clearly understand your words. "nested loop statement" means you set a loop through thread B in Loop A? If so, how to determine "point" to "point" loop? That is, how do you get the value of a point in B from the corresponding point in A?

Could you give me an example code to describ your words?

Thank you very much!

 sumedh December 20, 2005 04:19