CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Writing reaction.R in reactingFoam

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

Like Tree3Likes
  • 1 Post By Swagga5aur
  • 2 Post By Swagga5aur

LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2018, 14:04
Post Writing reaction.R in reactingFoam
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 112
Rep Power: 10
Swagga5aur is on a distinguished road
Hello Foamers,

I am trying to make a chemical reactor solver, with both catalyst temperature and the thermal properties of the reacting fluid.

The issue is with the reaction.R(Yi) in YiEqn, as its solved as a function of the fluid temperature, however, it should be based upon the catalyst temperature and I'm unable to alter the reaction.R in the solver. Therefore, I'm trying to define a new fvMatrix based upon the reaction.R(Yi) which I then may alter to depend on catalyst temperature and remove its dependence on the reacting fluid temperature.

I tried to do this be adding the following code to the following directories.

PtrList<fvScalarMatrix> RrateReactor(reactorRegions.size());

    Info<< "    Adding to RrateReactor\n" << endl;
        new fvScalarMatrix
	    fvMatrix<>("Rrate", dimEnergy/dimVolume/dimTime,0)
    	    fvMatrix& Rrate = reaction.R(Y[i]);
    fvScalarMatrix& Rrate=RrateReactor[i];
However, this results in fvMatrix typing issues with the fvMatrix<>, and was hoping anyone could help me with the fvMatrix typing or have another solution approach for the above issue.

Here is a link to the solver which I'm trying to add the above in the reactor domain for OpenFOAM v4:

Regards Lasse.
Rochi likes this.
Swagga5aur is offline   Reply With Quote

Old   October 20, 2018, 05:16
New Member
Join Date: Oct 2011
Posts: 6
Rep Power: 14
faeze.d is on a distinguished road
have a look at this thread:
Species Reaction Rate RR()
I think this would be helpful
faeze.d is offline   Reply With Quote

Old   October 22, 2018, 15:11
Default reactingRateFoam
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 112
Rep Power: 10
Swagga5aur is on a distinguished road
Hi Faezeh,
Thank you for the link that helped a lot
I have attached a reactingRateFoam solver to this post for others to look at (for ofv6).

Going to implement it in a multi region solver as well.
luonghungtruyen and Rochi like this.
Swagga5aur is offline   Reply With Quote


reaction rate, temperature dependence

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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[snappyHexMesh] crash sHM H25E OpenFOAM Meshing & Mesh Conversion 11 November 10, 2014 11:27

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