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   July 23, 2015, 10:49
Default
  #501
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Hello, everyone,

Could anyone tell me how can the variance of mixture fraction be normalized by this:
Code:
            Zvar_normalized = Zvar[celli] / (Z[celli]*(1.-Z[celli]));
I want to know how to deduce this normalization equation. Could anyone give me some hints?

Thank you in advance!

Best regards,
Wen

Last edited by wenxu; July 23, 2015 at 21:13.
wenxu is offline   Reply With Quote

Old   July 23, 2015, 12:35
Default
  #502
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
Its Not the mixture fraction, it's its Varianz ... Zvar is defined between 0 and 0.25 (parabolic profile). No area weight ed interpolation possible.
See also http://www.holzmann-cfd.de/index.php...ameletModel2.2
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 23, 2015, 21:14
Default
  #503
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Thank you for your reply. And sorry for my mistake. I have corrected it.

Regards,
Wen
wenxu is offline   Reply With Quote

Old   September 19, 2015, 08:24
Default
  #504
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Dear Tobi,

May I kindly ask two questions about the libOpenSMOKE:

(1) About the enthalpy defect: I do not know how you generate the flamelet library with different enthalpy defects, that means do you modify the boundary condition of the temperature flamelet equation or add a source term to the that equation?

(2) About the actual enthalpy (H): How to calculate the actual enthalpy at the inlet as that in the H initial file?
Quote:
dimensions [ 0 2 -2 0 0 0 0 ];

internalField uniform -17992.9;

