CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   No reactions in reactingFoam 2.1 (http://www.cfd-online.com/Forums/openfoam-solving/96106-no-reactions-reactingfoam-2-1-a.html)

OMN January 12, 2012 10:25

No reactions in reactingFoam 2.1
 
Hi

In OpenFoam 2.0.1 it was easy to get rid of the reactions in reactingFoam to model the dispersion of a gas in air: the reactions keyword needed to be followed by an empty dictionary.

I am trying to do the same thing with OpenFoam 2.1, but it always complains that there is a reaction missing. Is there a simple way of turning off the reactions in reactingFoam 2.1?

Kind regards

Olivier

hz283 January 22, 2013 17:30

Quote:

Originally Posted by OMN (Post 339038)
Hi

In OpenFoam 2.0.1 it was easy to get rid of the reactions in reactingFoam to model the dispersion of a gas in air: the reactions keyword needed to be followed by an empty dictionary.

I am trying to do the same thing with OpenFoam 2.1, but it always complains that there is a reaction missing. Is there a simple way of turning off the reactions in reactingFoam 2.1?

Kind regards

Olivier

Hi OMN,

I am also using reactingFoam to model the dispersion of a gas in air. I switch off the reactions. Should I change the thermo in thermophysicsmodel

hsPsiMixtureThermo<reactingMixture<gasThermoPhysic s>>

Is it still suitable for simulating cold flows? Thank you very much!

best
H

mturcios777 January 22, 2013 18:57

The easiest way of turning off reactions in 2.1.x is to turn off chemistry. In chemistryProperties, turn the chemistry off, and in combustion properties turn the combustion off as well.

hz283 January 22, 2013 19:20

Quote:

Originally Posted by mturcios777 (Post 403437)
The easiest way of turning off reactions in 2.1.x is to turn off chemistry. In chemistryProperties, turn the chemistry off, and in combustion properties turn the combustion off as well.

Hi Macro,

Thank you so much. If I turn off the combustion term, are these laminar transport parameters like mu, alpha... still calculated based on the composition of the local cell center?

Thank you very much!

H

mturcios777 January 22, 2013 19:25

Actually, wait I think I lied :o. Keep combustion on, but chemistry off. Its weird I know, but the combustion model handles the turbulent mixing outside of the chemistry. The chemistry model is part of the combustion model, so it can be turned off by itself just to turn of reactions.

Laminar transport parameters are calculated based on the thermophysical model. hsPsiMixtureThermo<reactingMixture<gasThermoPhysic s>>
supports mixtures (which is what I imagine you are after since you are using reactingFoam) so it will work. Anything that supports inhomogenous mixtures should work. Have a look at the FOAM documentation for thermophysical models to be sure.

hz283 January 22, 2013 19:33

Quote:

Originally Posted by mturcios777 (Post 403442)
Actually, wait I think I lied :o. Keep combustion on, but chemistry off. Its weird I know, but the combustion model handles the turbulent mixing outside of the chemistry. The chemistry model is part of the combustion model, so it can be turned off by itself just to turn of reactions.

Laminar transport parameters are calculated based on the thermophysical model. hsPsiMixtureThermo<reactingMixture<gasThermoPhysic s>>
supports mixtures (which is what I imagine you are after since you are using reactingFoam) so it will work. Anything that supports inhomogenous mixtures should work. Have a look at the FOAM documentation for thermophysical models to be sure.

Thank you, Macro!

Today, I switch off both, reaction and combustion, and the openfoam can give me some results, but the results are not correct. I am not sure if this caused by turning off combustion.

Besides, in isothermal mixing, about how to calculate the density, I think I have two ways:

1), the default in reactingFoam, therm.rho()

2), user hard-coded Equation of State:

rho=1/(Y_fuel/rho_fuel+Y_N2/rho_N2+...+Y_speciesN/rho_speciesN)

Are they equivalent in reactingFoam when isothermal flow is simulated?

Thank you in advance!

best
H

mturcios777 January 22, 2013 21:15

Quote:

Originally Posted by hz283 (Post 403446)
Besides, in isothermal mixing, about how to calculate the density, I think I have two ways:

1), the default in reactingFoam, therm.rho()

2), user hard-coded Equation of State:

rho=1/(Y_fuel/rho_fuel+Y_N2/rho_N2+...+Y_speciesN/rho_speciesN)

Are they equivalent in reactingFoam when isothermal flow is simulated?

Thank you in advance!

best
H

They should be equivalent. When you select the thermophysical model, you determine how the mixture properties (of which rho is one) by selecting the mixture type. See the documentation:

http://www.openfoam.org/docs/user/thermophysical.php

If you want to know the details of how the mixture properties are calculated, you will need to look at the source code for a particular thermophysical model. For the hsPsiThermo models, I know that thermo.rho() returns p*psi (since its a compressible model), and that psi is calculated in the thermo.calculate() function for the model. I can't remember where psi is calculated to take into account the mixture, but I remember seeing it when I had to develop my own thermo models.

rkc.cfd April 26, 2014 19:08

Quote:

Originally Posted by hz283 (Post 403446)
Thank you, Macro!

Today, I switch off both, reaction and combustion, and the openfoam can give me some results, but the results are not correct. I am not sure if this caused by turning off combustion.

Besides, in isothermal mixing, about how to calculate the density, I think I have two ways:

1), the default in reactingFoam, therm.rho()

2), user hard-coded Equation of State:

rho=1/(Y_fuel/rho_fuel+Y_N2/rho_N2+...+Y_speciesN/rho_speciesN)

Are they equivalent in reactingFoam when isothermal flow is simulated?

