CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent Multiphase

multiphase UDF errors!

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 14, 2013, 05:01
Smile multiphase UDF errors!
  #1
New Member
 
JEEE
Join Date: Nov 2011
Posts: 7
Rep Power: 6
alexsatan is on a distinguished road
Dear all,

Here I got a problem. I am doing a VOF (air and water) modelling. Now I want use UDF to calculate the volume sum when the velocity is lager than 0 in the water. But It seems that the loop function can not go into the water phase and get the info. of the cells. can anyone help me?

# include "udf.h"
#define water_ID 3

DEFINE_EXECUTE_AT_END(execute_at_end)
{
int spe_i;
real volumet;
cell_t c;
Thread *mixture_thread,*water_thread;
Domain *mixture_domain,*water_domain;

mixture_domain= Get_Domain(1);/* To get the mixture phase*/
water_domain=DOMAIN_SUB_DOMAIN(mixture_domain,wate r_ID);
mixture_thread = Lookup_Thread(mixture_domain, 1);


thread_loop_c(water_thread, water_domain)
{
begin_c_loop(c,water_thread)
{

if(C_U(c,water_thread)>0.0)
volumet += C_VOLUME(c,water_thread);

}
end_c_loop(c,water_thread)
}
Message("\n Total volume is %f\n",volumet);
}
alexsatan is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for coal combustion in multiphase flow niisha24 Fluent UDF and Scheme Programming 10 March 9, 2015 02:56
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 9 January 3, 2012 09:06
udf for multiphase flow with real gas mixture sugumaran ANSYS 0 July 30, 2010 11:38
multiphase udf Rashmi FLUENT 1 March 7, 2006 03:17
UDF for multiphase flow ROOZBEH FLUENT 3 April 7, 2004 17:54


All times are GMT -4. The time now is 01:15.