2.5.9.  DEFINE_DPM_PROPERTY

2.5.9.1. Description

You can use DEFINE_DPM_PROPERTY to specify properties of discrete phase materials. You can model the following dispersed phase properties with this type of UDF:

  • particle emissivity

  • vapor pressure

  • vaporization temperature

  • thermophoretic coefficient

  • particle scattering factor

  • boiling point

  • particle viscosity

  • particle density

  • particle surface tension

  • binary diffusivity

  • swelling coefficient

  • latent heat

  • specific heat


Important:  When you are using the DEFINE_DPM_PROPERTY macro to specify the density property for a combusting particle material, all other model-specific density calculations, such as the swelling calculation during particle devolatilization, or the composition dependent char density will be ignored and the density calculated by the UDF will always be used. Similarly when you are using the DEFINE_DPM_PROPERTY macro to specify the specific heat property for a combusting particle material, the composition dependent char specific heat option will be ignored.



Important:  When you are using either the non-premixed or the partially-premixed combustion model in the continuous phase calculation together with DEFINE_DPM_PROPERTY for particle specific heat, the DEFINE_DPM_PROPERTY UDF will be used for the specific heat and enthalpy calculations of the non-volatile/non-reacting particle mass. 


2.5.9.2. Usage

DEFINE_DPM_PROPERTY (name, c, t, tp, T)

Argument Type

Description

symbol name

UDF name.

cell_t c

Index that identifies the cell where the particle is located in the given thread.

Thread *t

Pointer to the thread where the particle is located.

Tracked_Particle *tp

Pointer to the Tracked_Particle data structure which contains data related to the particle being tracked.

real T Temperature. The appropriate temperature will be passed to your UDF by the solver. Depending on the DPM model you are using and the physical property type, it may be the temperature of the particle, the film, or the continuous phase at the current, previous, or initial location of the particle being tracked.

Function returns

real

There are five arguments to DEFINE_DPM_PROPERTY: name, c, t, tp, and T. You supply name, the name of the UDF. c, t, tp, and T are variables that are passed by the ANSYS Fluent solver to your UDF. Your UDF will need to compute the real value of the discrete phase property and return it to the solver.

If you are using DEFINE_DPM_PROPERTY to specify the specific heat for particle materials, your UDF will also need to set the value of the particle enthalpy in the Tracked_Particle *tp, tp->enthalpy, to the particle sensible enthalpy, which should be calculated as the temperature integral of the specific heat function from the reference temperature, T_REF, to the temperature, T.


Important:  Pointer tp can be used as an argument to the macros defined in DPM Macros to obtain information about particle properties (for example, injection properties).


2.5.9.3. Example

In the following example, three discrete phase material property UDFs (named coal_emissivity , coal_scattering, and coal_cp, respectively) are concatenated into a single C source file. These UDFs must be executed as compiled UDFs in ANSYS Fluent.

/*********************************************************************
   UDF that specifies discrete phase materials
 **********************************************************************/
 
 #include "udf.h"
 
 DEFINE_DPM_PROPERTY(coal_emissivity,c,t,tp,T)
 {
    real mp0= TP_INIT_MASS(tp);
    real mp = TP_MASS(tp);
    real vf, cf;
    /* get the material char and volatile fractions and store them */
    /* in vf and cf             */
    vf=DPM_VOLATILE_FRACTION(tp);
    cf=DPM_CHAR_FRACTION(tp);
    if (!(((mp/mp0) >= 1) || ((mp/mp0) <= 0)))
      {
       if ((mp/mp0) < (1-(vf)-(cf)))
         {
          /* only ash left */
          /* vf = cf = 0; */
            return .001;
         }
       else if ((mp/mp0) < (1-(vf)))
         {
          /* only ash and char left */
          /* cf = 1 - (1-(vf)-(cf))/(mp/mp0); */
          /* vf = 0; */
          return 1.0;
         }
     else   {
      /* volatiles, char, and ash left */
      /* cf = (cf)/(mp/mp0); */
      /* vf = 1. - (1.-(vf))/(mp/mp0); */
      return 1.0;
     }
  }
  return 1.0;
 }
 
 DEFINE_DPM_PROPERTY(coal_scattering,c,t,tp,T)
 {
    real mp0= TP_INIT_MASS(tp);
    real mp = TP_MASS(tp);
    real cf, vf;
    /* get the original char and volatile fractions and store them */
    /* in vf and cf             */
    vf=DPM_VOLATILE_FRACTION(tp);
    cf=DPM_CHAR_FRACTION(tp);
    if (!(((mp/mp0) >= 1) || ((mp/mp0) <= 0)))
      {
       if ((mp/mp0) < (1-(vf)-(cf)))
       {
        /* only ash left */
        /* vf = cf = 0; */
        return 1.1;
       }
     else if ((mp/mp0) < (1-(vf)))
       {
        /* only ash and char left */
        /* cf = 1 - (1-(vf)-(cf))/(mp/mp0); */
        /* vf = 0; */
        return 0.9;
       }
     else   {
      /* volatiles, char, and ash left */
      /* cf = (cf)/(mp/mp0); */
      /* vf = 1. - (1.-(vf))/(mp/mp0); */
      return 1.0;
     }
    }
  return 1.0;
 } 

 DEFINE_DPM_PROPERTY(coal_cp,c,t,tp,T)
 {
  real mp0= TP_INIT_MASS(tp);
  real mp = TP_MASS(tp);
  real cf = TP_CF(tp); /*char fraction */
  real vf = TP_VF(tp); /* volatiles fraction */
  real af = 1. - TP_VF(tp) - TP_CF(tp);  /* ash fraction */
  real Cp = 2000*af + 1100*vf + 1300*cf;
  tp->enthalpy = Cp*(T-T_REF);

  return Cp;
 }

2.5.9.4. Hooking a DPM Material Property UDF to ANSYS Fluent

After the UDF that you have defined using DEFINE_DPM_PROPERTY is interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name of the argument that you supplied as the first DEFINE macro argument will become visible in the Create/Edit Materials dialog box in ANSYS Fluent. See Hooking DEFINE_DPM_PROPERTY UDFs for details on how to hook your DEFINE_DPM_PROPERTY UDF to ANSYS Fluent.


Release 18.2 - © ANSYS, Inc. All rights reserved.