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

Reacting rate depending on a field other than pressure or temperature

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2021, 18:17
Default Reacting rate depending on a field other than pressure or temperature
  #1
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
Hi. I'm trying to add a new reacting rate to rhoReactingFoam that depends on the solar exposure of a cell. I'm able to write that field into the time folders of my case, but I'm unsure of how to add it as a parameter to the function that calculates the reacting rate of a reaction.


Looking at the function that calculates the reacting rate (in irreversibleReaction.H):

Code:
 template<class ReactionThermo>
 
 Foam::scalar Foam::Reaction<ReactionThermo>::kf
 
 (
 
     const scalar p,
 
     const scalar T,
 
     const scalarField& c
 
 ) const
 
 {
 
     return 0.0;
 
 }virtual scalar kf 
             (
 
                 const scalar p,
 
                 const scalar T,
 
                 const scalarField& c
 
             ) const;
It seems to only have access to pressure and temperature. I want it to also have access to the field I created (called J).
However, I don't know from where this kf function is called from, so I don't know where I can pass the J value to the reacting rate class.
I'm thinking it happens somewhere in reactingThermo or combustionModels, but trying to look through these huge classes is daunting.

What would be your best way of adding the J field as a parameter to the kf function? Any help would be appreciated
lumpor is offline   Reply With Quote

Reply


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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 09:21
Same pressure gradient but different velocity field TurbJet Main CFD Forum 22 April 28, 2018 03:35
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions Vishnu_bharathi CFX 12 November 21, 2017 06:56
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27


All times are GMT -4. The time now is 21:42.