
[Sponsors] 
December 30, 2005, 08:02 
As far as I known the dieselEn

#1 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
As far as I known the dieselEngineFoam is the only solver that does not currently have a tutorial case or FoamX configuration!
Has anybody out there an existing FoamX config or at least a complete set of dictionaries for the dieselEngine solver? Any help is very appreciated. cheers Stephan 

December 30, 2005, 08:54 
Hi Stefan,
dieselEngineFoam

#2 
Member
Tommaso Lucchini
Join Date: Mar 2009
Posts: 85
Rep Power: 10 
Hi Stefan,
dieselEngineFoam has not a tutorial, but, as you can see in the $FOAM_TUTORIALS/ directory there are the tutorials of dieselFoam and engineFoam. dieselEngineFoam is dieselFoam with the moving mesh (have a look at the code of both solvers). So the only difference in a case setup between dieselFoam and dieselEngineFoam is that you need to put in the /constant/ directory the file engineGeometry. To better understand how dieselFoam and engineFoam works you can run both the tutorials (aachenBomb and kivaTest). In the aachenBomb case focus on the following files: constant/sprayProperties constant/injectorProperties constant/thermophysicalProperties constant/chemistryProperties In the kivaTest file have a look to constant/engineGeometry system/controlDict and look at the mesh, and see that the patches requires particular names (piston, liner, cylinderHead). Then try to merge the two tutorial and have fun! bye Tommaso 

December 30, 2005, 10:34 
I try to "merge" the two cases

