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

UDF - Source Term Question

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2008, 14:40
Default UDF - Source Term Question
  #1
Jacques
Guest
 
Posts: n/a
Hi folks,

I wrote a UDF to add a source term to my second phase (euler-euler model). Now I am not sure if the velocitys (and other variables) I use in the code are the right ones. The source must be calculated with the velocitys of the second phase, not the first one. I hook the UDF to the fluid-regions second phase via FLUENT-GUI. Is this enough or do I have to implement it in the UDF?

###################### Here is the UDF I wrote so far:

#include "udf.h"

DEFINE_SOURCE(neg_source,c,t,dS,eqn) { Domain *d; real source = 0.0; real uvf, vvf; real A[ND_ND]; face_t f; Thread *t0;

int Zone_ID=6; d=Get_Domain(1);

t0=Lookup_Thread(d,Zone_ID);

F_AREA(A,f,t0);

uvf = C_U(c,t); vvf = C_V(c,t); source = -(1/C_VOLUME(c,t))*C_VOF(c,t)*C_R(c,t)*sqrt(((NVD_DOT( A,uvf,vvf,0)))*((NVD_DOT(A,uvf,vvf,0))));

return source;

} ##########################
  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
UDF - Source term Andrew RONALD FLUENT 0 September 29, 2006 17:26
A question about source term kirby CFX 0 April 10, 2006 10:17
VOF and Source Term Mickaël PERRIN FLUENT 4 July 12, 2003 07:01
a question about UDF for source term winnie FLUENT 1 May 2, 2003 10:11
UDS source term Mark Richardson FLUENT 1 August 21, 2001 05:41


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