As far as I known the dieselEn
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 
Hi Stefan,
dieselEngineFoam
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 
I try to "merge" the two cases
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 ? 
Hi,
It seems to me there is a
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 
control dict:

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 
is there anybody who can help
is there anybody who can help ?

Hello,
what averaged Veloci
Hello,
what averaged Velocity and pressure write dieselEngineFoam out ? 
Hi,
as you can see from the
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! 
Can anyone help me with this e
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! 
I mean the averaged velocity a
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 ??? 
Those values are incorrect for
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 
Hi Niklas,
I have already t
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? 
Yes I think I have a clue what
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 
Niklas,
as recommended I ch
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 http://www.cfdonline.com/OpenFOAM_D...lipart/sad.gif 
Wow, that was fast...
I sur
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 
Niklas,
thanks for you supp
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 ... 
Niklas,
thanks for you supp
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 ... 
the same problem occurs when I
the same problem occurs when I restart my calc from 180 CA http://www.cfdonline.com/OpenFOAM_D...lipart/sad.gif
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? 
That mesh is pretty bad and
i
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 
thanks I will try your PISO se
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). 
All times are GMT 4. The time now is 08:09. 