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

Initialisation of UDS at t=0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2013, 06:54
Default Initialisation of UDS at t=0
  #1
Member
 
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 14
moloykb is on a distinguished road
Dear All,

I want to calculate the concentration contour, in the three fluid zone in a transient situation. For that I need to initialize concentration equal to 1 at zone 1 at t=0 whereas for zone 2,3 concentration is equal to 0 at t=0. I am using only 1 single UDS equation. How to implement this initial condition. Any help is highly appreciated.
moloykb is offline   Reply With Quote

Old   August 22, 2013, 08:47
Post
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 499
Rep Power: 17
bigfootedrockmidget is on a distinguished road
Find the fluid id's of the different zones, and then do something like this: copy,paste,build,load and set function hook.

Code:
#define ID_FLUID_1 136
#define ID_FLUID_2 242
#define ID_FLUID_3 281

DEFINE_INIT(Set_start_conc,d){ 
cell_t c;
Thread *t;
double x[ND_ND];
    
t=Lookup_Thread(d,ID_FLUID_1); 
begin_c_loop(c,t){
  C_UDSI(c,t,0) = 1.0 // value of user defined scalar 0     
}
end_c_loop(c,t)
        

t=Lookup_Thread(d,ID_FLUID_2); 
begin_c_loop(c,t){
  C_UDSI(c,t,0) = 0.0;            
}
end_c_loop(c,t)

t=Lookup_Thread(d,ID_FLUID_3); 
begin_c_loop(c,t){
  C_UDSI(c,t,0) = 0.0;            
}
end_c_loop(c,t)
}
bigfootedrockmidget 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
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 08:53
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 15:58
UDS David FLUENT 1 March 21, 2005 11:31
ODD: no UDS flux across interior boundary Bob FLUENT 1 February 25, 2002 19:15


All times are GMT -4. The time now is 05:54.