-
-
August 4, 2022 at 7:53 amjchen17Subscriber
hi all, I'm using DPM to simulate a filter, namely, when a bunch of particles flow to a surface, if the particle size is big then reflect. otherwise, pass through. The problem is the small particles stick on the surface, instead of pass through.
the figure is my results. I only tested small particles (in the code, it's < 120 um. big particles are fine, they can reflected) as can be seen, the particles trapped on the surface.
What I'd like to do is
if (particle diameter > D_filter_size)
{
boundary condition is reflect;
}
if (particle diameter < D_filter_size)
{
boundary condition interior;
}
Â
Â
the following is my code. it only contains the big particle case. However, I also tried to manipulate the small paritcle position and velocity, the results are same. particles < 120 um trapped on the surface.
#include "udf.h"
#include "dpm.h"
#include "surf.h"
#include "random.h"
#include
#include
/*Â
define a user-defined dpm boundary condition routine
* bc_reflect: name
* p: the tracked particle
* t: the touched face thread
* f: the touched face
* f_normal: normal vector of touched face
* dim: dimension of the problem (2 in 2d and 2d-axi-swirl, 3 in 3d)
*
* return is the status of the particle, see enumeration of Path_Status
* in dpm.h
*/Â
DEFINE_DPM_BC(bc_filter, p, t, f, f_normal, dim)
{
  real alpha; /* angle of particle path with face normal */
  real vn = 0.;
  real vns = 0.;
  real nor_coeff = 0.5;
  real tan_coeff = 0.7;
  real normal[3];
  int i, idim = dim;
  real NV_VEC(x);
  for (i = 0; i    normal[i] = f_normal[i];   if (P_DIAM(p) >= 0.00012)
  {
    if (p->type == DPM_TYPE_INERT)
      alpha = M_PI / 2. - acos(MAX(-1., MIN(1., NV_DOT(normal, P_VEL(p)) / MAX(NV_MAG(P_VEL(p)), DPM_SMALL))));
    if ((NNULLP(t)) && (THREAD_TYPE(t) == THREAD_F_WALL))
      F_CENTROID(x, f, t);
    // calculate the normal component, rescale its magnitude by the coefficient of restitution and subtract the changeÂ
    //Compute normal velocity.Â
    Â
    for (i = 0; i      vn += P_VEL(p)[i] * normal[i];
    // Subtract off normal velocity.Â
    for (i = 0; i      P_VEL(p)[i] -= vn*normal[i];
    // Apply tangential coefficient of restitution.Â
    for (i = 0; i      P_VEL(p)[i] *= tan_coeff;
    // Add reflected normal velocity.Â
    for (i = 0; i      P_VEL(p)[i] -= nor_coeff*vn*normal[i];
    // Store new velocity in P_VEL0 of particleÂ
    Â
    for (i = 0; i      P_VEL0(p)[i] = P_VEL(p)[i];
    return PATH_ACTIVE;
  }  return PATH_ACTIVE;
  Â
}Â
Anyone could help me?
-
August 4, 2022 at 9:05 amRobForum Moderator
What did you set the interior DPM fate to be?Â
-
August 4, 2022 at 12:24 pmjchen17Subscriber
if (particle diameter > D_filter_size)
{
boundary condition is DPM_BC_REFLECT;
}
if (particle diameter < D_filter_size)
{
boundary condition DPM_BC_INTERIOR;
}
For interior DPM, it's just like the "porous jump" boundary, interior for DPM, and particles can pass through the boundary without anything happening ("filter" surface in my figure).
-
August 4, 2022 at 2:36 pmRobForum Moderator
You set the result of the particle passing a location,  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v221/en/flu_udf/flu_udf_sec_define_dpm_bc.html not the boundary condition on a surface. Remember DPM is tracked in the Lagrangian frame, not the Euler.Â
-
August 10, 2022 at 8:05 amjchen17Subscriber
-
-
August 10, 2022 at 10:37 amRobForum Moderator
Example 3.Â
-
- The topic ‘DPM boundary UDF for a filter’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Script error Code: 800a000d
- Fluent fails with Intel MPI protocol on 2 nodes
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Encountering Error in Heterogeneous Surface Reaction
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.