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   April 3, 2014, 05:45
Default
  #361
New Member
 
PSM
Join Date: Sep 2013
Posts: 10
Rep Power: 13
pitamber.methia is on a distinguished road
Greeting all ,

Is it possible to simulate the lifted flames with the flameletSImpleFoam solver ???
pitamber.methia is offline   Reply With Quote

Old   April 9, 2014, 06:03
Default
  #362
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 13
yash.aesi is on a distinguished road
Greeting all ,
i have a small doubt regarding the flamelet generation and pdf library. when we give command ./runFlameletGeneration , then the flamelet is generated for the particular enthalpy defect at different scaler dissipation rates and simultaneusly after the flamelet generation PDF library will be generated.

so my doubt is that i want to edit the flamelet library and then want to generate the pdf library to be use in my case , so is it possible to do it in OF ?? as per my observation pdf library will be generated just after the flamelet generation after giving the above command.

please somebody guide me about this ....

Regards ,
Sonu
yash.aesi is offline   Reply With Quote

Old   April 9, 2014, 06:08
Default
  #363
TBO
Member
 
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 13
TBO is on a distinguished road
Hi Sonu,

Can't you just edit the runFlameletGeneration.sh file, this script includes all steps you need to create flamelet library and PDF lookup table. I would suggest either edit this script (basically split it into two seperate scripts) or run script line by line

Regards
TBO is offline   Reply With Quote

Old   April 9, 2014, 07:05
Default
  #364
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 13
yash.aesi is on a distinguished road
Thanks TBO for such a quick reply , there are 3 scripts :

1. Calculate Flamelets all Flamelets and all enthalpy defects
2. Generate Look-Up-Tables using the Beta-Probability-Function
3. Prepare the PDF-Library/LookUpTable.out file for OpenFOAM

so what i understood is that you suggested to break this script into parts and then edit the flamelet as per requirement and and then generate the pdf library folder . am i rite ???
yash.aesi is offline   Reply With Quote

Old   April 9, 2014, 07:07
Default
  #365
TBO
Member
 
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 13
TBO is on a distinguished road
You're right Sonu
yash.aesi likes this.
TBO is offline   Reply With Quote

Old   April 16, 2014, 06:31
Default Regarding scaler dissipation rate
  #366
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 13
yash.aesi is on a distinguished road
Greeting All,
can anybody plz tell me that is it possible to calculate the scaler dissipation rate for the cold flow ?? or somebody knows the magnitude of scaler dissipation rate for the region where there is no flames ?

Thank You ,
Regards,
Sonu
yash.aesi is offline   Reply With Quote

Old   April 16, 2014, 09:06
Default
  #367
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Hi Sonu

The scalar dissipation rate value in the flame-region is equal to its stoichiometric value i.e. chi = chi_st . In other locations according to the value of the mixture fraction gradient you will face a value for the chi. i.e. chi= 2 Dz (Grad Z) ^2.

However this forum is related to simulating flames with flamelet approaches not fundamental subjects.

You really need to study Prof. Pitsch papers.

Could you get result for your case?

Regards
Bobi
babakflame is offline   Reply With Quote

Old   June 17, 2014, 10:50
Default
  #368
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear all,

This is a very nice thread, it is amazing that so many nice people have discussed on this topic over yeas. I have read through all the posts, and had really learned a lot. Thanks you guys!

@Bobi:

I read on another thread http://www.cfd-online.com/Forums/openfoam/85341-foam-error-printstack-foam-ostream-simplefoam-parallel.html
that you have compiled the rhoPimpleFoam with the flamelet code. I am trying to do the same thing now, but in OpenFoam-2.3.0.