Thank you in advance!

best
H

Hello,

I working on the same iso thermal mixing without reaction and using reactingfoam. Could you please elaborate, if you made progress on the the above comment. Since there are few thermo.rho() calling instances, could you just replace with one rho based on specie local mixture fraction (2nd way) after eliminating the EEqn and turning off reactions?

Cheers,

RKC

coroi June 19, 2014 12:00

Help with turning off
 
Quote:

Originally Posted by hz283 (Post 403446)
Thank you, Macro!

Today, I switch off both, reaction and combustion, and the openfoam can give me some results, but the results are not correct. I am not sure if this caused by turning off combustion.

Besides, in isothermal mixing, about how to calculate the density, I think I have two ways:

1), the default in reactingFoam, therm.rho()

2), user hard-coded Equation of State:

rho=1/(Y_fuel/rho_fuel+Y_N2/rho_N2+...+Y_speciesN/rho_speciesN)

Are they equivalent in reactingFoam when isothermal flow is simulated?

Thank you in advance!

best
H


Hi,
Can I ask you for some help? How you managed to turn off cobustion and run the case without crashing the solver? In fact i use a fireFoam case but the chemistryProperties fand cobustionProperties files are very similar to those of reactingFoam.
Have you changed something in Dict files apart in cobustionProperties file (change active on with active off) ?
Thank you for your attention!

mturcios777 June 20, 2014 12:48

If the solving is crashing and chemistry/combustion has been turned off, I would seriously look at your case setup. The solver is relatively robust and modelling transport hasn't been a real problem.

coroi June 23, 2014 09:34

Quote:

Originally Posted by mturcios777 (Post 498020)
If the solving is crashing and chemistry/combustion has been turned off, I would seriously look at your case setup. The solver is relatively robust and modelling transport hasn't been a real problem.

In fact it worked, there was another problem with a BC.

ziemowitzima June 28, 2014 08:00

gas expansion incorrect ?
 
Dear Foamers,
I am using the reactingFoam to simulate cold He ejection into warm air (O2 + N2), so I have mixture of 3 ideal gases.

I turn off combustion and reactions.

But I am sure that results are not correct. There is way to little He in the flow. It seems that He does no expand, as it should. Initially He has 5K, surrounding air has about 300K,
so He should increase its value significantly once its temperature rises. But it seems that it never happens.

Any clues ?

what about the "combustion", should it be on ?

Thanks

coroi September 23, 2014 09:02

Quote:

Originally Posted by ziemowitzima (Post 499066)
Dear Foamers,
I am using the reactingFoam to simulate cold He ejection into warm air (O2 + N2), so I have mixture of 3 ideal gases.

I turn off combustion and reactions.

But I am sure that results are not correct. There is way to little He in the flow. It seems that He does no expand, as it should. Initially He has 5K, surrounding air has about 300K,
so He should increase its value significantly once its temperature rises. But it seems that it never happens.

Any clues ?

what about the "combustion", should it be on ?

Thanks

Hi,
Combustion sould be set to off , because you don't need to simulate the combustion of any gas if I understood you well.

ziemowitzima September 23, 2014 09:09

Hi,
It does not change too much if combustion is on or off.
But main problem seems to be still there,
there is to little Helium in the tunnel, it seems that it does not expands correctly while it heats up...
any clues ?
thanks

rhythm April 7, 2015 07:24

Hi guys,

I was wondering if there is a way to turn of the combustion in reactingFoam, yet still perform reactions? (I presume OF uses FiniteRateModel, so use that, but without combustion.)

I have been digging through the solvers and libraries and so far I understand that in OpenFOAM the reaction kinetics is entangled within the combustion libraries and any time one wants to use reactions, one has to start by creating/envoke a combustion object/class in the createFields.H file. Which is then used to create instances for thermodynamics, mixture composition and to calculate reaction rates.

I was wondering if there was a particular reason why there is no separate class (not a subclass/method of combustion) that would be used for reaction rate calculation?



I wasn't brave enough to create a new thread :o but I hope my question is appropriate for this thread.

Ben.

ziemowitzima April 7, 2015 07:37

strange numerical behavior of reactingFoam...
 
Dear All,

I encountered very strange behavior while using reactingFoam, without reactions and combustions,
please see the thread:

http://www.cfd-online.com/Forums/ope...tml#post540279

any idea why it behaves like that ?

thx
ZMM

mturcios777 April 7, 2015 12:14

Quote:

Originally Posted by rhythm (Post 540305)
Hi guys,

I was wondering if there is a way to turn of the combustion in reactingFoam, yet still perform reactions? (I presume OF uses FiniteRateModel, so use that, but without combustion.)

I have been digging through the solvers and libraries and so far I understand that in OpenFOAM the reaction kinetics is entangled within the combustion libraries and any time one wants to use reactions, one has to start by creating/envoke a combustion object/class in the createFields.H file. Which is then used to create instances for thermodynamics, mixture composition and to calculate reaction rates.

I was wondering if there was a particular reason why there is no separate class (not a subclass/method of combustion) that would be used for reaction rate calculation?



I wasn't brave enough to create a new thread :o but I hope my question is appropriate for this thread.

Ben.

Hi Ben,

If you look at an older version of OpenFOAM (I think as late as 2.1.x) you can see that it used to be that the chemistry object was created directly in the solver. If you feel like it you can do that same thing in the newest versions; just create a solver that uses chemistry rates directly.

Although I'm not sure what you mean about using reactions and turning off combustion, since combustion is a reacting flow.


All times are GMT -4. The time now is 06:21.