CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

ScalerField as a reaction rate

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2012, 12:43
Question ScalerField as a reaction rate
  #1
New Member
 
Mostafa Moghaddami
Join Date: Oct 2009
Posts: 13
Rep Power: 17
Mostafa is on a distinguished road
Dear All

I am going to use the incident radiation as a part of the chemical reaction rate. As I know the solvers such as reactingfoam get a constant rate not a scalerfield. I wonder if there is any way to introduce a scalerfield as a reaction rate in the chemical solvers.
Thanks in advance for your help.

Best Regards
MM
Mostafa is offline   Reply With Quote

Old   April 6, 2012, 16:27
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
Quote:
Originally Posted by Mostafa View Post
Dear All
constant rate not a scalerfield
hi dear mostafa
your question is too general, at least post the equation of your reaction, in general, the answer of your question is almost yes
nimasam is offline   Reply With Quote

Old   April 6, 2012, 17:01
Default
  #3
New Member
 
Mostafa Moghaddami
Join Date: Oct 2009
Posts: 13
Rep Power: 17
Mostafa is on a distinguished road
Quote:
Originally Posted by nimasam View Post
hi dear mostafa
your question is too general, at least post the equation of your reaction, in general, the answer of your question is almost yes

Dear Nima
Thank you for your reply. Assume two species H2O2 and OH that dissolved in the water. Water is the inert component and does not appear in the reactions.
There are two reactions:
1-H2O2->2OH rate=k1*G*[H2O2]
2-2OH->H2O2 rate=k2*[OH]*[OH]

Assume that k1 and k2 are constant scalars and G is an available scalar field such as incident radiation.
So we have:
d[H2O2]/dt=k2*[OH]*[OH]-k1*G*[H2O2]
d[OH]/dt=2*k1*G*[H2O2]-2*k2*[OH]*[OH]

Thanks in advance
P.S: In which university you are studying?
Mostafa is offline   Reply With Quote

Old   April 6, 2012, 17:42
Default
  #4
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
Quote:
Originally Posted by Mostafa View Post

d[H2O2]/dt=k2*[OH]*[OH]-k1*G*[H2O2]
d[OH]/dt=2*k1*G*[H2O2]-2*k2*[OH]*[OH]
some thing like following code that may solve your problem

Code:
fvScalarMatrix firstEqn
(
    fvm::ddt(X)
  + fvm::div(phi,X)
  + fvm::Sp(2*k*Xw,Xw)
    == 2*k1*Y
);
i study @ tarbiat modares university , and you ?
nimasam is offline   Reply With Quote

Old   April 8, 2012, 09:45
Post
  #5
New Member
 
Mostafa Moghaddami
Join Date: Oct 2009
Posts: 13
Rep Power: 17
Mostafa is on a distinguished road
Dear Nima,

Thank you for your reply.
I know that we can define any ODEs in OF and I did it already.
The problem is that the set of transport equations of the species is stiff and does not converge.
It seems that the OF solvers such as reactingFoam use some kind of limiters and adjust the time step in a way that the solution converges.
I want to use the OF chemistry solvers that are used in reactingFoam. I want to modify the reactinFOAM solver and define an arbitrary scalar field for it. Do you know how I should do this?

P.S.: I am studying in University of Tehran
Mostafa is offline   Reply With Quote

Old   April 8, 2012, 11:13
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
sorry Dear Mostafa
i did not work with reactingFoam, so i can't be helpful here, you need to dig the code to find where that variable is used and whether it possible to change it or not.
How much are you familiar with OpenFOAM coding?
nimasam is offline   Reply With Quote

Old   April 22, 2012, 11:57
Default
  #7
New Member
 
Mostafa Moghaddami
Join Date: Oct 2009
Posts: 13
Rep Power: 17
Mostafa is on a distinguished road
I am quite familiar but there are a lot of things for learning. How about you? What’s your field?
Mostafa is offline   Reply With Quote

Reply

Tags
radiation, reaction rate, variable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault in running alternateSteadyReactingFoam,why? NewKid OpenFOAM 18 January 20, 2011 17:55
UDF for catalyst volumetric reaction, temperature overshoot though rate is small elmcmaster FLUENT 0 October 11, 2010 10:37
surface reaction rate with udf yellow-stuff FLUENT 4 January 29, 2010 13:53
UDF changing the rate exponent of a reaction Stefan H Fluent UDF and Scheme Programming 0 September 16, 2009 14:20
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 01:07


All times are GMT -4. The time now is 15:20.