CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[openSmoke] libOpenSMOKE

Register Blogs Community New Posts Updated Threads Search

Like Tree133Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2013, 10:48
Default
  #261
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Tobi


Actually, cause I want to try evaluating rms data, I have started a new case with RhoPiso,The time of crash varies,when I modify my fvSolution file. The point is my solution never goes beyyond 0,02 sec.

Once I tried to continue my steady case, However interestingly before crossing 0.02 sec,it crashed.

So odd and vague


Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 6, 2013, 10:52
Default
  #262
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by babakflame View Post
Greetings Tobi


Actually, cause I want to try evaluating rms data, I have started a new case with RhoPiso,The time of crash varies,when I modify my fvSolution file. The point is my solution never goes beyyond 0,02 sec.

Once I tried to continue my steady case, However interestingly before crossing 0.02 sec,it crashed.

So odd and vague


Regards
Bobi

Hmm ... well I never tested the piso algo. Just with the sandia flame.
You can try the following:

1. use the algebraic equation for zvar instead of partial equateion (flameletProperties).
2. switch off the radiation


Oh ... what is your setting of update thermodata in flameletProperties?
Tobi is offline   Reply With Quote

Old   November 6, 2013, 11:03
Default
  #263
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Tobi

This is my setting for update

Code:
//- LookUpTable extraction after <n> iterations
        
        //- Thermo variables
        propertyUpdate            5;

        //- mass fraction
        massFractionsUpdate        50;
Just clearing one thing for myself; if we make variance equation ON, it solves variane transport equation. what happens if we toggle it to OFF?
My case is now off.

It's very odd,if the solver has simulated sandia,I think it should compute bluff-body flames with no problem.
I even used your settings for sandia but no result.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 6, 2013, 11:07
Default
  #264
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

if you turn it on then the algebraic equation will be solved.
If it is turned off then the partial equation will be solved.

Code:
if (varianceEquation == false)
{
        //- Solving equation of variance of mixture fraction
        fvScalarMatrix ZvarEqn
        (
                (
                    fvm::ddt(rho, Zvar)
                  + fvm::div(phi, Zvar)
                  - fvm::laplacian(turbulence->mut()/sigmat, Zvar)
                  - Cg*turbulence->mut()*magSqr(fvc::grad(Z))
                  + Cd*rho*turbulence->epsilon()/(turbulence->k()+k_small)*Zvar
                )
        );


        ZvarEqn.solve(mesh.solver("Zvar"));
}
else
{
        Info << "Algebraic equation for Zvar" << endl;
        scalarField& ZvarCells = Zvar.internalField();
        ZvarCells = Cg*turbulence->mut()*magSqr(fvc::grad(Z))*turbulence->k()/(Cd*rho*(turbulence->epsilon()+epsilon_small));
}
Did you try to change the propertyUpdate to 1. I think its important that the values are actual in the PISO algorithm.

Regards Tobi
babakflame likes this.
Tobi is offline   Reply With Quote

Old   November 6, 2013, 11:29
Default
  #265
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Hi Tobi

Thanks for your valuable experience and hints.
i will try toggling radiation to off and also change property update to 1.
Also using variance transport equation.
I will report my results.

Just another short question:
what are these property update? I mean why do we need iterations from our look-up table? Not just picking our required data by interpolating.

Best Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 6, 2013, 11:44
Default
  #266
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by babakflame View Post
Hi Tobi

Just another short question:
what are these property update? I mean why do we need iterations from our look-up table? Not just picking our required data by interpolating.

Best Regards
Bobi
Hi Bobi,

that is no iteration. This is the number after how many iterations the values phi are updated by the flamelet database.

So 1 is every iteration OpenFOAM is doing.
babakflame likes this.
Tobi is offline   Reply With Quote

Old   November 10, 2013, 05:07
Default
  #267
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Is it working now?

