|
[Sponsors] |
Accessing phase volm fraction in UDF for a source term in mixture model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 19, 2013, 07:54 |
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 |
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! |
|
|
|
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 |