关于在 udf 定义比热参数问题
-
在Fluent 中定义物性比热时 有一个特定的函数
DEFINE_SPECIFIC_HEAT(specific_heat_paddy, T, Tref, h, yi)
只能传入一些指定参数,而我想通过 uds 传入一部分数据,根本不知道怎么弄?下边是ANSYS surpport 关于一个相关问题的答案,看完更加懵逼了,希望有大神可以解释一下,谢谢
"**Why is the cell data not available in the DEFINE_SPECIFIC_HEAT UDF?**
The UDF for specific heat is called as part of the material definition in the solver where the cell is not available. This is a limitation for this macro and its Real Gas equivalent.
Cp is by definition ∂H/∂T, so for it to have other dependencies is not expected by the solver. Since Cp and enthalpy definitions are critical to the stability of the energy equation, a strict format has to be defined so that the UDF doesn't cause instabilities.The only way to vary the Cp at the cell level is via the variation of the mass fractions of a mixture. This is what most users are trying to emulate when they are using a UDS, UDM or similar value to vary Cp. They should instead add a new species (which is not much more expensive than a UDS) to follow the material flow. The species could be a copy of the original species, but with a different Cp. Then, the Cp can be varied by varying the proportions of the species, potentially via source terms driven by UDM values."