duncanam / rhoReactingCentralFoam

An OpenFOAM solver with AMR that combines rhoCentralFoam and rhoReactingFoam for high-speed reactive flows.
GNU General Public License v3.0
47 stars 22 forks source link

reactingFoam -> rhoReactingCentralFoam example #4

Open PattiMichelle opened 1 year ago

PattiMichelle commented 1 year ago

Hi: I don't use github much, and I think this is the only spot where I can put some words... I am running a reactingFoam (CHEMKIN combustion with RAS) and would like to try making a rhoReactingCentralFoam example case for comparison. My understanding is that this might be a bit difficult as I'm not sure the CHEMKIN thermodynamic libraries are compatible with the "rho" part of "rhoReactingCentralFoam." My main interest is a density-based solver, so I guess I'm really more interested in a "reactingCentralFoam" (which may not be a "thing").

Otherwise, it's currently a simple low speed combusting non-premixed flame flow (40 m/s) involving hundreds of reactions. Ultimately a mixed supersonic/subsonic flowfield is my interest. But for now, just getting it running in a density-based solver would be enough. I don't know if this is of interest to the coder(s) here.

Thank You, PattiMichelle orcid.org/0000-0002-6722-3677

duncanam commented 1 year ago

Hey there, contributions towards making this better seem great- honestly it's been a couple of years since I've run anything in OpenFOAM. Have you been able to get you low speed, incompressible simulations working in the base solvers first? I'd probably start there, and then can try moving to this solver to see what all breaks.

PattiMichelle commented 1 year ago

Thanks for the reply! Yes, I'm successfully using reactingFoam right now. rhoReactingFoam (not running) is just PISO. The advantage of a density-based solver is supersonics - getting chemistry of shocks and transonic shear layers and the like. I'm a chemical physicist so I have to ask this silly question - "incompressible" means something different to CFD specialists than to physicists... to me, air is compressible and liquids incompressible - whereas to you incompressible means low-speed, correct? I ask because I believe if properly formulated, a density based solver should also work for subsonic flows - I've used one before on a commercial code...

duncanam commented 1 year ago

Ah, so this solver was created for the purpose of simulating flow inside pulse and rotating detonation engines, where we have fuel and oxidizer species mixed and then combusted with a supersonic flamefront. In the fluids world, we label a fluid as "incompressible" if the Mach number is below 0.3, but IMO this is mostly just to help us determine how simplified our assumptions for solving a problem can be. One can still use a density-based solver for low-speed flows, and the downside is typically solver speed and/or stability. We like using density-based solvers for supersonic flows as the density of the fluid can often vary noticeably spatially, so this density variation is more aptly captured/more stably captured.

So, with all that said, my thinking is that if you have a low-Mach gaseous specie flow (that remains low speed temporally and spatially), reactingFoam might be fine. If you think density may vary spatially and temporally, rhoReactingFoam is probably the next step up. Lastly, if you want to capture the huge variation in pressure and density in a reacting flow that has the presence of shocks, using rhoReactingCentralFoam is an option. The "Central" part comes from the solver formulation where it uses a "central upwind" scheme, and this has been found to better capture shocks. Therefore, if you don't need or care to capture the sharp flow features of shocks, the other two solvers I mentioned may fit your use cases for potentially cheaper solution time.

PattiMichelle commented 1 year ago

Very good - thanks for the detail on the CFD art! There have been many changes in the art since I started doing reacting flows with the PHOENIX (SIMPLE) + CHEMKIN solvers in the 90's. I suspect I should try pushing reactingFoam to as high a Mach number as I can before considering other solvers, especially since density-based formulations of the CHEMKIN thermodynamics files (i.e., the so-called "NASA polynomials") maybe difficult to obtain. Thanks again.

EDIT: I was able to get crude approximations of shocks and supersonic/subsonic shear layers with SIMPLE, so I suppose it wouldn't be any worse with reactingFoam (PISO). I don't think rhoReactingFoam would be an improvement over reactingFoam since it's still just PISO. Maybe if I can find a sonicReactingFoam.