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

UDF for energy source

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2005, 16:56
Default UDF for energy source
  #1
mauricio sanchez
Guest
 
Posts: n/a
Hello, I have been trying to solve a time-dependet single order differential equation inside FLUENT. The differential equation uses the temperature per each cell to obtain a numerical value that needs to be placed on the source term for each cell in the domain.

I do not know how to assign the sourcer term for each cell.

I have tried tiresly to work on this problem but I have not been able to get an answer. One method I have tried is creation of UDS in order to hold the answer for each cell but I am getting an "Access Violation Error".

I am trying to follow the UDF manual with respect to UDS but is does not describe in detail how to set it up. I have even tried to use its examples and still I get the same error message.

If somebody can help me out I would appreciate it (either set an answer to assign a source term for each cell or using UDS). Please take a look of the problem description.

THANKS Mauricio.

PS. The problem I am solving is the following:

This is the differential equation...

∂α/∂t = Z0e(.Ea/RT)αm(1 - &alphan (1)

where Z0 (1/s) is a constant; Ea (J/mol) is the activation energy; R (8.31 J/mol-K) is the universal gas constant; T (K) is the absolute temperature; α is the degree of conversion; and m & n are the reaction order constants. The conversion parameter, α, ranges between zero and one. When there is no reaction α = 0, while α = 1 indicates a complete reaction. The energy balance equation for a 1-D axisymmetric model is given in cylindrical coordinates by

ρC(∂T/∂t)= k (∂2T/∂r2) +(1/r)(∂T/∂r) + ρcq(∂α/∂t) (2)

The last term of equation (2) is the one that I am solving using the UDF since I need the values of α for each cell (since α requires temperature to be solved, see Eq. 1). This value of α needs to be calculated for every cell using the current and previous temperature and time respectively after discretization of the equation.

As you might see the last term is not directly dependent on temperature so it can go as a constant in the source term. (It is to remember that is a constant source term but each cell will have a different value)

I am using Rungue-Kutta mehod to solve for α. I do not know how to assign the sourcer term for each cell.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for energy source João Fernandes FLUENT 4 October 17, 2008 05:53
UDF - source terms Fred FLUENT 2 October 11, 2005 21:53
help on UDF mass source shao1 FLUENT 2 July 11, 2002 21:36
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 14, 2000 00:03
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


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