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! :) |
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 |
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. |
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 |
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? |
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? |
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? |
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 |
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!!! |
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 |
Which version?
Hi, nakul
Do you use the standard version of reactingFoam (1.7.* version without any modifications in the hs equation)? |
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 |
Can you post your energy equation?
|
Hi
I am attaching my energy equation. If you have any doubts, feel free to ask right now. -Nakul |
1 Attachment(s)
Sorry the energy equation is attached here.
|
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. |
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. |
non-unit lewis number
Quote:
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 |
One question:
I don't get how the term Code:
fvm::laplacian(alphaEff(),hs) Code:
fvc::laplacian(k, T) What is the error in my reasoning? |
I'm surprised, because I thought it must be something obvious and everyone who uses reactingFoam / rhoReactingFoam can help me.
Best, |
third try...
|
Hi Valerio-
What's the latest on the multispecies diffusion libraries you were working on (Fick model, Maxwell-Stefan, etc)? Anything released yet? This would be helpful! With so many solvers in openFoam, it seems there's not enough attention given to chemistry and more is always welcome. Thank you and best wishes, Scot |
Hi Scot,
have a look on http://www.extend-project.de/user-gr...ewgroup/groups Send me an e-mail and I can send you the code. Regards Valerio |
Quote:
|
Dear All
I am going to run a case includes some liquid species that react with each other. I am going to use the reactingFoam as a solver (OF 2.0.1). All species have constant proprties and I want to use the following thermo type: thermoType hsPsiThermo<reactingMixture<constTransport<specieT hermo<eConstThermo<icoPolynomial>>>>>> but when I set it in the constat/thermophysicalProperties file and run the case, I get this error: ------------------------------------------------------------------------------------ --> FOAM FATAL ERROR: Inconsistent thermo package selected: hsPsiThermo<reactingMixture<constTransport<specieT hermo<eConstThermo<icoPolynomial>>>>>> Please select a thermo package based on gasThermoPhysics. Valid options include: 3 ( hsPsiMixtureThermo<singleStepReactingMixture<gasTh ermoPhysics>> hsPsiMixtureThermo<multiComponentMixture<gasThermo Physics>> hsPsiMixtureThermo<reactingMixture<gasThermoPhysic s>> ) From function autoPtr<hsCombustionThermo> hsCombustionThermo::NewType(const fvMesh&, const word&) in file combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C at line 116. FOAM exiting ------------------------------------------------------------------------------------- What should I do to use the reactingFoam for constant propertie species? Thanks in advance for your help. |
Hi nakul:
would you tell me what "chemistrySh" represents in hEqn.H in reactingFoam?Please!Is there any theroy can corresponding to the term "chemistrySh"? |
Hi
'chemistrySh' is the conventional 'chemistry source term' of your energy equation. you can see its definition in createFields.H -Nakul |
thanks,nakul,I find the define of chemistrySh in the chemisty.H,the following is codes:
if (chemistry.chemistry()) { Info<< "Solving chemistry" << endl; chemistry.solve ( runTime.value() - runTime.deltaTValue(), runTime.deltaTValue() ); // turbulent time scale if (turbulentReaction) { tmp<volScalarField> tepsilon(turbulence->epsilon()); const volScalarField& epsilon = tepsilon(); tmp<volScalarField> tmuEff(turbulence->muEff()); const volScalarField& muEff = tmuEff(); tmp<volScalarField> ttc(chemistry.tc()); const volScalarField& tc = ttc(); forAll(epsilon, i) { if (epsilon[i] > 0) { // Chalmers PaSR model scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]); kappa[i] = (runTime.deltaTValue() + tc[i]) /(runTime.deltaTValue() + tc[i] + tk); } else { // Return to laminar combustion kappa[i] = 1.0; } } } else { kappa = 1.0; } chemistrySh = kappa*chemistry.Sh()(); } But I really don not know what formula expression can corresponding to the term "chemistrySh",would you tell me its formula expression about the term?Or if you have some paper about the term ,could you let me take look?please! |
Hi
Read this paper - http://powerlab.fsb.hr/ped/kturbo/Op...olmPhD2008.pdf It has details on how reaction source term is modeled in OF. As I said in previous post, chemistrySH is chemical source term multiplied by a factor 'kappa'. kappa takes into account the effect of turbulence. It is so because reactingFoam solves chemistry based upon turbulence of the flow. The philosophy is similar to Eddy Dissipation but formulation is different. |
Thank you,nakul!It is kind of you!
|
Hi guys,
would you mind running my enthalpy diffusion test case (https://github.com/greole/ValidationCases and http://www.cfd-online.com/Forums/openfoam/123227-enthalpy-diffusion-testcase.htm) with your reactingFoam version to see if the mean enthalpy ist conserved ? Help would be much apprechiated |
help regarding reactionFoam solver .
greeting oll ,
i am relatively new to OF. nowadays i am trying to simulate my case of different species with the reactingFoam solver and m using openFoam 2.2-x . fist i solved the tutorial of counterFlow Flame after that nw i tried to run my case . but i am not able to understand what to write in place of bold marked text in thermophysical properties file shown below : Code:
FoamFile PHP Code:
Regards , sonu . |
Nothing. "$FOAM_CASE" should be resolved by the solver at runtime.
|
greeting adhiraj ,
thanks for replying . sori but can you elaborate a bit more i am not getting what you want to say . |
What I meant was that if you have the phrase "$FOAM_CASE" in the file, during running, the solver will be able to resolve the path. You do not need to explicitly put in your case directory name.
|
thanks adhiraj for quick replying .
but if i keep it as it is means "$FOAM_CASE" then it will end in big error of print stack and if i change it like i said above then again end up with diffrent error . one more doubt i am using OF 2.2-X. so there in constant folder we are having reaction and thermo. file so do we need to separately keep chemkin folder alone with our case files . thanks again , Regards , sonu |
What error do you get when you retain "$FOAM_CASE/..." ?
Can you post the error message in its entirety? |
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
1 Attachment(s)
Greeting adhiraj ,
The above posted error comes if i retain it as it is and i dont have any idea what kind of error it is . if i run the tutorial of counterflowflame2D there its working fine . i am attaching my constant folder . please have a look and guide me . thank you . Regards , sonu |
greeting oll ,
Above error is solved its just bcz of the wrong BC's , nw my case is running but there is no combustion ( combustion is on ) . The BC's for temp for fuel inlet is 300 k and air inlet is 500 k . but in this case there combustion is not happening why ? also if i try to change the BC's to some higher temperature like 600 k then following error is coming : PHP Code:
Thanks , Regard sonu . |
All times are GMT -4. The time now is 12:41. |