CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   having trouble using reactingFoam with reactions turned off (http://www.cfd-online.com/Forums/openfoam/81352-having-trouble-using-reactingfoam-reactions-turned-off.html)

kaka22 October 25, 2010 02:13

having trouble using reactingFoam with reactions turned off
 
Hi,

I have been simulating the counterFlame2D tutorial file using reactingFoam in version 1.7.1. As I wanted to just solve for the species transport without reaction, I have switched reactions off by specifying in constant/chemistryProperties reactions off and turbulent reactions off. Temperatures at 2 inlets are 573K and 373K. I should expect that temperature will not increase beyond 573K since there are no reactions and I am just solving for the flow. However, the temperature increased beyond 573 K. May I know what exactly that I have done wrong? I have been trying to solve my problem for a long time and tried to think of all means and change any necessary parameters but this problem still persist. Would appreciate any help. Thank you! :)

novyno November 8, 2010 12:24

Same strange behaviour
 
Hi all,

I also have the same problem (reactingFoam + no reactions). In a domain with two inlets (both at 1000 K) I start the simulation setting the internalField for T = 1000. During the simulation the temperature range varies between 985 and 1034 K.

I can't explain me this strange behaviour.

Valerio

nakul November 9, 2010 02:01

Hi kaka22,

How much is your maximum temperature?

If its only a little more, it might be due to sudden compression of gas in some regions of your domain.

If its considerably more then I don't have a clue. There might be some problem with your case setup.

kaka22 November 10, 2010 02:15

Hi,

The problem I have mentioned earlier have been reported and I got a reply.

"reactingFoam algorithm is an efficient, approximate method for turbulent reacting flow. However, in the laminar limit the approximation breaks down, leading to temperature inconsistencies.

In the laminar case, if you have a composition gradient, the only way to ensure that the diffusion does not give rise to temperature errors is by enforcing a Lewis no = 1 constraint, e.g. update the sensible enthalpy eqn to:

fvScalarMatrix hsEqn
(
fvm::ddt(rho, hs)
+ mvConvection->fvmDiv(phi, hs)
// - fvm::laplacian(turbulence->alphaEff(), hs)
- fvm::laplacian(turbulence->muEff(), hs) // unit lewis no.
==
DpDt
+ chemistrySh
);
"
So basically, I have commented this line // - fvm::laplacian(turbulence->alphaEff(), hs) and run the case again but with inlet velocities as 0.1 m/s, reactions off and turbulent reaction off, initial temperature as 573 K, inlet temperature at 373 K and 573 K. The temperature remains approximately constant at 573K, basically the temperature does not shoot up high as expected since there's no reaction.

However, I have run a similar second case with varying only the inlet velocities. I have changed inlet velocities to be 100 m/s and 289 m/s, still with the same temperature and reactions off. The temperature gradually increases high during the simulation.

I guess the solver works well only for laminar case? since at low velocity we are not facing the problem. Probably we still have to look further into the solver! Hope this helps, cheers

nakul November 10, 2010 07:17

Hi,
Do you mean that at higher velocities when you did the simulation with unit Lewis No., you again got temperature inconsistencies?

Are you getting agreeable results with combustion(reaction) on?

kaka22 November 10, 2010 23:13

Hi Nakul,

Yes that's right I got temperature inconsistencies still when I simulated with unit Lewis No. for flow at high velocities.

For my case when I simulated it with reactions on, the temperature profile came out fine but I am not getting mass fraction of product as desired. So I can't really tell if I get agreeable results with reactions on since there are some things that are still inconsistent.

Have you run any case with reactingFoam and got the result as per expected?

nakul November 11, 2010 01:30

1 Attachment(s)
Hi,

I am also trying to understand reactingFOAM and I am in process of making my test case and I am also facing some problems and that's why I thought it might be useful to discuss it with someone whose also using it.

From what I have heard reactingFOAM is a good solver. There is some publication also out there which uses reactingFOAM in ramjet engine combustor.

Have you taken a look at the code in Y-equ.H ? Its also a little bit different from what I expected it to be. There also I think variation of Lewis No. is playing a role (in terms of "mueff()").

According to me the species equation should be something like the one in the attachment. I am still confused about its present formulation.

Do you have any ideas about this?

novyno November 12, 2010 06:55

Thanks for your help and something about y.eqn
 
Hi all!

First of all thanks to kaka22 for his exaustive reply! It was very useful for me!

Then speaking about y.eqn its form is different than the usual one becouse also there in my opinion there is the hypotesis of Sc = 1 for all species (so we can sobstitute the rho*D term with mu).

This is done (always in my opinion) becouse OpenFOAM doesn't (officially) have a complete library for multispecies diffusion model (multispecies Fick model, Maxwell-Stefan model, etc...). I'm working on it (multispecies diffusion model on OpenFOAM ) and I hope to release soon this library. Actually I'm trying to combine my library of diffusion models with reactingFoam in order to leave the rho*D term in y.eqn and h.eqn without make any hypotesis on Le or Sc numbers.

