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

udf for exothermic reaction:source term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 19, 2017, 00:09
Default udf for exothermic reaction:source term
  #1
New Member
 
Mat
Join Date: Jan 2017
Posts: 23
Rep Power: 9
mataus is on a distinguished road
hai
I am trying to write an energy source term UDF for an exothermic chemical reaction.the source term equation is q=contstant *(dx/dt),where dx/dt is the reaction rate of the equation
Initially the value of x=0 and at the end the value of x=1
I wrote the UDF as follows(this I got from this site)

DEFINE_INIT(my_init_fuc,d)
{
cell_t c;
Thread*t;
thread_loop_c(t,d)
{
begin_c_loop_all(c,t)
{
C_UDSI(c,t,0)= 0;
}
end_c_loop_all(c,t)
}
}

/*UDF for solving Energy Equation HEAT SOURCE term */
DEFINE_SOURCE(heat_generation,c,t,ds,eqn)
{
real q_a;
real physical_dt;
physical_dt = RP_Get_Real("physical-time-step");
q_a=1000*(C_UDSI(c,t,0)-C_UDSI_M1(c,t,0))/physical_dt;
ds[eqn]=0;
C_UDMI(c,t,0)=q_a; /* Memory allocation for storing 'heat generation' */
return q_a;
}

Is this UDF right?? Can anyone please explain how this udf works exactly in fluent solver or
how this calculation works in fluent especially these two lines
C_UDSI(c,t,0)= 0;
q_a=1000*(C_UDSI(c,t,0)-C_UDSI_M1(c,t,0))/physical_dt;
??
mataus is offline   Reply With Quote

Old   October 31, 2017, 06:12
Default
  #2
New Member
 
VIGNESHWARAN SANKAR
Join Date: Mar 2016
Posts: 2
Rep Power: 0
Vicky3141 is on a distinguished road
Hi mataus,

Did you get clear with the UDF?
Because I am also facing the same problem and need help pls.

Regards
Vicky3141 is offline   Reply With Quote

Old   March 31, 2020, 06:02
Default
  #3
New Member
 
Muhammad Faizan
Join Date: Jul 2018
Location: Incheon, South Korea
Posts: 5
Rep Power: 7
fzmd55 is on a distinguished road
There is no source term for your heat. Hence there will no heat generation. While the source term you have given is just the transient term, which is the change in heat with respect to time. So, you first need to define the source for heat generation.
fzmd55 is offline   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
udf for source term fersim Fluent UDF and Scheme Programming 2 September 15, 2017 03:50
UDF to visualize the cavitation source term: getting a very strange result!!! dinhanh Fluent UDF and Scheme Programming 1 June 6, 2015 10:29
UDF for momentum source term Tanmay_Dutta Fluent UDF and Scheme Programming 0 December 6, 2014 06:24
UDF sink term pichai FLUENT 0 October 20, 2010 01:07
UDF Source Term Christian FLUENT 4 August 1, 2009 05:53


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