CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Where is dieselEngineFoam in OF-2.1.0 ? (http://www.cfd-online.com/Forums/openfoam/95623-where-dieselenginefoam-2-1-0-a.html)

Alexvader December 25, 2011 17:54

Where is dieselEngineFoam in OF-2.1.0 ?
 
Hi

I have compiled OpenFOAM-2.1.0, and I have noticed dieselEngineFoam is no longer there...

will it be substituted by other solver...?

Best

Alex

wyldckat December 25, 2011 20:43

Greetings Alex,

I'm not 100% certain about this, but I think it was removed due to this bug report: http://www.openfoam.com/mantisbt/view.php?id=346
Notice the status line:
Quote:

Status resolved Resolution suspended
You might want to submit a bug report asking for clarifications about the removal of that solver and if it is related to that bug report. You might also want to ask if the results reached with said solver were implicitly wrong or not.

By what I can understand, as long as there isn't a boiling stage, or if said boiling stage can be ignored, then the results shouldn't be all that different from reality...

Best regards,
Bruno

Alexvader December 26, 2011 10:08

Hi Wyldckat

Thanks for your answer :)

BRGDS

Alex

lucchini December 27, 2011 07:36

Dear all,

to understand the differences between the spray and dieselSpray implementations in the evaporation model, please check the following references that will probably make everything clear:

N. Nordin: "Complex Chemistry Modeling of Diesel Spray Combustion"
D. Clerides: "Numerical Simulations of Spray Processes in Diesel Engines"
C. Baumgarten: "Mixture Formation in Internal Combustion Engines"

All of them start from the Fick's law for a two-component mixture to compute the evaporation rate of the liquid droplet. However:

1) the old dieselSpray library uses the complete approximation (see Eq. 42 in Nordin's thesis; Eq. 3.135 in Clerides). In particular the evaporation rate is:

m_d = d_drop * pi * rho * D_ab * Sh * ln (1 + (X_vs - X_vinf)/(1 - X_vs))

where:

m_d : droplet evaporation rate
d_drop: droplet diameter
pi: 3.1415...
rho: liquid density
D_ab: binary diffusion coefficient
Sh: Sherwood number
X_vs: fuel molar fraction at saturatioin conditions
X_vinf: fuel molar fraction "far" from the droplet

In particular, the term (X_vs - X_vinf)/(1 - X_vs) is generally called "mass diffusion coefficient", B, and goes usually from 0 to very high numbers depending on the ambient conditions. Usually at engine conditions B can vary quite a lot.

2) In the new spray library, there are few differences. First of all, the following expression is used to compute m_d (Eq. 4.151 in Baumgarten):

m_d = d_drop * pi * rho * D_ab * Sh * ln (1 + (Y_vs - Y_vinf)/(1 - Y_vs))

where the mass fractions instead of mole fractions are used.
Then, an approximation is done on the term (Y_vs - Y_vinf)/(1 - Y_vs) which is assumed to be relatively small. Under such conditions,
ln(1+x) is almost equal to x, so:

m_d = d_drop * pi * rho * D_ab * Sh * (Y_vs - Y_vinf)

where also the term (1 - Y_vs) is approximated to be 1.

Such expression gives you what you can find in the LiquidEvaporation.C file (just debug it and you will get exactly the same expression):

// mass transfer [kg]
dMassPC[lid] += Ni*A*liquids_.properties()[lid].W()*dt;

Probably the lagrangian/intermediate class was more developed for low-volatile sprays, where the assumption adopted is correct and makes everything faster and more stable (no logarithms need to be computed).

In my opinion, the possibility to use the old implementation should be included as well. I don't see very big difficulties in introducing it. For what concerns boiling conditions, there are few models that can be used like the ones developed for GDI engines in the past. See:

Zuo, Gomes, Rutland, "Modelling superheated fuel sprays and vaproization", International Journal of Engine Research.

Best regards and wishes for 2012,

Tommaso

dkxls January 18, 2012 03:43

Hi all,

first of all thanks Tommaso for giving such a detailed explanation on the evaporation routines of the two libraries. I encountered that the missing routines in the new libraries for boiling conditions are causing a way bigger problem than the differences in the evaporation rate. But after all, both aim in the same direction.
In my opinion, the differences in the evaporation rate calculation is just one more reason to _not_ remove the dieselSpray libraries before this is fixed in the new libraries!