Additionall you can use relaxation factors and more nOuterCorrectors!
Tobi is offline   Reply With Quote

Old   November 10, 2013, 08:13
Default
  #268
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Tobi

The good news is I solved that sigFPE problem.
The bad news is my case is now unstable. I have attached some pictures of my simulation during different times. I don't know that why Temp doesn't go beyond 1400 and the flame is very unstable.

The grid is refined enough, I have tested it with RhoSimple algorithm.

I am going to relax equations by a factor of 0.9 except 0.5 for zvar.



Regards
Bobi
Attached Images
File Type: png 0.03sec.png (15.7 KB, 26 views)
File Type: png 0.036sec.png (15.4 KB, 23 views)
File Type: png 0.0377sec.png (15.3 KB, 19 views)
babakflame is offline   Reply With Quote

Old   November 11, 2013, 06:18
Default
  #269
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

what did you do?

And what is sigFPE ?

Can you send me the pimple case again

I want to try something.

Regards Tobi
Tobi is offline   Reply With Quote

Old   November 12, 2013, 10:28
Default
  #270
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi bobi,

sorry my fault. You can not use relaxation with PISO ... I thought I build the PIMPLE algorithm -.-

Sorry ... I will have a look at your case now and maybe I will try to build the "flameletPimpleFoam"

Additionall. Did you change the flamelet code?
I can not start the case:

Code:
OpenSMOKE_PDF_Flamelet Error
File name:     PDF-Library/PDF0/SR_8.bin
Error message: Only version 0.1 is supported...
RegardsTobi
Tobi is offline   Reply With Quote

Old   November 12, 2013, 12:19
Default
  #271
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Tobi

Actually from CFD concepts, there is no problem with relaxing PISO algorithms. Although in some of O.F. cases ; relaxing factor of 1 is used. I think it means that relaxing PISO algorithm is unnecessary.

Your tutorial did not have a solver for rho matrix, albeit it uses a compressible algorithm (RhoPISO).
I think there is no need to change the flow solver (I am not 100% sure)
However my case is still unstable

You can take a look at the code that I have added to the end of controldict. these lines enable us to compute rms data in the URAS solver.

That mysterious error sometimes happens to me too. If you want I can send the PDF-Library again. But I think you may take a look into flamelet properties file and find the name for PDF library path.Maybe this name is different in your server.


I really appreciate your kind hints and helps.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 12, 2013, 12:30
Default
  #272
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

normaly PISO algorithm is not using any relaxation.

The merge of SIMPLE and PISO = PIMPLE can use underrelaxation. The reason why you be not able to use PISO + relaxation is the fact that you change the real solution (accuracy in time).

For SIMPLE you neglect a pressure term. For that it is necessary to have underrelaxation.

Quote:
The idea of PIMPLE is to combine the PISO and the SIMPLE algorithms. You iterate several times over one time step and use underrelaxation to get a stable solution. Of course, if you only did one iteration per time step + underrelaxation your solution would not be correct. Therefore, you do multiple iterations (check your residuals).

I did not check the controlDict because first of all your simulation have to work.
At the moment I am simulating your case and at the moment I used adiabatic conditions but for your:

Folder 0/H - your enthalpy defect is wrong for the fuel !


I will check it and give a feedback to you.


Additionall!
Do not mix the standard thermodynamics (included with openfoam) and the flamelet thermodynamics. There is no calculation of any variable like:

Code:
rho
mu
nu
cp
.
.
.
Thats all calculated in the pre-processing flamelet calculation.


Regards
Tobi


PS: Maybe its possible to have a stable version with PIMPLE
babakflame likes this.
Tobi is offline   Reply With Quote

Old   November 12, 2013, 13:18
Default
  #273
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings tobi

Just making one thing clear for myself:

In flameletPisoFoam we have:

