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

Morsi-Alexander Drag Law UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2019, 00:17
Default Morsi-Alexander Drag Law UDF
  #1
New Member
 
Join Date: Feb 2018
Posts: 29
Rep Power: 8
Manu4CFD is on a distinguished road
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);
}
}
Manu4CFD is offline   Reply With Quote

Old   March 27, 2019, 12:18
Default
  #2
Member
 
Liliana de Luca Xavier Augusto
Join Date: Feb 2013
Posts: 64
Rep Power: 13
liliana is on a distinguished road
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?
liliana is offline   Reply With Quote

Old   March 27, 2019, 23:08
Default
  #3
New Member
 
Join Date: Feb 2018
Posts: 29
Rep Power: 8
Manu4CFD is on a distinguished road
Quote:
Originally Posted by liliana View Post
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?
Hi Liliana,

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.
Manu4CFD is offline   Reply With Quote

Old   November 9, 2023, 11:18
Default
  #4
Member
 
Join Date: Jul 2013
Posts: 84
Rep Power: 12
HHOS is on a distinguished road
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.
HHOS is offline   Reply With Quote

Reply


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
udf for compute pressure drag force fatemi Fluent UDF and Scheme Programming 1 January 26, 2018 13:27
EMMS drag model UDF NAD Fluent UDF and Scheme Programming 26 November 19, 2017 07:49
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
UDF for pressure drag CFDstudent123 Main CFD Forum 0 May 23, 2011 03:18
Problem with UDF (Drag model) understate FLUENT 0 January 4, 2011 05:01


All times are GMT -4. The time now is 02:21.