|
[Sponsors] |
define different mass diffusion coefficient in different zones |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
Weiqiang Liu
Join Date: Feb 2018
Posts: 278
Rep Power: 9 ![]() |
Hi all,
I am trying to assign different mass diffusion coefficients in different zones. I use DEFINE_DIFFUSIVITY. In porous zone, mass diffusion coefficient is a combination of molecular and knudsen coefficient while in other fluid zone, mass diffusion is just molecular diffusion calculated by kinetic theory. I attached my code here. I spend a while to check my code. However, it's still can not be loaded with some error. I think fluent only check syntax of the code no matter the logic is right or wrong. Can anybody help me to check my code? I am very new to UDF. Thanks very much! Weiqiang |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Joe
Join Date: Jan 2022
Posts: 13
Rep Power: 4 ![]() |
Hello all,
I have a similar problem as Weiqiang Liu. I want to define two different diffusion coefficients in two different cell zones. For this I use the following UDF: Code:
DEFINE_DIFFUSIVITY(diffusivity, c, t, i) { Domain* d; Thread * tc1, * tc2; d = Get_Domain(1); tc1 = Lookup_Thread(d, 8); tc2 = Lookup_Thread(d, 9); if (t == tc1) { diffusivity = 1e-7; } else if (t == tc2) { diffusivity = 1e-5; } return diffusivity; } Many thanks in advance. Many greetings Joe |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
juan hincapie
Join Date: Apr 2022
Posts: 1
Rep Power: 0 ![]() |
Did you finally figure out how to solve this problem? I'm trying to fix a diffusion value in a porous zone. I dont know how to do it.
|
|
![]() |
![]() |
![]() |
Tags |
effective diffusion, mass diffusion, udf |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP----Surface Reaction UDF | Ashi | Fluent UDF and Scheme Programming | 1 | May 19, 2020 21:13 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion | faizan_habib7 | CFX | 4 | February 1, 2016 17:00 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 00:00 |
question about how to define diffusion coefficient in CFX | rystokes | CFX | 0 | December 12, 2009 05:32 |