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

UDF Adjust to redefine UDS Diffusivity

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Andrew Garrard
  • 1 Post By David Harvey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2004, 02:53
Default UDF Adjust to redefine UDS Diffusivity
  #1
David harvey
Guest
 
Posts: n/a
I am attempting to use the Define_Adjust function to enforce a value of 0 for the scalar transport diffusivity for a specific thread, but my adjust function does not appear to modify the value of the diffusivity. If I try to actually implement 0, I return an error so I have tried to force the value to as close to zero as possible. I am working with full multicomponent flow and my UDS is an attempt to model electrical potentials across two locations, but the third physically has a very small value for conduction. The zone id from the fluent panel is 4. Here is the UDF code:

/************************************************** *************** * UDF FOR ADJUSTING THE SCALAR DIFFUSIVITY * * ************************************************** *************/

#include "udf.h"

DEFINE_ADJUST(channel_diff, d) {

int ID;

ID = 4;

Thread *channel = Lookup_Thread(d,ID);

cell_t c;

begin_c_loop(c, channel)

{

C_UDSI_DIFF(c,channel,0) =1e-20;

}

end_c_loop(c, channel) }

THANKS FOR THE HELP

DH
  Reply With Quote

Old   February 26, 2004, 06:15
Default Re: UDF Adjust to redefine UDS Diffusivity
  #2
Andrew Garrard
Guest
 
Posts: n/a
OK, I have been dealing with a similar problem, so I will try and be as helpful as I can. I really have had very little luck with define adjust functions and UDS's. I think this is because when you start a single interation, the define adjust sets conditions, then the act of performing the iteration then trys to solve the UDS, which can alter the parameters set in the adjust, if that makes any sense. Try a DEFINE_DIFFUSIVITY (4.3.2) I have had luck with these.

The other point that I want to raise is that you cannot set the diffusivity to zero if you have certain boundary conditions, e.g. a fixed value boundary and a flux. This is because if the diffusivity/conductivity goes to zero, then the flux will tend to infinity and you will get a nan error.
  Reply With Quote

Old   February 26, 2004, 14:41
Default Re: UDF Adjust to redefine UDS Diffusivity
  #3
David harvey
Guest
 
Posts: n/a
I did look at the Define Diffusivity function that you say. However I thought there might be a problem there because I am able to return only one value for diffusivity. More or less what I have is a zone that is a catalyst region, another zone which is a gas diffusion layer, and lastly a zone which is my flow channel (Bipolar plate to be added later). So my desire is to allow this electronic conductivity (the diffusivity) to be a specific value in my catalyst and my gas diffusion layer, but enforce the physical condition of zero conductivity in the flow channel. Do you think it might be possible to do this through an if else statement, ie if the zone id is the flow channel return near zero, but otherwise return the conductivity of the other two zones?

(btw to another post we talked on, fluent appears to have added a possible fix for modelling the scalar transport for a solid medium, although it still does require the work around of defining it as a porous media).

Thanks for you help

DH
  Reply With Quote

Old   February 27, 2004, 06:38
Default Re: UDF Adjust to redefine UDS Diffusivity
  #4
Andrew Garrard
Guest
 
Posts: n/a
You definalty can use an if else statement to make the diffusivity different in different zones, I have done it and I know that it works. There is a problem though, as the code will not allow a two neighbouring cells to have different diffusivities with a step change. There is a gradient change between the two zones. There are a couple of way around this. Firstly create a *very* set of cells to allow the gradient change to exist. Secondly, use two UDS's with differenct diffusivitys and allow interaction between them I know the problems you are experiencing, as I am working on fuel cells as well, albeit, not hydrogen fuel cells. However, I work for a company, and they are not too thrilled at the prospect of me revealing too much information.

I still don't think that you will be able to solve a UDS with 0 diffusivity.
yashganatra likes this.
  Reply With Quote

Old   February 27, 2004, 08:47
Default Re: UDF Adjust to redefine UDS Diffusivity
  #5
David Harvey
Guest
 
Posts: n/a
I have done this with modifying through an if else statement. It does seem to help and yes you are correct that it doesn't not allow for a zero and that their exists a step interpolation between the face diffusivities. I have also coded in using a define adjust a loop to set the neighboring cells equal removing the gradient and I see some small gradient effect from the interpolation still within the flow channel, but now fairly minimal. Now I just need to implement a finer grid so that the interpolation scheme doesn't skew my plots. I am thinking more about coupling the UDS equations as I am going to need to do this anyway to get my potentials in the conducting plate. But this does need some thought on my part prior to doing. Thanks for the help it was much appreciated. (btw if you can say...are you working with SOFC?)

cheers,

DH
yashganatra likes this.
  Reply With Quote

Reply


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
PEM modeling UDS diffusivity in mixture gemini FLUENT 6 August 7, 2012 08:37
What is UDS diffusivity of a self-defined material? aleisia FLUENT 0 March 5, 2011 23:08
Fluent 6.3 pemfc module, UDS diffusivity yerem3 FLUENT 0 January 19, 2010 04:10
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 16:58
UDS DIffusivity... up FLUENT 4 July 16, 2001 09:11


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