Here is my flameletPimpleFoam.C:

Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright held by original author
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation; either version 2 of the License, or (at your
    option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM; if not, write to the Free Software Foundation,
    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Application
    rhoPisoFoam

Description
    Transient solver for laminar or turbulent flow of compressible fluids.
    
    uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and 
    pseudo-transient simulations.

\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "flameletThermo.H"
#include "RASModel.H"
#include "bound.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "OFstream.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"
    
    pimpleControl pimple(mesh);
    
    #include "readMassFlowProperties.H"
    #include "readGravitationalAcceleration.H"

    #include "createFields.H"
    #include "createFvOptions.H"
    #include "initContinuityErrs.H"
//    #include "readTimeControls.H"
//    #include "compressibleCourantNo.H"
//    #include "setInitialDeltaT.H"


    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    Info<< "\nStarting time loop\n" << endl;

    while (runTime.run())
    {
        #include "readTimeControls.H"
//        #include "readPISOControls.H"
        #include "compressibleCourantNo.H"
        #include "setDeltaT.H"

        runTime++;

        Info<< "Time = " << runTime.timeName() << nl << endl;
    
//    if (pimple.nCorrPIMPLE() <= 1)
//    {
//      #include "rhoEqn.H"
//    }

        // --- Presure-velocity PIMPLE corrector loop
    while (pimple.loop())
    {
        #include "UEqn.H"
        #include "ZEqn.H"
        #include "HEqn.H"
        
        // --- Pressure corrector loop
            while (pimple.correct())
            {
                #include "pEqn.H"
            }
            
            if (pimple.turbCorr())
        {
                turbulence->correct();
        }
    }

//        rho = thermo.rho();

        runTime.write();

    #include "writeMassFlow.H"
    #include "outputVariables.H"

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

    Info<< "End\n" << endl;

    return 0;
}


// ************************************************************************* //
Can you please have a check, do I made something obviously wrong here?

When I tried to wrong the tutorial, I got the following errors:

PHP Code:
--> FOAM FATAL ERROR:
temporary of type N4Foam8fvMatrixINS_6VectorIdEEEE deallocated

    From 
function TFoam::tmp<T>::operator()()
    
in file /home6695/likun/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/tmpI.H at line 193.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home6695/likun/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home6695/likun/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2
 
in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/bin/flameletPimpleFoam"
#3  __libc_start_main in "/lib64/libc.so.6"
#4
 
in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/bin/flameletPimpleFoam" 
I saw on the thread http://www.cfd-online.com/Forums/ope...-parallel.html that you had similar errors, did you solved that? Can you please give me some hints?

my fvSolution and fvSchemes files are pasted following:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.3;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-10;
        relTol          0.05;
        smoother        GaussSeidel;
        cacheAgglomeration off;
        nCellsInCoarsestLevel 20;
        agglomerator    faceAreaPair;
        mergeLevels     1;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    U
    {
        solver          PBiCG;
    preconditioner  DILU;
        tolerance       1e-08;
        relTol          0.1;
    }

    UFinal
    {
        $U;
        relTol          0;
    }


    "(k|epsilon|H|Z|Zvar)"
    {
        $U;
        tolerance       1e-09;
        relTol          0.1;
    }

    "(k|epsilon|H|Z|Zvar)Final"
    {
        $U;
        relTol          0;
    }


}

//PISO
//{
//    nNonOrthogonalCorrectors 0;

//    residualControl
//    {
//        p               1e-5;
//        U               1e-6;
//        H               1e-6;
//
//        // possibly check turbulence fields
//        "(k|epsilon|omega)" 1e-3;
//    }
//}


PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] 0.5;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 2.0;
}


// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.3;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         bounded Euler;
}

gradSchemes
{
    default         Gauss linear; 
}

