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

How to specifically apply heteregoneous reaction UDF only in certain cell zone

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

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2021, 09:55
Default How to specifically apply heteregoneous reaction UDF only in certain cell zone
  #1
New Member
 
M R Fata
Join Date: Jan 2021
Posts: 2
Rep Power: 0
fluidizedbed is on a distinguished road
Hello all,


I have prepared and tested a heterogeneous reaction UDF (DEFINE_HET_RXN_RATE) which turned out to be working fine now.

In my mesh, I have 3 separate cell zones (fluid). At the moment the reaction occurs in all these three zones. If I would like to apply the reaction only in one of these three zones (please see the image below) - what should I do for the macro to pinpoint to the right pointer?

Because of the way the heterogeneous reaction applied (phase interaction - independent of the cell zone, unlike the single phase reaction), I cannot also specify that this reaction only apply at the particular cell zone.

Quote:
image link
I understood that the top level domain is the superdomain. But this seems to refer to the "mixture", not the "cell zone", and in my case the mixture actually exists in all these three cell zones. Do you have any suggestions how to implement this?

Thanks in advance!
fluidizedbed is offline   Reply With Quote

Old   October 28, 2021, 22:02
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,013
Rep Power: 31
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may try to do following
you may check thread ID using thread from the header of function
Code:
DEFINE_HET_RXN_RATE(name, c, t, hr, mw, yi, rr, rr_t)
{
if THREAD_ID(t) == id of you zone
{}
}
fluidizedbed likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   October 29, 2021, 10:16
Default
  #3
New Member
 
M R Fata
Join Date: Jan 2021
Posts: 2
Rep Power: 0
fluidizedbed is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
you may try to do following
you may check thread ID using thread from the header of function
Code:
DEFINE_HET_RXN_RATE(name, c, t, hr, mw, yi, rr, rr_t)
{
if THREAD_ID(t) == id of you zone
{}
}
Thank you!


It works quite well in principle. Just stating this here: for others who are interested with this case, the statements of the thread pointers must be placed before the if statement.


However, somehow in the case that I am working the reaction occurs as well outside the cell zone in the direction of the flow - instead of going directly to 0 when the flow goes to the next cell zone. It is like as if there is a numerical diffusion happening for the reaction.

I am still trying to figure out why actually this can occur.
fluidizedbed is offline   Reply With Quote

Reply

Tags
cell zone, multiphase, reaction, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting cell variable values in a fluid zone using UDF eromon84 Fluent UDF and Scheme Programming 6 March 28, 2021 11:59
Issue with begin_c_loop when more than one cell zone Brian_ Fluent UDF and Scheme Programming 4 March 2, 2018 11:44
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07
Segmentation fault in running alternateSteadyReactingFoam,why? NewKid OpenFOAM 18 January 20, 2011 16:55
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


All times are GMT -4. The time now is 01:24.