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

DEFINE_SOURCE : Urgent PLZ

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2006, 10:01
Default DEFINE_SOURCE : Urgent PLZ
  #1
PK
Guest
 
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
  #2
Allan Walsh
Guest
 
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
  #3
PK
Guest
 
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 :

DEFINE_SOURCE(remove_S1,cell,thread,dS,eqn)

{

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
  #4
Allan Walsh
Guest
 
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

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
Jet flow problem.. PLZ help URGENT!! Vinayak CFX 1 April 3, 2008 19:02
plz help its urgent garima chaudhary FLUENT 0 September 25, 2007 06:28
Plz help on MHD. Urgent! Rucy FLUENT 2 May 27, 2007 21: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 05:15


All times are GMT -4. The time now is 13:40.