divSchemes
{
    div(phi,U)          bounded Gauss limitedLinearV 1;
    div(phi,epsilon)     bounded Gauss limitedLinear 1;
    div(phi,k)          bounded Gauss limitedLinear 1;
    div(phiU,p)        bounded Gauss limitedLinear 1;

    div(phi,H)          bounded Gauss limitedLinear 1;
    div(phi,Z)        bounded Gauss limitedLimitedLinear 1 0 1;
    div(phi,Zvar)          bounded Gauss limitedLimitedLinear 1 0 0.25;

    div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{

    laplacian(muEff,U)         Gauss linear corrected;
    laplacian((rho*(1|A(U))),p) Gauss linear corrected;
    laplacian(DkEff,k)      Gauss linear corrected; 

    laplacian((rho|A(U)),p)     Gauss linear corrected;

    laplacian(DepsilonEff,epsilon)     Gauss linear corrected;
    laplacian((muEff|sigmat),Z)     Gauss linear corrected;
    laplacian((muEff|sigmat),H)     Gauss linear corrected;
    laplacian((mut|sigmat),Zvar)    Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}


// ************************************************************************* //
Likun is offline   Reply With Quote

Old   June 18, 2014, 07:04
Default
  #369
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
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 Likun,

give the first lines after your start please.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 18, 2014, 07:45
Default
  #370
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Hi Tobi,

Thank you for reply.

Here are the information after I start:

Code:
*---------------------------------------------------------------------------*\                                                                                                                                
| =========                 |                                                 |                                                                                                                                
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |                                                                                                                                
|  \\    /   O peration     | Version:  2.3.0                                 |                                                                                                                                
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |                                                                                                                                
|    \\/     M anipulation  |                                                 |                                                                                                                                
\*---------------------------------------------------------------------------*/                                                                                                                                
Build  : 2.3.0                                                                                                                                                                                                 
Exec   : flameletPimpleFoam                                                                                                                                                                                    
Date   : Jun 17 2014                                                                                                                                                                                           
Time   : 14:39:20                                                                                                                                                                                              
Host   : "tud0028150.wbmt.tudelft.nl"                                                                                                                                                                          
PID    : 5844                                                                                                                                                                                                  
Case   : /mnt/home6695/likun/OpenFOAM/likun-2.3.0/flameletModel-2.2.x/tutorials/flameletPimpleFoam/Sandia_COH2N2                                                                                               
nProcs : 1                                                                                                                                                                                                     
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).                                                                                                                                             
fileModificationChecking : Monitoring run-time modified files using timeStampMaster                                                                                                                            
allowSystemOperations : Disallowing user-supplied system call operations                                                                                                                                       

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time                                                                    

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading mass flow properties


Reading g
Reading thermophysical properties

Selecting thermodynamics package 
{                                
    type            pdfFlameletThermo;
    mixture         pureMixture;      
    transport       sutherland;       
    thermo          hConst;           
    equationOfState perfectGas;       
    specie          specie;           
    energy          sensibleEnthalpy; 
}                                     

/*-------------------------------------*\
|    Flamelet Thermo initialization     |
|                                       |
|   Rebuild by Tobias Holzmann M.Eng.   |
|          www.Holzmann-cfd.de          |
\*-------------------------------------*/

Enthalpy:
     + inletfuel <fixedValue>
     + inletair <fixedValue> 
     + outlet                
     + axis                  
     + sidewall              
     + burnerwall            
     + front                 
     + back                  

Temperature: 
     + inletfuel <fixedValue>
     + inletair <fixedValue> 
     + outlet                
     + axis                  
     + sidewall              
     + burnerwall            
     + front                 
     + back                  

Mixture fraction:
     + inletfuel <fixedValue>
     + inletair <fixedValue> 
     + outlet                
     + axis                  
     + sidewall              
     + burnerwall            
     + front                 
     + back                  

Flamelet thermo mode is <non-adiabatic>
Flamelet thermo uses the <delta-dirac distribution> for the scalar dissipation rate
Flamelet thermo does not show the single flamelet properties                       
Flamelet thermo does not show the flamelet library properties                      


Flamelet thermo loaded all libraries
Summarize the whole flamelet library: 

     + File name:                         PDF-Library/LookUpTable.out
     + Number of Enthalpy defects:        3                          
     + Minimum enthalpy defect:           100 kJ/kg                  
     + Maximum enthalpy defect:           -100 kJ/kg                 
     + Adiabatic flamelets:               2                          
     + Temperature fuel:                  292.15 K                   
     + Temperature oxidizer:              290.15 K                   
     + Density fuel:                      0.843154 kg/m3             
     + Density oxidizer:                  1.21084 kg/m3              
     + Enthalpy fuel:                     -2.19608e+06 J/kg          
     + Enthalpy oxidizer:                 -17992.9 J/kg              

