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

Accessing net reaction rates of each species in DEFINE_ADJUST?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2022, 07:54
Lightbulb Accessing net reaction rates of each species in DEFINE_ADJUST?
  #1
New Member
 
Join Date: Dec 2019
Posts: 29
Rep Power: 6
Baum is on a distinguished road
Hi all, the title pretty much says it all: How do I access the value of the current reaction rate for a species in each cell within an ADJUST UDF? I don't want to change the value, just read it. Is there a way, for example, to access the pointer *rr like you can in other UDFs (DEFINE_NET_REACTION_RATE etc.)?


Thanks!

Baum
Baum is offline   Reply With Quote

Old   August 10, 2022, 00:58
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Look for Ansys Fluent Customization manual -> DEFINE_DPM_INJECTION_INIT -> example
that could be useful

to get cell and thread you probably need a loop over particles, could be done like this:
Code:
Injection *I;
Particle *p;

I = Get_dpm_injections();
loop(p, I->p)
{
code
}
I think it could be done inside ADJUST UDF
__________________
best regards


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

Old   August 11, 2022, 03:23
Default
  #3
New Member
 
Join Date: Dec 2019
Posts: 29
Rep Power: 6
Baum is on a distinguished road
Hi Alexander, thanks for the reply. I looked at the UDF manual and could not really find anything about accessing the reaction rate there. It seems like they calculate their own reaction rate based on temperature and concentration, but they don't access the current value stored in the cell.

Also, I don't really want to use a DPM injection just to find this value, so I think an ADJUST UDF is definitely preferred.



Maybe another way to formulate this question could be: Can I just write "Reaction Rate *rr" or something similar somewhere in the ADJUST UDF and access that structure?
Baum 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
Which macro gives the net reaction rate of species in a multistep chemical reaction Van9527 Fluent UDF and Scheme Programming 0 March 12, 2021 03:36
Reaction Species transport and Population Balance abgoel363 Fluent Multiphase 0 January 20, 2020 07:08
Modelling species transport and implementing reaction rates res FLUENT 0 May 11, 2017 10:29
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 08:42.