CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Source Term UDF VS Porous Media Model

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 27, 2012, 05:56
Default Source Term UDF VS Porous Media Model
  #1
New Member
 
Join Date: Aug 2011
Posts: 13
Rep Power: 5
pchoopanya is on a distinguished road
Hello from Thailand,

I am new to UDF and computer programming.

I need to model a PEM fuel cell's flow channel and got stuck on this UDF thing.

I am familiarising myself to the coding starting from, I believe, the simplest of all - source term UDF.

I follow the first tutorial which is the flow in a porous media with a user-defined momentum source term. One question pops up in my head, I have done one tutorial regarding a flow in porous media but with no UDF. The tutorial showed me how to activate the porous model (based on Darcy's law?).

My question is, what is the point of coding the source term via UDF function if we already have this built-in porous media model? Is UDF more accurate?

My next step is to incorporate a simple chemical reaction (Hydrogen + Oxygen = Water + heat). Again, I have done the tutorial regarding chemical reaction but it is more like combustion reaction in the ICE engine (hydrocarbon + oxygen). I cannot find any tutorial to show me how to model the reaction in PEM fuel cell at all. Seems like the others have done this via the UDF source term in order to predict the hydrogen/oxygen consumption rates and water generation rate.

So, is it worth trying to find the way to model the H+O reaction without coding UDF source term? I am asking this because I am so scared of computer programming, but this seems to be unavoidable! Can anyone just assure me that the only way is via UDF? In fact, I am learning the basic C language/coding and I want to be sure that I am on the right track.

Again, can anyone emphasise the necessity of UDF for my PEM fuel cell modelling? I am waiting for the purchase of their PEM fuel cell Add-on Module. But while I am waiting I believe I would be able to build my own model with the use of UDFs and the standard FLUENT. Am I right?

Thank you very much for your comments, sorry for my poor English.




Pattarapong
pchoopanya is online now   Reply With Quote

Old   August 28, 2013, 06:12
Default
  #2
New Member
 
Harshad
Join Date: May 2013
Posts: 13
Rep Power: 4
harsh_999 is on a distinguished road
Quote:
Originally Posted by pchoopanya View Post
Hello from Thailand,

I am new to UDF and computer programming.

I need to model a PEM fuel cell's flow channel and got stuck on this UDF thing.

I am familiarising myself to the coding starting from, I believe, the simplest of all - source term UDF.

I follow the first tutorial which is the flow in a porous media with a user-defined momentum source term. One question pops up in my head, I have done one tutorial regarding a flow in porous media but with no UDF. The tutorial showed me how to activate the porous model (based on Darcy's law?).

My question is, what is the point of coding the source term via UDF function if we already have this built-in porous media model? Is UDF more accurate?

My next step is to incorporate a simple chemical reaction (Hydrogen + Oxygen = Water + heat). Again, I have done the tutorial regarding chemical reaction but it is more like combustion reaction in the ICE engine (hydrocarbon + oxygen). I cannot find any tutorial to show me how to model the reaction in PEM fuel cell at all. Seems like the others have done this via the UDF source term in order to predict the hydrogen/oxygen consumption rates and water generation rate.

So, is it worth trying to find the way to model the H+O reaction without coding UDF source term? I am asking this because I am so scared of computer programming, but this seems to be unavoidable! Can anyone just assure me that the only way is via UDF? In fact, I am learning the basic C language/coding and I want to be sure that I am on the right track.

Again, can anyone emphasise the necessity of UDF for my PEM fuel cell modelling? I am waiting for the purchase of their PEM fuel cell Add-on Module. But while I am waiting I believe I would be able to build my own model with the use of UDFs and the standard FLUENT. Am I right?

Thank you very much for your comments, sorry for my poor English.




Pattarapong


Hi Pattarapong,
if your transport equation contains source term then you have to write udf to account it while solving that,as FLUENT doesn't consider it
U need not 2 learn C language, there are predefined macros and u have to enter d logic in given syntax
Which tutorial u r talking about?
Let me have a look at it as I want to work on porous media
Please send it to this mail id: hhs999@gmail.com
Thanks n all d best
harsh_999 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Porous media setup issues in Fluent Bernard Van FLUENT 22 June 6, 2014 05:52
How to Model Porous media in CFX senCFX Main CFD Forum 0 January 10, 2011 11:02
UDF Time-dependent term in source Ronnfors FLUENT 0 October 16, 2009 11:25
gradient source term UDF ak6g08 Fluent UDF and Scheme Programming 0 July 9, 2009 06:37
Porous Media UDF Vamsee FLUENT 0 February 26, 2009 02:01


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