CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Using UDF in fuel cell addon module (https://www.cfd-online.com/Forums/fluent/147705-using-udf-fuel-cell-addon-module.html)

qwe2077 January 27, 2015 20:57

Using UDF in fuel cell addon module
 
Hi I'm using PEM fuel cell addon module in fluent.
I'm tring to model the micro porous layer to a unit cell.
But in the fuel cell module, I can give only one porocity and one contact angle to the porous cell zone.
So I need to change boundary conditions in the porous media.
then I should use UDF macro to give boundary conditions.

so I got in to the pem_user.c file and found

DEFINE_DIFFUSIVITY(diff,c,t,j_spe)
{
return pem_diff(c,t,j_spe);
}

and in the pem.h file,
real pem_diff(cell_t c, Thread *t, int j_spe);

My questions are,

1. Is there no way to see the contents of pem_diff(c,t,j_spe) ?
2. How can I use UDF Macro in the fuel cell addon module?
3. Can you give me a advise about modeling extra layer of porous media?

walied123 February 11, 2015 14:17

fuel cell module addon_code
 
1 Attachment(s)
hi, dear

to see the content of the addon code of fuel cell please follow the directories "C:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\addons"

you can make change to the pem code and do the recompilation again.
see the attached pdf file for more datails.

qwe2077 February 11, 2015 22:33

Hi walied123 thanks for your reply.

yes I know Ansys provides user-accessable-functions in pem_user.c file in addons/src folder as you mentioned.

I want to see and change the contents of UDF of source terms and charge transfer conservation.

In the C-file, I couldn't find any content of them.

please help me

maverick123 February 12, 2015 02:55

If you want to see the equations how these source terms are calculated by default..check the fuel cell manual..it is given over there...



Quote:

Originally Posted by qwe2077 (Post 531509)
Hi walied123 thanks for your reply.

yes I know Ansys provides user-accessable-functions in pem_user.c file in addons/src folder as you mentioned.

I want to see and change the contents of UDF of source terms and charge transfer conservation.

In the C-file, I couldn't find any content of them.

please help me


qwe2077 February 12, 2015 03:18

Thanks again maverick.

I've checked out the fuel cell manual. It was a lot of help.

How can I see the c-code of default source terms and UDS flux, UDS diffusion?

Are they not opened to see?

There are only declare exression in C file and I can't find the C-code contents of those UDS function.

maverick123 February 12, 2015 03:25

I think, you can not see it as it is not available for Users. But you can modify it for sure with your code/equations.

Quote:

Originally Posted by qwe2077 (Post 531526)
Thanks again maverick.

I've checked out the fuel cell manual. It was a lot of help.

How can I see the c-code of default source terms and UDS flux, UDS diffusion?

Are they not opened to see?

There are only declare exression in C file and I can't find the C-code contents of those UDS function.



All times are GMT -4. The time now is 07:54.