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. CFD中文网
  2. Fluent
  3. 关于化学反应带来的质量源项的udf编写

关于化学反应带来的质量源项的udf编写

已定时 已固定 已锁定 已移动 Fluent
2 帖子 2 发布者 1.0k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • S 离线
    S 离线
    shallowdream
    写于 最后由 编辑
    #1

    各位大哥们,最近在模拟一个液固催化反应过程,液体反应物传质到固体催化剂中然后进行反应。在给固相编写源项udf的时候,发现如果直接用C_YI(c, t, 0)来获取浓度,得到的是在固相的浓度。而文献通常所写的反应速度R=k·c1·c2,这里的浓度c都是液相的浓度。在网上和官方手册上也找了一些例子,但是发现好像都不涉及多相流,都是直接获取反应所在相的浓度来计算速度。
    好像不管 DEFINE_SOURCE 还是 REACTION_RATE,都没有对主次流动相的指针,这种情况应该怎么去获取物种在另一个相的浓度呢?
    有大哥知道应该怎么解决吗?感激不尽!97cef91fbe096b63062602774a338744ebf8ac67.jpg 23816063f6246b60fe31ee53adf81a4c510fa267.jpg

    1 条回复 最后回复
  • G 离线
    G 离线
    gemini
    写于 最后由 编辑
    #2

    有一节叫Advanced Multiphase Macro,也许有帮助。


    For most standard UDFs written for multiphase models (for example, source term, material property, profile functions), variables that your function needs (domain pointers, thread pointers, and so on) are passed directly to your UDF as arguments by the solver in the solution process. All you need to do is hook the UDF to your model and everything is taken care of. For example, if your multiphase UDF defines a custom profile for a particular boundary zone (using DEFINE_PROFILE) and is hooked to the appropriate phase or mixture in Ansys Fluent in the relevant boundary condition dialog box, then appropriate phase or mixture variables will be passed to your function by the solver at run time.

    There may, however, be more complex functions you want to write that require a variable that is not directly passed through its arguments. DEFINE_ADJUST and DEFINE_INIT functions, for example, are passed mixture domain variables only. If a UDF requires a phase domain pointer, instead, then it will need to use macros presented in this section to retrieve it. ON_DEMAND UDFS are not directly passed any variables through their arguments. Consequently, any on demand function that requires access to phase or domain variables will also need to use macros presented in this section to retrieve them.

    1 条回复 最后回复

  • 登录

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