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

Help with UDS

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2016, 06:58
Default Help with UDS
  #1
Senior Member
 
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12
1988 is on a distinguished road
Hello

I wrote a UDS to add attached equations
Code:
DEFINE_SOURCE(source_ci,c,t,dS,eqn)
{
real source;
real ci;
real teta;
real k_a = 1;
real k_d = 2;
real s = 3;
ci = C_UDSI(c,t,0);
teta = C_UDSI(c,t,1);
source = (-1)*(k_a*(1-teta)*ci-k_d*teta)*s*C_R(c,t);
return source;
}

DEFINE_SOURCE(source_teta,c,t,dS,eqn)
{
real source;
real ci;
real teta;
real k_a = 1;
real k_d = 2;
real s = 3;
ci = C_UDSI(c,t,0);
teta = C_UDSI(c,t,1);
source = k_a*(1-teta)*ci-k_d*teta*C_R(c,t);
return source;
}
But when I change Ka and Kd results stay the same and it is obvious something is wrong, could you please help.

Thanks
Attached Images
File Type: jpg EQUATIONS.JPG (29.3 KB, 9 views)
1988 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
When to use User-defined Scalar (UDS) for concentration? THC FLUENT 1 May 30, 2019 10:04
Can you explain me how to use UDS? Tleja Fluent UDF and Scheme Programming 0 July 14, 2015 02:52
Set UDS on wall... fivos Fluent UDF and Scheme Programming 2 July 25, 2014 06:57
Calculate UDS flux through the wall ananth_01 FLUENT 0 August 5, 2013 08:33
Doubts UDS Flux, UDS Unsteady for VOF model kel85uk FLUENT 0 March 17, 2010 09:53


All times are GMT -4. The time now is 19:03.