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

Accessing phase volm fraction in UDF for a source term in mixture model

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 19, 2013, 07:54
Default Accessing phase volm fraction in UDF for a source term in mixture model
  #1
New Member
 
Aditya Pandare
Join Date: Aug 2012
Location: Pune, India
Posts: 20
Rep Power: 13
aditya.pandare is on a distinguished road
Hello
I am trying to simulate cavitation using a UDF for the source term of vapor phase in the mixture model.
I am having trouble accessing the volume fraction of the secondary phase. this is the UDF I wrote. I am new to UDFs, so please help me.

#include "udf.h"

DEFINE_SOURCE(re,c,t,dS,eqn)
{
real source, prsr, alpha, pv, zoneid;
zoneid = 11;
Thread *mixture_thread = Lookup_Thread(domain,zid);
Thread **pt;
pt = THREAD_SUB_THREADS(mixture_thread);
prsr = C_P(c,t);
alpha = C_VOF(c,pt[3]);
pv = -97000;
source = 0.02 * (sqrt((2/3)*(pv - prsr)/998.2)) * (1-alpha) * 998.2 * 0.5542 / 0.0717;
dS[eqn] = - 0.02 * (sqrt((2/3)*(pv - prsr)/998.2)) * 998.2 * 0.5542 / 0.0717;
return source;
}

It gives a parse error for the 2 lines beginning with "Thread"
Any help in understanding the working of the THREAD syntaxes!
aditya.pandare is offline   Reply With Quote

 


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
Error message: Insufficient Catalogue Size Paresh Jain CFX 32 February 3, 2021 03:37
UDF source term jerome_ FLUENT 2 July 11, 2011 11:55
A question about UDF utility in mixture and multiphase model aleisia Fluent UDF and Scheme Programming 0 June 7, 2011 16:32
gradient source term UDF ak6g08 Fluent UDF and Scheme Programming 0 July 9, 2009 06:37
UDF Source Term Units? Brian FLUENT 1 October 24, 2005 09:15


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