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

EMMS drag model UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2014, 12:04
Default
  #21
Senior Member
 
Join Date: May 2011
Posts: 231
Rep Power: 16
Kanarya is on a distinguished road
Hi Ignacio,
I think, you have some problem with your code…
If you do not mind, you can send me the code and I can check it.
kah.recep@gmail.com
best regards,
Kanarya is offline   Reply With Quote

Old   May 21, 2014, 21:47
Default
  #22
New Member
 
Join Date: Aug 2012
Posts: 22
Rep Power: 14
jipaz is on a distinguished road
Hi Kanarya:

I applied the modifications to the code you recommended to me, but I'm still getting the same error messages:

Updating solution at time level N... done.
iter continuity u-aire u-solidos v-aire v-solidos gt-solidos k epsilon vf-solidos time/iter
# Divergence detected in AMG solver: mp-x-momentum -> Decreasing coarsening group size!
# Divergence detected in AMG solver: mp-x-momentum -> Increasing relaxation sweeps!
# Divergence detected in AMG solver: pressure correction -> Turning off correction scaling!

Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: k
Divergence detected in AMG solver: epsilon
Divergence detected in AMG solver: vof-1
Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: k
Divergence detected in AMG solver: epsilon
Divergence detected in AMG solver: vof-1
Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: k
Divergence detected in AMG solver: epsilon
Divergence detected in AMG solver: vof-1
Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: k
Divergence detected in AMG solver: epsilon
Divergence detected in AMG solver: vof-1# Divergence detected in AMG solver: pressure correction -> Increasing relaxation sweeps!

Primitive Error at Node 0: floating point exception

Primitive Error at Node 1: floating point exception

Primitive Error at Node 2: floating point exception

Primitive Error at Node 3: floating point exception

Error: floating point exception
Error Object: #f

I'm using a non-uniform grid in radial direction, and thinking that this could be a problem, I returned to a radial uniform grid, but I got the same error messages for the uniform grid case.

Then I changed the UDF drag model to modified Syamlal-O'Brien as wrttien in the Fluent UDF manual example and the case start and continue running properly without any error messages, so I'm sure the problem is the EMMS UDF drag model.

Any help is very welcome

Regards,

Ignacio
jipaz is offline   Reply With Quote

Old   May 24, 2014, 14:01
Default
  #23
New Member
 
Join Date: Aug 2012
Posts: 22
Rep Power: 14
jipaz is on a distinguished road
Dear all, finally I found what is the problem. According many papers the initial conditions for riser simulations are setting as Vg=0.0, Vs=0.0, so when the run starts, the Reynold number becomes 0.0, and Cd becomes no-definded, and then the run crashes.

In fact my EMMS UDF drag function commented by Kanarya, including some minor modifications done by myself is working properly.

Now I defined initial Vg as 1e-6, and the case is able to start doing 2 iterations, now my problem is flow reversal detected in pressure outlet, but I think i'm walking in the right direction.

Regards,

Ignacio
jipaz is offline   Reply With Quote

Old   June 2, 2014, 16:53
Default
  #24
New Member
 
Join Date: Aug 2012
Posts: 22
Rep Power: 14
jipaz is on a distinguished road
Dear all:

Finally I found the problem, my EMMS drag model code was not correct, be careful about writing the code properly, and be careful about the if's and else if's statements.

Thanks again Kanarya.

Good luck doing CFD simulations.

Regards,

Ignacio
jipaz is offline   Reply With Quote

Old   July 18, 2014, 07:21
Default
  #25
New Member
 
Rajani Kant Baro
Join Date: Jul 2014
Posts: 1
Rep Power: 0
Kant is on a distinguished road
Can You tell me how to solve the non-linear equations in variables a & Usc?
Kant is offline   Reply With Quote

Old   January 7, 2015, 06:32
Default EMMS DRAG MODEL for gas solid flow
  #26
New Member
 
sourav ganguli
Join Date: Jan 2015
Posts: 1
Rep Power: 0
SOURAV GANGULI is on a distinguished road
Can anyone tell me the operating condition to run emms drag model?
SOURAV GANGULI is offline   Reply With Quote

Old   November 19, 2017, 08:49
Default
  #27
New Member
 
Rakhim
Join Date: Oct 2017
Posts: 3
Rep Power: 9
Rakhim is on a distinguished road
Quote:
Originally Posted by Kanarya View Post
Hi,
you should compile it.
I think, to send my code to you is not good idea for you!
you should just modify the code from Syamlal-O'Brien drag which is included in the Udf examples.
I think you do not have much experiance with UDF.
I suggest you to get familiar with it and then you will see that it is not so difficult to implement it.
If you have the code and it is not working you can ask some specific questions and I will try to help you!

Best!
Hi Kanarya,

I have pretty much similar problem. When I incorporate udf (I modified Symlal model which is provided in the fluent manual), divergence problem occured. My udf (attached below) is modifying drag coefficient between 2 phases in multiphase flow. Could you please have a look?

#include "udf.h"

#define diamrbc 5.5e-6


DEFINE_EXCHANGE_PROPERTY(custom_drag, cell, mix_thread, s_col, f_col)
{
Thread *thread_p, *thread_rbc;
real u_vel_p, u_vel_rbc, v_vel_p, v_vel_rbc, w_vel_p, w_vel_rbc, abs_vrbc,
rho_rbc, mu_p, reyrbc,
cd_rbc;


/* find the threads for the plasma (primary) */
/* and rbc (secondary phases) */
thread_p = THREAD_SUB_THREAD(mix_thread, s_col);/* plasma*/
thread_rbc = THREAD_SUB_THREAD(mix_thread, f_col);/* rbc*/

/* find phase velocities and properties*/
u_vel_p = C_U(cell, thread_p);
v_vel_p = C_V(cell, thread_p);
w_vel_p = C_W(cell, thread_p);
u_vel_rbc = C_U(cell, thread_rbc);
v_vel_rbc = C_V(cell, thread_rbc);
w_vel_rbc = C_W(cell, thread_rbc);
rho_rbc = C_R(cell, thread_rbc);
mu_p = C_MU_L(cell, thread_p);

/*compute velocity*/
abs_vrbc = sqrt(pow(u_vel_p - u_vel_rbc, 2) + pow(v_vel_p - v_vel_rbc, 2) + pow(w_vel_p - w_vel_rbc, 2));


/*compute Reynolds number*/
reyrbc = rho_rbc*abs_vrbc*diamrbc / mu_p;




/*compute drag and return drag coeff, k_g_s*/
cd_rbc = 5.847e-05*pow(reyrbc, 2) - 0.02132*reyrbc + 1.904;


return cd_rbc;
}
Rakhim is offline   Reply With Quote

Reply

Tags
emms, udf


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
one-step simulation for two-stage model with UDF wlt_1985 FLUENT 0 March 25, 2011 06:01
UDF for linear PTT model implementation dpitz Fluent UDF and Scheme Programming 1 February 4, 2011 11:08
Problem with UDF (Drag model) understate FLUENT 0 January 4, 2011 06:01
UDF for Herschel-Bulkely model emad Fluent UDF and Scheme Programming 5 July 20, 2009 09:16
UDF, Herschel-Bulkely model don't have Yielding viscosity term emad Fluent UDF and Scheme Programming 0 May 19, 2009 13:46


All times are GMT -4. The time now is 17:05.