CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Using UDF in fuel cell addon module

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2015, 21:57
Question Using UDF in fuel cell addon module
  #1
New Member
 
Brian
Join Date: Jan 2015
Posts: 7
Rep Power: 11
qwe2077 is on a distinguished road
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?
qwe2077 is offline   Reply With Quote

Old   February 11, 2015, 15:17
Default fuel cell module addon_code
  #2
New Member
 
walied
Join Date: Aug 2014
Posts: 16
Rep Power: 12
walied123 is on a distinguished road
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.
Attached Files
File Type: pdf www-eureka-im.pdf (81.3 KB, 206 views)
walied123 is offline   Reply With Quote

Old   February 11, 2015, 23:33
Default
  #3
New Member
 
Brian
Join Date: Jan 2015
Posts: 7
Rep Power: 11
qwe2077 is on a distinguished road
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 is offline   Reply With Quote

Old   February 12, 2015, 03:55
Default
  #4
Member
 
Join Date: Nov 2014
Posts: 31
Rep Power: 11
maverick123 is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Old   February 12, 2015, 04:18
Default
  #5
New Member
 
Brian
Join Date: Jan 2015
Posts: 7
Rep Power: 11
qwe2077 is on a distinguished road
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.
qwe2077 is offline   Reply With Quote

Old   February 12, 2015, 04:25
Default
  #6
Member
 
Join Date: Nov 2014
Posts: 31
Rep Power: 11
maverick123 is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Reply

Tags
fuel cell, module, udf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting cell variable values in a fluid zone using UDF eromon84 Fluent UDF and Scheme Programming 6 March 28, 2021 12:59
Identifying cell in parallel UDF upeksa Fluent UDF and Scheme Programming 0 July 24, 2013 12:27
UDF for heat source on surface instead of the whole cell zone?? benson621 Fluent UDF and Scheme Programming 4 December 8, 2011 12:54
Fuel Cell Module Tutorial Mesh File. PEM_Fuel_Cell Main CFD Forum 1 September 13, 2006 17:11
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 13:51.