
[Sponsors] 
March 4, 2010, 06:51 
kivaTest tutorialfault on temperature (engineFoam)

#1 
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
Sponsored Links
I'm an openfoam beginner. I used kivaTest tutorial (OpenFoam1,5dev on Slax). without any modification. in combustionProperties file "ignite yes;" Pressure is not increase but temperature is increasing continuously. I think pressure should have increased to about ~60 70 bar, temperature should have increased to ~27002900 K after TDC decrease again. So i cant find where is problem. Please inform me about what should i do for correct work. Thanks for your help, Best Regards. 

Sponsored Links 
October 12, 2013, 13:23 
Pressure Increase

#2 
New Member
Apoorv Talekar
Join Date: Oct 2013
Posts: 2
Rep Power: 0 
Rescale the pressure in paraFoam, display mode.


August 21, 2015, 16:20 

#3 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
hi
what's your T dictionary in boundary conditions? 

August 21, 2015, 16:25 
kivaToFoam

#4 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
hi everybody
1) I want to run the kivaTest by bore*stroke=76*66 in different compression ratio e.g.,12 and 20. How can i create this C.R ? I mean just by changing GoemetryDictionary I can't fix my favorite compression ratio? 

August 21, 2015, 17:34 

#5 
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
hi kaveh19,
i suggest you should create new geometry and mesh for different CR. then check your mesh and engine compression ratio with checkMesh & engineCompRatio 

August 25, 2015, 16:08 

#6 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
Dear ayhan515,
I have modified the below case by your guides: bore=0.086 stroke=0.086 Fortunately I modified the compression ratio as same as I desired .I received ok for checkMesh . Vmax = 0.00053768, Vmin = 3.83001e05 Vmax/Vmin = 14.0386 ************************************************** * My geometry contains 2 cylinder ,one for Vmin and another for Vmax. I have meshed the geometry in Gambite, but unfortunately I don’t know what boundary condition should I use fore jointed face between Vmin and Vmax volumes . Some points: 1wheater or not I consider it Gambite and openFoam will consider it as a wall so the wall appears it paraFoam as I expected . 2In default case of kivaTest this wall condition doesn’t exist. So when I want to run the test case . What's your suggestion? Had you this problem? Thanks in advance. 

August 26, 2015, 08:27 

#8  
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
Dear kaveh19,
1.1 create a geometry just draw single cylinder (not 2 parts) (for your CR=20 case) diameter: 76 mm height:69,473 mm 1.2check z direction is height otherwise rotate your geometry. 1.3rename the bottom surface as "piston" rename the side surface as "liner" rename the top surface as "cylinderHead" 2.create a CFD mesh from geometry and check named surfaces. 3.convert your mesh to Foam mesh. https://yadi.sk/d/5OyB8MYJifqvu sorry i've never used gambit i couldn't help. i hope more professional helps come. best regards. Quote:


August 28, 2015, 14:51 

