<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[fluent如何输出颗粒对壁面的碰撞速度和角度。]]></title><description><![CDATA[<p dir="auto">我用fluent模拟气固管流冲蚀，得到了壁面的冲蚀速率：<br />
1、问题：fluent导出壁面数据后，缺乏颗粒对壁面的平均碰撞速度（轴向、径向、切向）和平均角度（入射角、反射角）这五个变量。 一个壁面位置受多次颗粒撞击，速度和角度有多个，需要统计一下平均。<br />
2、UDF刚接触，按照模板修改了一点点，不知道怎么继续写下去，求高人指路！<br />
#include "udf.h"</p>
<pre><code>DEFINE_DPM_BC(bc_reflect,p,t,f,f_normal,dim)
{
  real alpha;  /* angle of particle path with face normal */
  real vn=0.;
  real nor_coeff = 0.;
  real tan_coeff = 0;
  real normal[3];
  int i, idim = dim;
  real NV_VEC(x);


  for (i=0; i&lt;idim; i++)
      normal[i] = f_normal[i];

  if(p-&gt;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)) &amp;&amp; (THREAD_TYPE(t) == THREAD_F_WALL))
        F_CENTROID(x,f,t);
      
       /* 定义壁面反射系数 */
      nor_coeff=0.993-0.0307*alpha+4.75e-4*alpha*alpha-2.61e-6*alpha*alpha*alpha
      tan_coeff=0.998-0.029*alpha+6.43e-4*alpha*alpha-3.56e-6*alpha*alpha*alpha

      /* calculate the normal component, rescale its magnitude by 
         the coefficient of restitution and subtract the change */

      /* Compute normal velocity. */
      for(i=0; i&lt;idim; i++)
        vn += P_VEL(p)[i]*normal[i];

      /* Subtract off normal velocity. */
      for(i=0; i&lt;idim; i++)
        P_VEL(p)[i] -= vn*normal[i];

      /* Apply tangential coefficient of restitution. */
      for(i=0; i&lt;idim; i++)
        P_VEL(p)[i] *= tan_coeff;

      /* Add reflected normal velocity. */
      for(i=0; i&lt;idim; i++)
        P_VEL(p)[i] -= nor_coeff*vn*normal[i];  

      /* Store new velocity in P_VEL0 of particle */
      for(i=0; i&lt;idim; i++)
        P_VEL0(p)[i] = P_VEL(p)[i];
      
      return PATH_ACTIVE;
    }

  return PATH_ABORT;
}
</code></pre>
]]></description><link>https://cfd-china.com/topic/1566/fluent如何输出颗粒对壁面的碰撞速度和角度</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 19:58:27 GMT</lastBuildDate><atom:link href="https://cfd-china.com/topic/1566.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 May 2018 06:47:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to fluent如何输出颗粒对壁面的碰撞速度和角度。 on Wed, 23 May 2018 23:45:41 GMT]]></title><description><![CDATA[<p dir="auto">这个问题比较复杂，有兴趣的话，可以加QQ18743641聊一下。<br />
轴向，径向，切向还是按照解析几何的方法换算一下就行，只是坐标系的切换而已。这个宏在每个颗粒的轨迹可能与壁面碰撞的时候都会运算一次，所以很容易输出所有的碰撞相关的物理量，唯一的缺陷是这个碰撞是不计时间，只考虑碰撞那一刻的。由于fluent内部trap算法保密，所以很多问题也是很难处理，你不得不自己编个碰撞算法。</p>
]]></description><link>https://cfd-china.com/post/8497</link><guid isPermaLink="true">https://cfd-china.com/post/8497</guid><dc:creator><![CDATA[l.j刘侃]]></dc:creator><pubDate>Wed, 23 May 2018 23:45:41 GMT</pubDate></item></channel></rss>