sega |
January 14, 2010 04:43 |
How does DEFINE_DPM_SOURCE work?
I'm trying to learn an understand the source term in Discrete-Phase-Model (DPM).
I have read the example from the UDF-Manual:
Code:
DEFINE_DPM_SOURCE(dpm_source,c,t,S,strength,p)
{
real mp_dot;
Material *sp = P_MATERIAL(p);
/* mp_dot is the (positive) mass source to the continuous phase */
/* (Difference in mass between entry and exit from cell) */
/* multiplied by strength (Number of particles/s in stream) */
mp_dot = (P_MASS0(p) - P_MASS(p)) * strength;
C_DPMS_YI(c,t,0) += mp_dot*dpm_relax;
C_DPMS_ENERGY(c,t) -= mp_dot*dpm_relax*
MATERIAL_PROP(sp,PROP_Cp)*(C_T(c,t)-298.15);
C_DPMS_ENERGY(c,t) -= mp_dot*dpm_relax*
MATERIAL_PROP(sp,PROP_latent_heat);
}
But I can't see where the actual source termin is returned or assigned to the equations.
Which one is the code to actully return the caluclated value (of mp_dot in this example).
|