
[Sponsors] 
The pressure equation in reactingFoam and rhoReactingFoam 

LinkBack  Thread Tools  Search this Thread  Display Modes 
December 29, 2019, 02:28 
The pressure equation in reactingFoam and rhoReactingFoam

#1 
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 
Hello Foamers,
As far as I understand, the two solvers reactingFoam and rhoReactingFoam differ ONLY in the way how the density is calculated. One is calculated from psi*p and one is directly accessed from the thermodynamics library (By the way is this true?). They are both pressurebased solvers, because they both solve a pressure equation to satisfy the continuity equation. However, their pressure equations are different. I also notice that starting from OpenFOAM5.x, the pressure equation in rhoReactingFoam is the same as the one in rhoPimpleFoam. But before that, the pressure equation in reactingFoam is the same as the one in rhoPimpleFoam. I basically have two questions: 1. Why the pressure equation is different in reactingFoam and rhoReactingFoam? Aren't they solving the same pressure equation? 2. How is rhoReactingFoam (or reactingFoam) connected to rhoPimpleFoam? I would think that with reaction turned off, these three should be the same thing. Thanks in advance, Ruiyan 

December 29, 2019, 07:46 

#2 
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 
Would you mind to give snippets of the differences, otherwise quite difficult to follow?
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki1/Wiki2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESIOpenCFDTrademark) Bugs/Features: FOAMExtend (WikkiFSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror 

December 29, 2019, 21:06 

#3  
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 
Hi HPE, thank you for your interest! I should've done that to make myself more clear. Take OpenFOAM6 for example, the relevant code are as follows.
From the pEqn.H in rhoReactingFoam (and rhoPimpleFoam) Quote:
Quote:
The pressure equation in reactingFoam seems natural and easy to understand. It is just a Poisson's equation where rho does not appear explicitly because of the fact that rho = psi * p. However, the pressure euqation in rhoReactingFoam involves a fvc::ddt(rho) term, which is explicit, and the correction term I mentioned above. Why can't we use the same Poisson's equation as that in reactingFoam? I feel like I'm missing some obvious things here and it could be very obvious to other people. And one more thing, if I run a same case with these two solvers, it should give me the exact same results right? In other words, in terms of the ability of modelling the physics, these two should be identical, or maybe one is better than the other under some extreme conditions? Sorry for my lengthy statements/questions above, as I'm getting picky about every detail since I started using FOAM, dare I say it's kind of addictive. 

January 3, 2020, 03:13 

#4 
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 
Anyone? Still waiting for some answers/discussions here.


January 19, 2024, 10:03 

#5 
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 
Four years have passed, can anyone have a clearer understanding of this issue and share it? I would appreciate it.


January 20, 2024, 02:02 

#6 
Senior Member

One element in the discussion might be the fact that reactingFoam is able to solve flows that are not incompressible.
Understanding the pressure equation in reactingFoam might thus involve two steps: 1/ step 1/2: understand how the pressure equation changes when passing from incompressible constant density flow (say simpleFoam) to still incompressible, but now variable density flow (say buoyantSimpleFoam). The energy equation and the thermodynamics (equation of state) needs to be taken into account. 2/ step 2/2: understand how the pressure equation changes when passing from incompressible variable density flow to no longer incompressible flows. The book of e.g. DarwishManganiMoukalled gives a good theoretical basis. Having settled that basis, one can discuss what happens in the implementation. 

January 20, 2024, 05:26 

#7  
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 
Quote:


January 21, 2024, 06:45 

#9 
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 
Yes, you are right. In OF V9, these two solvers had been merged. The "transonic" you mentioned seems to be effective in simple flow without combustion. I'm not familiar with OF. If I am wrong, please point it out.


January 21, 2024, 07:35 

#11 
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 

January 21, 2024, 10:06 

#12 
Senior Member

What follows could merely be my points of view. The transonic options belongs to a solver like reactingFoam, more than to a tutorial case.
I do know at Mach number e.g. the chokedNozzle or membrane tutorial case are set. One could merely change the inlet velocity, vary the Mach number and verify how reactingFoam behaves with transonic set either on or off. Not sure whether this addresses your concern. 

January 21, 2024, 11:01 

#13  
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 
Quote:


January 21, 2024, 12:43 

#14 
Senior Member

Pls beware that changing the combustion/reactingFoam/RAS tutorial cases from incompressible to transonic (by increasing e.g. the mass flow rate of the fuel) might require changing the boundary conditions for the pressure. We have found the wave transmissive boundary conditions at the outlet to work well. Good luck.


January 21, 2024, 13:09 

#15  
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 
Quote:


Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Difference between reactingFoam & rhoreactingfoam  upadhyay.1  OpenFOAM Programming & Development  8  October 13, 2022 09:42 
Segmentation fault when using reactingFOAM for Fluids  Tommy Floessner  OpenFOAM Running, Solving & CFD  4  April 22, 2018 12:30 
compressible, reacting nozzle flow rhoReactingFoam  hughmorgan  OpenFOAM Running, Solving & CFD  1  September 26, 2016 08:08 
reactingFoam vs rhoReactingFoam  Scot  OpenFOAM Running, Solving & CFD  8  June 2, 2016 11:28 
Bug in rhoReactingFoam  francesco_capuano  OpenFOAM Bugs  2  February 6, 2012 15:11 