CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

libOpenSMOKE

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree128Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   October 13, 2013, 04:01
Default
  #241
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Hi Tobi

After trying to optimize my grid; I went to change my turbulence model.
As suggested by hannes (FGM forum); I tried to implement realizableKE; However this error happens (even with RNGKEpsilon this error appears)
Do you have any hint for this error?

Code:
Starting time loop

Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 1.76289432e-08, No Iterations 6
DILUPBiCG:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.000958120731, No Iterations 40
time step continuity errors : sum local = 0.0906109149, global = -0.00473111621, cumulative = -0.00473111621
DILUPBiCG:  Solving for H, Initial residual = 0.999999999, Final residual = 1.40752135e-08, No Iterations 9
Updating look-up table extractions...
Updating mass fraction extractions...
DILUPBiCG:  Solving for csi, Initial residual = 1, Final residual = 3.12448826e-08, No Iterations 10
DILUPBiCG:  Solving for csiv2, Initial residual = 1, Final residual = 5.93143858e-09, No Iterations 4
#0  Foam::error::printStack(Foam::Ostream&) in "/home/babak/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/babak/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/babak/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/babak/OpenFOAM/babak-2.1.x/platforms/linux64GccDPOpt/bin/turbulentFlameletRhoSimplecFoam"
#5   at realizableKE.C:0
#6  Foam::compressible::RASModels::realizableKE::correct() in "/home/babak/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so"
#7  
 in "/home/babak/OpenFOAM/babak-2.1.x/platforms/linux64GccDPOpt/bin/turbulentFlameletRhoSimplecFoam"
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  
 in "/home/babak/OpenFOAM/babak-2.1.x/platforms/linux64GccDPOpt/bin/turbulentFlameletRhoSimplecFoam"
Floating point exception
Regards
Bobi
babakflame is offline   Reply With Quote

Old   October 13, 2013, 04:49
Default
  #242
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

1. you ever need k and epsilon for that model so your turbulence model should work
2. as I realize the calculation of Z and Zvar is completed and the k value should be calculated while the error occure. Therefor I think its a problem of:

a) Boundery
b) Initial solution (did you use value uniform in every BC?)

3. I had a look at your case, there are some problems I found.


3.1. The side wall should not be a symmetryPlane
3.2. You should create your bluff body down the bottom (see attachment)
3.3. I changed some values of k and epsilon


Have fun and I hope that my recirculation field is bigger than yours

Kind Regards
Tobi
Attached Images
File Type: jpg Temp.jpg (11.5 KB, 21 views)
File Type: jpg Velo.jpg (10.8 KB, 20 views)
babakflame likes this.
Tobi is offline   Reply With Quote

Old   October 13, 2013, 05:38
Default
  #243
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Many thanks to my friend Tobi.



Some hints For guys who want to change the turbulence model:

the error that I posted earlier appears with GAMG solver and GaussSeidel smoother. Try using PCG and PBiCG solvers. the error would remove.
Then kOmegaSST turbulence model is easily applicable.


Regards
Bobi
Tobi, yash.aesi and subir like this.
babakflame is offline   Reply With Quote

Old   October 13, 2013, 06:02
Default
  #244
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

another hint to the solvers.
In most cases its the best way to use PBiCG solver.

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

I will update the tutorials today evening that none smoothsolver is used anymore.

Regards
Tobi
Tobi is offline   Reply With Quote

Old   October 13, 2013, 06:05
Default
  #245
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 91
Rep Power: 5
yash.aesi is on a distinguished road
Greetings tobi,
just a kind reminder that in last updated tutorial the files in the constant folder like faces , points etc is missing . plz have a look on it .
yash.aesi is offline   Reply With Quote

Old   October 13, 2013, 13:27
Default
  #246
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,
you do not need the files.
Just run the command
Code:
~: blockMesh
in your terminal and everything will build.

Tobi
Tobi is offline   Reply With Quote

Old   October 13, 2013, 13:32
Default
  #247
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 91
Rep Power: 5
yash.aesi is on a distinguished road
ok tobi
Thank you .
yash.aesi is offline   Reply With Quote

Old   October 26, 2013, 07:20
Default
  #248
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by TBO View Post
I already looked into other solvers, e.g. reactingFoam and there you have the possibility to switch off chemical reactions (however this solver is transient, resulting in extreme calculation times). Is there any possibility to switch off the chemical reactions (or modify the library) for the libOpenSmoke?

Hi TBO,

is your problem still there? I think the main reason you want not to simulate the cold flow with rhoSimpleFoam is the fact that the two different fluids are using different densitys. Therefor rhoSimpleFoam is not a good deal. With libOpenSmoke I think its possible but I will say that it s more commen to use a modified rhoSimpleFoam solver with two densitys