#3 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
I try to "merge" the two cases to get a setup for the dieselEngine solver. I use the same mesh as the engineFoam case to get rid of mesh problems.
Nevertheless the calculation fails: Number of parcels in system  0 Injected liquid mass.......  0 mg Liquid Mass in system......  0 mg SMD, Dmax..................  0 mu, 0 mu Added gas mass = 1.71521e10 mg Evaporation Continuity Error 1.71521e10 mg ExecutionTime = 240.61 s Mean and max Courant Numbers = 0.000929914 31.5694 deltaT = 8.74482e10 Crank angle = 175.033 CAdeg deltaZ = 3.57846e10 clearance: 0.0855261 Piston speed = 0.409209 m/s volume continuity errors : sum local = 1.10786e15, global = 5.78031e18 Solving chemistry BICCG: Solving for Ux, Initial residual = 0.929704, Final residual = 4.04514e07, No Iterations 12 BICCG: Solving for Uy, Initial residual = 0.902951, Final residual = 6.88233e07, No Iterations 12 BICCG: Solving for Uz, Initial residual = 0.909879, Final residual = 4.33674e07, No Iterations 12 BICCG: Solving for O2, Initial residual = 0.884681, Final residual = 7.73892e07, No Iterations 12 BICCG: Solving for h, Initial residual = 0.852227, Final residual = 5.31857e07, No Iterations 12 > FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 > 5000; T = 113.962 From function janafThermo<equationofstate>::checkT(const scalar T) const in file /home/dm2/henry/OpenFOAM/OpenFOAM1.2/src/thermophysicalModels/specie/lnInclude/ janafTh ermoI.H at line 73. FOAM aborting  Why there is no injected fuel  How to handle the begin (start) of injection injector setup:  injectorType unitInjector; unitInjectorProps { position (0.03 0 0.0995); direction (0 0 1); diameter 0.00019; Cd 0.9; mass 6e06; temperature 320; nParcels 5000; Any ideas ? 

December 30, 2005, 15:00 
Hi,
It seems to me there is a

#4 
Member
Tommaso Lucchini
Join Date: Mar 2009
Posts: 85
Rep Power: 10 
Hi,
It seems to me there is a huge Courant Number. What did you set in the controlDict file for deltaT? What boundary conditions are you using for T, p, O2, N2, k and epsilon? Are they correct? Also: the injectorProperties file for the dieselFoam has the injection law depending on time and not by the crank angle, as you have to set in the dieselEngineFoam case. So if you start a case from 180 and the injection law start from 0 you don't have injected particles till you reach 0 Crank Angles. I hope this could help you a little bit. Keep on. Bye Tommaso 

December 30, 2005, 16:02 
control dict:


#5 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
control dict:
 adjustTimeStep yes; maxCo 0.1; maxDeltaT 1.0; boundary conditions:  T,p,k,epsilon  engineFoam default O2,N2,Ydefault zero gradient injection start:  You are right, the injection law is depending on time and not by CA but how can I define the injection start time or CA. Has anyone out there a setup for the dieselEngine solver which works? If so feel free to post! I think a lot of people are insterested in. Stefan 

January 6, 2006, 08:33 
is there anybody who can help

#6 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
is there anybody who can help ?


January 12, 2006, 05:40 
Hello,
what averaged Veloci

#7 
New Member
Marcus Ende
Join Date: Mar 2009
Posts: 4
Rep Power: 10 
Hello,
what averaged Velocity and pressure write dieselEngineFoam out ? 

January 12, 2006, 06:39 
Hi,
as you can see from the

#8 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
Hi,
as you can see from the dieselEngine (logSummary.H) code mean p: spacial mean value of the pressure of the computational domain. mean u': mean (time+space) turbulent velocity fluctuation hth p.s are you able to compute the case (dieselEngine) successfuly? My computation cancels after 66 CA with an error! 

January 12, 2006, 06:43 
Can anyone help me with this e

#9 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
Can anyone help me with this error.
from CA 180 to 66 all is ok but then the following error occurs: > FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 > 5000; T = 5101.98 From function janafThermo<equationofstate>::checkT(const scalar T) const in file /home/dm2/henry/OpenFOAM/OpenFOAM1.2/src/thermophysicalModels/specie/lnInclude/ janafThermoI.H at line 73. FOAM aborting time step properties: adjustTimeStep yes; maxCo 0.2; maxDeltaT 0.01; I use the kivaTest Mesh from the engineFoam tutorial! 

January 12, 2006, 08:52 
I mean the averaged velocity a

#10 
New Member
Marcus Ende
Join Date: Mar 2009
Posts: 4
Rep Power: 10 
I mean the averaged velocity and injector pressure at the begin of calculation ?
The error I think comes from a unstable solution of the Enthalpy equation. Have you chemistry solve on ??? 

January 12, 2006, 09:02 
Those values are incorrect for

#11 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Those values are incorrect for engines, since
the values are based on the average pressure at the start of the simulation. Maybe they should be removed for moving meshes, but I've kept them since I like to have that info to check that the input is descent. if you want to check that these values are physically sound, estimate the pressure at SOI and set that value as reference in 180/p, run the code and see what you get. ...and for the nonworking dieselEngineFoam case, try setting momentumPredictor off in the PISOdictionary in fvSolution. N 

January 12, 2006, 09:31 
Hi Niklas,
I have already t

#12 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
Hi Niklas,
I have already tried to set momentumPredicator off but the problem still exists. As I already mentioned above the calculation aborts after 66,5 CA reproducible. Here are the setup (fvSolution/fvSchemes) I use: fvSolution:  solvers { rho ICCG 1e06 0; U BICCG 1e06 0; p ICCG 1e09 0; Yi BICCG 1e06 0; h BICCG 1e06 0; k BICCG 1e06 0; epsilon BICCG 1e06 0; } PISO { nCorrectors 2; nNonOrthogonalCorrectors 0; momentumPredictor off; } fvSchemes:  ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; } divSchemes { default none; div(phi,rho) Gauss limitedLinear 1; div(phi,U) Gauss limitedLinearV 1; div(phiU,p) Gauss linear; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,Yi_h) Gauss upwind; div(phi,fu_ft_h) Gauss multivariateSelection { fu limitedLinear 1; ft limitedLinear 1; h limitedLinear 1; }; div((muEff*dev2(grad(U).T()))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; laplacian(muEff,ft) Gauss linear corrected; laplacian(muEff,fu) Gauss linear corrected; laplacian(((alphah*mut)+alpha),h) Gauss linear corrected; laplacian((rhoA(U)),p) Gauss linear corrected; laplacian(rhoD,k) Gauss linear corrected; laplacian(rhoD,epsilon) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(HbyA) linear; } snGradSchemes { default corrected; } fluxRequired { p; } other:  chemistry off no fuel injection Do you have a clue what is going wrong here? 

