
[Sponsors] 
August 30, 2005, 15:56 
UDF for energy source

#1 
Guest
Posts: n/a

Hello, I have been trying to solve a timedependet 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/molK) 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 1D 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 RungueKutta mehod to solve for α. I do not know how to assign the sourcer term for each cell. 

Thread Tools  Search this Thread 
Display Modes  


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