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   December 24, 2013, 05:20
Default
  #281
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
Hi all,

I'm trying to make tests on the swirl flame from Sydney. But I have some problems with the temperature on bluff-body. I'm using a k-epsilon model and it's the SM2 flame. I've put a zeroGradient condition for the temperature on the wall.
After some iterations, there is some spots of cold temperature on the wall (cf. figure). And I don't understand why...

If somebody have an idea ...

Thanks for your help
Attached Images
File Type: jpg visu.jpg (58.7 KB, 30 views)
brugiere_olivier is offline   Reply With Quote

Old   December 24, 2013, 06:22
Default
  #282
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Olivier

Actually there is a heat loss zone on the bluff-body plate (refer to Navarro-Martinez and Kronenburg paper), However it must not be in this form and the steady flamelet is incapable of capturing it.

Continue your simulation, maybe it disappears. As I know, your B.C. is right.

Bobi
immortality likes this.
babakflame is offline   Reply With Quote

Old   December 26, 2013, 03:16
Default
  #283
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
Greetings Bobi,

Thanks for your answer. I've tried to continue my simulation but the problem persists when I'm using flameletSimpleFoam.
So I've tried to make the same test on Fluent and the problem of heat loss zone doesn't appear. However, I've also used a steady flamelet but Fluent's results are similar to the experiments.

I'll make some tests with Piso but I'm not sure that I obtain better results ...

If you have ideas for help me...

Thank you in advance
brugiere_olivier is offline   Reply With Quote

Old   December 26, 2013, 05:49
Default
  #284
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Olivier

This heat loss is not evident on experimental results. If you use a model which investigates unsteady finite rate effects then you will see this heat loss.like CMC

Any way, I had problem with rhoPiso solver by myself. Try your case with Piso and see if you can stable your result.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   January 2, 2014, 04:41
Default
  #285
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 12
yash.aesi is on a distinguished road
Greetings all ,

i have one small doubt that if i want to change the turbulence model in that Sandia tutorial , i.e from kEpsilon to modified kEpsilon with the changed value of dissipation equation constant C1 1.47 to 1.6 .

Then what should i have to do ? As per my knowledge i have to change the value of C1 in RASProperties file of constant folder . Is it all i have to do ??

Please correct me if i am wrong and guide me


Thank You ,
Regards ,
sonu
immortality likes this.
yash.aesi is offline   Reply With Quote

Old   January 2, 2014, 05:14
Default
  #286
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Hi Sonu

You are right. That is all needed.

@ olivier: Did you get a stable result from piso solver?

If yes, with a wedge typed grid or a 3D one?

Bobi
yash.aesi likes this.
babakflame is offline   Reply With Quote

Old   January 3, 2014, 01:49
Default
  #287
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greeting Tobi

What I Have put for ZVar algebraic equation till now is:
Code:
else
{
    Info << "Algebraic equation for Zvar" << endl;
    scalarField& delta= lesModel.delta();
    scalarField& ZvarCells = Zvar.internalField();
    ZvarCells = Cv*sqr(delta)*magSqr(Z);
}
The same formulation in FSD.C is as:

Code:
const compressible::LESModel& lesModel =
        YO2.db().lookupObject<compressible::LESModel>("LESProperties");

    const volScalarField& delta = lesModel.delta();
    const volScalarField ftVar(Cv_*sqr(delta)*sqr(mgft));
I tried to define sth like the FSD.C code to make the formulation read the delta from LESProperties file. But with no success.

I have added these lines into createfields folder:

Code:
scalar Cv     = readScalar(flameletsProperties_.lookup("Cv"));
scalar delta  = readScalar(LESProperties_.lookup("delta"));
As it is expected there is no problem with Cv but during compilation I got these errors for delta:

