CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Contours of custom surface rate (UDF and UDM) (https://www.cfd-online.com/Forums/fluent/174138-contours-custom-surface-rate-udf-udm.html)

cpassa July 5, 2016 11:30

Contours of custom surface rate (UDF and UDM)
 
Hello everybody,

I want to plot contours of a custom surface reaction rate introduced through a UDF. I know it should be done using defined memory, F_UDMI. I have tried some modifications of the udf routine, still unseccessfully. Can anybody help me on this issue? Thanks!
Below is my UDF:

#include "udf.h"
/************************************************** *********
Custom surface reaction rate UDF
************************************************** **********/
/* CONSTANTS en MKS */
#define LP1 8.4e-5
#define KF 7.e+6
#define densi 1.19

/* Species numbers. Must match order in Fluent panel */
#define ACE 0
#define MET 1
#define NUM_SPECS 3

/* Superficial Reaction (kmol/(m2*s)) */
DEFINE_SR_RATE(my_rate,f,t,r,mw,yi,rr)
{
real ConACE = 1.;
real r1;
ConACE = densi*yi[ACE]/mw[ACE];
r1 =LP1*ConACE/(1.7+KF*ConACE);
*rr = r1;
}

chinu007 August 13, 2021 02:32

Hi Cpassa,
Did you resolve this issue.
If yes then I would like to know how you had done done it.
Looking for your quick response.
Thanks in advance

pakk August 14, 2021 13:25

Cpassa said how to do it: use a UDM. Unfortunately, their UDF does not use any UDM, so we don't know what they tried, and how they failed.

I suggest you do it better: add a UDM to this code, compile it, use it, and share your result (or where it went wrong). It's much easier to help if we can see where it went wrong.


All times are GMT -4. The time now is 14:32.