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

DPM erosion

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By teojb
  • 2 Post By blacksmith

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2019, 08:56
Default DPM erosion
  #1
New Member
 
MT
Join Date: Jul 2019
Posts: 3
Rep Power: 7
teojb is on a distinguished road
Hi, I am trying to create an erosion model based on DNV standards. I managed to interpret the UDF and run the calculation but the erosion rate remains at 0 everywhere when I plot the contour. Are the lines for the thread and cell necessary?



#include "udf.h"

DEFINE_DPM_EROSION(DNV, p, t, f, normal, alpha, Vmag, mdot)

{

real A[ND_ND];

Thread *t0;

cell_t c0;

/*t0 = THREAD_T0(t);*/ /*error interpreting these two lines*/

/*c0 = F_C0(f,t);*/

real erosion, F_alpha; F_alpha = 0.6*(pow(((sin(alpha))+7.2*((sin(alpha))-(pow((sin(alpha)),2.0)))),0.6))*(1-exp((-20)*alpha));

erosion = (3.67e-4)*F_alpha*(pow(Vmag,2.6))*mdot; /*mm per year*/ F_STORAGE_R(f,t,SV_DPMS_EROSION) =erosion;

}
teojb is offline   Reply With Quote

Old   July 23, 2019, 23:05
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
#include "udf.h" 
#include "math.h" 

DEFINE_DPM_EROSION(DNV, p, t, f, normal, alpha, Vmag, mdot) 
{ 
real erosion, F_alpha;
F_alpha = 0.6*(pow(((sin(alpha))+7.2*((sin(alpha))-(pow((sin(alpha)),2.0)))),0.6))*(1-exp((-20)*alpha)); 
erosion = (3.67e-4)*F_alpha*(pow(Vmag,2.6))*mdot; /*mm per year*/ 
F_STORAGE_R(f,t,SV_DPMS_EROSION) =erosion; 
}
best regards
AlexanderZ is offline   Reply With Quote

Old   July 24, 2019, 05:59
Default
  #3
New Member
 
MT
Join Date: Jul 2019
Posts: 3
Rep Power: 7
teojb is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
Code:
#include "udf.h" 
#include "math.h" 

DEFINE_DPM_EROSION(DNV, p, t, f, normal, alpha, Vmag, mdot) 
{ 
real erosion, F_alpha;
F_alpha = 0.6*(pow(((sin(alpha))+7.2*((sin(alpha))-(pow((sin(alpha)),2.0)))),0.6))*(1-exp((-20)*alpha)); 
erosion = (3.67e-4)*F_alpha*(pow(Vmag,2.6))*mdot; /*mm per year*/ 
F_STORAGE_R(f,t,SV_DPMS_EROSION) =erosion; 
}
best regards

Thanks AlexanderZ. I compiled the above code but it is still showing zero erosion rate. I can see the erosion rate if I change to the default erosion models.
teojb is offline   Reply With Quote

Old   July 25, 2019, 00:49
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
check your equations

best regards
AlexanderZ is offline   Reply With Quote

Old   July 31, 2019, 21:15
Default
  #5
New Member
 
MT
Join Date: Jul 2019
Posts: 3
Rep Power: 7
teojb is on a distinguished road
Turns out that there were some changes in the define_dpm_erosion macro in Fluent 2019 R1/Ansys 19.3. Leaving the code below for reference.

Code:
#include "udf.h" 
#include "math.h" 

DEFINE_DPM_EROSION(DNV, tp, t, f, normal, alpha, Vmag, mdot)
{ 
real erosion, F_alpha;
F_alpha = 0.6*(pow(((sin(alpha))+7.2*((sin(alpha))-(pow((sin(alpha)),2.0)))),0.6))*(1-exp((-20)*alpha)); 
erosion = (3.67e-4)*F_alpha*(pow(Vmag,2.6))*mdot; /*mm per year*/ 
F_STORAGE_R_XV(f, t, SV_DPMS_EROSION, EROSION_UDF)=erosion;}
ZZH1997 likes this.
teojb is offline   Reply With Quote

Old   May 10, 2023, 02:49
Default
  #6
New Member
 
Xiaozhen Liu
Join Date: Aug 2019
Posts: 1
Rep Power: 0
blacksmith is on a distinguished road
Quote:
Originally Posted by teojb View Post
Turns out that there were some changes in the define_dpm_erosion macro in Fluent 2019 R1/Ansys 19.3. Leaving the code below for reference.

Code:
#include "udf.h" 
#include "math.h" 

DEFINE_DPM_EROSION(DNV, tp, t, f, normal, alpha, Vmag, mdot)
{ 
real erosion, F_alpha;
F_alpha = 0.6*(pow(((sin(alpha))+7.2*((sin(alpha))-(pow((sin(alpha)),2.0)))),0.6))*(1-exp((-20)*alpha)); 
erosion = (3.67e-4)*F_alpha*(pow(Vmag,2.6))*mdot; /*mm per year*/ 
F_STORAGE_R_XV(f, t, SV_DPMS_EROSION, EROSION_UDF)=erosion;}
Thank you teojb,

your reference code helps me to solve my problem.

Regards,
Xiao
ZZH1997 and Wang Cong NEU like this.
blacksmith 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
Question about Fluent DPM erosion model zdz198728 FLUENT 6 April 1, 2017 04:49
FLUENT Erosion DPM (Methane with Sand) - Strange Erosion Contours chongjqw FLUENT 3 February 22, 2015 22:17
FLUENT Erosion DPM - Strange Erosion Contours chongjqw FLUENT 0 February 7, 2014 03:43
DPM - Erosion model pipin FLUENT 2 November 18, 2013 06:02
Modelling Sand erosion using Mixture model and DPM karlchapman FLUENT 3 July 5, 2012 09:55


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