CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   DEFINE_SR_RATE: Override only specific reactions (https://www.cfd-online.com/Forums/fluent-udf/201964-define_sr_rate-override-only-specific-reactions.html)

CFDJonas May 16, 2018 12:20

DEFINE_SR_RATE: Override only specific reactions
 
Hello again everybody!

I'm here with another problem. I have several surface reactions (finite-rates) defined in my mixture. Now I want to add 2 reactions to this "mechanism" but with a more complex kinetic rate equation. So I thought I could do this by adding both reactions to the finite_rates with dummy values and then override them by using the UDF Macro DEFINE_SR_RATE. But this seems to be a problem as this macro somehow overwrites every reaction a little bit. Even when I compile an empty UDF (see below) and hook it, there seems to be a change in the reactions and my simulation does not deliver the same results with the UDF unhooked. My thought would've been that, only the *rr I override in the UDF are actually overwritten, so an empty UDF would just use the default values used in finite-rates.

Code:

DEFINE_SR_RATE(test_srrate, f, fthread, r, mw, yi, rr)
{

}

Can somebody explain me this behaviour? And if there is any possbility tell me how I can overwrite the rate of one specific reaction in finite-rates.

Thank you!


All times are GMT -4. The time now is 17:26.