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

unsteady udf for concentration uds

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2013, 04:32
Default unsteady udf for concentration uds
  #1
Member
 
soodabe
Join Date: Apr 2013
Posts: 40
Rep Power: 13
borhan_sd@yahoo.com is on a distinguished road
Hi to all,I want to write an uds for mass and the scalar is concentration,my unsteady term is -dC/dt that C is concentration(=density *mass fraction)

I studied udf manual about unsteady term udf for UDS,but I didn't understand its example,Should I write my udf as that example as below?
Is this example general?
Why this udf is used everywhere and for any uds????????
Where and how the variable of Concentration is specified in this udf??

#include "udf.h"

#define rho 1000

DEFINE_UDS_UNSTEADY(uds_unsteady, cell, thread, i, apu, su)

{

real time_step, vol, rho, phi_old, phi_curr;

time_step= RP_Get_Real("physical-time-step");

vol = C_VOLUME(cell,thread);

*apu = -rho*vol/time_step; /*central coefficient part*/

phi_old = C_STORAGE_R(cell,thread,SV_UDSI_M1(i));

phi_curr = C_UDSI(cell,thread,i);

*su = rho*vol*phi_old/time_step; /*source term part*/

}
Shouldn't I change any general thing in this udf?(I don't mean details as rho or etc.)
Help me plz

Last edited by borhan_sd@yahoo.com; July 15, 2013 at 07:25.
borhan_sd@yahoo.com 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
unsteady inlet velocity udf jill FLUENT 8 February 10, 2015 07:04
using UDF in Fluent for unsteady cavitation Pejman Main CFD Forum 6 November 6, 2008 11:18
UDF Unsteady velocity profile Rashad FLUENT 0 February 27, 2008 15:57
UDF for unsteady spray Fernando FLUENT 4 May 9, 2006 09:47
UDF Adjust to redefine UDS Diffusivity David harvey FLUENT 4 February 27, 2004 08:47


All times are GMT -4. The time now is 21:00.