|
[Sponsors] |
March 5, 2018, 09:11 |
Custom DPM laws using UDF
|
#1 |
New Member
sowmi
Join Date: Mar 2017
Posts: 14
Rep Power: 9 |
Hi all
I am injecting particles in plasma spray jet and need to find the solid heating of the particle with respect to time. The formula used is When the particle is less than melting point then DTp= DT *(6*dh/(PI*dp^3*cpp*rhop) I wrote this in custom DPM law using UDF given below. Can anyone help me to correct this UDF. And am very new to fluent and UDF it would be a grateful anybody help me at the earliest... Already am running out of time. #include "udf.h" #include <stdlib.h> #include <string.h> #include <time.h> #include "surf.h" #include "random.h" #include "prop.h" #include <math.h> #include "mem.h" #include "metric.h" #include "dpm.h" #include "dpm_types.h" #include "dpm_laws.h" #define CVIS 0.0037866 /*viscosity at 1310K */ #define PI 3.14 DEFINE_DPM_LAW(user_law,p,ci) { Material*m = P_MATERIAL(p); Thread*t0=P_CELL_THREAD(p); cell_t c = P_CELL(p); real Tg,thermcnd,Tp,mp,Dp,Ap,Pr,cpp,cpg,visg,Nu,h,times tep,dh,dT,Re,aux5,rel_vel,TM=1358.0; float x=0,dx; Tg = C_T(c,t0); /*gas temperature */ visg = C_MU_T(c,t0); /*turbulent viscosity of gas*/ thermcnd = C_K_L(c,t0); /*thermal conductivity of gas*/ cpg = C_CP(c,t0); /*specific heat of gas*/ Tp = P_T(p); /* particle temperature */ mp = P_MASS(p); /* particle mass */ Dp = DPM_DIAM_FROM_VOL(mp / P_RHO(p)); /* particle diameter */ Ap = DPM_AREA(Dp); /* particle surface */ Pr = (cpg * visg)/thermcnd; /* Prandtl number */ cpp = DPM_SPECIFIC_HEAT(p,P_T(p)); /* particle specific heat*/ rel_vel= sqrt(pow((P_VEL(p)[0]-C_U(c,t0)),2.0)+pow((P_VEL(p)[1]-C_V(c,t0)),2.0)); aux5=((rel_vel* Dp * P_RHO(p))/CVIS); /* reynolds number */ Nu = (2.0 + 0.66 * sqrt(aux5) * pow(Pr, 1.0/3.0))); /* Nusselt number */ h = (Nu * thermcnd) / Dp; /* Heat transfer coefficient*/ timestep = P_DT(p); dh = h * (Tg - Tp) * Ap; /* heat source term*/ dT =timestep*(6*dh/(PI*pow(Dp,3.0)*cpp*P_RHO(p))); P_T(p)= P_T(p)+dT; } Last edited by Sowmi; March 17, 2018 at 01:24. Reason: missing of content |
|
March 7, 2018, 12:31 |
|
#2 |
New Member
sowmi
Join Date: Mar 2017
Posts: 14
Rep Power: 9 |
Kindly someone reply me....
|
|
March 19, 2019, 02:54 |
|
#3 |
New Member
Tousif
Join Date: Nov 2018
Posts: 2
Rep Power: 0 |
What is the error you are getting? Can you explain?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Contours of custom surface rate (UDF and UDM) | cpassa | FLUENT | 2 | August 14, 2021 14:25 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
DPM with UDF - Step-by-Step Procedure???? | Prashanth | FLUENT | 3 | April 3, 2009 18:45 |
So many questions in DPM & UDF - Help! URGENT! | Prashanth | FLUENT | 0 | March 3, 2009 23:26 |
DPM - UDF for fluctuating bubble size | Jaroslav Kotara | FLUENT | 1 | April 19, 2006 10:02 |