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

Writing reaction.R in reactingFoam

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2018, 15:04
Post Writing reaction.R in reactingFoam
  #1
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
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.

Createfields:
Code:
PtrList<fvScalarMatrix> RrateReactor(reactorRegions.size());

    Info<< "    Adding to RrateReactor\n" << endl;
    RrateReactor.set
    (
        i,
        new fvScalarMatrix
        (
            IOobject
            (
                "Rrate",
                runTime.timeName(),
                reactorRegions[i],
                IOobject::NO_READ,
                IOobject::AUTO_WRITE
            ),
            reactorRegions[i],
	    fvMatrix<>("Rrate", dimEnergy/dimVolume/dimTime,0)
        )
    );
SetRegionFields
Code:
    	    fvMatrix& Rrate = reaction.R(Y[i]);
YiEqn;
Code:
    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: https://www.dropbox.com/s/affha5r5ht...am.tar.gz?dl=0

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

Old   October 20, 2018, 06:16
Default
  #2
New Member
 
Faezeh
Join Date: Oct 2011
Posts: 6
Rep Power: 15
faeze.d is on a distinguished road
Hi,
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, 16:11
Default reactingRateFoam
  #3
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
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).

https://www.dropbox.com/s/6si5ecxjzm...am.tar.xz?dl=0

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

Reply

Tags
reaction rate, temperature dependence


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 03:36
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[snappyHexMesh] crash sHM H25E OpenFOAM Meshing & Mesh Conversion 11 November 10, 2014 12:27


All times are GMT -4. The time now is 03:04.