As soon as I will obtain some relevant results I'll update you!

Regards,

Valerio

nakul November 12, 2010 07:36

Hi Valerio,

Correct me if I am wrong but I think that if assumption of Le=1 is there then we should have alpha instead of mu in the species equation.

In hs-equ. also for Le=1 they have used alphaEff().

According to me muEff() is there to account for turbulent diffusion. Please clarify me if I am wrong!!!

nakul November 25, 2010 01:17

Hi,

I am facing another problem with rectingFOAM. Hope that somebody here might be able to help!!!

I am trying to run a case using reactingFOAM. But I am getting the following error:

FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 -> 5000; T = 195.559.

From function janafThermo<equationofstate>::checkT(const scalar T) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.2/src/thermophysicalModels/specie/lnInclude/ janafThermoI.H at line 73

The temperatures that I have supplied as BC are 1000K and 600K for O2 and H2 respectively. (Its H2-O2 combustion.)

My Courant No. is 0.2 and my max. cell skewness = 0.66838.
My "checkMesh" results are all OK.

Can anybody please tell me where am I going wrong?

You may look at the posts in this discussion also :

http://www.cfd-online.com/Forums/ope...ctingfoam.html

-Nakul

novyno November 25, 2010 06:55

Which version?
 
Hi, nakul

Do you use the standard version of reactingFoam (1.7.* version without any modifications in the hs equation)?

nakul November 26, 2010 01:41

No I don't use the standard version of reactingFOAM.

I have modified it for supersonic combustion and hence the energy equation has been modified to solve for supersonic flows.

Actually I have modified the energy equation of rhoCentralFOAM to include turbulence and reaction. However the energy equation still solves for hs only.
-Nakul

novyno November 26, 2010 05:07

Can you post your energy equation?

nakul November 26, 2010 05:11

Hi
I am attaching my energy equation. If you have any doubts, feel free to ask right now.

-Nakul

nakul November 26, 2010 05:13

1 Attachment(s)
Sorry the energy equation is attached here.

nakul November 26, 2010 05:16

My solver is running for around 500 time steps beginning with 0.

It goes to a time of around 2e-6 and then I get the above error that T has exceeded 5000 K limit to become ~5200K.

I have also tried different BC like waveTransmissive, inletOutlet at outlet for p and U respectively and also I have tried zeroGradient.

Any help would be appreciated.

novyno November 26, 2010 05:38

Only one question more.

If you switch off all the reactions and if you set all the inlets and the internal field to the same temperature, what do you obtain?

In line of principle you have to obtain good results (uniform temperature or temperature variations only due to the compressibility). Probably if you have in your domain an uniform mixture you will obtain this. But if you have some gradients of the species you will probably obtain some strange results.

I am not an expert in supersonic flows, but looking your energy equations it seems that miss some term related to the gradient of the composition. And this, in my opinion, is the cause of your strange behavior of the temperature (to hight if I have well understood).

Try this test case and update me.

yashar.afarin May 26, 2011 04:03

non-unit lewis number
 
Quote:

Originally Posted by novyno (Post 283211)
Hi all!

First of all thanks to kaka22 for his exaustive reply! It was very useful for me!

Then speaking about y.eqn its form is different than the usual one becouse also there in my opinion there is the hypotesis of Sc = 1 for all species (so we can sobstitute the rho*D term with mu).

This is done (always in my opinion) becouse OpenFOAM doesn't (officially) have a complete library for multispecies diffusion model (multispecies Fick model, Maxwell-Stefan model, etc...). I'm working on it (multispecies diffusion model on OpenFOAM ) and I hope to release soon this library. Actually I'm trying to combine my library of diffusion models with reactingFoam in order to leave the rho*D term in y.eqn and h.eqn without make any hypotesis on Le or Sc numbers.

As soon as I will obtain some relevant results I'll update you!

Regards,

Valerio

Hi valerio

I am using reactingFoam and I am very interesting to using multi-species diffusion model and compare its results with my result when lewis was considered as one. have you had any progress to implementing multi-species diffusion model in reactingFoam? I would appreciate it if you could kindly help me.

best regards
yashar

linch June 8, 2011 05:08

One question:

I don't get how the term
Code:

fvm::laplacian(alphaEff(),hs)
in the enthalpie equation can work in multicomponent case? Different components have different standard enthalpies of formation, so the term exists even without temperature gradient. pre.cjk { font-family: "DejaVu Sans",monospace; }p { margin-bottom: 0.21cm; }
Code:

fvc::laplacian(k, T)
Seems to make sense, but It can't be treated implicitly, so internal iterations with temperature update needed.

What is the error in my reasoning?

linch June 10, 2011 07:24

I'm surprised, because I thought it must be something obvious and everyone who uses reactingFoam / rhoReactingFoam can help me.

Best,


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