|
[Sponsors] |
June 19, 2017, 01:09 |
udf for exothermic reaction:source term
|
#1 |
New Member
Mat
Join Date: Jan 2017
Posts: 23
Rep Power: 9 |
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; ?? |
|
October 31, 2017, 07:12 |
|
#2 |
New Member
VIGNESHWARAN SANKAR
Join Date: Mar 2016
Posts: 2
Rep Power: 0 |
Hi mataus,
Did you get clear with the UDF? Because I am also facing the same problem and need help pls. Regards |
|
March 31, 2020, 07:02 |
|
#3 |
New Member
Muhammad Faizan
Join Date: Jul 2018
Location: Incheon, South Korea
Posts: 5
Rep Power: 8 |
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.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for source term | fersim | Fluent UDF and Scheme Programming | 2 | September 15, 2017 04:50 |
UDF to visualize the cavitation source term: getting a very strange result!!! | dinhanh | Fluent UDF and Scheme Programming | 1 | June 6, 2015 11:29 |
UDF for momentum source term | Tanmay_Dutta | Fluent UDF and Scheme Programming | 0 | December 6, 2014 07:24 |
UDF sink term | pichai | FLUENT | 0 | October 20, 2010 02:07 |
UDF Source Term | Christian | FLUENT | 4 | August 1, 2009 06:53 |