CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Steady state chemistry (https://www.cfd-online.com/Forums/openfoam-solving/58772-steady-state-chemistry.html)

linnemann April 1, 2008 05:23

Hi.. I'm trying to modify t
 
Hi..

I'm trying to modify the reactingFoam solver to be steady state. I've had some success and have been able to create a solver which actually works (bear in mind i have only used OpenFOAM + C++ for 2 months :-))..

The problem is now that when the solver goes from itt. 1 to 2 the chemistry part of the solver crashes with following output. If anyone has an idea to where the stuff breaks please be free to post. Or if more info is needed.


------------%%%%%%%%%%%%-------------------

Creating turbulence model

Selecting turbulence model kEpsilon
Creating field DpDt

Constructing chemical mechanism
Selecting ODE solver SIBS
chemistryModel::chemistryModel: Number of species = 9 and reactions = 5

Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.27053e-07, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.53356e-07, No Iterations 4
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 1.93888e-07, No Iterations 4
DICPCG: Solving for p, Initial residual = 0.999999, Final residual = 9.29203e-10, No Iterations 330
time step continuity errors : sum local = 4.59095e-07, global = -2.06926e-10, cumulative = -2.06926e-10
rho max/min : 0.994073 0.757904
Solving chemistry
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for CH4, Initial residual = 1, Final residual = 6.83189e-07, No Iterations 79
DILUPBiCG: Solving for O2, Initial residual = 1, Final residual = 8.5065e-07, No Iterations 77
DILUPBiCG: Solving for CO2, Initial residual = 1, Final residual = 6.01839e-07, No Iterations 45
DILUPBiCG: Solving for H2O, Initial residual = 1, Final residual = 6.01839e-07, No Iterations 45
DILUPBiCG: Solving for CO, Initial residual = 1, Final residual = 6.69834e-07, No Iterations 89
DILUPBiCG: Solving for O, Initial residual = 2.27305e-15, Final residual = 2.27305e-15, No Iterations 0
DILUPBiCG: Solving for OH, Initial residual = 4.95287e-22, Final residual = 4.95287e-22, No Iterations 0
DILUPBiCG: Solving for H, Initial residual = 3.95626e-21, Final residual = 3.95626e-21, No Iterations 0
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 8.46321e-07, No Iterations 151
DILUPBiCG: Solving for epsilon, Initial residual = 0.981056, Final residual = 1.65846e-07, No Iterations 4
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 9.46134e-07, No Iterations 4
ExecutionTime = 43.6 s ClockTime = 49 s

Time = 2

DILUPBiCG: Solving for Ux, Initial residual = 0.14041, Final residual = 3.81936e-08, No Iterations 6
DILUPBiCG: Solving for Uy, Initial residual = 0.117192, Final residual = 1.78371e-07, No Iterations 5
DILUPBiCG: Solving for Uz, Initial residual = 0.12593, Final residual = 8.13593e-07, No Iterations 4
DICPCG: Solving for p, Initial residual = 0.676268, Final residual = 8.91297e-10, No Iterations 345
time step continuity errors : sum local = 4.24033e-07, global = -6.36642e-10, cumulative = -8.43568e-10
rho max/min : 0.994533 0.266745
Solving chemistry
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 pow in "/lib/tls/libm.so.6"
#4 Foam::chemistryModel::omega(Foam::Reaction<foam::s utherlandtransport<foam::speci ethermo<foam::janafthermo<foam::perfectgas> > > > const&, Foam::Field<double> const&, double, double, double&, double&, int&, double&, double&, int&) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libchemistryModel.so"
#5 Foam::chemistryModel::omega(Foam::Field<double> const&, double, double) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libchemistryModel.so"
#6 Foam::chemistryModel::derivatives(double, Foam::Field<double> const&, Foam::Field<double>&) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libchemistryModel.so"
#7 Foam::SIBS::SIMPR(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifDE const&, double, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Matrix<double> const&, double, int, Foam::Field<double>&) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libODE.so"
#8 Foam::SIBS::solve(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifDE const&, double&, Foam::Field<double>&, Foam::Field<double>&, double, Foam::Field<double> const&, double, double&, double&) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libODE.so"
#9 Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifDESolver::solve(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifDE const&, double, double, Foam::Field<double>&, double, double&) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libODE.so"
#10 Foam::ode::solve(Foam::Field<double>&, double, double, double, double) const in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libchemistryModel.so"
#11 Foam::chemistryModel::solve(double, double) in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libchemistryModel.so"
#12 Uninterpreted: .././reactingFoam-new [0x805d12e]
#13 __libc_start_main in "/lib/tls/libc.so.6"
#14 __gxx_personality_v0
Floating point exception

linnemann April 1, 2008 06:20

Okay partially found the answe
 
Okay partially found the answer to my problem..

The chemistry solver is not steady state and depends on deltaT somehow, so setting a small time step in the dictionary will allow the calculation to continue..

So now to a new question.
Any guidelines howto make the chemistry solver steady state,, any hints?

markusrehm April 2, 2008 02:10

Hello Niels, there is work
 
Hello Niels,

there is work going on towards a EDC-based steady state solver. In principle you have tu use under relaxation together with coupling of chemical time scales to the time scales of the flow. Maybe some limits for temperature differences need to be added as well. I will tell you if I reached the goal. I hope I can achieve something until the Milan Workshop.