Code:
//        #include "rhoEqn.H"
        #include "UEqn.H"
    

        // --- PISO loop
        for (int corr = 1; corr <= nCorr; corr++)
        {
        #include "ZEqn.H"
        #include "HEqn.H"
            #include "pEqn.H"
        }

        turbulence->correct();

        rho = thermo.rho();

        runTime.write();
You have omitted rho equation from being computed, then we have this line
Code:
rho = thermo.rho();
So how can you explain the existence of rho here, You mean it comes from flamelet calculations?
This binary flamelet calculation has made this whole thing a mystery.

I really didn't get that this is compressible or incompressible algorithm.

I think maybe its a real necessity to write an open source flamelet tabulation.

PS:I sent the files.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 12, 2013, 17:11
Default
  #274
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,

yes I comment the rhoEqn.H out because we have no density calculation during the simulation.

As you know, the flamelet approch is only depend on one variable Z (laminar diffusion flames) ... if you extend it to turbulent flows you have an additional parameter Zvar. Thats all.

Okay that not all because you have the scalar dissipation rate and enthalpy defect as two further parameters but that doesn't matter for the understanding because you could use that model with only one scalar dissipation rate so that would be cnostant and you do not need to solve that equation. The same is valid für the enthalpy defect so keep in your head:


every variable:

rho, nu, mu, cp, species, temperature depend only (simplified) on Z and Zvar (of course on scalar dissipation rate and enthalpy defect too).

And that is the big advantage of that model because you just have to solve only two simple conserved scalar eqautions for Z and Zvar.


With those two variables you catch all other needed flow characteristics for calculation like rho, nu etc.