Thermo flamelet set the adiabat enthalpy for enthalpy defect calculation:

     + Adiabat enthalpy fuel: -2.19608e+06
     + Adiabat enthalpy oxidizer: -17992.9

Preparing additional scalar fields

     + thermo.p()
     + thermo.Z()
     + thermo.Zvar()
     + thermo.chi_st()
     + thermo.H()     
     + thermo.as()    


Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs                         
{                                      
    Cmu             0.09;              
    C1              1.47;              
    C2              1.92;              
    C3              -0.33;             
    alphah          1;                 
    alphak          1;                 
    alphaEps        0.76923;           
    muLimiter       on;                
    Lsgs            0.0002;            
    sigmak          1;                 
    sigmaEps        1.3;               
    Prt             1;
}

Creating field dpdt

Creating field kinetic energy K

Reading flameletProperties dictionary

Preparing field Qrad (radiative heat transfer)

No finite volume options present


Starting time loop

Courant Number mean: 1.20001e-05 max: 0.00120145
deltaT = 1.19904e-07
Time = 1.19904e-07

DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 1.24062e-09, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 1.07914e-09, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 4.54658e-10, No Iterations 2
DILUPBiCG:  Solving for Z, Initial residual = 1, Final residual = 3.80246e-05, No Iterations 1
DILUPBiCG:  Solving for Zvar, Initial residual = 1, Final residual = 3.77171e-05, No Iterations 1
DILUPBiCG:  Solving for H, Initial residual = 0.999997, Final residual = 3.77244e-05, No Iterations 1

Flamelet thermo:
     + Flamelet thermo updates all thermo variables from the Look-Up-Table
     + Flamelet thermo updates all mass fraction from Look-Up-Table



--> FOAM FATAL ERROR:
temporary of type N4Foam8fvMatrixINS_6VectorIdEEEE deallocated

    From function T& Foam::tmp<T>::operator()()
    in file /home6695/likun/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/tmpI.H at line 193.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home6695/likun/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home6695/likun/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2
 in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/bin/flameletPimpleFoam"
#3  __libc_start_main in "/lib64/libc.so.6"
#4
 in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/bin/flameletPimpleFoam"
Aborted
DE]
I tried to do this base on the flameletModel-2.2.x from your website www.Holzmann-cfd.de. I think there must be some obvious mistakes, but I can not figure out what are they, because I am very new to OpenFoam. PLZ help.

Best regards,
Likun
Likun is offline   Reply With Quote

Old   June 18, 2014, 09:35
Default
  #371
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
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,

did you compile the thermodynamic lib correct for OpenFOAM-2.3.x? At the moment I never tried this due to the fact that I have too much work now.
Unfortunatelly I am on holyday for the next 2 weeks

So you have to investigate some time in the code.
Its confusing because the constructor is working ... hmmm ...
But still the question is open:
  • did you compile the flamelet-model-2.2.x for OpenFOAM-2.3.x without changing any data?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 18, 2014, 10:04
Default
  #372
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Greetings Likun

My proposal for you is using verified codes instead of trying to re-write another one. However, you need to take a look at the compatibility of thermodynamic data format of the codes with OpenFoam versions.
By searching this thread you can find different versions of flamelet solvers applicable on O.F. 2.0.0 to O.F. 2.2.x.

For transient solver I recommend to use the flameletFoam solver which is applicable on O.F. 2.1.x. By studying its flow solver, you will find out how to implement pimple algorithm. Here is the link:

http://openfoamwiki.net/index.php/Ex...n/flameletFoam

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

Old   June 18, 2014, 10:09
Default
  #373
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
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,

