CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Diffusion source and user defined boundary conditions. (https://www.cfd-online.com/Forums/fluent-udf/185896-diffusion-source-user-defined-boundary-conditions.html)

Elizabeth Wang April 5, 2017 04:30

Diffusion source and user defined boundary conditions.
 
Hi, everyone,

I have two questions about Fluent UDF when I was using it. I would like to share them with you, and hopefully someone can help me out.
The first question is about the boundary conditions. In my simulations, methane enters in porous medium through bottom pressure-inlet and reacts with oxygen in porous medium. Because of incomplete reaction, some methane flows out of pressure outlet. What counts is the oxygen diffuses in this porous medium through top out-let boundary conditions since the gradient of concentration. How to set a suitable boundary condition which can be an in-let and out-let at the same time?
To solve the first problem, I wrote a UDF oxygen constant source and hooked it in porous medium zone. Then I found a mistake. The flux of oxygen is an unknown variable, and I can’t use a constant to replace it in the reaction.
The other question is related to oxygen source. How to write this kind of diffusion source ?
Any suggestion or comment is welcome and will be greatly appreciated.

Elizabeth Wang


All times are GMT -4. The time now is 20:55.