|
[Sponsors] |
March 17, 2019, 01:17 |
Morsi-Alexander Drag Law UDF
|
#1 |
New Member
Join Date: Feb 2018
Posts: 29
Rep Power: 8 |
Hi,
I have written a user defined code based on the Morsi-Alexander Drag law parameters for spherical particles. I had compiled this udf and successfully loaded into the solver. Inorder to print the particle reynolds number(Re) passed by the solver to the udf in the console, I had written the “message” statement. But while printing the "Re", the output value in shown like this: The particle reynolds number is : -1.#IND00e+00. Why is it so? Kindly provide me your valuable suggestions. The UDF code is given below for your reference. #include <stdio.h> #include <math.h> #include "udf.h" DEFINE_DPM_DRAG(particle_drag_force, Re, p) { real Cd, drag_force; if (Re < 0.1) { Cd = (24/Re); drag_force = 18 * Cd * Re / 24; Message("The particle reynolds number is : %e\n",Re); return (drag_force); } else if (Re < 1.0) { Cd = 3.690 + (22.73/Re) + (0.0903/ pow(Re,2)); drag_force = 18 * Cd * Re / 24; Message("The particle reynolds number is : %e\n",Re); return (drag_force); } else if (Re < 10.0) { Cd = 1.222 + (29.1667/Re) + (-3.8889/ pow(Re,2)); drag_force = 18 * Cd * Re / 24; Message("The particle reynolds number is : %e\n",Re); return (drag_force); } else { Cd = 0.6167 + (46.50/Re) + (-116.67/ pow(Re,2)); drag_force = 18 * Cd * Re / 24; Message("The particle reynolds number is : %e\n",Re); return (drag_force); } } |
|
March 27, 2019, 13:18 |
|
#2 |
Member
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 68
Rep Power: 13 |
Hi!
Did you find your answer? I wrote an UDF to calculate CD by Morsi and Alexander correlation. But the results are very different from the results I got using the spherical law already implemented on Fluent (which is also Morsi and Alexander correlation). Did you have the same problem? |
|
March 28, 2019, 00:08 |
|
#3 | |
New Member
Join Date: Feb 2018
Posts: 29
Rep Power: 8 |
Quote:
Yes, I found the solution to my problem. The issue was that my particle reynolds number was equating to zero, as my relative velocity (i.e., between particle and air) was zero. Since Cd is 24/Re, Cd was equating to infinity. So, I gave a very small initial velocity to the particle, say 0.001 m/s. Henceforth, the udf written above and the spherical law already implemented by Fluent gave me the same results, as both consider the Morsi-Alexander correlations. |
||
November 9, 2023, 12:18 |
|
#4 |
Member
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
Hello all!
I am trying to achieve the same thing, mimicking the drag law of Fluent with a UDF, but I don't manage the results to match. You mentioned that you got it working. Was there really no difference? or there was one that you considered acceptable? I have posted my results in this post. I would be glad if you could give me a hand with it. Thanks in advance, and regards. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for compute pressure drag force | fatemi | Fluent UDF and Scheme Programming | 1 | January 26, 2018 14:27 |
EMMS drag model UDF | NAD | Fluent UDF and Scheme Programming | 26 | November 19, 2017 08:49 |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF | acasas | CFD Freelancers | 1 | January 23, 2015 08:26 |
UDF for pressure drag | CFDstudent123 | Main CFD Forum | 0 | May 23, 2011 04:18 |
Problem with UDF (Drag model) | understate | FLUENT | 0 | January 4, 2011 06:01 |