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

UDF for a specie source in a specific wall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2014, 14:54
Default UDF for a specie source in a specific wall
  #1
Member
 
Join Date: Jul 2014
Location: Portugal
Posts: 36
Rep Power: 12
Rui_27 is on a distinguished road
Hi everyone!

I have air (21% of O2 and 79% of N2) entering into a channel with a square section. I would like to add a reaction in the bottom wall in which O2 is consumed and H2O is produced. The mass flux of each specie (O2 and H2O) will obtained through a set of equations that depend on the mass fraction of O2 in the cells next to the bottom wall.

I found that there are two main ways I can considered this reaction through UDFs:
- Set a mass source/sink using the macro DEFINE_SOURCE;
- Set the mass fraction of O2 and H2O at the wall through boundary conditions using the macro DEFINE_PROFILE.

Adding a source/sink seems easier and more intuitive but I have some doubts on how to set the source term only for that specific wall and specifying the source in the form of derivatives as described in UDF Fluent manual.

Have some of you write a similar UDF in which you can share the code (or parts of it)?

All comments are greatly appreciated and will certainty help me a lot.

Thanks in advanced.

Last edited by Rui_27; September 2, 2014 at 05:43.
Rui_27 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
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 BlGene OpenFOAM Meshing & Mesh Conversion 10 August 6, 2009 05:26
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 03:04.