当前位置: 首页 > 计算模拟 >fluent中UDF颗粒直径设定

fluent中UDF颗粒直径设定

作者 lazylazylazy
来源: 小木虫 200 4 举报帖子
+关注

如何使用DEFINE_DPM_LAW,编写粒子直径代码符合正态分布。 返回小木虫查看更多

今日热帖
  • 精华评论
  • duwei789551

    是用law吗?我也是刚学,看到这个
    4.5.4 DEFINE_DPM_INJECTION_INIT
    功能和使用方法的介绍
    你可以使用DEFINE_DPM_INJECTION_INIT macro when you want to initialize injections by specifying the particle properties at the time of injection.
    Macro:
    DEFINE_DPM_INJECTION_INIT ( name, I)
    Argument types:
    Injection *I
    Function returns:
    void
    There are two arguments to DEFINE_DPM_INJECTION_INIT: name and I. name is the name of the UDF, specified by you. 当你的UDF编译和连接时,你为函数所选择的名字会在FLUENT图形用户界面中变得可见,且可被选择。 I is a variable that is passed by the FLUENT solver to your UDF.
    I is a pointer to the Injection structure which is a container for the particles being created. This function is called twice for each Injection before the first DPM iteration, and then called once for each Injection before the particles are injected into the domain at each subsequent DPM iteration.
    Your UDF can initialize a particle's injection properties such as location, diameter, and velocity.
    下面编译的UDF名字为init_random_diameter, initializes the particle diameter ( P_DIAM) with a randomized distribution in the range from 10 -5 m to 10 -3 m. The initial particle density ( P_RHO) is set to 1 kg/m 3. Initial particle mass is computed accordingly.
    /*********************************************************************/
    /* UDF that initializes particle injection properties */
    /*********************************************************************/
    #include "udf.h"
    #include "random.h" /* not included in udf.h so must include here */
    DEFINE_DPM_INJECTION_INIT(init_random_diameter,I)
    {
    Particle *p;
    CX_Message("Initializing Injection: %s with random diameter\n",I->name);
    loop(p,I->p) /* Standard Fluent Looping Macro to get
    particle streams in an Injection */
    {
    p->flow_rate = 1.e-4;
    P_DIAM(p) = 1.e-5 + fabs(cheap_gauss_random())*1.e-3;
    P_RHO(p) = 1.0;
    P_MASS(p) = P_RHO(p)*M_PI*pow(P_DIAM(p),3.0)/6.0;
    }
    },

  • lazylazylazy

    引用回帖:
    2楼: Originally posted by duwei789551 at 2017-01-07 13:23:33
    是用law吗?我也是刚学,看到这个
    4.5.4 DEFINE_DPM_INJECTION_INIT
    功能和使用方法的介绍
    你可以使用DEFINE_DPM_INJECTION_INIT macro when you want to initialize injections by specifying the particle pro ...

    应该是DEFINE_DPM_LAW吧,我本来也是考虑在哪里加载,后来看到UDF帮助里这一段写的


    There are three arguments to DEFINE_DPM_LAW: name, p, and ci. name is the
    name of the UDF, specified by you. 当你的 UDF 编译和连接时,你为函数所选择
    的名字会在 FLUENT 图形用户界面中变得可见,且可被选择。 p and ci are
    variables that are passed by the FLUENT solver to your UDF.
    p is a pointer to a Tracked_Particle structure that contains data relating to the particle
    being tracked. This pointer can be used as an argument to the macros defined in
    Section 5.7 to obtain information about particle properties (e.g., injection properties).
    ci is an integer that indicates whether the continuous and discrete phases are coupled
    (equal to 1 if coupled with continuous phase, 0 if not coupled).
    Your UDF can define custom laws for particle properties (mass, diameter,
    temperature, etc.) as the droplet or particle exchanges mass and energy with its
    surroundings.

    觉得应该是用DEFINE_DPM_LAW编写   因为里面提到粒子直径了

  • lazylazylazy

    引用回帖:
    2楼: Originally posted by duwei789551 at 2017-01-07 13:23:33
    是用law吗?我也是刚学,看到这个
    4.5.4 DEFINE_DPM_INJECTION_INIT
    功能和使用方法的介绍
    你可以使用DEFINE_DPM_INJECTION_INIT macro when you want to initialize injections by specifying the particle pro ...

    DEFINE_DPM_LAW里有一段话里说的可以用来定义粒子质量,直径,温度等  所以我觉得应该是在这里加载

  • 燕赵帅

    我想做一个DPM中颗粒质量流量随时间变化的UDF 求教

猜你喜欢
下载小木虫APP
与700万科研达人随时交流
  • 二维码
  • IOS
  • 安卓
复试调剂复试调剂
复试调剂二维码获取复试 & 调剂指南!微信扫一扫
商务合作商务合作
商务合作二维码商务合作咨询微信扫一扫(备注:商务合作)
学术干货学术干货
学术干货二维码微信扫一扫了解最新学术干货
论文辅导论文辅导
论文辅导二维码微信扫一扫添加老师,免费咨询
师资招募师资招募