UDF that uses DEFINE_DPM_SWITCH to
switch between DPM laws using a criterion. The UDF switches to DPM_LAW_USER_1 which refers to condenshumidlaw since only one user law has been defined.if i have two ,Any suggestions of how to tackle this issue? tomas 
nobody help me！！！！！！！！！:mad:

#include "udf.h"
#include "dpm.h" #include "mem.h" #define Ta 300 #define Em 0.8 #define Tm 1983 #define sgb 0.0000000567 #define Tb 2500 #define Cpp 800 #define Hm 369000 #define Hv 12480000 DEFINE_DPM_LAW(HeatLaw,p,ci) { real area, rel_vel, Re, Pr, HTC, delta_temp,delta_x,delta_p; float x = 0; cphase_state_t *c = &(p>cphase); area = 4.0 * M_PI * pow(P_DIAM(p),2.0); Pr = c>sHeat * c>mu / c>tCond;/* Prandtl number */ HTC =c>tCond * (2.0 + 0.6*pow(p>Re,0.5)*pow(Pr,1./3.))/ P_DIAM(p); if (P_T(p) < Tm) { delta_temp = P_DT(p) * (area * HTC * (c>tempP_T(p))area*Em*sgb*(pow(P_T(p),4.0)pow(Ta,4.0))) /(P_MASS(p)*Cpp); P_T(p) = P_T(p) + delta_temp; } else if (P_T(p) = Tm && x>O&& 1>x ) { delta_x=P_DT(p) *6* (area * HTC * (c>tempP_T(p))area*Em*sgb*(pow(P_T(p),4.0)pow(Ta,4.0)))/(P_RHO(p)*Hm); x=x + delta_x; } else if((P_T(p) < Tb )&&(P_T(p) >Tm )) { delta_temp = P_DT(p) * (area * HTC * (c>tempP_T(p))area*Em*sgb*(pow(P_T(p),4.0)pow(Ta,4.0))) /(P_MASS(p)*Cpp); P_T(p) = P_T(p) + delta_temp; x=1; } else { P_T(p)=Tb; delta_p=P_DT(p) *2* (area * HTC * (c>tempP_T(p))area*Em*sgb*(pow(P_T(p),4.0)pow(Ta,4.0)))/(P_RHO(p)*Hv); P_DIAM(p)= P_DIAM(p)+delta_p; } } 
why it showed no change in melting process （Tp=tm ）

.................

Sorry I can't help you but can you check this?
else if (P_T(p) = Tm && x>O&& 1>x ) 
hank you very much ghost82. I do apprecaite your concern. All the best,
Tomas 
DPM in combination with plasma
Hej Tomas!
This thread is already more than 2 years old and unfortunately I cannot help you with your problem (if that would still be necessary...), but I am trying to model plasma gasification using the DPM model. I read that you also combine a plasma flow with the DPM model, so I was hoping you could help me with something. I have written several UDFs to calculate the hightemperature thermodynamic and transport properties of the plasma flow, but now I find that this results in a conflict with using the DPM model... As far as I know, it's not possible to use a UDF for density, but only the idealgaslaw when using combusting paricles. Did you manage to solve this problem in some way? Thank you in advance! Ian 
All times are GMT 4. The time now is 23:26. 