CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Species Diffusivity in PEMFC Simulation (

circle2000 September 20, 2004 22:12

Species Diffusivity in PEMFC Simulation
Hi everyone,

I want to use the udf to set diffusivity of the mixture in MEA to zero, I use the code posted below

DEFINE_DIFFUSIVITY(my_diff,cell,thread,index) {

real diffu;

Domain *domain=Get_Domain(1); if(thread==Lookup_Thread(domain,MEA_ID))




return diffu; }

But it seems that it only changes the diffusivity of H2, I also tried to use if(index==0.1..n-1){if(thread==...)diffu=...;else diffu=...;return diffu;} to set each species's diffusivity, but it still doesn't work, only H2's diffusivity has been changed.

What can I do? Can someone tell me how to use this function well and how to set diffusivity of every species in the mixture?

All times are GMT -4. The time now is 15:25.