|
[Sponsors] |
October 14, 2013, 06:01 |
multiphase UDF errors!
|
#1 |
New Member
JEEE
Join Date: Nov 2011
Posts: 7
Rep Power: 15 |
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); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for coal combustion in multiphase flow | niisha24 | Fluent UDF and Scheme Programming | 13 | September 19, 2022 05:01 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
udf for multiphase flow with real gas mixture | sugumaran | ANSYS | 0 | July 30, 2010 12:38 |
multiphase udf | Rashmi | FLUENT | 1 | March 7, 2006 03:17 |
UDF for multiphase flow | ROOZBEH | FLUENT | 3 | April 7, 2004 18:54 |