CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Question about DEFINE_DPM_LAW (https://www.cfd-online.com/Forums/fluent-udf/145286-question-about-define_dpm_law.html)

ZJX December 2, 2014 08:54

Question about DEFINE_DPM_LAW
 
Hello:
everyone, I'm simulating the combustion of black liquor, some chracters of black liquor are different from which defined in Fluent,so I must use DEFINE_DPM_LAW to do some modification on the original one. my modification is based on the following example:
/************************************************** ********************
UDF that models a custom law for evaporation swelling of particles
************************************************** *********************/
#include "udf.h"
DEFINE_DPM_LAW(Evapor_Swelling_Law,p,ci)
{
real swelling_coeff = 1.1;
/* first, call standard evaporation routine to calculate
the mass and heat transfer */
VaporizationLaw(p);
/* compute new particle diameter and density */
P_DIAM(p) = P_INIT_DIAM(p)*(1. + (swelling_coeff - 1.)*
(P_INIT_MASS(p)-P_MASS(p))/(DPM_VOLATILE_FRACTION(p)*P_INIT_MASS(p)));
P_RHO(p) = P_MASS(p) / (3.14159*P_DIAM(p)*P_DIAM(p)*P_DIAM(p)/6);
P_RHO(p) = MAX(0.1, MIN(1e5, P_RHO(p)));
}
this UDF call vaporizationlaw first,I think the vaporizationlaw will calculate the changes of temperature、diameter and mass of particle, then the following program will calculate another temperature、diameter and mass of particle, the last one will overwrites the previous data.In order to test if my idea is correct,I wrote the following UDF:
#include 'UDF.h'
#include 'dpm.h'
DEFINE_DPM_LAW(Surface_Combustion,p,ci)
{
SurfaceCombustionLaw(p);
}
I used this UDF to replace the 'Surface Combustion' in the custom law,I think I made nothing change on this law,so the simulation results should not changed,but it proved that I was wrong, the Fluent didn't calculte the reaction that take place during surface combustion.
I was so depressed,I don't know what 'SurfaceCombustionLaw' calculated,so can anybody give some suggestion to me?

thanks


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