boundaryField
{
coal_air
{
type fixedValue;
value uniform -2.19608e+06;
}

ch4
{
type fixedValue;
value uniform -17992.9;
}

co_flow
{
type fixedValue;
value uniform -17992.9;
}
As I already know, we can calculate the actual enthalpy as: H = phi + Hfuel (fuel side); H = phi + Hoxidizer (Oxidizer side). Here, the Hfuel and the Hoxidizer can be looked up from the flamelet library. But how to evaluate the phi value at these two different inlets? (I have this confusion because I think the enthalpy is the variable should be calculated but not a already calculated variable in the solver.)

Best,
Wen
wenxu is offline   Reply With Quote

Old   September 28, 2015, 05:10
Default
  #505
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
Dear Wen,

(1) the enthalpy defect is a source term added in the flamelet equations (not in the openFOAM solver). The flamelet equations are not solved in openFOAM. These eqn are solved within the binary files and you can add a defect, that means a delta enthalpy to the adiabatic condition.

(2) The actual enthalpy at some cell is calculated using a passive scalar transport equation (not what you mentioned). The equation is (in SIMPLE):

Code:
fvScalarMatrix hEqn 
		( 
    fvm::div(phi, H) 
  - fvm::laplacian(turbulence->muEff()/sigmat, H)
		);
If you solve non-adiabatic systems a radiation term is included. Check the H.Eqn file. The equation with phi is the calculation of the enthalpy defect that is caluclated using the mixture fraction (it is Z and not phi) and the adiabatic enthalpy of fuel and oxidzer. Check the thermodynamic lib.

The adiabatic values of the inlet are the adiabatic enthalpies of fuel and oxidizer and is shown at the beginning of the libOpenSMOKE solver. Run it once, abort, get the values of the adiabatic enthalpy, insert them into the H file and restart.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 28, 2015, 05:25
Default
  #506
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
I do not know whether the enthalpy defect is set as a source term or as the boundary condition in the fuel and oxidizer sides (the common choice), because it is a binary file. But I know that the total enthalpy on the fuel and oxidizer side is a calculated value if we use FlameMaster solver. Of course, the method you implemented is right.

Thank you for you hints, I already know that.

Best regards,
Wen
wenxu is offline   Reply With Quote

Old   September 28, 2015, 06:07
Default
  #507
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
Dear Wenxu,

you ment the enthalpy defect within the flamelet equations (so flame-master, binaries of libOpenSMOKE, cantera)?

I think it is a source term and not a boundary condition because if you compare flamelets of the same scalar dissipation rates and different enthalpy defects you can see that the temperature profile is moved (somehow with a defined value --> delta distribiution).

Therefore I think its not a boundary condition
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 4, 2016, 04:30
Default
  #508
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
Hey all,

I am really working hard on my flamelet generator and I programmed more than 10.000 lines till now. For me the binarys of libOpenSMOKE are in gerneral somehow a comparison of my calculations. However I found some problems in the binary code.

  • The calculated strain rate (at the beginning) is in my opinion wrong. The calculation is done using this equation:
\chi_{st} = \frac{as \cdot \mathrm{exp}(-2 \cdot (\mathrm{erfc}^{-1}(2\cdot Z_{st}))^2)}{\pi}

During the flamelet calculation we use the stochiometric scalar dissipation rate and we also know the stochiometric mixture fraction. Therefore we can calculate the strain rate as that we will use for modeling the scalar dissipation rate across the flamelet.

After a few hours of debuging, because my code is not giving the same strain rate, I figured out that in libOpenSMOKE the strain rate is calculated using the c++ function erfc. This function is the complimentary error function but in the function above, we have the inverse complimentary error function. Using this, we get different values of as. I am not sure how much this will influence the calculation but it is in my opinion a wrong calculation.

FInally, I am not sure about the stochiometric mixture fraction calculation. For pure fuel's I am getting the same results but if I add some inert gas to the fuel, my calculation differs from that of lib-open-smoke.

It would be very nice if someone could check this with fluent or some other software.

Example:
Code:
Fuel:   Y_H2 = 0.3  Y_N2  = 0.7
Oxi:   Y_O2 = 1
  • The calculation of the stochiometric mixture fraction is given by:
Z_{st} = \left[1 + \frac{\nu Y_{F,1}}{Y_{O_2, 2}}\right]^{-1}

Y_{O_2,2} is the mass fraction of O2 in the oxidizer stream
Y_{F,1} is the mass fraction of fuel in the fuel stream
\nu is the stochiometric fraction and is related to the needed oxigen o_{min}to burn the fuel completely (stochiometric mixture).

The needed oxigen can be calculated using the mass fraction of the elements.

In this way I am calculating the stochiometric mixture fraction. Can someone proof the way I am calculating that? Thanks in advance.

Tobi
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 26, 2016, 07:14
Default
  #509
Member
 
Mukesh Adlak
Join Date: Jun 2016
Posts: 32
Rep Power: 9
Adlak is on a distinguished road
Hello everyone,
i have compiled flamelet model in openfoam-4.x but while running the tutorial case i am getting the following error :

Code:
--> FOAM FATAL ERROR: 
Not implemented

    From function flameletThermo::Z()
    in file flameletThermo/flameletThermo.C at line 160.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::flameletThermo::Z() at ??:?
#3  ? at ??:?
#4  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5  ? at ??:?
Aborted (core dumped)

Last edited by wyldckat; December 26, 2016 at 16:21. Reason: Added [CODE][/CODE] markers
Adlak is offline   Reply With Quote

Old   January 13, 2017, 05:28
Default
  #510
Member
 
Mukesh Adlak
Join Date: Jun 2016
Posts: 32
Rep Power: 9
Adlak is on a distinguished road
Hi Tobi, Hope your holidays were awesome,

I have compiled flamelet model in openfoam-4.x but while running the tutorial case i am getting the following error :

--> FOAM FATAL ERROR:
Not implemented

From function flameletThermo::Z()
in file flameletThermo/flameletThermo.C at line 160.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::flameletThermo::Z() at ??:?
#3 ? at ??:?
#4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 ? at ??:?
Aborted (core dumped)
Adlak is offline   Reply With Quote

Old   January 13, 2017, 07:45
Default
  #511
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
You do not have to post it everywhere - I already got the notification
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   February 6, 2017, 01:37
Default
  #512
Member
 
Mukesh Adlak
Join Date: Jun 2016
Posts: 32
Rep Power: 9
Adlak is on a distinguished road
Hi Tobi,
I am using ur flameletPimplefoam in openfoam-2.3.x for supersonic combustion but after some iterations it is diverging. Z and Zvar values go in thousands. Can u help me out ?
Adlak is offline   Reply With Quote

Old   February 6, 2017, 01:40
Default
  #513
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
Maybe it is based on the fact that the solver has no supersonic implementation or it is based on your mesh, boundary conditions or whatever. In addition I do not support old versions anymore.

If it is not possible, try the flameletFoam from Hagen Müller.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 31, 2017, 03:48
Default Density calculation
  #514
New Member
 
Join Date: Jan 2016
Posts: 5
Rep Power: 10
MorenoGeerts is on a distinguished road
Hi Tobi,

First of all: thank you for all the work you have done on the flamelet solver!

I have a question about the rho calculation in the thermophysical model.
Am I correct in assuming that rho is looked up in the flamelet table?

I am a bit confused due to the "flameletThermo.C" file in which rho is returned as p*psi() and psi is calculated as 1/RT in the perfect gas equation of state. But in pdfFlameletThermo.C "density_reynolds" is looked up and used in calculations for psi. However, I do not seem to be able to determine the place where the rho-field is connected to the looked up value.

A related question: in the validation syngas flame you use the following values for the pure mixture:

mixture
{
specie
{
nMoles 1;
molWeight 28.9;
}
thermodynamics
{
Cp 1005;
Hf 0;
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}

How did you determine the molWeight and Cp value? Or are they not used in the simulation at all?
MorenoGeerts is offline   Reply With Quote

Old   March 31, 2017, 05:31
Default
  #515
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,
  • The density is looked up from the table and then used in the calculation. As you can see in the thermodynamic model.
Code:
psiCells[celli] = RhoReynolds[celli]/pCells[celli];
  • The pressure is constant and therefore using the return function which is psi*p gives the density again
  • So everything is fine
  • The stuff in the thermodynamic files does not matter because we do not use any value here. Its just a dummy, we do not use it.
MorenoGeerts likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 31, 2017, 05:49
Default
  #516
New Member
 
Join Date: Jan 2016
Posts: 5
Rep Power: 10
MorenoGeerts is on a distinguished road
Thank you for the clarification!

So that means that also none of the following parameters of thermotype matter, except "type pdfFlameletThermo;"

thermoType
{
type pdfFlameletThermo;
mixture pureMixture;
transport sutherland;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
MorenoGeerts is offline   Reply With Quote

Old   March 31, 2017, 06:21
Default
  #517
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
Correct.
It is just needed for the object we construct but in the new thermodynamic we made in that model, everything is based on the Look-Up-Table:
  • cp
  • mu
  • rho
  • lambda
  • species mass fractoin
I hope I didn't forget anything. Since 3 years I am programming on a flamelet creator. The last few month I did not do anything but maybe in a few centuries I will finish it
MorenoGeerts likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 23, 2017, 12:02
Default Wall boundary condition
  #518
New Member
 
Join Date: Jan 2016
Posts: 5
Rep Power: 10
MorenoGeerts is on a distinguished road
Hi Tobi,

I have a question about the implemented boundary conditions in the pdfFlameletThermo.C file.
I don't get why the boundary condition for fixed temperature should coïncide with a fixed enthalpy BC with value 0 as the following error message suggests:

FatalErrorIn
(
"pdfFlameletThermo<BasicFlameletThermo, MixtureType>::update()"
)
<< "Boundary conditions are wrong: "
<< "fixed temperature BC must be fixed enthaplie BC with value 0;"
<< abort(FatalError);

I think that a wall would have a zero gradient BC for H and a fixedValue one for T, because the enthalpy H is not necessarily 0 at a wall. It is an easy alteration (for me/you/...) to change/add this condition, but maybe I'm overseeing something.

What do you think about this requirement?

Thank you!
MorenoGeerts is offline   Reply With Quote

Old   May 23, 2017, 16:51
Default
  #519
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,

it was my implementation. The reason for that is very easy. It is based on the fact that libOpenSMOKE has some special treatment for fixedValue BC for the temperature. Based on the temperature the application calculates an enthalpydefect and thus choose the appropriate LUT. It was not working in the official one so I debugged a few things here. The enthalpy fixed value = 0 does not influence the solution. it is just a dummy for further treatment in the code.

I have everything in my thesis. Unfortunately it is in german. Even the usage of the log-normal in the properties will change a lot of things . To make it short:

Fixed T: With T, Z, Z'', chi at face find enthalpy defect at face.

Based on the enthalpy defect, calculate the enthalpy at the face.
MorenoGeerts likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 23, 2017, 16:53
Default
  #520
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
IMAG3892.jpg

Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming,
Tobias Holzmann
Tobi 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 10:31.