|
[Sponsors] |
July 26, 2019, 13:47 |
reaction in a cel zone
|
#1 |
New Member
ahmed mezer
Join Date: Feb 2019
Posts: 2
Rep Power: 0 |
hello... if i have a volumtric reaction rate and want it to occur in a selected cell zone that have ID=8 is this code right or what i need to correct it...
please reply ////////////////////////////////////////////////////////// #include "udf.h" thread_loop_f(f_thread, domain) { if (THREAD_ID(f_thread) == 8) { DEFINE_VR_RATE(user_rate, c, t, r, mole_weight, species_mf, rr) { real temp=C_T(c,t); real D=15.0/pow(9.0,((temp-100.0)/9.0)); real s1 = species_mf[0]; real mw1 = mole_weight[0]; *rr=(2.303/D)*s1*mw1; } } } |
|
July 29, 2019, 01:05 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
#include "udf.h" #include "math.h" DEFINE_VR_RATE(user_rate, c, t, r, mole_weight, species_mf, rr) { real temp,D,s1,mw1; temp=C_T(c,t); if (THREAD_ID(t) == 8) { D=15.0/pow(9.0,((temp-100.0)/9.0)); s1 = species_mf[0]; mw1 = mole_weight[0]; *rr=(2.303/D)*s1*mw1; } } |
|
Tags |
fluent - udf, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 10:28 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 18:51 |
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 |