as Bobi mentioned the two flamelet models are different.
Use one which is available for the actual model. For pimple it would be better to use the mentioned one of Bobi. I think he made some simulation with it. For 2.2.x there is the transient solver for flamelet also in the flameletModel-2.2.x you can download from my site. The validation of this solver is given in the repository but here you only calculate flow with time derivations but the flamelets still are steady-state formation. I am not sure about the other model used build by the munic guy.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 18, 2014, 10:13
Default
  #374
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Hi Tobi,

I have made some modifications in the thermodynamic files of the flamelet-model-2.2.x, because there are some changes in the basicThermo.H form OpenFoam-2.2.x to OpenFoam-2.3.x.

I added

Code:
virtual tmp<scalarField> rho(const label patchi) const;
and
Code:
virtual const scalarField& mu(const label patchi) const;
in the flameletThermo.H.

Code:
Foam::tmp<Foam::scalarField> Foam::flameletThermo::rho(const label patchi) const
{
    return p_.boundaryField()[patchi]*psi_.boundaryField()[patchi];
}
and
Code:
const Foam::scalarField& Foam::flameletThermo::mu(const label patchi) const
{
    return mu_.boundaryField()[patchi];
}
in the flameletThermo.C

Then the thermodynamic lib was successfully compiled. I could also compile the flameletSimpleFoam, and run the tutorial of flameletSimpleFoam with OF2.3, the results seems OK.

But I had some problems for compiling the flameletPisoFoam, then I though maybe it is possible to create a flameletPimpleFoam based on the rhoPimpleFoam in the OF2.3. And then I came to the errors that I posted earlier.

Enjoy you holiday!!!

I will try to do more investigation on the code, if you have any idea, suggestions, clue on how can I fix the above errors, please kindly let me know. And also, it would be great if you could try to compile the flameletPisoFoam in OF2.3 (because there is no rhoPisoFoam in the OF2.3, so I do have any reference, therefore I can not do this myself).

Likun
Likun is offline   Reply With Quote

Old   June 18, 2014, 10:24
Default
  #375
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
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 Likun,

nice to know that there are (again) some changes in thermodynamics. So I do not have to figure it out by myself. Then everything is okay and the libs are working correctly. I searched a bit and found the following link. Maybe its very helpful:

http://www.cfd-online.com/Forums/ope...ted-error.html

After my holiday I will investigate into my scheme analyses and then I will investigate into flamelet-model again.
Likun likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 18, 2014, 10:28
Default
  #376
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Hi Bobi,

Thank you very much for reply!

Quote:
Originally Posted by babakflame View Post
My proposal for you is using verified codes instead of trying to re-write another one. However, you need to take a look at the compatibility of thermodynamic data format of the codes with OpenFoam versions.
I fully agree with you, as I tried to create the flameletPimpleFoam myself, there are a lot of wired errors that I could not even understand what do them mean.

Quote:
Originally Posted by babakflame View Post
For transient solver I recommend to use the flameletFoam solver which is applicable on O.F. 2.1.x. By studying its flow solver, you will find out how to implement pimple algorithm. Here is the link:

http://openfoamwiki.net/index.php/Ex...n/flameletFoam
Bobi
Thank you for your suggestion, I will try the flameletFoam.

Actually, my ultimate goal is to do LES for spray combustion with FGM model. And I want to first start with the gas phase flamelet implementation that are available. Do you think the flameletFoam can be extended for LES? And what should I do for extending it to LES?

Thank you again.

Best,
Likun
Likun is offline   Reply With Quote

Old   June 18, 2014, 10:41
Default
  #377
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Greetings Likun

My ultimate aim is LES too. The solver supports both URAS and LES approaches by defining different approaches for the stoichiometic scalar dissipation rate.

Actually I can say by now that I have got very well results with URAS solver and I am testing LES now. Hope to get reasonable results with LES, too. In case of using this solver with LES, Keep me updated on your results accuracy.

Best
Bobi
babakflame is offline   Reply With Quote

