|
[Sponsors] |
October 16, 2008, 18:35 |
UDF for energy source
|
#1 |
Guest
Posts: n/a
|
Hi there, folks!
I am trying to model the flow and heat transfer to a supercritical fluid (compressed gas above its critical pressure and critical temperature) near the pseudo critical point, the fluid is CO2. Near the pseudo critical point, the specific heat increases extraordinarily what makes it difficult to model by using polynomial functions of temperature (the first thing I tried!), so I developed a UDF to calculate the value of the specific heat as a function of both pressure and temperature, the problem is that I cannot hook this UDF to the Materials form. As a way to overcome this constrain I thought of defining an extra term in the energy equation defining it as an energy source through all the domain occupied by the gas, here it is: DEFINE_SOURCE(cell_energy,c,t,dS,eqn) { real source ; real cp ; real vol = C_VOLUME(c,t) ; real cubic_root_vol = pow(vol,0.3333333) ; real twall = 323 ; begin_c_loop(c,t) { /* source term */ source = C_R(c,t) * C_U(c,t) * (cp - 840.37) * C_T(c,t) / cubic_root_vol ; /* derivative of source term */ dS[eqn] = C_R(c,t) * (cp - 840.37) * C_U(c,t) / cubic_root_vol ; return source ; } end_c_loop(c,t) } But I am not sure if everything's ok with the definition of the energy source (my geometry is simply a straight tube and its axis is on the z-direction). The energy source should account for both radial and axial temperature gradients of temperature. Can you tell me how to do this if the previous UDF is not correct? Many thanks in advance, Best regards Joćo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Please help...energy source W/m^3? | Nady | FLUENT | 2 | June 22, 2007 04:43 |
energy source UDF | Jason | FLUENT | 3 | August 2, 2006 14:30 |
Energy source | fluidwork | FLUENT | 0 | April 11, 2005 09:28 |
Set energy source | Bogesz | CFX | 2 | March 26, 2002 23:45 |
source of energy | Benoit | FLUENT | 1 | July 12, 2001 04:05 |