Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

1

15623209328

@15623209328
关于
帖子
1
主题
1
群组
0
粉丝
0
关注
0

帖子

最新

  • plasma 等离子体射流的 体积力——UDF实现
    1 15623209328

    #include "udf.h"
    #include "math.h"
    #include "sg_udms.h"
    #define debye 0.001
    #define rhomax 0.0008
    #define phimax 5000
    #define sigma 0.003
    #define rholoc 0.5

    enum {
    phi,
    rho
    };

    enum {
    Ex,
    Ey,
    Fx,
    Fy,
    Fm
    };

    %%%%% CALCULATION OF ELECTRIC FIELD STRENGTH %%%%%%%%%%%%%

    DEFINE_ADJUST(udf_adjust, domain)
    {
    Thread *t;
    cell_t c;

    thread_loop_c(t,domain)
    {
    begin_c_loop(c,t)
    {
    C_UDMI(c,t,Ex)=-C_UDSI_G(c,t,phi)[0];
    C_UDMI(c,t,Ey)=-C_UDSI_G(c,t,phi)[1];
    }
    end_c_loop(c,t)
    }
    }

    %%%%% DEFINITION OF SOURCE OF HELMHOLTZ EQUATION %%%%%%%

    DEFINE_SOURCE(rho_source, c, t, dS, eqn)
    {
    real source;
    source=-pow(debye,-2)*C_UDSI(c,t,rho);
    dS[eqn]=-pow(debye,-2);
    return source;
    }

    %%%%%%%%%%%%%% DEFINITION OF X-MOMENTUM SOURCE TERM %%%%%%%%

    DEFINE_SOURCE(X_Source, c, t, dS, eqn)
    {
    real Sourcex;
    Sourcex=-rhomaxphimaxC_UDSI(c,t,rho)C_UDSI_G(c,t,phi)[0];
    dS[eqn]=-rhomax
    phimax;
    C_UDMI(c,t,Fx)=Sourcex;
    return Sourcex;
    }

    %%%%%%%%%%%%%%%% DEFINITION OF Y-MOMENTUM SOURCE TERM %%%%%%%%

    DEFINE_SOURCE(Y_Source, c, t, dS, eqn)
    {
    real Sourcey;
    Sourcey=-rhomaxphimaxC_UDSI(c,t,rho)C_UDSI_G(c,t,phi)[1];
    dS[eqn]=-rhomax
    phimax;
    C_UDMI(c,t,Fy)=Sourcey;
    C_UDMI(c,t,Fm)=sqrt(C_UDMI(c,t,Fx)*C_UDMI(c,t,Fx)+C_UDMI(c,t,Fy)*C_UDMI(c,t,Fy));
    return Sourcey;
    }

    %%%%%%%%%%%%%%%%%%%%% DISTRIBUTION FUNCTION ON WALL %%%%%%%%%%%%%%%%%%%%

    DEFINE_PROFILE(rho_profile,thread,i)
    {
    float r[3];
    float x;
    real xloc;
    face_t f;

    begin_f_loop(f,thread)
    {
    F_CENTROID(r,f,thread);
    xloc = r[0];
    F_PROFILE(f,thread,i)=exp(-pow((xloc-rholoc),2)/(2*pow(sigma,2)));
    }
    end_f_loop(f,thread)
    }

    这是国外毕业论文里的UDF( Master of Science Thesis : Master of Science ThesisModeling of Dielectric-Barrier Discharge ActuatorImplementation, validation and generalization of an electrostatic model),模拟一对电极的等离子体,如下图
    plasma-mesh.png

    现在遇到的问题是,不确定在fluent中定义的x和y的动量source term是否正确。
    (1)加载UDF后,定义UDM和UDS的数量,5和2.
    define UDS.png define UDM.png

    (2)定义x、y动量源项
    x mom.png y动量源项一样的操作
    (3)定义 User Scalar 0 和 1?这个步骤我不太确定
    confuse UDS.png

    所以在UDF中, rho_source和rho_profile在fluent中应该如何使用呢?请教下各位前辈,谢谢!

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]