Regards Markus.

christian_andersen April 23, 2008 04:08

Hi Again, Could Anyone give
 
Hi Again,

Could Anyone give som input to how to implement a IF-sentence in OpenFOAM?

For each cell I need to determine the minimum of:

omega_fu = CH4
omega_ox = O2/s

omega = min(omega_fu, omega_ox)

How do I get OpenFOAM to select the minimum reaction rate? I've tried with an if sentence:

/******************************************/

omega_fu = C_R*rho*CH4*epsilon/k;
omega_ox = C_R*rho*O2/st*epsilon/k;
omega_pr = C_RR*rho*(1-CO2-H2O)/(1+st)*epsilon/k;

if (omega_fu > omega_ox)
{
omega = omega_ox;
}
if (omega > omega_pr )
{
omega = omega_pr;
}
/************************************/

Any help/comments will be appreciated!

Best
Christian Andersen

christian_andersen April 24, 2008 08:10

I figured it out by reading th
 
I figured it out by reading this thread:
http://www.cfd-online.com/cgi-bin/Op...pc=1&post=5191

If others have same problem, I'd be happy to send my code as an example.

Best
Christian

christian_andersen June 11, 2008 10:04

To whom it may concern. I'v
 
To whom it may concern.

I've been working with OpenFOAM for the last 4 months and I've come this far:

I have implementet the mixing rate limited reaction model of Eddy Break-Up model, Eddy Dissipation concept and the mixturefraction model.

However, my coding is not object oriented nor optimal. The thermodynamic coupling to the flow properties is still missing. Comparison with Fluent for disabled energy-equation showed good results.

I would like to make this work available to others, that can use it to get started with OpenFOAM.

Can someone tell me how I can upload/present this model?

Best
Christian Andersen

ratnavk June 12, 2008 00:12

Christian Andersen, I am wo
 
Christian Andersen,

I am working on laminar flames for H2-CO mixtures.
does your code can be used for that. In case I can have it for that purpose.

I am at present using Fluent but it is giving some trouble.

my email id ratnavk@gmail.com

sradl June 27, 2008 02:58

Dear Christian, look on the
 
Dear Christian,

look on the help panel under Documentation/Formatting and then search for attachments. There you'll find hints how to post the solver here.

I'm very much interested in your solver for my research on reactions in turbulent flows in bubble swarms. Maybe you can send it to me under

stefan <dot> radl <ad> tugraz <dot> at

sanjibdsharma June 14, 2009 02:57

Hi Christian,

Very nice of you to make your code available. I have downloaded your document from the internet and have gone through it. Although I am an experienced user of FLUENT, but I have started OpenFOAM only few days back. However, the project I am working is quite daunting and very much similar to your project.

I want to do the following:

1) Implement multi-species, multiple reaction turbulent reactive flow
2) Turbulent-chemistry interaction is through Eddy break-up model
3) The solver is steady state
4) Density change due to liquid-to-vapor flashing
5) Inclusion of latent heat of vaporization
6) Phase-partitioning between vapor and liquid

This project has already been developed in FLUENT and I am trying to migrate it in OpenFOAM.

You can send the file to sanjibdsharma@gmail.com and tell me how do I run the code in OpenFOAM.

I might also need your help as I move deeper into the project.

Thanks and regards,

Sanjib

GD07 September 21, 2010 06:05

hello,
i am also using reactingFoam but for a supersonic combustion. In fact it is a steady state problem, but reactingFoam can only be used transient.
it would be great, if if someone has a modification for steady state problems.
my email is: gabrieldilmac@googlemail.com

thank u
best regards
Gabriel

alfa_8C November 24, 2010 10:16

Hello Niels,

You mentioned to have modified reactingFoam from tranisient to steady sate.
I'm about to do the same and was looking for information in the net.
Is it a big deal.

All the best,
Tony

Filankes January 21, 2014 11:36

Hi, 2 years passed...any progress? would be very thankfull if you send the solver to me, too.


faraj.khalikov@gmail.com

Thanks you in advance.

ni-openfoam-user June 5, 2014 11:14

reactingFoam to steadyState
 
Hi guys,

Just wondering if you have been successful in creating a steadyState version of reactingFoam?

Thanks,

James

flowAlways April 7, 2015 12:59

steady state reactingFoam
 
Hi, it has been long since this thread started, its almost dead :(.
Has anybody been successful in creating a steady state solver based on the EDC concept, similar to the reactingFoam ?

Currently it is based on the PIMPLE algorithm and is limited by a low courant no (maxCo<1). However it is possible to accelerate it using ideas from SIMPLE(more outer correctors and under-relaxation).
http://openfoamwiki.net/index.php/Op...hm_in_OpenFOAM

However is it possible to completely replace PIMPLE with SIMPLE and if so what happens to the chemistry time scale and how do we deal with it? How does it work in Fluent. What is the idea ?

Do we really need to care about the chemistry time scale when considering "mixed=burnt" assumption. I suppose not!. But I am not a chemisrty guy and I am not clear about this ? Please if someone can illustrate. It will be very helpful.

flowAlways April 7, 2015 13:10

Hey I just found this new thread and some good human beings are contributing to a steady state reactingFoam. Cheers to there work.!
modify reactingFoam in order to make it a steady state solver

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


All times are GMT -4. The time now is 04:25.