CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Reaction products display (

megacrout July 4, 2011 09:29

Reaction products display

I am running a case very similar to the counterFlowFlame2D tutorial (combustion/reactingFoam) and IŽd like to display the products - not only the reactants - in paraView. How can I achieve that? I am pretty sure it does not have anything to do with paraView (directly) but I am not quite sure about what I have to do in OpenFoam to get the result I want.

Do I have to add a file in the 0 folder for every product I want to display (instead of setting them using the Ydefault file)? If so, do I have to modify/create any other file? If not, what am I supposed to do?

Thanks to any answer.


mturcios777 July 4, 2011 16:43

Are you able to see your products at the reaction proceeds? You should be able to see them as they are created at later time steps, unless they are subsequently being consumed by another reaction.

megacrout July 6, 2011 04:13

I only modified the mesh. The reaction (thereŽs only one), constants, solvers, equations... everything else remained untouched. But still, I cannot display any product concentration profile at any time step.
Any idea about what could be wrong?

mturcios777 July 6, 2011 13:08

If you see only products but no reactants, then there may be no reaction happening. What do your temperature profiles look like?

megacrout July 7, 2011 05:39

It seems you got me wrong here.
I can NOT see any PRODUCT. Reactants are fine. The sum of their respective mole fractions at a given time (>0) and at a given place does not give 1, which proves that OF computes at least one more mole fraction.

By the way, if you only see products but no reactant (as you wrote), this does NOT mean you have no reaction taking place but rather that your reaction takes place so quickly that you do not even have time to compute any measurable reactant concentration. Or that you messed up your code ahaha!

Temperature profile looks fine. It goes up to several thousand Kelvin at what I assume to be the right place and the right time.

Can you, or someone else, tell me what I have to do to be able to display and plot the computed product profiles?

Thanks in advance.


mturcios777 July 7, 2011 14:44

You are correct on my comment. I MEANT to write reactants not products, but it had been a long day...

Very strange. Do the time directories have CO2 and H2O files written to them? If so then the problem is with ParaView. If not, then something has happened to the solver...

megacrout July 8, 2011 03:41

Yes, all product files are in the time step folders.

I actually just checked it out one more time and noticed that CO2 and H2O (among other computed parameters) appear in the "Volume Field" window of ParaView but not in the drop-down menu from which we can choose the parameter to display (after selecting them in "Volume Field" and clicking "Apply", of course).

Do you have any idea about how I can get it to work?

megacrout July 8, 2011 05:19

Ok, I got it now. And I better understand what you meant in your first post, Marco.

The products are not defined for the first time step, i.e. I do not have any "H2O" or "CO2" file in my "0" directory. For that reason, no product to display in the first time step (not even a 0 value everywhere).

Second problem: I either never paid attention to the fact that the products go unchecked in the "Volume Field" menu when I select time steps other than 0 or never clicked again on "Apply" after re-selecting all displayable fields. If one does that, the products appear in the top drop-down menu and the their profiles can be watched.

However, because of the non-existing values for the first time step, watching the entire simulation once or in a loop does not work great. I expect creating an initial condition for every product or simply selecting "Skip Zero Time" in paraView to solve the problem.

Anyway, thanks a lot Marco.

All times are GMT -4. The time now is 09:56.