
[Sponsors] 
April 3, 2014, 04:45 

#361 
New Member
PSM
Join Date: Sep 2013
Posts: 10
Rep Power: 3 
Greeting all ,
Is it possible to simulate the lifted flames with the flameletSImpleFoam solver ??? 

April 9, 2014, 05:03 

#362 
Member
sonu
Join Date: Jul 2013
Location: delhi
Posts: 79
Rep Power: 3 
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 

April 9, 2014, 05:08 

#363 
New Member
Join Date: May 2013
Location: Netherlands
Posts: 26
Rep Power: 3 
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 

April 9, 2014, 06:05 

#364 
Member
sonu
Join Date: Jul 2013
Location: delhi
Posts: 79
Rep Power: 3 
Thanks TBO for such a quick reply , there are 3 scripts :
1. Calculate Flamelets all Flamelets and all enthalpy defects 2. Generate LookUpTables using the BetaProbabilityFunction 3. Prepare the PDFLibrary/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 ??? 

April 9, 2014, 06:07 

#365 
New Member
Join Date: May 2013
Location: Netherlands
Posts: 26
Rep Power: 3 
You're right Sonu


April 16, 2014, 05:31 
Regarding scaler dissipation rate

#366 
Member
sonu
Join Date: Jul 2013
Location: delhi
Posts: 79
Rep Power: 3 
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 

April 16, 2014, 08:06 

#367 
Senior Member
Bobi
Join Date: Oct 2012
Posts: 238
Rep Power: 4 
Hi Sonu
The scalar dissipation rate value in the flameregion 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 

June 17, 2014, 09:50 

#368 
Member

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 Foam::error::printStack(Foam::Ostream&) with simpleFoam parallel that you have compiled the rhoPimpleFoam with the flamelet code. I am trying to do the same thing now, but in OpenFoam2.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 021101301 USA Application rhoPisoFoam Description Transient solver for laminar or turbulent flow of compressible fluids. uses the flexible PIMPLE (PISOSIMPLE) solution for timeresolved and pseudotransient 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" // } //  Presurevelocity 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; } // ************************************************************************* // When I tried to wrong the tutorial, I got the following errors: PHP Code:
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 1e10; relTol 0.05; smoother GaussSeidel; cacheAgglomeration off; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } pFinal { $p; relTol 0; } U { solver PBiCG; preconditioner DILU; tolerance 1e08; relTol 0.1; } UFinal { $U; relTol 0; } "(kepsilonHZZvar)" { $U; tolerance 1e09; relTol 0.1; } "(kepsilonHZZvar)Final" { $U; relTol 0; } } //PISO //{ // nNonOrthogonalCorrectors 0; // residualControl // { // p 1e5; // U 1e6; // H 1e6; // // // possibly check turbulence fields // "(kepsilonomega)" 1e3; // } //} 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*(1A(U))),p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian((rhoA(U)),p) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian((muEffsigmat),Z) Gauss linear corrected; laplacian((muEffsigmat),H) Gauss linear corrected; laplacian((mutsigmat),Zvar) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } // ************************************************************************* // 

June 18, 2014, 06:04 

#369 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 890
Blog Entries: 2
Rep Power: 17 
Hey Likun,
give the first lines after your start please.
__________________
Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials and videos on www.Holzmanncfd.de 

June 18, 2014, 06:45 

#370 
Member

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/likun2.3.0/flameletModel2.2.x/tutorials/flameletPimpleFoam/Sandia_COH2N2 nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied 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.Holzmanncfd.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 <nonadiabatic> Flamelet thermo uses the <deltadirac 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: PDFLibrary/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.20001e05 max: 0.00120145 deltaT = 1.19904e07 Time = 1.19904e07 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.24062e09, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.07914e09, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 4.54658e10, No Iterations 2 DILUPBiCG: Solving for Z, Initial residual = 1, Final residual = 3.80246e05, No Iterations 1 DILUPBiCG: Solving for Zvar, Initial residual = 1, Final residual = 3.77171e05, No Iterations 1 DILUPBiCG: Solving for H, Initial residual = 0.999997, Final residual = 3.77244e05, No Iterations 1 Flamelet thermo: + Flamelet thermo updates all thermo variables from the LookUpTable + Flamelet thermo updates all mass fraction from LookUpTable > FOAM FATAL ERROR: temporary of type N4Foam8fvMatrixINS_6VectorIdEEEE deallocated From function T& Foam::tmp<T>::operator()() in file /home6695/likun/OpenFOAM/OpenFOAM2.3.0/src/OpenFOAM/lnInclude/tmpI.H at line 193. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home6695/likun/OpenFOAM/OpenFOAM2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home6695/likun/OpenFOAM/OpenFOAM2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/home6695/likun/OpenFOAM/likun2.3.0/platforms/linux64GccDPOpt/bin/flameletPimpleFoam" #3 __libc_start_main in "/lib64/libc.so.6" #4 in "/home6695/likun/OpenFOAM/likun2.3.0/platforms/linux64GccDPOpt/bin/flameletPimpleFoam" Aborted DE] Best regards, Likun 

June 18, 2014, 08:35 

#371 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 890
Blog Entries: 2
Rep Power: 17 
Hi,
did you compile the thermodynamic lib correct for OpenFOAM2.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:
__________________
Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials and videos on www.Holzmanncfd.de 

June 18, 2014, 09:04 

#372 
Senior Member
Bobi
Join Date: Oct 2012
Posts: 238
Rep Power: 4 
Greetings Likun
My proposal for you is using verified codes instead of trying to rewrite 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 

June 18, 2014, 09:09 

#373 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 890
Blog Entries: 2
Rep Power: 17 
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 flameletModel2.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 steadystate formation. I am not sure about the other model used build by the munic guy.
__________________
Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials and videos on www.Holzmanncfd.de 

June 18, 2014, 09:13 

#374 
Member

Hi Tobi,
I have made some modifications in the thermodynamic files of the flameletmodel2.2.x, because there are some changes in the basicThermo.H form OpenFoam2.2.x to OpenFoam2.3.x. I added Code:
virtual tmp<scalarField> rho(const label patchi) const; Code:
virtual const scalarField& mu(const label patchi) const; Code:
Foam::tmp<Foam::scalarField> Foam::flameletThermo::rho(const label patchi) const { return p_.boundaryField()[patchi]*psi_.boundaryField()[patchi]; } Code:
const Foam::scalarField& Foam::flameletThermo::mu(const label patchi) const { return mu_.boundaryField()[patchi]; } 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 

June 18, 2014, 09:24 

#375 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 890
Blog Entries: 2
Rep Power: 17 
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: Temporary deallocated error After my holiday I will investigate into my scheme analyses and then I will investigate into flameletmodel again.
__________________
Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials and videos on www.Holzmanncfd.de 

June 18, 2014, 09:28 

#376  
Member

Hi Bobi,
Thank you very much for reply! Quote:
Quote:
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 

June 18, 2014, 09:41 

#377 
Senior Member
Bobi
Join Date: Oct 2012
Posts: 238
Rep Power: 4 
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 

June 18, 2014, 10:25 

#378  
Member

@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:
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); } PHP Code:


June 18, 2014, 10:28 

#379 
Member

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 

July 7, 2014, 10:08 

#380 
New Member
Join Date: May 2013
Location: Netherlands
Posts: 26
Rep Power: 3 
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, 

Thread Tools  
Display Modes  