#9 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
Dear ayhan515,
I have modified the kivaTest for C.R=14. Fortunately I haven't problem with checkMesh,it is ok.In fact I have mentioned this post in other page ,too. ************************* my engine geometry is: engineMesh layered; conRodLength conRodLength [ 0 1 0 0 0 0 0 ] 0.15449; bore bore [ 0 1 0 0 0 0 0 ] 0.086; stroke stroke [ 0 1 0 0 0 0 0 ] 0.086; clearance clearance [ 0 1 0 0 0 0 0 ] 0.00115; rpm rpm [ 0 0 1 0 0 0 0 ] 1500; ***************************** engineCompressioratio is: engineMesh layered; conRodLength conRodLength [ 0 1 0 0 0 0 0 ] 0.15449; bore bore [ 0 1 0 0 0 0 0 ] 0.086; stroke stroke [ 0 1 0 0 0 0 0 ] 0.086; clearance clearance [ 0 1 0 0 0 0 0 ] 0.00115; rpm rpm [ 0 0 1 0 0 0 0 ] 1500; **************************** engineCompressionratio is Vmax = 0.00053768, Vmin = 3.83001e05 Vmax/Vmin = 14.0386 ************************* the controlDict is: application engineFoam; startFrom latestTime; startTime 180; stopAt endTime; endTime 30; deltaT 0.05; writeControl runTime; writeInterval 5; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; adjustTimeStep true; maxCo 0.2; maxDeltaT 1; functions { timeStep { type coded; functionObjectLibs ("libutilityFunctionObjects.so"); redirectType setDeltaT; code #{ const Time& runTime = mesh().time(); if (runTime.timeToUserTime(runTime.value()) >= 15.0) { const_cast<Time&>(runTime).setDeltaT ( runTime.userTimeToTime(0.025) ); } #}; } } ************************************** Other sittings are as same as the default kivaTest. *************************************** I use mpirun np 5 engineFoam parallel >log **************************************** but the run continues from 180 to 19.9968 ***************************************** my log file is: Create engine time Create mesh for time = 180 Selecting engineMesh layered deckHeight: 0.086 piston position: 0 Reading combustion properties [4] Found ignition cells: [4] 1(15267) Ignition switched off Reading thermophysical properties Selecting thermodynamics package { type heheuPsiThermo; mixture inhomogeneousMixture; transport sutherland; thermo janaf; equationOfState perfectGas; specie specie; energy absoluteEnthalpy; } min(b) = 1 Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model type RASModel Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; C3 0.33; sigmak 1; sigmaEps 1.3; Prt 1; } > FOAM Warning : From function janafThermo<EquationOfState>::limit(const scalar T) const in file /home/openfoam/OpenFOAM/OpenFOAM2.4.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 108 attempt to use janafThermo<EquationOfState> out of temperature range 298.15 > 5000; T = 5798.3 > FOAM Warning : From function janafThermo<EquationOfState>::limit(const scalar T) const in file /home/openfoam/OpenFOAM/OpenFOAM2.4.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 108 attempt to use janafThermo<EquationOfState> out of temperature range 298.15 > 5000; T = 1720.57 . and . . . > FOAM Warning : From function janafThermo<EquationOfState>::limit(const scalar T) const in file /home/openfoam/OpenFOAM/OpenFOAM2.4.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 108 attempt to use janafThermo<EquationOfState> out of temperature range 298.15 > 5000; T = 4512.94 DICPCG: Solving for p, Initial residual = 0.30828, Final residual = 4.00653e18, No Iterations 1 DICPCG: Solving for p, Initial residual = 7.07815e18, Final residual = 7.07815e18, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 0.0996372, global = 0.0516891, cumulative = 3.35361e+06 DICPCG: Solving for p, Initial residual = 2.20533e12, Final residual = 2.20533e12, No Iterations 0 DICPCG: Solving for p, Initial residual = 2.20533e12, Final residual = 2.20533e12, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 31043.8, global = 0.0516891, cumulative = 3.35361e+06 DILUPBiCG: Solving for epsilon, Initial residual = 0.0415452, Final residual = 1.98579e21, No Iterations 1 bounding epsilon, min: 1.78742e+63 max: 1.64625e+67 average: 4.90317e+63 DILUPBiCG: Solving for k, Initial residual = 0.996852, Final residual = 2851.55, No Iterations 1001 bounding k, min: 1.33881e+77 max: 6.24989e+75 average: 1.807e+73 Mean pressure:1.21196e+16 Mean temperature:985.341 Mean u':8.03304e+34 ExecutionTime = 392.13 s ClockTime = 397 s Courant Number mean: 0.727501 max: 8250.86 deltaT = 1.78964e28 > FOAM Warning : From function Timeerator++() in file db/Time/Time.C at line 1061 Increased the timePrecision from 11 to 12 to distinguish between timeNames at time 0.0019149 Crank angle = 17.2341 CAdeg deltaZ = 0 clearance: 0.00245679 Piston speed = 0 m/s diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 ************************************************* Do you have any idea? thanks in advanc 

August 28, 2015, 16:42 

#10 
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
Dear kaveh19
my suggestion is decreasing of deltaT for example startTime 20; stopAt endTime; endTime 30; deltaT 0.005; //instead 0.05 writeControl runTime; writeInterval 1;//instead 5 best regards. 

August 31, 2015, 08:46 

