|
[Sponsors] |
November 28, 2012, 11:10 |
Accessing reaction information from PaSR.C
|
#1 |
New Member
Tatu Pinomaa
Join Date: Oct 2012
Location: Finland
Posts: 16
Rep Power: 13 |
Hello!
I want to modify the standard PaSR to calculate reaction rates based solely on turbulent mixing, without using Arrhenius data (Eddy-dissipation model). The current PaSR+ODEChemistryModel has no "direct dependency" on turbulent mixing time scale, in that the turbulent time scale appears only in the reactive volume scaling factor, kappa. The actual reaction rates are calculated based on Arrhenius data in ODEChemistryModel. I figured out that probably the easiest way to proceed would be to modify the PaSR files, by copy-pasting the original PaSR folder to and by giving it a different name. I would like to have an access to the reaction data (list of reactions, stoichiometric coefficients, etc.), as is done in the standard ODEChemistryModel. What is the easiest way to access this reaction data? I thought I could simply use a pointer to the ODEChemistryModel (this->pChemistry_ in PaSR). ODEChemistryModel.H has the following line in the list of public member functions: Code:
inline const PtrList<Reaction<ThermoType> >& reactions() const; Code:
this->pChemistry_->reactions(); Code:
error: ‘const class Foam::psiChemistryModel’ has no member named ‘reactions’ error: ‘const class Foam::rhoChemistryModel’ has no member named ‘reactions’ Thanks, Tatu Last edited by tatu; November 28, 2012 at 11:28. |
|
June 7, 2018, 14:35 |
|
#2 |
Member
Raunak Bardia
Join Date: Jan 2015
Posts: 32
Rep Power: 11 |
I know it has been a while but did you figure this out and do you remember how?
|
|
June 7, 2018, 23:14 |
|
#3 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 11 |
Which version of OF are you using?
And you want to access `reactions` in the solver or in the library?
__________________
https://openfoam.top |
|
June 11, 2018, 10:02 |
|
#4 |
Member
Raunak Bardia
Join Date: Jan 2015
Posts: 32
Rep Power: 11 |
I am using OpenFOAM v5.0 and I would like to access reactions at the solver level. I am trying to modify the reactingFoam solver. Any insights will be helpful?
|
|
June 12, 2018, 02:35 |
|
#5 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 11 |
I think it is difficult to access reactions in solver.
Because: chemistryPtr_ in ChemistryCombustion class is a Protected data, means that it can be only used in itself or its derived class, but not its object. I plotted a UML for this issue as in my bolg: https://openfoam.top/chemistry/. Sorry for the language is Chinese and the version is OF-dev, but the UML figure may be a little help for you. UML
__________________
https://openfoam.top |
|
June 12, 2018, 08:47 |
|
#6 |
Member
Raunak Bardia
Join Date: Jan 2015
Posts: 32
Rep Power: 11 |
Yes, I agree. The UML figure is quite helpful. Thank you.
I would like to elaborate a bit on my problem and would really like your input on that. 1. Currently,the reaction rate is evaluated in "omega" function of the chemistryModel.C file. This reaction rate uses the concentration of the reactants and products as well as the reaction rate (k) calculated from the reaction rate models. 2. Instead, I need to calculate the reaction rate using turbulence parameters. The issue is that turbulence parameters cannot be accessed by the chemistryPtr_. 3. I have tried passing turbulence parameters as function arguments but they somehow end up giving an error due to some templates that the chemistryModel is using. Any help on how to call the eddy dissipation energy, and kinematic viscosity fields in the chemistryModel will be really helpful. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PaSR + infinite reaction rate in reactingFoam --> no reactions occurring | tatu | OpenFOAM Running, Solving & CFD | 2 | November 24, 2016 18:34 |
Segmentation fault in running alternateSteadyReactingFoam,why? | NewKid | OpenFOAM | 18 | January 20, 2011 16:55 |
reaction in UDF(DEFINE_VR_RATE) | louiza | FLUENT | 3 | October 13, 2010 23:59 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 00:07 |
chemical reaction - howto | Dan Sorensen | Siemens | 1 | February 21, 2000 09:20 |