CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Suggestion to make spray simulations more stable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2007, 09:56
Default Hello, I have a suggestion f
  #1
Member
 
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17
fabianpk is on a distinguished road
Hello,
I have a suggestion for how to stabilize the spray simulations in OpenFOAM. After having my fair share of "out of temperature range" errors, Niklas Nordin suggested to me to introduce under-relaxation on the temperature calculation, together with a few iterations. This was ok for some cases, but not for all. After examining closer what happened to each parcel I found out that OpenFOAM has set a lower limit for each parcel's mass to VSMALL (1e-300). This is, in my opinion, far too low, and is (at least as far as I can see now) one of the major causes for janaf thermo related crashes.

For instance, in my spray simulation I had parcels with a total mass of less than 1e-20 kg. This means the droplets in that parcel amount to roughly 60 000 molecules (assuming 100e-3kg/mole) in total. This is also below the machine epsilon, which is at about 2.2e-16 in my case.

I made the needed changes to parcel.C, parcel.H and also made the new limits for minimum parcel mass, relaxation factor and number of iterations runtime-selectable through the spray class, as the spray is passed when parcel::updateParcelProperties is updated. If anyone is interested I can be more precise in how and where the changes were made.

/Fabian
fabianpk is offline   Reply With Quote

Old   October 12, 2007, 21:41
Default Hi Fabian, Yup, I'd like to
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Hi Fabian,

Yup, I'd like to know - could you please indicate the changes by E-mail.

Thanks,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 16, 2007, 05:36
Default Hi, I am also interested in t
  #3
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 17
tsencic is on a distinguished road
Hi,
I am also interested in the modifications about the spray calculation.
Thanks,
Tomislav
tsencic is offline   Reply With Quote

Old   October 16, 2007, 07:38
Default hmmm, not a bad change but Im
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
hmmm, not a bad change but Im not completely happy about it either, since it requires some a-priori knowledge of the system since you have to give absolute numbers.

The nature of implicit evaporation is you never reach 0, but has to make a cut-off somewhere after
which the residual is added to the gas.

What I didnt think of was that as the mass of the parcel is reduced, the parcel is also more sensitive to energy
transfer.

It should be pretty straight-forward to compare the characteristic evaporation time and compare with the integration time. If the ratio is
'small enough' and the energy content in the drop is 'small enough' compared to the energy in the gas it should be evaporated immediately.

something like this...

(m^(n+1) - m^n)/delta = - m^(n+1)/tau =>

m^(n+1) = m^p/(1+delta/tau)

if delta/tau > 100 (for instance) and
the energy left in parcel the is lower than 10% (or 1%...dunno how stability/accuracy will be affected)
then it safe to remove the drop and add all.

Would be nice if you could test this Fabian
niklas is offline   Reply With Quote

Old   October 16, 2007, 07:53
Default As I've tried more and more ca
  #5
Member
 
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17
fabianpk is on a distinguished road
As I've tried more and more cases, I've noticed that you sometimes need to have as low under-relaxation as 0.5, so it's not really stable yet, just more stable. What tends to happen for small parcels is that their temperature starts to diverge in one direction (usually down), and as this happen they evaporate more and more mass. If the fix works, the parcel mass hits the minimum mass and is removed. If it doesn't, the code still crashes because the temperature goes below 200. As you say, the parcel becomes very sensitive to energy transfer at these low masses.

I will try to see if comparing evaporation time scales will make things better.

/Fabian
fabianpk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ldusolvers in stable release johndeas OpenFOAM 4 December 2, 2008 15:01
spray simulations IƱigo Iparragirre Main CFD Forum 0 October 30, 2006 11:01
A stable unstable flow? Jonathan Vogt FLUENT 0 August 7, 2005 03:52
Von Karman 2D Stable, no shedding Stephen Mar FLUENT 3 March 16, 2004 15:48
stable problem s.t.Wang Main CFD Forum 3 December 10, 1999 16:57


All times are GMT -4. The time now is 21:07.