# Ploting Drag Force Vectors

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

 September 24, 2014, 15:39 Ploting Drag Force Vectors #1 Member   Camilo Costa Join Date: Jun 2009 Posts: 34 Rep Power: 17 Dears Members, Anyone has some experience for write an udf to plot the vectors of drag force in a multiphase flow modeled by Euler-Euler approach with VOF model enable? More specified, I want to see the vectors of the drag force near the interface liquid-gas, responsible for create slug flow pattern in two phase flow. Thanks!!

 September 26, 2014, 13:36 Find for variable #2 Member   Camilo Costa Join Date: Jun 2009 Posts: 34 Rep Power: 17 Well, I find this variable that should be responsible to evaluate the coefficient of the drag force on the XX direction. C_DRAG_COEFF_ANISO_XX_IJ(c,t,i,j) But, I dont know what for the index I J are used. Anyone could help me? Thx. Best Regards

 September 29, 2014, 14:17 #3 Member   Camilo Costa Join Date: Jun 2009 Posts: 34 Rep Power: 17 I write this udf, but the problem now is the segmentation violation!! What is wrong? This udf need be written for multiphase problems? #include "udf.h" /* Define which user-defined scalars to use. */ enum { drag_xx, N_REQUIRED_UDS }; DEFINE_ADJUST(adjust_fcn, domain) { Thread *t; cell_t c; int i = 2; int j = 3; /* Make sure there are enough user-defined scalars. */ if (n_uds < N_REQUIRED_UDS) Internal_Error("not enough user-defined scalars allocated"); /* Fill first UDS with temperature raised to fourth power. */ thread_loop_c (t,domain) { if (NULL != THREAD_STORAGE(t,SV_UDS_I(drag_xx))) { begin_c_loop (c,t) { real drag_xx = C_DRAG_COEFF_ANISO_XX_IJ(c,t,i,j); C_UDSI(c,t,0) = drag_xx; } end_c_loop (c,t) } } }

 Tags drag force, multiphase, plot