|
[Sponsors] |
January 22, 2015, 09:23 |
|
#421 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
I am not sure if you mean that but this is the interpolation scheme of libOpenSmoke in 4th dimension
http://www.holzmann-cfd.de/index.php/en/development
__________________
Keep foaming, Tobias Holzmann |
|
January 24, 2015, 08:00 |
|
#422 | ||
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Dear Tobi,
Thank you for your quick reply and sorry for the late thanks. You are a pretty guy! I had looked through the source code of the libOpenSMOKE and your homepage as well. Actually, one bilinear interpolation (from both Z and Z") and two 1-D linear interpolations (for chi and phi ) were carried out in the source code, which give me hints what to do next. But i have two questions and a suggestion regarding the source code: Q1: In pdfFlameletThermo.H I'm not fully understand the three "if" sentence: Quote:
Q2: Also in pdfFlameletThermo.H Quote:
Suggestion: Now the libOpenSMOKE should use two binary utilities to generate library. That's a huge shortcoming for the widely use of the libOpenSMOKE. For me and may be some others, the mixture fraction should be redefined in special cases, such as multiphase combustion etc. So my suggestion is : Could we generate flamelet library with Open Source code, such as Cantera and FlameMaster. Thank you again, Tobi. Best regards for you, wenxu |
|||
January 26, 2015, 09:38 |
|
#423 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
Q1: pdfFlameletThermo.C That I was implementing because of some problems and features the tool should handel. Therefor you have to know what I am doing here. In the constructor you can see that I check if the patches are fixedValue condition or not. If yes save 1 otherwise save 0. (3) (patch_type_T[patchi] == 1 && patch_type_H[patchi] == 1 && patch_type_Z[patchi] == 0) That means
Code:
defect = flamelets_library.GetEnthalpyDefectFromTemperature(0., 0., max_chi, pt[facei]); (2)else if (patch_type_T[patchi] == 1 && patch_type_H[patchi] == 1 && patch_type_Z[patchi] == 1) Here all variables are fixed and therefor it must be an inlet for fuel or oxidizer. Due to that you do not have an enthalpy defect because fuel and oxidizer are pure and in adiabatic condition! If you check the lines after that else if line, you see that the defect is set to zero: Code:
defect = 0.; (1)if (patch_type_T[patchi] == 0) Here you calculate first the enthalpy defect, then get the values you want - non special operation has to be taken into account. Q2: pdfFlameletThermo.C Of course you are right but that is not possible because of an area weighted interpolation scheme. Just have a look to the second picture (http://www.holzmann-cfd.de/index.php/en/development). At the right you see the A_ges which is the divisor. Now imagine that Zvar = 1, that means that value (because there is no area anymore) is zero and you divide with zero - not valid. To your suggestion: I mentioned a few times if there is someone interested in generating a new flamelet generator for using it with libOpenSMOKE (flameletModel). But everybody us cantera or flameMaster and do not want to develop it again (its a lot of work). Otherwise, I heard from Bobi that cantera is much slower than the binaries of libOpenSMOKE. I think that the binaries are doing a good job but as you mentioned, there should be the possibility to modify a lot of stuff. I also started this own-interest-project: https://bitbucket.org/shor-ty/flameletcreator But the last 2 month I had no time to go on. Hope this is helpful.
__________________
Keep foaming, Tobias Holzmann |
|
January 26, 2015, 10:18 |
|
#424 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Thank you for your detailed comments and it is helpful to me. Now I am more clear of the libOpenSMOKE source code. What I'm doing now is to merge the libOpenSMOKE with flameletModel (Huggen's code). LibOpenSMOKE is not OF like, but pure C++, which is good for single phase combustion but could not do well in multiphase combustion. I hope I'm wrong.
regards, wenxu |
|
January 28, 2015, 23:47 |
|
#425 | |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Hello, everyone.
I'm not sure if I should start a new thread since the problem was not totally regarding libOpenSMOKE. But now I encounter some problem regarding merging libOpenSMOKE and flameletFoam. The code was complied succeed, but when i run the tutorials, the code was crashed. Quote:
regards, wenxu |
||
January 29, 2015, 07:05 |
|
#427 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
flameletFoam:
regards, wenxu |
|
January 29, 2015, 08:14 |
|
#428 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Quote:
I do not agree with you in that points! You are right, that FlameletFoam has the ability to use LES but you can also program this in libOpenSMOKE (Bobi did this successfully). Also libOpenSMOKE is more like OpenFOAM because its a library you can implement (like the mesh motion solver). The flameletFoam directly changes your files of the thermodynamic database (not a very good programming style in my opinion, but of course it is working). And I did not get the point that LibOpenSMOKE is more C++ » OpenFOAM is C++. Heat defect already has to be calculated with the flamelet generater. I do not know if cantera can handel this. And if its not possible to do that, you have to change the cantera calculation too. Point 3: I did not get the point? In Müllers code there has to be a interpolation scheme for the flamelet too (one dimension less due to missing enthalpy defect), but it should be similar. Point 1: You can use both, logNormal and Dirac. If you check the code, its different in calculation. Maybe you meant that you will write one new library which contains the advantages of both. But merging both is for me like you use both thermodynamic libs So if you want to use this, I would try to get LES in libOpenSMOKE and make a script that transform the cantera tables to libOpenSMOKE, or vice versa. Like you like flameletFoam more, you should then implement the heat defect but therefor you also have to calculate flamelet with heat defect and I am not sure that cantera can handle this.
__________________
Keep foaming, Tobias Holzmann |
||
January 29, 2015, 08:44 |
|
#429 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
In Müllers code, trilinear interpolation was implemented.http://en.wikipedia.org/wiki/Trilinear_interpolation
If you can get LES in libOpenSMOKE, that will be wonderful since LES was researched by more people than RANS. I doubt that if the cantera tables can be converted to libOpenSMOKE tables. Since the ASCII was used in the first while the binary was implemented in the latter one. FlameMaster is more suitable since the flamelet libraries generated by it are also binary. I'm more familiar with the flameletFoam source than libOpenSMOKE, but i can change between both freely. In my research, LES should be used and the mixture fraction should be redefined so Opensource code MUST be used! Now i want to convert the advantages of libOpenSMOKE to flameletFoam. I say libOpenSMOKE is more C++, that means many functionty (registryObject, RTS, inheritance ) was not used in libOpenSMOKE but only STL C++ was implemented there. Sure that's good if we only want to add a NEW function to the OF. But if many classes related with this function (flamelet model), that's not good (e.g. multiphase combustion ). Thank you for your detailed reply. That's really help me. Now the four dimension flamelet library can be successfully extracted. But as you said the ASCII tables are slowly than binary. regards, wenxu |
|
January 29, 2015, 08:59 |
|
#430 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
now I get your point And yes - in that sence libOpenSMOKE uses more C++ Classes than OpenFOAM classes and therefor its not sooo flexible. I did not consider multiphase combustion in my research so it does not affect it. Well if you are more familiar with Müllers code, then use it. The triliniar interpolation of Müller is for Dissipation, mixture fraction and its variance. But it is the same (maybe a other function) like in libOpenSMOKE. If you use adiabatic (turn it on) then you have triliniear interpolation of the three parameters too. The main disadvantage that cantera has is that it is solving the flamelets in the space (I think) and then you have to convert this to mixture fraction Z. Therefor Müller wrote some script preparing cantera tables for his flamelet solver. In libOpenSMOKE the binaries are solving (I think so) direct the flamelet equations and therefor its faster but here we have the disadvantage that its closed (as you mentioned only binaries). FlameMaster is a nice program but for me too huge to get through it, thousands of hard coded lines and so many files That was the reason why I wanted to create a new flamelet generator with the flexibility to modify this like you want. But no time and combustion is not anymore my research topic. So good luck and if you have good results, let us know.
__________________
Keep foaming, Tobias Holzmann |
|
January 29, 2015, 09:12 |
|
#431 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Hello, Tobi. (call me wenxu or wen, both ok.but not "hi")
I do not agree with you that when we turn off the heat defect then it will be trilinear interpolation. In fact, it will be one 1D interpolation and 2D linear interpolation. See my attachment. I wish I will get everything right. Thank you, you really help me lot!!!! Best wishes for you. wenxu |
|
January 29, 2015, 09:24 |
|
#432 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Wenxu,
"hi" is not your name it's like hello but I am sorry if you take it personality You make a nice PDF and its the same I mentioned here: http://www.holzmann-cfd.de/index.php...ameletModel2.3 And yes you are right its 1x 2D interpolation for Z and Zvar and 1d in the dissipation stuff. But for me its similar to the link you mentioned before ! 2d and 1d -> triliniear. So good luck in you research / project.
__________________
Keep foaming, Tobias Holzmann |
|
January 31, 2015, 11:12 |
|
#433 | |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Hello, Tobi,
Quote:
I also have the doubt that why the heat defect should be considered if we only simulate free spray flame? If we calculate internal combustion, radition models have been built in OF(2.3) , so we can use the radition model in OF and the heat defect in libOpenSMOKE is not necessary if we use OF 2.3 and more latest versions. Thank you in advance! regards, wenxu |
||
February 2, 2015, 08:19 |
|
#434 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hey Wenxu,
well you need to define psi due to OpenFOAM behavior. The solver was generated out of a density based solver and therefore you need have psi included in the calculation. If you output that variable you will see that its always zero. If you uncomment it, you will not be able to compile (if its possible, you get problems with your pressure calculations). This heat defect is - please get the point - for non adiabatic free stream flames. Have a look to the sandia labs. There you will get information about that model. This model is only valid in free-stream flames and - of course there you have heat defect due to radiation too but the differences to adiabatic flames are neglectable. Please notice that you are not solving a enthalpy equation in the flamelet solver. Its only a passive conserved scalar equation! If you are successfull in implementing the radiation models which are included in the libraries, let me know.
__________________
Keep foaming, Tobias Holzmann |
|
February 2, 2015, 08:56 |
|
#435 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Dear Tobi,
Now I almost understand that. Thank you. Sorry I have not compiled radiation models in the library. Now I have another two questions: (1) Why could we update thermo properties and mass fractions for every propertyUpdate and massFractionsUpdate interal? The number set for the two parameters has any requirements? (2) Wen can set scalar dissipation rates while generate flamelets in Data.inp. And I find that scalar dissipation rate are calculated according to equation (2.5) in User Guide. My question is that the scalar dissipation rates set in Data.inp by ourselves but not according to (2.5) right? (Usually the same scalar dissipation rates are set for the different flamelets, right?) And the maximum dissipation rate set in Data.inp can SURELY lead to exitinction for different mass fraction of fuel side and oxidizer side? Thank you, Tobi. regards, wenxu |
|
February 3, 2015, 05:42 |
|
#436 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Dear Bobi,
Do you familiar with the Cantera software? I want to generate flamelet libraries with Cantera using a series of scalar dissipation rates like LibOpenSMOKE binaries utilities. The fact that I can only set mass flow rate and distance between fuel side and oxidizer side which will generate different scalar dissipation rate, which are hard to extracted by LES solver. regards wenxu |
|
February 3, 2015, 08:10 |
|
#437 | ||
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Quote:
The mass fractions do not influence the solution so you only have to update this in the last time step of your simulation. But in closed chambers my results in a vortex - breakdown flow was very bad - not useful. Quote:
Then you calculate flamelets on the defined scalar dissipation rate and during the simulation you make some interpolations for your matrix to get the (more or less) accurate values you need. If you set the scalar disspation rate to very high rates, combustion take place and the flamelet is "cold" - not burned. Hope this information is helpful.
__________________
Keep foaming, Tobias Holzmann |
|||
February 3, 2015, 08:41 |
|
#438 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Thank you, Tobi.
Using a series of scalar dissipation rates to generate flamelet library is easy to extract with LES/RANS slover. However, in cantera, we must set different mass flow rate and distance between fuel side and oxidizer side to generate different scalar libraries, which the scalar dissipation rate is calculated from strain rate. Then different scalar dissipation rates will be got when mass fraction at both sides are different. Then the libraries will be difficult to extracted. Now I look into FlameMaster , and I found that the binaries used in LibOpenSMOKE are similar to this software. Now i am thinking change from Cantera to FlameMaster. Thank you for your help! regards, wenxu |
|
February 3, 2015, 08:44 |
|
#439 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Well if you have interesting things, please share.
I worked with flame-master in my master thesis but I never get the point of that extreme - non nice - programming. So many files and out - commented equations and lines. Confusing!
__________________
Keep foaming, Tobias Holzmann |
|
February 3, 2015, 23:31 |
|
#440 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Hello, everyone and Tobi.
Now I using FlameMaster to generate flamelet libraries. The output file of FlameMaster should be read by C++ vector<double> or OF List<scalar>, and the Flex should be used for this function. The attachment are a Flex file (the suffix should be .L) and an outout file (the suffix should be .kg) by FlameMaster, which was generated by LT utility. I do not know what's wrong with it, the output file can not be flexed properly. Anyone who familiar with the Flex could tell me what's wrong with it? Thank you in advance!! regards, wenxu |
|
|
|
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 14:42 |
[openSmoke] flameletSmoke + new ODESolver (by Alberto Cuoci) | Tobi | OpenFOAM Community Contributions | 1 | November 21, 2017 19:24 |
Unsteady solver with Flamelet Model (libOpenSMOKE) | francesco_capuano | OpenFOAM Running, Solving & CFD | 11 | November 26, 2013 05:50 |
LibOpenSmoke, getting the species in ParaFoam | Christoph_84 | OpenFOAM | 1 | May 31, 2012 15:42 |