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

Help with UDS

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 2, 2016, 06:58
Default Help with UDS
  #1
Senior Member
 
Ali reza
Join Date: Mar 2014
Posts: 103
Rep Power: 5
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, 7 views)
1988 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
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 0 October 30, 2015 10:35
Can you explain me how to use UDS? Tleja Fluent UDF and Scheme Programming 0 July 14, 2015 01:52
Set UDS on wall... fivos Fluent UDF and Scheme Programming 2 July 25, 2014 05:57
Calculate UDS flux through the wall ananth_01 FLUENT 0 August 5, 2013 07: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 12:01.