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

udf & uds

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2001, 12:19
Default udf & uds
  #1
joby
Guest
 
Posts: n/a
Hi, I am doing some modeling work by Fluent, there is a problem for me to call the result from one subroutine to another for further calculation, could any one kindly tell me how to do it? Thanks. Here is part of my program, I need to call the result of F_UDSI from UDS_FLUX when doing the calculation of source in SOURCE.

DEFINE_UDS_FLUX(a,f,t,i) { face_t f; Thread *t=Look_Thread(domain,ID);

Yo2=F_YI(f,t,0);

Pc=F_P(f,t);

Xo2=Yo2*Pc;

F_UDSI(f,t,0)=Pc*Xo2;

return F_UDSI(f,t,0); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DEFINE_SOURCE(qq_source,c,thread,ds,eqn) {

cell_t c;

face_t f;

Thread *t;

real source,I0,w;

w=F_UDSI(f,t,0);

source=-w*2.5;

ds[eqn]=-2.5;

return source; } thanks
  Reply With Quote

Old   November 11, 2001, 20:38
Default Re: udf & uds
  #2
Greg Perkins
Guest
 
Posts: n/a
You should note that for each cell there are multiple faces - so generally your source term will require some integration over all these faces - see Gauss divergence theorem in math books, which is the normal way of doing this.

Alternatively, you can use adjacent cell information to interpolate to a face.

You need to remeber that Fluent doesn't necessarily store face data - for many variables only cell data is stored. Look at the macro definitions in .h files and you'll see that the face definitions and cell definitions are often the same!

Greg
  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
uds flux - drift velocity - udf johnwinter Fluent UDF and Scheme Programming 3 November 25, 2017 04:07
error about uds in udf a.maroofi Fluent UDF and Scheme Programming 0 September 22, 2010 02:23
connection between udf and uds a.maroofi Fluent UDF and Scheme Programming 1 September 19, 2010 08:46
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 15:58
UDS & UDF geg FLUENT 0 May 25, 2006 12:06


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