CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Species Diffusivity in PEMFC Simulation (https://www.cfd-online.com/Forums/fluent/34662-species-diffusivity-pemfc-simulation.html)

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))

diffu=1e-10;

else

diffu=2.88e-5;

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 16:05.