CFD Online Logo CFD Online URL
Home > Forums > FLUENT


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

LinkBack Thread Tools Display Modes
Old   December 13, 2006, 10:01
Default DEFINE_SOURCE : Urgent PLZ
Posts: n/a
Hi , I have a 2D simulation (flow with 2 species S1 and S2 in a channel) I have an amount of specie S1 at inlet and I want to have a certain amount of the same specie S1 at the outlet : So I manage to get D1 a "density" of specie S1 to be removed (Unit : Kg/m3) for all the domain .

If I use source = - D1 x C_VOLUME for each cell I would get the mass (kg) of specie S1 to be removed per cell . But how to have it in Kg/m3/s (which the unit of source)?.

I have a steady simulation.

Thanks any kind of help. PK

  Reply With Quote

Old   December 13, 2006, 16:11
Default Re: DEFINE_SOURCE : Urgent PLZ
Allan Walsh
Posts: n/a
Are you using a UDF? Could you not just use the source option in the base version of Fluent? That is boundary condition (of fluid)->source->set source.

  Reply With Quote

Old   December 14, 2006, 04:40
Default Re: DEFINE_SOURCE : Urgent PLZ
Posts: n/a
Hi Yes I am using a UDF, but I have the same problem by using this boundary conditions features through the GUI . with the UDF I do this : To be more precise in my question :

-1 : I know the mass fraction of Si at the inlet : MF_S1_inlet

-2 : I know the mass fraction of Si at the outlet : MF_S1_oulet .

So I can get the mass (Kg )which should removed all over the Domain and so have this removal "density" of S1 (D1) all over the Domain (Kg/m3).

So when I am using DEFINE_SOURCE :



removal_density_S1 = D1;

source = -removal_density_S1 *C_VOLUME(cell,thread);

dS[eqn] = 0;

return source; /*(so it is a mass)*/


By doing this I am not able to get the MF_S1_oulet : it seems that not enough S1 is removed.

I am running a steady state simulation Thanks a lot for your help
  Reply With Quote

Old   December 14, 2006, 16:06
Default Re: DEFINE_SOURCE : Urgent PLZ
Allan Walsh
Posts: n/a
I didn't see any obvious problems in your code. It looks like you just want to have constant removal rate - why don't you just use the built in boundary condition source? Does it not work to deplete a species? I know it works fine to add a species source in 2D. There are lots of ways to go wrong in UDFs.

I am using a UDF to add a source term for a species evolved from a particle. Fluent gives the macro DEFINE_DPM_SOURCE which I was going to use, but I started just directly changing the species storage variable. It has not caused any problems, so I have not bothered with the source macro.

Good Luck.
  Reply With Quote


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
Jet flow problem.. PLZ help URGENT!! Vinayak CFX 1 April 3, 2008 18:02
plz help its urgent garima chaudhary FLUENT 0 September 25, 2007 05:28
Plz help on MHD. Urgent! Rucy FLUENT 2 May 27, 2007 20:46
Urgent: Plz help in 3D extension of Fluent code... Farooq FLUENT 0 November 27, 2003 23:28
Urgent..plz help Puck FLUENT 6 July 29, 2002 04:15

All times are GMT -4. The time now is 15:23.