#11 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
Dear ayhan515,
I really appreciate you for your mentions. ****************************************** I want to change the fuel of kivaTest to gasoline . Would you mind telling me how i should start? In combustionProperties : fuel IsoOctane; says that fuel is Isooctane , but GuldersCoeffs { Methane { W 0.422; eta 0.15; xi 5.18; alpha 2; beta 0.5; f 2.3; } Propane { W 0.446; eta 0.12; xi 4.95; alpha 1.77; beta 0.2; f 2.3; } IsoOctane { W 0.4658; eta 0.326; xi 4.48; alpha 1.56; beta 0.22; f 2.3; } } specify some weird coefficient ,of course for me , for Methane ,Propane,and Isooctane. In thermophysicalProperties; thermodynamics { Tlow 298.15; Thigh 5000; Tcommon 1000; highCpCoeffs ( 19.3963 0.0488137 1.55798e05 2.17831e09 1.08391e13 37133.9 78.8531 ); lowCpCoeffs ( 0.429357 0.0765769 8.41306e06 5.86603e08 2.79414e11 30446.4 25.6735 ); } transport { As 1.67212e06; Ts 170.672; } are really unfamiliar for me. Thanks in advance. 

August 31, 2015, 09:33 

#12 
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
Dear kaveh19
i am not an expert and i am also asking questions to professionals to learn something. if you want to use gasoline you can use isooctane there is no need to change fuel for kivaTest case. if you want use to a different species or mixture in my opinion you need
if you have thermo files in chemkin format you can use chemkinToFoam command to get coefficients for thermophysical and transport properties sorry i haven't used that case with different fuel so i couldn't help. i hope more professional helps come. if you use gasoline with 14.0386 compression ratio at SI engine it would be knock. if you want to use at HCCI conditions then you should check sprayFoam & sprayEngineFoam. best regards. Last edited by ayhan515; August 31, 2015 at 09:48. Reason: typo 

August 31, 2015, 16:16 

#13 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
hello ayhan515,
you are right Isooctane has a good harmony with gasoline but If I want to simulate a HCCI case, I can't use kivaTest and should change my solver to sprayEngineFoam? sorry for bothering you. bet regards. 

August 31, 2015, 18:41 

#14  
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
Quote:
Just use kivaTest and engineFoam is not sufficient because ignition starts with your control at that case. HCCI ignition starts with high temperature like diesel engines. and need to solve many chemical reactions for combustion. firstly you need to combine kivaTest (engineFoam) and aachenBomb (sprayFoam) cases and create a new case for sprayEngineFoam and if you define fuel and air species at initial condition you don't have to deal with solving spray that case. and you can use more detailed reaction mechanisms for HCCI combustion instead of single reaction so your results would be more satisfying and accurate at least in this respect. best regards. 

September 7, 2015, 06:46 

