|
[Sponsors] |
UDF for catalyst volumetric reaction, temperature overshoot though rate is small |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 11, 2010, 09:37 |
UDF for catalyst volumetric reaction, temperature overshoot though rate is small
|
#1 |
New Member
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17 |
Hi all, im doing a reaction on a catalyst as a volumetric reaction that occurs only in the porous catalyst region. Ive done this before for kinetic that only involved one rate equation, though now im trying to do more. I have followed the relegvant bits of the manual as intelligently as i think i can, though the temperature rise im getting is far too high for this reaction, even though it is considered quite exothermic. When i run it after doing a coldflow for initial soloution and activating reactions and relevant equations in the equations control, there are warnings about the temperature limiting, thoughthis rectifies itself after a few iterations.
Another thing is that the species contours for most species look ok, but for one of the reactants, CO, there is quite clearly a problem. I have included the text of the UDF if anyone would like to look at it below, in particular, are the parts and structure of the two reactions with the if and else bit right? Also is the check one whether the reaction is to take place due to it being a porous zone in the right place or should that be included for each reaction? /************************************************** **************** rate.c Compiled UDF for specifying a reaction rate in a porous medium ************************************************** *****************/ #include"udf.h" int koco,koh2,kco,khs,Eco,Eh2,R,e; int exponenta,exponentb,kco,kh2; R = 8.314; e = 2.71828183; koco = 1400000000000; koh2 = 1600000000000; Eco = 19900; Eh2 = 35000; DEFINE_VR_RATE(vol_reac_rate,c,t,r,mole_weight,spe cies_mf,rate,rr_t) { real mfco = species_mf[3]; real mfco2 = species_mf[2]; real mfh2 = species_mf[4]; real mfh20 = species_mf[0]; real mfo2 = species_mf[1]; real temp = C_T(c,t); exponenta = (-1*(Eco/(R*temp))); exponentb = (-1*(Eh2/(R*temp))); kco = koco*pow(e,exponenta); kh2 = koh2*pow(e,exponentb); if (FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous) if (!strcmp(r->name, "reaction-1")) { *rate = kco*(pow(mfco,1.02)*pow(mfo2,0.0001)); *rr_t = *rate; } elseif (!strcmp(r->name, "reaction-2")) { *rate = kh2*(pow(mfo2,0.2)); *rr_t = *rate; } else *rate = 0.; ;} |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 07:29 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 06:27 |
Incylinder dynamic mesh with volumetric reaction | mas | FLUENT | 4 | May 3, 2012 10:22 |
Constant flow rate through a small area inside the fluid domain. | robingilbert | OpenFOAM | 7 | October 4, 2010 16:19 |
case files UDF volumetric reaction rate | Marie-Anne | Main CFD Forum | 2 | February 24, 2006 09:43 |