Skip to content

Fluent

Fluent交流区

994 主题 4.4k 帖子
  • 这是上述问题的图片

    2
    2 帖子
    3k 浏览
    I

    后来解决的怎么样?

  • 求助冷凝udf

    2
    2 帖子
    3k 浏览
    I

    #include "udf.h"
    /Constants used in psat_h2o to calculate saturation pressure/
    #define PSAT_A 0.01
    #define PSAT_TP 338.15
    #define C_LOOP 8
    #define H2O_PC 22.089E6
    #define H2O_TC 647.286
    /user inputs/
    #define MAX_SPE_EQNS_PRIM 2 /total number of species in primary phase/
    #define index_evap_primary 0 /evaporating species index in primary phase/
    #define prim_index 0 /index of primary phase/
    #define P_OPER 101325 /operating pressure equal to GUI value/
    /end of user inputs/
    //
    / UDF for specifying an interfacial area density /
    /
    /
    double psat_h2o(double tsat)
    /* /
    / Computes saturation pressure of water vapor /
    / as function of temperature /
    / Equation is taken from THERMODYNAMIC PROPERTIES IN SI, /
    / by Reynolds, 1979 /
    / Returns pressure in PASCALS, given temperature in KELVIN /
    {
    int i;
    double var1,sum1,ans1,psat;
    double constants[8]={-7.4192420, 2.97221E-1, -1.155286E-1,
    8.68563E-3, 1.094098E-3, -4.39993E-3, 2.520658E-3, -5.218684E-4};
    / var1 is an expression that is used in the summation loop /
    var1 = PSAT_A(tsat-PSAT_TP);
    /* Compute summation loop /
    i = 0;
    sum1 = 0.0;
    while (i < C_LOOP){
    sum1+=constants[i]pow(var1,i);
    ++i;
    }
    ans1 == sum1(H2O_TC/tsat-1.0);
    / compute exponential to determine result /
    / psat has units of Pascals /
    psat = H2O_PCexp(ans1);
    return psat;
    }
    DEFINE_HET_RXN_RATE(user_evap_condens_react, c, t, hr, mw, yi, rr, rr_t)
    {
    Thread **pt = THREAD_SUB_THREADS(t);
    Thread *tp = pt[0];
    Thread *ts = pt[1];
    int i;
    real concentration_evap_primary, accum = 0., mole_frac_evap_prim,
    concentration_sat ;
    real T_prim = C_T(c,tp); /primary phase (gas) temperature/
    real T_sec = C_T(c,ts); /secondary phase (droplet) temperature/
    real diam = C_PHASE_DIAMETER(c,ts); /secondary phase diameter/
    real D_evap_prim = C_DIFF_EFF(c,tp,index_evap_primary)

    0.7C_MU_T(c,tp)/C_R(c,tp);
    /primary phase species turbulent diffusivity/
    real Re, Sc, Nu, urel, urelx,urely,urelz=0., mass_coeff, area_density,
    flux_evap ;
    if(Data_Valid_P())
    {
    urelx = C_U(c,tp) - C_U(c,ts);
    urely = C_V(c,tp) - C_V(c,ts);
    #if RP_3D
    urelz = C_W(c,tp) - C_W(c,ts);
    #endif
    urel = sqrt(urelxurelx + urelyurely + urelzurelz);
    /relative velocity/
    Re = urel * diam * C_R(c,tp) / C_MU_L(c,tp);
    Sc = C_MU_L(c,tp) / C_R(c,tp) / D_evap_prim ;
    Nu = 2. + 0.6 * pow(Re, 0.5)* pow(Sc, 0.333);
    mass_coeff = Nu * D_evap_prim / diam ;
    for (i=0; i < MAX_SPE_EQNS_PRIM ; i++)
    {
    accum = accum + C_YI(c,tp,i)/mw[i][prim_index];
    }
    mole_frac_evap_prim = C_YI(c,tp,index_evap_primary)
    / mw[index_evap_primary][prim_index] / accum;
    concentration_evap_primary = mole_frac_evap_prim * P_OPER
    / UNIVERSAL_GAS_CONSTANT / T_prim ;
    concentration_sat = psat_h2o(T_sec)/UNIVERSAL_GAS_CONSTANT/T_sec ;
    area_density = 6. * C_VOF(c,ts) / diam ;
    flux_evap = mass_coeff *
    (concentration_sat - concentration_evap_primary) ;
    *rr = area_density * flux_evap ;
    }
    }
  • 2 帖子
    3k 浏览
    I

    图在哪?
    感觉描述的很有意思
    再试试??

  • 环境温度的用户自定义函数从哪里设置呀

    2
    2 帖子
    3k 浏览
    I

    请自己看手册。。。
    祝早日脱离苦海

  • 关于加载用于自定义函数

    2
    2 帖子
    2k 浏览
    I

    可以加载多个

  • 2 帖子
    2k 浏览
    I

    我真的发现,凡是写“求大神指导的”,下面的回复就是这样的

  • 2 帖子
    2k 浏览
    I

    编译方式不一样?

  • 请教大家一个有关反应速率的udf急。

    2
    2 帖子
    3k 浏览
    I

    #include "udf.h"
    DEFINE_EC_RATE(user_ec_rate, f, fthread, r, V, current, didV, Eeq)
    {
    double alpha_a = r->alpha_a, alpha_c = r->alpha_c;
    double io = r->io
    double T = F_T(f,fthread);
    double arg1, arg2;
    cxboolean tafelmethod = r->tafelmethod;
    int i;
    double eta;
    if (tafelmethod)
    {
    alpha_a = 2.303 * UNIVERSAL_GAS_CONSTANT * 298.15 /(alpha_a * FARADAY_CONSTANT);
    alpha_c = 2.303 * UNIVERSAL_GAS_CONSTANT * 298.15 /(alpha_c * FARADAY_CONSTANT);
    }
    Eeq = r->Eeq;
    eta = V - Eeq;
    for(i = 0; i<r->n_reactants; i++)
    if( ABS( r->exp_reactant[i] ) > SMALL_S )
    {
    int ni = r->reactant[i];
    io = pow((F_YI(f,fthread,ni)/MAX(r->yi_ref[ni],SMALL) + 1.0e-20), r->exp_reactant[i]);
    }
    for(i = 0; i<r->n_products; i++)
    if( ABS( r->exp_product[i] ) > SMALL_S )
    {
    int ni = r->product[i];
    io = pow((F_YI(f,fthread,ni)/MAX(r->yi_ref[ni],SMALL) + 1.0e-20), r->exp_product[i]);
    }
    arg1 = FARADAY_CONSTANT / (UNIVERSAL_GAS_CONSTANTT);
    arg2 = arg1eta;
    current = io( exp( arg2alpha_a ) - exp( -arg2alpha_c ) );
    didV = io( arg1alpha_aexp( arg2alpha_a ) + arg1alpha_cexp( -arg2alpha_c ) );
    /* If multiple electrochemical reactions are used, you can define rate for each reaction
    using the following if-statement /
    /
    if (STREQ(r->name, "reaction-1"))
    {
    ...
    }
    else if (STREQ(r->name, "reaction-2"))
    {
    ...
    }
    */
    }

  • 二维双圆柱串联

    2
    2 帖子
    3k 浏览
    I

    Cd 变化,物理上就是这样吧

  • 2 帖子
    3k 浏览
    I

    getdata取点;
    给原作者发个邮件问一下;
    这个图是excel 做的吧

    你可以用excel 也可以用origin

  • 有关ANSYS Fluent和PV panels simulation的问题

    2
    2 帖子
    3k 浏览
    I

    大气温度可以通过udf patch 进去,太阳辐照我推测可以采用边界条件设置,但是Fluent guide里面完全没有提到关于weather file 的东西,请您给些提示吧

  • openfoam,导入,ansys

    2
    2 帖子
    3k 浏览
    I

    进展怎么样?

  • 咨询一个关于fluent并行计算的问题

    2
    2 帖子
    2k 浏览
    I

    MPI 安装都一样吗?

  • 2 帖子
    2k 浏览
    I

    http://blog.sina.com.cn/s/blog_599d8faa010121yc.html
    参考一下流沙大哥的

  • FLUENT耦合EDEM模拟水平管气力输送问题请教

    2
    2 帖子
    2k 浏览
    I

    你查一下这方面的实验论文吧?
    壁面速度低,容易造成管壁聚集

  • 特征长度如何选取

    2
    2 帖子
    4k 浏览
    I

    雷诺数计算和其定义有关。比如槽道流动中特征长度采用的是槽径,平板流动就是板长,而颗粒雷诺数就是采用颗粒粒径。
    你搜过其他论文里面的选取原则吗?

  • Fluent周期网格模拟有什么限制吗?

    2
    2 帖子
    2k 浏览
    I

    可以吧,fluent给定的周期边界的案例就是类似的

  • fluent 大渦模拟温度变化问题

    2
    2 帖子
    2k 浏览
    I

    我搜索了一下“大神”这个关键词,在本站目前有355个帖子,下面几乎都是和我这条回复一样。

  • 2 帖子
    2k 浏览
    I

    RSM 怎么样? 对雷诺数没有的限制

  • fluent theory guide翻译

    2
    2 帖子
    3k 浏览
    I

    @东岳 在 关于correctPhi.H这个函数 中说:

    哦对了还有fluent理论指南。最近琐事太多了:sad: 。都已经翻译完了。就是格式太难统一了。因为是各自翻译的。用的是word。处理格式比较费时。

    这个可能是最近的进展了