Code:
createFields.H:102:29: error: ‘LESProperties_’ was not declared in this scope
In file included from flameletPisoFoamLES.C:80:0:
ZEqn.H:33:22: error: ‘lesModel’ was not declared in this scope
In file included from flameletPisoFoamLES.C:65:0:
/home/babak/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.
In file included from flameletPisoFoamLES.C:50:0:
createFields.H:100:16: warning: unused variable ‘Cd’ [-Wunused-variable]
createFields.H:102:9: warning: unused variable ‘delta’ [-Wunused-variable]
In file included from flameletPisoFoamLES.C:53:0:
/home/babak/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readTimeControls.
make: *** [Make/linux64GccDPOpt/flameletPisoFoamLES.o] Error 1
Would PLZ hint me how to do this ?

Regards
Bobi
babakflame is offline   Reply With Quote

Old   January 3, 2014, 02:30
Default
  #288
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
I added these lines to create fields and it seems that the first error dissappeared.

Code:
IOdictionary LESProperties_
    (
        IOobject
        (
            "LESProperties",
            U.time().constant(),
            U.db(),
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        )
    );
Code:
ZEqn.H: In function ‘int main(int, char**)’:
ZEqn.H:33:22: error: ‘lesModel’ was not declared in this scope
But adding the LESModel.H to Zeqn.H did not solve the final error.
babakflame is offline   Reply With Quote

Old   January 3, 2014, 17:23
Default
  #289
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,

wow - I was away a long time and some guys are talking about the flamelet solver.
Well first off all!

Here is a overview about the extraction of the variables that the solver is doing every "update" iteration (flameletProperties):

http://www.holzmann-cfd.de/index.php...ameletModel2.2

(additionally see the attachment). There are so many graphics I want to share but I am not allowed to do it -.-



@ Bobi: Did you solve the problem with the bluff-body flame and PISO ?

@ olivier: Did you get results with the piso solver?

@ Bobi (LES):

--- I think that belong to the following lines:

createFields.H
Code:
    Info<< "Creating turbulence model\n" << endl;
    autoPtr<compressible::RASModel> turbulence
    (
        compressible::RASModel::New
        (
            rho,
            U,
            phi,
            thermo
        )
    );
flameletSimpleFoam.C
Code:
#include "RASModel.H"
Make/options
Code:
EXE_INC = \
    -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
    -I$(LIB_SRC)/finiteVolume/cfdTools \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/fvOptions/lnInclude \
    -I$(realpath ../../../../thermophysicalModels/basic/flameletThermo/)
    
EXE_LIBS = \
    -L$(FOAM_USER_LIBBIN) \
    -lOpenSMOKE_common \
    -lOpenSMOKE_turbulent_flamelets \
    -lflameletThermophysicalModels \
    -lspecie \
    -lcompressibleTurbulenceModel \
    -lcompressibleRASModels \
    -lfiniteVolume \
    -lsampling \
    -lmeshTools \
    -lfvOptions


Did you chance all the relevant lines?



Additionally

I got a hint from Prof. Dr. Olivier Borm that the flamelet generation may has a bug in the calculation with the wanted scalar dissipation rates insert in "Data.inp".
The values with an "e" are not taken into account. I changed the values on the github server to decimal values (just for information).
Attached Images
File Type: jpg extraktionsverfahren.jpg (38.3 KB, 21 views)
File Type: jpg Interpolationsverfahren.jpg (28.0 KB, 16 views)
Tobi is offline   Reply With Quote

Old   January 4, 2014, 11:25
Default
  #290
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 brugiere_olivier View Post
Hi all,

I'm trying to make tests on the swirl flame from Sydney. But I have some problems with the temperature on bluff-body. I'm using a k-epsilon model and it's the SM2 flame. I've put a zeroGradient condition for the temperature on the wall.
After some iterations, there is some spots of cold temperature on the wall (cf. figure). And I don't understand why...

If somebody have an idea ...

Thanks for your help

Can you share your case ?
Tobi is offline   Reply With Quote