To summarize that: for RHO you do not need to solve an equation because rho depends only on Z and Zvar. And which value rho should is fetched by the flamelet thermodynamic model out of the PDF`s you created befor with the binaries.

The uncomment rho equation comes from the rhoPisoFoam solver


I am working on a open source flamelet generator. There is one available "FlameMaster" RWTH Aachen but this code is sooooo confusing - so many files etc.
Tobi is offline   Reply With Quote

Old   November 13, 2013, 00:15
Default
  #275
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Hi Tobi

I know that Rho is present in flamelet equations. But from compressible solver I was wondering whether this rho is computed from flow solver and then brought into flamelet equations or viceversa i.e. computed as a dependent variable in flamelet equations with no need to be computed in flowsolver.
from your explanations it seems that here the first belief is right.

I have seen many many different flowcharts for flamelet algorithms in papers and my doubt was maybe due to different flowcharts used by researchers.
Even I have seen radiation source term incorporated in steady flamelet eqauations.
All in all, thanks for your clarification.


I have worked some times ago with flame master and a bit familiar with that code and have created some files for sandia CH4/H2/N2 in that software. If you need them, I can send it to you.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   November 13, 2013, 07:03
Default
  #276
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bobi,


thanks for your replay.
I think the best way for using the flamelet solver would be the following:

- open source thermodynamic libraries
- open source solvers
- open source flamelet building libraries


Additionally I think it would be nice to compute the time dependend flamelets for research extinction and so on.

BUT

- Alberto is no more working with the SLFM
- I do not know anyone - exept the few People in this thread - using that flamelet Approximation / theory for combustion
- In my thesis I get not good results with flameletSimpleFoam and a complex burning chamber for species fraction CO or sth. like that.
- In general I think this model has advantages and disadvantages but more disadvantages because the prediction of some species etc. are too bad. Maybe it is caused by the turbulence model and k-Epsilon and scalar Dissipation rate calculation ... There are a lot of assumptions and simplifications...

But I just wrote a depth masterthesis of the implementation of the model in OpenFOAM. So I am not a super Guru in this topic and always working alone is hard. The only Thing that I really know is - how the flamelet mechanismn in OpenFOAM is working and how the thermodynamic library is working.



Additionally:

GriMech3.0 is not updated anymore
I am not sure if the University Aachen (with Prof. Dr. Peters and Prof. Dr. Pitsch) is using that model anymore or if there are extensions to the model to predict the species better or sth. like that.


All These reasons prevent me to build an open source flamelet calculation libraries because:

1. I have no Advantage for that
2. I have less time and spare time is important to do other things than building complex combustion programming algorithm and C++ code
3. I have no idea if more then 10 People will use that tool for combustion

4. I had do go depth into the flamelet theory and numerical theory to solve partial differential equations.
5. Sometimes money is a factor too
6. Every paper / literature is written in english and it is not my first language - it is no barrier but some times it is hard to read it and to understand everything.



And additionally I am just a Master of Engineering - no doctor or sth. like that.!

Regards Tobi



PS: Due to your density Transport (example with SIMPLE algorithm)
-----------------------------------------------------------------



Normally while initialize the thermodynamics the solver fetches for every cell the density due to Z, Zvar, enthalpydefect and scalar Dissipation rate.
If you have and update every 5 iterations then the following should be valid:



- Iteration 1, 2, 3, 4 density on every cell is kept constant / not changed (the initialize value)
But in that Iteration Z, Zvar, enthalpy defect and scalar Dissipation rate changes

- Iteration 5 density on every cell will be updated with the actual Z, Zvar, enthalpydefect and scalar Dissipation rate and will kept constant / not changed till Iteration 10.

This is valid for all other variables to like:

temperature, dynamic viscosity, kinematic viscosity, plank mean absorption coefficient, heat capacity, ...

All These variables will not be changed till the next update is reached.


So it is clear that for PISO algorithm you should use an update every iteration.
Tobi is offline   Reply With Quote

Old   November 17, 2013, 13:16
Default
  #277
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 12
yash.aesi is on a distinguished road
greeting all,

I tried to solve the case of Sandia flame as given in the tut for my geometry (for jet flame) but the temperature plot which i am getting is having some waviness toward the end of the domain . can somebody plz suggest me why this is happening and what i can do to get rid of this problem ? thanks alot in advance



Regards ,
sonu
Attached Images
File Type: jpg cfd.jpg (29.2 KB, 19 views)
yash.aesi is offline   Reply With Quote

Old   November 17, 2013, 13:45
Default
  #278
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

that depend on (i think) your BC ...
The same phenomena I got in the first Solutions I made with SANDIA flame.




PS: Yellow on white (not very common)
yash.aesi likes this.

Last edited by Tobi; November 18, 2013 at 06:04.
Tobi is offline   Reply With Quote

Old   November 26, 2013, 12:36
Default
  #279
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I build the flameletPIMPLEFoam today.
At the moment I am solving SANDIA Flame ...

I keep you posted.

@Bobi: Thanks for your PM. I will have a look at your case again - maybe with pimple!
babakflame likes this.
Tobi is offline   Reply With Quote

Old   December 12, 2013, 06:17
Default
  #280
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings all

It seems that some of users have problem with the enthalpy defect parameter and its range.
This parameter has been added to take into account non-adiabatic effects (here radiation). When the mean enthalpy computed from its transport equation, then according to flamelet shelves you have produced (different values for enthalpy defect and therefore different actual enthalpy), the needed data is interpolated from these shelves.

take this parameter from zero to -250 (It is available in Tobi tutorial).

Regards
Bobi
babakflame is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Numerical treatment of the source term in combustion equations Tobi Main CFD Forum 37 September 15, 2020 13:42
[openSmoke] flameletSmoke + new ODESolver (by Alberto Cuoci) Tobi OpenFOAM Community Contributions 1 November 21, 2017 18:24
Unsteady solver with Flamelet Model (libOpenSMOKE) francesco_capuano OpenFOAM Running, Solving & CFD 11 November 26, 2013 04:50
LibOpenSmoke, getting the species in ParaFoam Christoph_84 OpenFOAM 1 May 31, 2012 14:42


All times are GMT -4. The time now is 08:24.