[ANSYS, Inc. Logo] return to home search
next up previous contents index

2.5.7 DEFINE_DPM_LAW



Description


You can use DEFINE_DPM_LAW to customize laws for particles. For example your UDF can specify custom laws for heat and mass transfer rates for droplets and combusting particles. Additionally, you can specify custom laws for mass, diameter, and temperature properties as the droplet or particle exchanges mass and energy with its surroundings.



Usage



DEFINE_DPM_LAW( name, p, ci)


Argument Type Description
symbol name UDF name.
Tracked_Particle *p Pointer to the Tracked_Particle data structure which
  contains data related to the particle being tracked.
int ci Variable that indicates whether the continuous and discrete
  phases are coupled (equal to $1$ if coupled with continuous
  phase, $0$ if not coupled).
   
Function returns  
void  
   

There are three arguments to DEFINE_DPM_LAW: name, p, and ci. You supply name, the name of the UDF. p and ci are variables that are passed by the ANSYS FLUENT solver to your UDF.

figure   

Pointer p can be used as an argument to the macros defined in Section  3.2.7 to obtain information about particle properties (e.g., injection properties).



Example


The following UDF, named Evapor_Swelling_Law, models a custom law for the evaporation swelling of particles. The source code can be interpreted or compiled in ANSYS FLUENT. See Section  2.5.13 for another example of DEFINE_DPM_LAW usage.

/**********************************************************************
   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)));
}



Hooking a Custom DPM Law to ANSYS FLUENT


After the UDF that you have defined using DEFINE_DPM_LAW is interpreted (Chapter  4) or compiled (Chapter  5), the name of the argument that you supplied as the first DEFINE macro argument will become visible in the Custom Laws dialog box in ANSYS FLUENT. See Section  6.4.7 for details on how to hook your DEFINE_DPM_LAW UDF to ANSYS FLUENT.


next up previous contents index Previous: 2.5.6 DEFINE_DPM_INJECTION_INIT
Up: 2.5 Discrete Phase Model
Next: 2.5.8 DEFINE_DPM_OUTPUT
Release 12.0 © ANSYS, Inc. 2009-01-14