Old   January 6, 2014, 05:31
Default
  #291
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
Hello Tobias

I've made some tests with Piso but it doesn't work better... I share you the Simple case. I've tried to modify the scalar dissipation rate without "e" and now the local extinction is in the down part of the bluff body.



Thanks for your help
brugiere_olivier is offline   Reply With Quote

Old   January 6, 2014, 06:25
Default
  #292
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,

thanks for sharing.
Tobi is offline   Reply With Quote

Old   January 6, 2014, 09:33
Default
  #293
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 Olivier,

I had a look at your case now.
Hmm seems that you did everything correct. Did you ever made 2D swirl simulations ?
Tobi is offline   Reply With Quote

Old   January 7, 2014, 17:28
Default SM2 flame - conclusion.
  #294
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 Olivier,

I had a look at your case and got several points:

1. Enthalpy H has to be fixed on all inlets

2. k/epsilon values are not correct in my opinion

2.1 for the mixing length you should use d_hyd * 0.037
2.2 for the values of k and epsilon you can use the cfd-online.com turbulent calculator tool
2.3 for the intensity you should use 2% for coflow (not 10%). Further more I used 15% for fuel and 10% for air stream

3. your mesh is not okay - if you use checkMesh you get some *** errors // especially for the wedges

4. Your inlets are very short - I changed your mesh and geometry.

5.1. I changed the schemes of Z, H, U and Zvar.
5.2. Especially Z and Zvar are bounded variables they are guilty in the interval
Code:
0 <= Z <= 1 
0 <= Zvar <= 0.25
To be sure you will not get unphysical values you should use the following schemes:
Code:
bounded Gauss limitedLimitedLinear 1 0 1
bounded Gauss limitedLimitedLinear 1 0 0.25


//  The numbers are:
1 0 1

1 -> full limiter 
0 -> lower bound
1 -> upper bound
6. I set down the relaxation factors to get a better result.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Some hints to the results

- in the attachment you see a temperature profil. It seems very good to me but I have no time to check it out with the measurments.
- in that temperatur profil you will see some "fluctuation" points - especially at the bluff body. That is caused of the fine mesh I used and the high transient problem. I set the propertyUpdate of the thermodynamic variables to 5 iterations. Maybe its caused by that but you do not need to extract it every iteration ( 5 - 10 is a good value).

- additionally you see the residuals. That is very typical for the high transient flame. If you use the SANDIA flame (in the tutorials) you will see that there are the same residuals. Pressure and some momentum equations has big fluctuations BUT it repeats after a few hundert iteration. The fluctation of the residuals are caused of the fluctuations you have in the flow field.

So you have to check the results after 4000 iterations and compare the result with 4050 4100 4150 - you will see the fluctuation areas.

To get a smooth resdiual it is possible to start with 4000 iterations with the piso algorithm. I did this in the tutorial too. But you will see that there are a lot of fluctuations and you can say that it is "semi-steady-state". Therefor you should make your mesh coarser not finer

REMEMBER - we are using RANS not LES ...



I will make a validation too and if everything is okay I will set this case on the tutorials to github too.

I hope I could help you and you will get the same result now.
Attached Images
File Type: jpg Result1.jpg (17.2 KB, 37 views)
File Type: jpg residuals.jpg (42.1 KB, 27 views)
File Type: jpg residuals_PISO.jpg (37.7 KB, 18 views)
Tobi is offline   Reply With Quote

Old   January 8, 2014, 06:50
Default
  #295
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
@Bobi:

after I made a validiation with the SM2 flame I will give your LES model a try and I am looking to implement the flamelet model for it.

Hope that I will fix/solve your Problem.
As you described in your e-mails there should be a simple possibility to have Access to the Delta class and it s calculation. Maybe I have to implement some other functions/libs/headers into the thermodynamics because the FSD.H is a thermodynamic lib and in the solvers I can not find anything about the Delta class.
babakflame likes this.
Tobi is offline   Reply With Quote

