CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

In reactingFoam, is there any way to normalize mass fractions in initial conditions?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2013, 15:26
Default In reactingFoam, is there any way to normalize mass fractions in initial conditions?
  #1
New Member
 
Geoff Oxberry
Join Date: May 2013
Posts: 1
Rep Power: 0
goxberry is on a distinguished road
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.
goxberry is offline   Reply With Quote

Reply

Tags
codestream, combustion, openfoam, reactingfoam


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
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
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 03:32
Unknown error sivakumar OpenFOAM Pre-Processing 9 September 9, 2008 12:53


All times are GMT -4. The time now is 19:02.