I build this solver a time ago because one friend made a simulation of mixing air and methan. At the beginning he used a transient combustion solver. After that he used my scalarSimpleFoam (there is only one density - like rhoSimpleFoam). He get good results but after that I build a new solver with two densitys. He get a better accuracy there

Sorry I don 't read your posts befor and therefor my answer is too late.

With lib open smoke its not possible or better - it would be more work because the thermodynamic values are used out of the PDF-Library. Therefor you had to change more things in the thermodynamic. Additionally all values are depend on "Z" and therefor you have different mixture fraction therefor different densitys etc.

The libOpenSmoke solvers are none combustion solvers as xiFoam or sth. like that because you do not calculate the combustion while solving the flow field. Its separated into:

1. calculate chemistry
2. calculate flowfield

Regards
Tobi
Tobi is offline   Reply With Quote

Old   October 28, 2013, 03:54
Default
  #249
TBO
Member
 
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 5
TBO is on a distinguished road
Hi Tobi,

The problem is still there, I am very interested in your solution with using two different densities. Can you share that one (or where can I find it?)

Regards,
TBO is offline   Reply With Quote

Old   October 29, 2013, 05:24
Default
  #250
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I dont know why its not in my github I will check it out and give you a link.
Regards Tobi
Tobi is offline   Reply With Quote

Old   October 29, 2013, 07:20
Default
  #251
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Hi Tobi

I am interested to the discussion with TBO as well. Is there any way that I have access to that solver too?
Does your solver employs flamelet tabulation?
Or is it a cold flow simulator?
It seems that TBO is interested in cold flow simulations.



Regards
Bobi

Last edited by babakflame; October 29, 2013 at 08:50.
babakflame is offline   Reply With Quote

Old   October 29, 2013, 09:33
Default
  #252
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

my solver is just a incompressible solver for mixing up two gases or liquids (Ma < 0,3). I think TBO wants to know the mixture fraction of two gases without chemical reactions.

This solver is just a modified simpleFoam solver. I have to search for my solver today. Maybe I have to conntact my old friend that had made some simulations with that.

It is not possible to connect it with the flamelet-lib. Why? Or what do you think is an advantage of that?

Regards Tobi
Tobi is offline   Reply With Quote

Old   October 29, 2013, 11:07
Default
  #253
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Hi Tobi

Thanks for your reply. Actually I thought that maybe you are talking about a kind of high mach algorithm .(Although RhoSimple and RhoPiso are high mach algorithms too). Cause You said this solver predicts mixing more efficient than RhoSimple algorithm, I thought that maybe its a better high mach solver. Since high mach algorithms take into account density fluctuations, I got a bad impact.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   October 29, 2013, 11:15
Default
  #254
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi bobi,

I read my post again and ... sorry I wrote "rhoSimple" ... but I meant an incompressible solver without compressibility.
Tobi is offline   Reply With Quote

Old   November 1, 2013, 11:02
Default
  #255
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Hi Tobi

I have a doubt about radiation source term that is due to closed code of flamelet. ( Once, I met alberto but I forgot to ask about this part of his code, although he said that he does not work on turbulent flames anymore).
I have seen both radiation source term in and out of flamelet equations.
However according to pitsch papers I know that including radiative source terms in steady flamelet equations yields to unrealistic results.
I think radiative source term is just in the enthalpy equation. Am I right?

Also would you PLZ write the enthalpy equation of the code in latex form?
I have a problem with this phi in the equation.

2- Your Rhopiso code has the ability to compute rms fluctuations. Since we can move in real times.

I am computing these dataset now, if right results achieved, my proposal is to put the codes (available in O.F.) in the end of control dict so as to help users calculating rms data.

3- A question about RhoPiso algorithm:
In this algorithm the spatial and temporal fluctuations of density and pressure are related to chemistry. Am I right?


Regards
Bobi

Last edited by babakflame; November 1, 2013 at 12:16.
babakflame is offline   Reply With Quote

Old   November 4, 2013, 11:28
Default
  #256
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

the code for the enthalpy equation in the flamelet*Foam is that one:

PISO

\bar \rho \frac{\partial \bar H}{\partial t} + \bar \rho v \cdot \nabla \bar H = \nabla ( \frac{\mu_t}{\sigma_t} \nabla \bar H)


SIMPLE

\bar \rho {v} \cdot  \nabla \bar H = \nabla ( \frac{\mu_t}{\sigma_t} \nabla \bar H)


If you compare it with the equation of the mixture fraction Z its the same:


PISO

