EMMS drag model UDF
hi. i try to make numerical simulation of a circulating fluidized bed riser using fluent. and i want to use EMMS drag model as a coefficient of exchange between solid and gas. so i must use UDF to incorporate this model into fluent.
the problem is i don't know how to write this UDF. if someone has such UDF please send to me or give me a hint. thanks. |
Re
Hi
There are several drag laws udf in the udf Manuel of fluent. You can copy the Schiller-Newman drag law udf from the manual and modify it with your own need. Hope that will help you. SHK |
SHK, Thank You very much for your suggestion.
in the UDF manual i found a ''UDF for customizing the default Syamlal drag law'' and i modified it to obtain EMMS drag model. but when i tried to make the simulation. fluent displayed this message '' error: floating point error:invalid number''. i verified the udf but i can't find the mistake. |
Re
Hi
This is a general problems that happens with udf many times. Even mostly when i try to compile the udf form the user manual even they also don't work. U have to still debug it more and try to use different combination of equations and try to make it work if you are using windows. Many times if is very difficult to make udf work. Else you can interpret the udf in a linux machine. Hope that will help you. SHK |
Quote:
I have the same problem. did you manage to solve it? thanks in advance! |
Hi everybody I need to use the EMMS drag model to simulate a gas-solids granular flow. Finally, does somebody get the EMMS UDF properly implemented in ANSYS Fluent?
|
Hi jipaz,
I did it. It is very esay task because you have already Syamlal model for example you should only modify it. What is your project? What is your question? best! Kanarya Quote:
|
EMMS Drag Model
Kanarya, thanks for your reply.
The first part of my project is to validate a CFD model for a FCC Riser against Knowlton's et.al. experimental data. I have already done a first aproximation using the Syamlal-O'Brien drag model (already included in Fluent 12.1), and my results are good, but I have read that I could improve my predictions using a better drag model, this is why I want to include EMMS model. What is the best way to implement the EMMS UDF, interpreted or compiled? Could you send the EMMS UDF that you did, just to compare with mine? By the way, I also need to set Johnson and Jackson Boundary Conditions for wall-solids tangential velocity and granular temperature, but I don't know how to do this task, any help is very welcome. Thanks in advance. Ignacio Quote:
|
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! Quote:
|
in case of Johnson and Jackson Boundary Conditions, it is already in the fluent.just go to solid phase wall boundary conditions and you will see the option!
Quote:
|
Thanks Kanarya, you are right I don't have any experience about UDF, but I'll try to do my best, and if I'd have any additional question, I'll send it to the forum.
Also thanks about JJ BC reply Regards, Ignacio |
I'm running a FCC Riser gas-solid simulation, and I need to set the Johnson and Jackson BC for Tangential velocity of solids and Granular temperature at wall.
What I've done is to define at wall-surfase_body Boundary Conditions for the solid phase in Momentum/Shear Condition a value for Specularity Coefficient, and in Multiphase/Granular Conditions, selected the Johnson-Jackson option and defined a value for the Restitution Coefficient. Doing this is the way to define the Johnson-Jackson BC? I think that specifying the Specularity Coeff I defined the Tangential Velocity BC, but I'm not sure that defining the Restitution Coeff I'm defining the Granular temperature BC. Any help is very welcome. Regards, Ignacio |
Hi every body
i want use RUC drag model for simulation of gas-solid behaviour in fluidized bed and i written cod and im sure that cod is correct but i cant compile it .when i compile it fluent display this message : "Deleted old libudf\ntx86\2ddp\libudf.dll The system cannot find the file specified." Does anybody know what's problem? Thanks a lot |
hi ,
You should go to User Defined -> Functions->Manage and delete the libudf file... best! Kanarya Quote:
|
Quote:
I believe you have incorporated EMMS based drag model in fluent ? I am trying to figure out, did you work out meso scale structures related to your system/operating system and then optimise or use exisiting cases and corresponding case derived drag models such as in B. Lu et al. 2009 Chemical Eng. Sci. 64 3437-3447 ? I am trying to work out for the drag model according to d = 1.2 mm , rhop = 1000 kg/m^3 with U = 0.9 m/s , but I guess this requires solving 7 non-linear complex equations. Any insight will be appreciated. Kind regards Prashant |
Hi Prashant,
You can use simplified version at the beginning like in LM. Armstrong 2010,Two-dimensional and three-dimensional computational studies of hydrodynamics in the transition from bubbling to circulating fluidised bed Best regards, Kanarya Quote:
|
Hey,
Thanks for the reference. I would certainly go about coding this. However. I have a question on applicability of the generalized drag model in the present paper. the whole idea of the drag model was to account for heterogeneity and meso structures in the systems. There is apparent lack of explanation on how the drag model used is successful in producing these meso-structures which are dependent on fluidization regimes and in extension operating conditions. As a side comment. For ever since the drag models like ergun wen yu etc have been applied for a heterogeneous system in an ad hoc way. This drag model has certainly more grounds of applicability. But meso-scale drag model for a particular operating system would be quite logical as the procedure is laid down in the publication earlier mentioned. I would appreciate, If you have insights to these. Kind regards Prashant |
Hi,
Are you PhD student? what kind of application are u simulating? Have a look on 4th chapter of this book "Computational Gas-Solids Flows and Reacting Systems: Theory, Methods and Practice" best! Kanarya Quote:
|
Quote:
Yes I am a post grad. I am mostly simulating Geldart B/D fluidization behavior. I am not quite sure if I have access to the book. I request if you have a pdf of the book. However, I have gone through MFIX documentation by same authors, addressing these issues. I will be happy to read it in detail from the book :) if they present an argument supporting/against the applicability of drag models. Though I am mostly interested in applicability of EMMS drag models presented in this Armstrong paper. Thanks again for good reference and persistence with the argument :) Kind regards Prashant |
EMMS in fluent 14.5 diverging problem
Hi Kanarya:
I'm simulating a 2D Fluidized Bed Riser in Ansys Fluent 14.5 using an Eulerian approach, k-e turbulent model, Johnson-Jackson wall boundary condition. When I use some drag model included into fluent, I havo no problem about the convergence, but I can not obtain the proper mass flux profiles into the riser, so I tried to use the EMMS drag model as an UDF, I compiled it well, without any error message, but when I started the calculation procedure, before the first iteration I got the following error messages: Updating solution at time levels N and N-1. done. iter continuity u-aire u-solidos v-aire v-solidos gt-solidos vf-solidos time/iter mp-x-momentum equations: Divergence detected in AMG solver: pressure correction Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure correction Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure correction Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure correction Divergence detected in AMG solver: vof-1 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 I test my problem using the modified Syamlal-O'Brien drag model example, and the run progress properly, so I understand that the problem is the EMMS UDF, but I don't know what I should do. Any help is very welcome. Regards, Ignacio |
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, |
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 |
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 |
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 |
Can You tell me how to solve the non-linear equations in variables a & Usc?
|
EMMS DRAG MODEL for gas solid flow
Can anyone tell me the operating condition to run emms drag model?
|
Quote:
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; } |
All times are GMT -4. The time now is 18:04. |