January 12, 2006, 10:26 
Yes I think I have a clue what

#13 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Yes I think I have a clue whats going on.
you're doing nonlinear CFD on a complex mesh, it crashes easily then. try with nNonOrthogonalCorrectors 1 and upwind for all variables. I would reduce the convergence criteria for Yi to 10e7 also. N 

January 12, 2006, 11:12 
Niklas,
as recommended I ch

#14 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
Niklas,
as recommended I changed the follwing parameters: Yi BICCG 1e07 0; nNonOrthogonalCorrectors 1; momentumPredictor off; div(phi,rho) Gauss upwind; div(phi,U) Gauss upwind; div(phiU,p) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,Yi_h) Gauss upwind; all other parameters are unchanged. but the problems still exists 

January 12, 2006, 11:17 
Wow, that was fast...
I sur

#15 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Wow, that was fast...
I sure hope you didnt restart from the latest result, it sounds like it already has gone wrong there. Remove the last result directory and restart from an earlier solution. Also start from 180 with these settings and see if the problem persists. N 

January 12, 2006, 11:37 
Niklas,
thanks for you supp

#16 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
Niklas,
thanks for you support so far! Sorry for my ignorance but what do you mean with "... and upwind for all variables" set upwind for all convection terms set all interpolation schemes to upwind? what`s about: div(phi,fu_ft_h) Gauss multivariateSelection, set this to upwind too? btw: have you got a setup which works and you are able to email me? >Remove the last result directory and restart from an earlier solution. Ok I started with 80 CA but it crashes as before at 66.5 CA! I am gonna restart the calculation from 180CA but I think this doesn`t help ... 

January 12, 2006, 11:37 
Niklas,
thanks for you supp

#17 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
Niklas,
thanks for you support so far! Sorry for my ignorance but what do you mean with "... and upwind for all variables" set upwind for all convection terms set all interpolation schemes to upwind? what`s about: div(phi,fu_ft_h) Gauss multivariateSelection, set this to upwind too? btw: have you got a setup which works and you are able to email me? >Remove the last result directory and restart from an earlier solution. Ok I restarted from 80 CA but it crashes as before at 66.5 CA! I am gonna restart the calculation from 180CA but I think this doesn`t help ... 

January 12, 2006, 15:52 
the same problem occurs when I

#18 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
the same problem occurs when I restart my calc from 180 CA
I have changed my mesh to a simple wedge geomerty and now the calc proceed successfully. It seems to be a mesh problem. I use the provided KivaTest mesh from the egineFoam tutorial. I think this mesh should work! Niklas (other peoples are welcome too) what do you think about this? 

January 13, 2006, 09:32 
That mesh is pretty bad and
i

#19 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
That mesh is pretty bad and
it looks like it needs some outercorrectors... The problem is in the highly distorted cells, which requires some extra corrections for the enthalpy. use this PISO { nOuterCorrectors 3; nCorrectors 1; nNonOrthogonalCorrectors 1; momentumPredictor off; } Should work. N 

January 13, 2006, 09:40 
thanks I will try your PISO se

#20 
Member
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 10 
thanks I will try your PISO setup.
another problem is that there is no combustion (signifiant pressure or temperature gain) altough I enabled the chemistry (15species, 39reations). 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Disable injection in dieselEngineFoam  francesco  OpenFOAM Running, Solving & CFD  0  November 26, 2008 02:23 
Strange pressure with dieselEngineFoam  tsencic  OpenFOAM Bugs  1  December 12, 2007 05:39 
Needing some advise about dieselEngineFoam  adorean  OpenFOAM Running, Solving & CFD  33  November 20, 2007 00:27 
Start with DieselEngineFoam  tsencic  OpenFOAM Running, Solving & CFD  20  June 28, 2007 21:07 