17
$\begingroup$

My thesis is on developing numerical methods for model reduction in combustion. I run my methods purely on the chemistry part of combustion simulations, and I have plenty of case studies for 0-D simulations (no flow). What I would like is to run simulations that do have flow in them, preferably 2-D or 3-D simulations.

These simulations would need to be in parallel, due to the high computational requirements. I'd also need something that can interface with chemistry solvers like Chemkin or Cantera, for which I have the source code. (Chemkin is in Fortran 77, and Cantera is in C++.)

In the ideal case, I could specify a flow pattern using the basic knowledge of fluid mechanics I have from my grad program and some CFD package, add the chemistry, and run it. If I have to, I can set up the equations governing the fluid motion and chemistry for a simple case study based on an experimental setup used by a former collaborator, but I'd very much prefer not to roll my own CFD code unless there were a package or packages that made it extremely easy to do it. I'd be willing to spend 2-3 weeks on it; I don't know if this requirement rules out PETSc or Trilinos. If I have to spend any longer on it, I'd rather put it off until later, because I have a collaborator supplying a CFD code for case studies as well.

Does anyone have any experience using a CFD package or writing CFD code, and if so, can you recommend one? One thing I know I'd like to use is Strang splitting, but I'm not a CFD or PDE expert; I study the chemistry and the numerical methods for the model reduction. Also, please comment on how long it took you to get up to speed using the software you recommend.

@FrenchKheldar makes a good point that I should mention the characteristics of problems I'd like to solve:

  • Ideal (perfect) gas, single-phase
  • Compressible
  • Laminar flow is essential; turbulent flow is a plus. (I know a little bit about turbulence from previous work in numerical methods in CFD, but I haven't worked on CFD solvers; I just know a little about physics.)
  • Zero-Mach-number formulation is okay (I don't care about shocks or supersonic flow)
  • Combustion chemistry, ignoring Soret and Dufour fluxes, and treating diffusion as Fickian
  • Geometry can be something simple

I can write interfacing code, though the less I have to write, the better; @FrenchKheldar also points out that Cantera has Fortran and Python bindings. I use the Cantera Python bindings right now for rapid prototyping, so I'm comfortable with those also.

$\endgroup$
6
  • $\begingroup$ Cantera has wrappers for python and Fortran, so that widens the search a bit. $\endgroup$ Dec 15, 2011 at 4:31
  • 2
    $\begingroup$ One more comment: if you don't care about acoustics or waves, shouldn't you be able to use an incompressible solver? That will widen your possibilities... $\endgroup$ Dec 15, 2011 at 6:07
  • $\begingroup$ Let me rephrase: I don't care about shocks. Since the phase is an ideal gas, and ideal gases change in density when the pressure changes, the flow should be compressible. $\endgroup$ Dec 15, 2011 at 19:36
  • $\begingroup$ That is not the definition of compressible flow though, and maybe my comment wasn't clear. It is the definition of a compressible fluid however. A compressible flow is a flow where changes in velocity will cause significant changes in density/pressure (and it doesn't require shocks). Of course both compressible and incompressible solvers will take into account the change of density because of combustion... $\endgroup$ Dec 15, 2011 at 19:39
  • $\begingroup$ @FrenchKheldar: I could try an incompressible fluid simulation. I'm basing my previous comments on the following paper from my collaborators. However, the CFD code isn't mine, and I'd like to be able to put up a separate simple case study online to illustrate some of my work in the name of reproducible research. It would also be nice to illustrate that my implementation isn't hard-coded to work with a particular CFD solver. $\endgroup$ Dec 15, 2011 at 23:14

4 Answers 4

12
$\begingroup$

I'm a heavy user of OpenFOAM, so naturally I'd recommend it. It has a large amount of features including combustion models (though not necessarily precisely what you need) and has been used together with Canterra by other people. If you need a solver for a specific equation that hasn't been implemented yet, you can pretty much literally write your equations. I don't know what strang-splitting is (I don't work on combustion myself), but other people have used it in OpenFOAM.

There is a limited amount of tutorials. The ones documented in the user guide do not include chemistry. There are some sample cases for the reaction solvers you can have a look at. Your best bet is to check out the OS-CFD grad course website at Chalmers (link is for 2011, but it contains a link to the pages of previous years). The students there often document the solvers they are working on, e.g. here.

About the effort to learn it: If you get by using one of the pre-defined models, it's fairly straightforward to use and you should be able to have results within weeks. If you have to descend beneath the top level (e.g. to add a new ODE solver), things can get more difficult quite fast and you'll appreciate to know C++.

$\endgroup$
0
3
$\begingroup$

You could use PyClaw, a parallel extension of Clawpack (note: I am one of PyClaw's main developers). It includes 2D and 3D solvers for the inviscid Euler equations (compressible flow) of an ideal gas. It also has Strang splitting built in, but you need to add the evaluation of viscous terms and chemistry yourself. It should be straightforward to interface with Chemkin and Cantera, since PyClaw is written in Python and already includes both Fortran 77 and C code.

PyClaw is relatively new (though the underlying Clawpack code is fairly old) and thus not as established as something like OpenFOAM.

$\endgroup$
0
3
$\begingroup$

NIST's Fire Dynamics Simulator (FDS) sounds like what you want. FDS is a low Mach number flow solver. The density can change, but acoustic effects and shocks are neglected.

FDS is fairly well documented, though, I admit I have not looked in the main flow solver routines. I also do not know much about how FDS handles combustion chemistry.

I suggest downloading the latest code from FDS's Google Code site.

$\endgroup$
0
$\begingroup$

You can use the open source Advanced Simulation Library which is hardware accelerated (in the case high performance computation is important). It has both laminar and turbulent flows and chemical reactions. It is also easy to use, see the source code of the Aerodynamics of a locomotive in a tunnel benchmark.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.