\bar \rho \frac{\partial \bar Z}{\partial t} + \bar \rho {v} \cdot  \nabla \bar Z = \nabla ( \frac{\mu_t}{\sigma_t} \nabla \bar Z)


Its just a conserved scalar equation. If you turn off radiation these both fields should be look identically.

At least if you turn on the radiation you modify your terms like that:

PISO

\bar \rho \frac{\partial \bar H}{\partial t} + \bar \rho {v} \cdot  \nabla \bar H = \nabla ( \frac{\mu_t}{\sigma_t} \nabla \bar H) + Q_R


SIMPLE

\bar \rho {v} \cdot  \nabla \bar H = \nabla ( \frac{\mu_t}{\sigma_t} \nabla \bar H) + Q_R

and the additional source term Q_R is:

Q_R = 4 \cdot \sigma_{BS} \cdot a_s \cdot (T^4 - T_{env}^4)


The first variable is the boltzmannconstant and the second one is caclulated during teh flamelet calculation and is called planscher absorptionscoefficient. More informations can be found here: www.sandia.gov/TNF/radiation.html

The last coefficient depend on the species and temperature. In the link you find the calculation of that coefficient with fitting curves.

Additionall information can be found here:

B.Marracino, D.Lentini: Radiation modelling in non-luminous nonpresmixed turbulent flames, Combustion Science and Technology, 128:2348 (1997)


Hope this help you.
Regards Tobi
yashar.afarin and babakflame like this.
Tobi is offline   Reply With Quote

Old   November 4, 2013, 11:54
Default
  #257
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Hi Tobi

So Many thanks from your hints.
Actually I am familiar with an optically thin radiation model.
The point that I am investigating is the factor as (mean absorption coefficient).
This factor is calculated from CO2,H2O and maybe CO and CH4 which are absorbing species.
My problem is finding this procedure in this code. I couldn't find that which species are included in computing planck mean absorption coefficient?

And If we can modify the featuring species or not?

I invstigated the files, however with no success.
I do not know how the code compute this factor. (From which source?)


From your reply, It seems that this factor is again computed during this ..... flamelet calculation

If I see alberto again, I am going to ask him that Why and Why his flamelet calculation step is closed.


Just another short question:Is there any way to put out our PDF solutions?
I mean our PDF plots. for instance PDF (Z) as a function of Z or PDF(chi) as a function of chi in different axial locations?

Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 4, 2013, 14:09
Default
  #258
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

you are right. The mean absorption coefficient is calculated during the flamelet generation with the nice closed binaries.

Therefor I can not say anything about it - which species are included and what exactly is calculated. I wrote an email to Alberto to ask about help of building my own flamelet-generation code - but still no feedback. But I think they are using the fitting curves in the link I wrote above.


As I know from the Homepage it seems that there is only the laminar flamelet model available. Hmmm ... :/

It seems that they do not extend the code.

Regards
Tobi


PS: Yes you can have a look at the laminar flamelets and plot everything (phi = f(Z)) or you can plot the PDFs (phi=f(Z,Zvar,enthalpydefect).
Tobi is offline   Reply With Quote

Old   November 6, 2013, 11:13
Default
  #259
Senior Member
 
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 372
Rep Power: 7
babakflame is on a distinguished road
Greetings Tobi

I am still working on my RhoPiso case. My case after trying different solvers (PCG and GAMG) for rho and P AND PBiCG for other variables still crashes. Always the same error:

Code:
[4] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[4] #1  Foam::sigFpe::sigHandler(int) at ??:?
[4] #2   in "/lib/x86_64-linux-gnu/libc.so.6"
[4] #3  Foam::pdfFlameletThermo<Foam::flameletThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::update() at ??:?
[4] #4  Foam::pdfFlameletThermo<Foam::flameletThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:?
[4] #5  
[4]  at ??:?
[4] #6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[4] #7  
[4]  at ??:?
[babak-System:02614] *** Process received signal ***
[babak-System:02614] Signal: Floating point exception (8)
[babak-System:02614] Signal code:  (-6)
[babak-System:02614] Failing at address: 0x3e800000a36
Even I reduced Courant to 0.1, However the case still crashes.
It seems that the error is related to enthalpy and my thermotype.
However cause we use flamelet , I can not change it.
It's very odd.


The position of myflow field when crashing is always neat the exit plane for fuel jet (bluff-body edge); even I computed my grid cells values in a way that compression before exit and expansion after exit are the same,But it crashes again.

Do you have any hint for me?

I have also tried upwind schemes, But I think that their convergence is lower than central schemes.


Best Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 6, 2013, 11:39
Default
  #260
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

do you start from beginning or at a solution of your SIMPLE algorithm?
Tobi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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