The bug I filed in autumn 2011 (see link earlier in this thread) was pointing out exactly that and demands basically the opposite of removing the dieselSpray libraries.

Best,
Armin

wyldckat January 18, 2012 05:22

Greetings Armin,

If you're the one that reported the issue, then you can re-open it because you were the original reporter! If you strongly feel that it shouldn't have been removed, than re-open the bug report and please tell them!
And pointing out the info on this thread might also be a good idea ;)

Best regards,
Bruno

niklas January 18, 2012 05:35

the dieselSpray-library is obsolete and a relic from the past.
It was developed in parallel as the lagrangian tracking was being developed and
since then the lagrangian class has undergone a complete re-write.

hence the dieselFoam and dieselEngineFoam code have been removed.
the dieselFoam code is replaced by the sprayFoam code and it shouldn't be
too difficult to create a sprayEngineFoam code from that.

Tommaso's implementation of boiling evaporation was sent to the developers and has been comitted to the git-repository and if you install the git version
you will now find a liquidEvaporationBoil evaporation model.

N

mturcios777 January 18, 2012 20:02

Quote:

Originally Posted by niklas (Post 339873)
the dieselSpray-library is obsolete and a relic from the past.
It was developed in parallel as the lagrangian tracking was being developed and
since then the lagrangian class has undergone a complete re-write.

hence the dieselFoam and dieselEngineFoam code have been removed.
the dieselFoam code is replaced by the sprayFoam code and it shouldn't be
too difficult to create a sprayEngineFoam code from that.

Tommaso's implementation of boiling evaporation was sent to the developers and has been comitted to the git-repository and if you install the git version
you will now find a liquidEvaporationBoil evaporation model.

N

Thanks for the answer Niklas. Inside the sprayFoam solver is a folder for sprayEngineFoam, and seems identical to the old dieselEngineFoam solver, except it doesn't have a mesh.move() statement. Do we need to add this.

Also, it appears the sprayProperties now includes lots of what used to be injectorProperties. I take it that all the different types of injectors that used to exist in dieselSpray are now inside the spray class?

niklas January 19, 2012 09:17

Quote:

Originally Posted by mturcios777 (Post 340009)
Thanks for the answer Niklas. Inside the sprayFoam solver is a folder for sprayEngineFoam, and seems identical to the old dieselEngineFoam solver, except it doesn't have a mesh.move() statement. Do we need to add this.

Also, it appears the sprayProperties now includes lots of what used to be injectorProperties. I take it that all the different types of injectors that used to exist in dieselSpray are now inside the spray class?

Oh, I hadnt seen the sprayEngineFoam code there.
Yes, there are some pieces missing from that code. if you check the engineFoam code
you see what to add in pEqn.H (2 meshPhi-statements) plus the move action in the main-loop.

Not all the injectors have been migrated to the new structure.

N

niklas January 19, 2012 10:29

bug-fix for sprayEngineFoam pushed to git.

mturcios777 January 19, 2012 15:05

This is great news! I'm looking at the sprayCloud tutorial (aachenBomb), as the sprayCloudProperties file is slightly different than the sprayProperties+injectorProperties combination. Most of it translates pretty well, but a documentation of the sprayCloudProperties file would be helpful, as it isn't entirely clear how to go about having multiple injectors, with different species mixtures and possibly different models for the parcels. On the surface, it seems like every sprayCloud can have completely different models applied to it.

What I'm really curious about is the singlePhaseMixtureCoeffs entry. It seems like it would be possible to introduce parcels that are gaseous through a spray, which would be very useful as that removes the need to resolve a gas injector as a boundary. I'll poke around some and start posting on another thread. This would be a very good page for the wiki if we can get the info...

wyldckat January 19, 2012 15:53

Greetings to all!

I'm glad things are looking better and better!

By the way, on the theme of wiki pages and diesel solving, here's a somewhat old and incomplete one that I found weeks ago: http://openfoamwiki.net/index.php/Contrib_dieselFoam

Hey, wait... according to the history log, it was Niklas that started and worked on it!! :eek: Assuming of course that the user names are related ;)

Best regards,
Bruno

mturcios777 January 19, 2012 17:44

I've posted some ideas about how to use multiple injectors:

http://www.cfd-online.com/Forums/ope...oam-2-1-x.html


All times are GMT -4. The time now is 17:08.