CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

A question about UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2005, 17:51
Default A question about UDF
  #1
owet.L
Guest
 
Posts: n/a
hi, guys,

I met a problem about UDF, pls give me your hands.

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
  Reply With Quote

Old   December 16, 2005, 20:49
Default Re: A question about UDF
  #2
Rucy
Guest
 
Posts: n/a
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
  Reply With Quote

Old   December 17, 2005, 10:16
Default Re: A question about UDF
  #3
Sumedh
Guest
 
Posts: n/a
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
  Reply With Quote

Old   December 17, 2005, 11:51
Default Re: A question about UDF
  #4
owet.L
Guest
 
Posts: n/a
Hi, Thank you for your answer.

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!
  Reply With Quote

Old   December 20, 2005, 04:19
Default Re: A question about UDF
  #5
sumedh
Guest
 
Posts: n/a
Hi, In my case i am doing it for single surface. So I am starting the outer loop for surface thread. Then in that loop i am again starting inner loop for same surface, but with changed name. Now in the inner loop I am comparing the coordinates and accessing the required values. I dont know how you will access some other part in inner loop.

Sumedh
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple UDF question Pirooz Darabi FLUENT 0 October 31, 2007 16:22
Basic question: UDF for wall heat flux Carl FLUENT 1 August 5, 2006 20:01
Question about UDF summer FLUENT 1 July 18, 2006 11:13
UDF question Ryan FLUENT 2 July 5, 2006 15:54
A question about the dynamic mesh UDF Tango FLUENT 1 November 27, 2003 03:56


All times are GMT -4. The time now is 16:00.