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

UDF to access only one phase in mixture domain

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 4, 2020, 04:11
Default UDF to access only one phase in mixture domain
  #1
Senior Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 194
Rep Power: 14
arunraj is on a distinguished road
Hello everyone,

I would like to access only one phase in the mixture domain. I have written the UDF. However, I do not know if my code is right? Could someone clarify?

Can anyone explain what the following code is doing? I have attached only a part of code that I am interested in.

Thread *t,
Thread **pt;
Thread **st;
Domain *d, *pd, *sd;

DEFINE_SOURCE ---------
{
mp_thread_loop_c (t, d, st)
if (FLUID_THREAD_P(t))
{
Thread *sp = st[phase_ID];
begin_c_loop (c, t)
{
if(C_T(c, t)>tsat)
{
source = C_VOF(c, sp)*fabs(C_T(c, t)*1000;
dS[eqn] = 0.0;
}
else if(C_T(c, t)<=tsat)
{
source = -C_VOF(c, sp)*fabs(C_T(c, t)*1000;
dS[eqn] = 0.0;
}
else
{
source = 0.0;
dS[eqn] = 0.0;
}
}
end_c_loop (c, t)
}
arunraj 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



All times are GMT -4. The time now is 21:53.