Old   June 18, 2014, 11:25
Default
  #378
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
@Tobi: Seems that the thermodynamics change form OF2.2.x to OF2.3.x are not as big as that for OF1.7.x to OF2.2.x. By adding those lines, as least it looks like working, but I am not sure if simply adding these lines are the right solution, because I am not fully understand what do they mean. And many thanks for the mentioned thread, it indeed very helpful, although has not yet solved my problem.

Quote:
Originally Posted by TDidi View Post
The problem was missing parenthesis after UEqn for the fvVectorMatrix. So I changed "UEqn" to "UEqn()". Hope it challenges your problem, too.
I assume that he means to change the "UEqn" in pEqn (am I correct?). My pEqn is here:
Code:
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();

volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));

volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();

if (pimple.nCorrPISO() <= 1)
{
    UEqn.clear();
}

if (pimple.transonic())
{
    surfaceScalarField phid
    (
        "phid",
        fvc::interpolate(psi)
       *(
            (fvc::interpolate(HbyA) & mesh.Sf())
          + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
        )
    );

    fvOptions.makeRelative(fvc::interpolate(psi), phid);

    while (pimple.correctNonOrthogonal())
    {
        fvScalarMatrix pEqn
        (
            fvm::ddt(psi, p)
          + fvm::div(phid, p)
          - fvm::laplacian(rhorAUf, p)
          ==
            fvOptions(psi, p, rho.name())
        );

        fvOptions.constrain(pEqn);

        pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));

        if (pimple.finalNonOrthogonalIter())
        {
            phi == pEqn.flux();
        }
    }
}
else
{
    surfaceScalarField phiHbyA
    (
        "phiHbyA",
        (
            (fvc::interpolate(rho*HbyA) & mesh.Sf())
          + rhorAUf*fvc::ddtCorr(rho, U, phi)
        )
    );

    fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);

    while (pimple.correctNonOrthogonal())
    {
        // Pressure corrector
        fvScalarMatrix pEqn
        (
            fvm::ddt(psi, p)
          + fvc::div(phiHbyA)
          - fvm::laplacian(rhorAUf, p)
          ==
            fvOptions(psi, p, rho.name())
        );

        fvOptions.constrain(pEqn);

        pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));

        if (pimple.finalNonOrthogonalIter())
        {
            phi = phiHbyA + pEqn.flux();
        }
    }
}

//#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"

// Explicitly relax pressure for momentum corrector
p.relax();

// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
Info<< "rho max/min : " << max(rho).value()
    << " " << min(rho).value() << endl;

U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);

if (thermo.dpdt())
{
    dpdt = fvc::ddt(p);
}
As you can see, the "UEqn" are already "UEqn()", except the "UEqn.clear()". But if I change it to "UEqn().clear()", there appears following errors during compiling:
PHP Code:
Eqn.HIn function 'int main(int, char**)':
pEqn.H:14error'class Foam::fvMatrix<Foam::Vector<double> >' has no member named 'clear'
make: *** [Make/linux64GccDPOpt/flameletPimpleFoam.oError 1
[likun@tud0028150 flameletPimpleFoam]$ pEqn.H:14error'class Foam::fvMatrix<Foam::Vector<double> >' has no member named 'clear'
bashpEqn.H:14:: command not found 
Maybe my problem is not because of this.
Likun is offline   Reply With Quote

Old   June 18, 2014, 11:28
Default
  #379
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Hi Bobi,

It is wonderful to know that it also works for LES, thank you! I will have a try on this solver and keep you updated.

Likun
Likun is offline   Reply With Quote

Old   July 7, 2014, 11:08
Default
  #380
TBO
Member
 
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 13
TBO is on a distinguished road
Guys,

Nice to see that people are implementing the flamelet solver to OF2.3.x. We are considering compiling OF2.3.x, especially since there finally is a default steady state combustion solver available (ltsReactingFoam). Preferably, we would like to get rid of OF2.2.x (since we already have multiple versions of OF next to each other). Can anyone share the files required for compiling flameletSimpleFoam in OF2.3.x?

Regards,
TBO 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 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


All times are GMT -4. The time now is 13:38.