|
[Sponsors] |
How to specifically apply heteregoneous reaction UDF only in certain cell zone |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 27, 2021, 10:55 |
How to specifically apply heteregoneous reaction UDF only in certain cell zone
|
#1 | |
New Member
Join Date: Jan 2021
Posts: 4
Rep Power: 5 |
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:
Thanks in advance! |
||
October 28, 2021, 23:02 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 {} }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 29, 2021, 11:16 |
|
#3 | |
New Member
Join Date: Jan 2021
Posts: 4
Rep Power: 5 |
Quote:
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. |
||
Tags |
cell zone, multiphase, reaction, udf |
|
|
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 12:59 |
Issue with begin_c_loop when more than one cell zone | Brian_ | Fluent UDF and Scheme Programming | 4 | March 2, 2018 12:44 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 23:07 |
Segmentation fault in running alternateSteadyReactingFoam,why? | NewKid | OpenFOAM | 18 | January 20, 2011 17:55 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 01:07 |