|
[Sponsors] |
April 1, 2014, 06:53 |
UDS for chemical reaction.
|
#1 |
New Member
Alexey
Join Date: Jan 2014
Posts: 18
Rep Power: 12 |
I want to use UDS for my simulation.
My reaction A => B So, i want to compare results of Fluent reaction module and results of UDS transport equation. UDS depends of concentration A. Source equation is S = Kd*[A] (k - is a reaction rate constant and [A] is a molar concentration) Finally, the concentration of reactant B and UDP should be identical but it is not the case My code #include "udf.h" #define kd0 1.58e+15 DEFINE_SOURCE(UDS0_source,c,t,dS,eqn) { real UDS0_source; real temp = C_T(c,t); real Dens = C_R(c,t); real kd = kd0*exp(-15500/temp); real IniMC1; real UDSMC_source; AMC = (C_YI(c,t,0)*Dens) / 164; UDSMC_source = kd*AMC; UDS0_source = UDSMC_source*164; dS[eqn] = 0; return UDS0_source; } May be somebody have any example with reaction and UDS? Or somebody can give any advice in that domain? Alexey |
|
April 2, 2014, 17:30 |
|
#2 |
New Member
Bill Wangard
Join Date: Jan 2011
Posts: 21
Rep Power: 0 |
Hi,
You will need one sink and one source. The sink is for A and the source is for B. if your reaction is rA = - k * [A], additionally, rB = -rA, and the net mass source has to be zero. and [A] = D * Y(0), where D is a constant (dens/164). Thus, rA = -k * D * Y(0) and d(rA)/dY = dS[eqn] = -k * D In your UDF, the Jacobian was 0... This is incorrect. Also rB = -rA, and d(rB)/dY(0) = k * D. Thus, you should have two DEFINE_SOURCE routines, one for each of your scalars. There should be no MASS SOURCE, since mass is not destroyed in the conversion of single molecule A to single molecule B. Good Luck, Bill |
|
April 3, 2014, 01:48 |
|
#3 | |
New Member
Alexey
Join Date: Jan 2014
Posts: 18
Rep Power: 12 |
Quote:
Thank you for your response! Then another question. Scalar must move with the flow. Now I try to explain what I want to do. I want to create scalar. Its source term depend on the concentration of the material component of the mixture. Scalar moves with the flow. So I should set flow function of scalar "mass flow rate"? But flow rate of scalar is 0 at time = 0. Transient and dif members of transport equation should be 0? |
||
April 7, 2014, 02:18 |
|
#4 |
New Member
Alexey
Join Date: Jan 2014
Posts: 18
Rep Power: 12 |
Guys, some ideas? I'm seriously stuck at this moment
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PaSR + infinite reaction rate in reactingFoam --> no reactions occurring | tatu | OpenFOAM Running, Solving & CFD | 3 | June 2, 2024 11:04 |
Having problems setting up surface reaction, catalyst, adsorption and desorption | Juun | FLUENT | 12 | February 8, 2017 12:03 |
Defining reaction rate with multiple surface reaction | Fred Marias | FLUENT | 1 | September 12, 2013 05:56 |
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 |