#15 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
Dear ayhan515,
I have run a kivaTest by the below characteristics: controlDict is: /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.4.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict.1st; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application engineFoam; startFrom latestTime; startTime 180; stopAt endTime; endTime 30; deltaT 1e5;>>>>>>>>>>I changed from 1e5 to 1e25 writeControl runTime; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; adjustTimeStep true; maxCo 0.2; maxDeltaT 1; functions { timeStep { type coded; functionObjectLibs ("libutilityFunctionObjects.so"); redirectType setDeltaT; code #{ const Time& runTime = mesh().time(); if (runTime.timeToUserTime(runTime.value()) >= 15.0) { const_cast<Time&>(runTime).setDeltaT ( runTime.userTimeToTime(0.025) ); } #}; } } // ************************************************** *********************** // Log dictionary contains: . . . . Courant Number mean: 1388.37 max: 1.04297e+10 deltaT = 5.32668e17 Crank angle = 2.58142 CAdeg deltaZ = 5.55112e17 clearance: 5.57749e05 Piston speed = 1.04213 m/s diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 3.43196e07, Final residual = 3.43196e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 5.73945e07, Final residual = 5.73945e07, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 1.7391e06, Final residual = 1.7391e06, No Iterations 0 DILUPBiCG: Solving for ft, Initial residual = 1.94301e05, Final residual = 6.8055e12, No Iterations 1 DILUPBiCG: Solving for ha, Initial residual = 7.60684e06, Final residual = 7.60684e06, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.5609e07, Final residual = 1.5609e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.5609e07, Final residual = 1.5609e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.543e10, global = 9.48277e15, cumulative = 0.000726909 DICPCG: Solving for p, Initial residual = 1.5609e07, Final residual = 1.5609e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.5609e07, Final residual = 1.5609e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.543e10, global = 9.48277e15, cumulative = 0.000726909 DILUPBiCG: Solving for epsilon, Initial residual = 2.87218e07, Final residual = 2.87218e07, No Iterations 0 DILUPBiCG: Solving for k, Initial residual = 6.01877e08, Final residual = 6.01877e08, No Iterations 0 Mean pressure:3.09589e+06 Mean temperature:831.055 Mean u':1.50482 ExecutionTime = 51054.1 s ClockTime = 51460 s Courant Number mean: 1388.39 max: 1.04298e+10 deltaT = 5.32662e17 Crank angle = 2.58142 CAdeg deltaZ = 0 clearance: 5.57749e05 Piston speed = 0 m/s diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 3.43199e07, Final residual = 3.43199e07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 5.73949e07, Final residual = 5.73949e07, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 1.7391e06, Final residual = 1.7391e06, No Iterations 0 DILUPBiCG: Solving for ft, Initial residual = 1.88412e05, Final residual = 2.40726e16, No Iterations 1 DILUPBiCG: Solving for ha, Initial residual = 7.60696e06, Final residual = 7.60696e06, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.56067e07, Final residual = 1.56067e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.56067e07, Final residual = 1.56067e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.54263e10, global = 1.1419e18, cumulative = 0.000726909 DICPCG: Solving for p, Initial residual = 1.56067e07, Final residual = 1.56067e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.56067e07, Final residual = 1.56067e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 2.54263e10, global = 1.14197e18, cumulative = 0.000726909 DILUPBiCG: Solving for epsilon, Initial residual = 2.87215e07, Final residual = 2.87215e07, No Iterations 0 DILUPBiCG: Solving for k, Initial residual = 6.0187e08, Final residual = 6.0187e08, No Iterations 0 Mean pressure:3.09589e+06 Mean temperature:831.055 Mean u':1.50482 ExecutionTime = 51054.6 s ClockTime = 51461 s ********************************************** It is about 24 hours that O.F has challenged with Crank angle = 2.58142 CAdeg Do you have any idea to help me? Thanks in advance. 

September 7, 2015, 07:10 

#16 
Member
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 10 
Code:
deltaT 1e5;>>>>>>>>>>I changed from 1e5 to 1e25 Courant Number mean: 1388.37 max: 1.04297e+10 is unacceptable I think that problem is related your mesh. I suggest check your mesh quality. i hope more professional helps come. best regards Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.4.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict.1st; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application engineFoam; startFrom latestTime; startTime 180; stopAt endTime; endTime 25; deltaT 0.05; writeControl runTime; writeInterval 5; Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.4.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict.1st; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application engineFoam; startFrom latestTime; startTime 25; stopAt endTime; endTime 30; deltaT 0.005;//if it is not enough cut in half 0.0025, 0.00125,etc... writeControl runTime; writeInterval 1; 

September 9, 2015, 09:19 

#17 
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 4 
Dear ayhan515,
Do you know how O.F in kivaTest can calculate the value of Heat released ? Do you think that it is a correct suppose to consider a constant temperature for piston,line, and cylindeHead during the engine's work? These temperature values are their maximum ,am I right? Thanks in advance. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculation of the Governing Equations  Mihail  CFX  7  September 7, 2014 06:27 
Weird problem with engineFoam tutorial  chris1980  OpenFOAM Running, Solving & CFD  29  August 28, 2013 06:53 
High temperature methane+air  Peter  FLUENT  5  January 26, 2009 19:04 
Question about the kivaTest tutorial  johan  OpenFOAM Paraview & paraFoam  1  October 27, 2008 08:07 
chemical reaction  decompostition  La S. Hyuck  CFX  1  May 23, 2001 00:07 
Sponsored Links 