|
[Sponsors] | |||||
In reactingFoam, is there any way to normalize mass fractions in initial conditions? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
|
#1 |
|
New Member
Geoff Oxberry
Join Date: May 2013
Posts: 1
Rep Power: 0 ![]() |
I'm using reactingFoam with OpenFOAM 2.2 to simulate a counterflow 2-D diffusion flame. One thing I'd like to do is run some studies on simulation run time scaling with number of species (with and without chemistry) for various chemical mechanisms. To make sure that all species are present in the simulation (again, to do a scaling analysis), I'd like to have the following species files as initial conditions:
- fuel species (e.g., H2, CH4, C3H8, etc.) - O2 - N2 - Ydefault (for everything else) The trouble is specifying the initial condition for Ydefault. For the inlet face of my geometry on the fuel side, I want a uniform boundary condition for each species, and I want the mass fractions for the fuel face to sum to one, since it appears that reactingFoam doesn't do any normalization of species mass fractions. I could do this by hand and figure out the scalar mass fraction I need to plug into Ydefault pretty easily (it would be (1 - (mass fraction of fuel species on fuel face)) / (total # of species - 3)), but I'd prefer to automate this calculation within OpenFOAM, if possible. Is there any way to do this automatically using a command line tool, or the codeStream directive? I don't mind having to change a small bit of code per case study, but it would be annoying to have to do the whole thing by hand, and before I decide to roll my own Python script, I want to see if there is an easier way. |
|
|
|
|
|
![]() |
| Tags |
| codestream, combustion, openfoam, reactingfoam |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 7 | March 15, 2013 06:08 |
| Multiple floating objects | CKH | OpenFOAM | 10 | September 21, 2011 23:13 |
| Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
| Computational time | sunnysun | OpenFOAM Running, Solving & CFD | 5 | March 16, 2009 04:32 |
| Unknown error | sivakumar | OpenFOAM Pre-Processing | 9 | September 9, 2008 12:53 |