Old   January 8, 2014, 14:27
Default
  #296
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,

I build your solver now but do not know if everything is working.
Please have a look at it and check it out!

Regards
Tobi
babakflame and yash.aesi like this.

Last edited by Tobi; January 10, 2014 at 14:45.
Tobi is offline   Reply With Quote

Old   January 14, 2014, 06:59
Default
  #297
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,

the next weeks I will investigate more time in the flamelet solver.

1. I will Change the hard coded things into fvOptions
2. I will simulate a lot of flames and validate the model
3. I will have a look if it is possible to include any OF Radiation model into it
4. I will investigate time to build an own flamelet gernerator code (someone who is interessted is invited to do it with me)
5. I will check the piso and pimple algorithm again

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

Old   January 14, 2014, 08:56
Default
  #298
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Tobi

I am interested in helping you generating an open source flamelet library.
I am 100% in. (But maybe these days a bit busy with LES)

I am interested in helping you adding O.F radiation models (especially DOM) in the code.
I am 100% in.

Also before testing the LES solver ( I was busy these days with some tests on FSD model). There is a question that has occupied my mind.

In RAS we have K_small and Epsilon_small that is read in every iteration for updating chi_Tilde.
In LES , we just need to use the exact definition for chi_Tilde and there is no update in every iteration (sth like RAS) , Does it make sense?
I mean in LES nothing is added in every iteration, just computing the exact definition for chi_Tilde.


Just clarifying myself:
I want to get rid of the "if loop" for mixture fraction variance

The only modifications needed is just leaving the formula used in LES and
also deleting switch directive in create fields file.
Am I right?

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

Old   January 14, 2014, 12:39
Default
  #299
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

I am interested in helping you generating an open source flamelet library.
I am 100% in. (But maybe these days a bit busy with LES)

I am interested in helping you adding O.F radiation models (especially DOM) in the code.
I am 100% in.
Sounds pretty good.

Quote:
Originally Posted by babakflame View Post
Also before testing the LES solver ( I was busy these days with some tests on FSD model). There is a question that has occupied my mind.

In RAS we have K_small and Epsilon_small that is read in every iteration for updating chi_Tilde.
In LES , we just need to use the exact definition for chi_Tilde and there is no update in every iteration (sth like RAS) , Does it make sense?
I mean in LES nothing is added in every iteration, just computing the exact definition for chi_Tilde.
K_small and epsilon_small is (in my opinion) just a placeholder if turbulence->k is zero. If this happens you will divide with zero (not possible). Therefor you have the very small k and epsilon values (defined in the flameletProperties).
Tobi is offline   Reply With Quote

Old   January 18, 2014, 03:24
Default
  #300
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Greetings Tobi

After checking the LES results, It seems that although the flame is captured steadily with piso solver, there are some mistakes in the arrangement of the reacting scalars. I checked my equations and found two errors
1- I should have changed the turbulent Schmidt number (to 0.4)
2- I found an error in my equation for chi_Tilde in ZEqn.H file. I should have used molecular diffusivity instead of turbulent diffusivity.

This is the false code that I have used:
Code:
chi_st=2 * (turbulence->mut()/(rho*sigmat)) * magSqr(fvc::grad(Z));
In the above equation turbulence->mut refers to turbulent viscosity(Mut). In the above formulation, Mut should be replaced with Mu (i.e. laminar viscosity)
If I want to use laminar viscosity(Mu) instead of Mut in the above formula, what should I write to be compatible with the code?

I used mu() for laminar viscosity. I got this error:
Code:
 ZEqn.H:24:16: error: 'mu' was not declared in this scope
then I used turbulence->mu() , this time no error appeared and the code compiled. But this notation is correct for referring to laminar viscosity?

Regards
Bobi

Last edited by babakflame; January 26, 2014 at 04:13.
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 07:48.