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

Change in trajectory causing problems

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2008, 07:47
Default In OpenFOAM 1.4.1 (or possibly
  #1
Member
 
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17
fabianpk is on a distinguished road
In OpenFOAM 1.4.1 (or possibly 1.4) there was a change in the lagrangian spray collision model "trajectory". In trajectoryCM.H on line 11, it is now:

scalar vAlign = vRel & (p/dist);

but before it was:

scalar vAlign = vRel & (p/(dist+SMALL));

The division by zero protection was removed, and I'm quite sure it's causing crashes for me, was there a specific reason why it was removed?

/Fabian
fabianpk is offline   Reply With Quote

Old   January 10, 2008, 08:06
Default The big question is how small
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The big question is how small should SMALL be? SMALL is set to 1e-15 when running double precision which may be similar to the real order of magnitude of "dist". If "dist" is so small that it cannot be used in this division what would you like vAlign to be set to?

Henry
henry is offline   Reply With Quote

Old   January 11, 2008, 04:58
Default I see the problem, but 1e-15 m
  #3
Member
 
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17
fabianpk is on a distinguished road
I see the problem, but 1e-15 m is of the order of the electron radius, so if they're that close they are in the same spot for all CFD applications. My guess is that this happens around the spray injector where there are many parcels in the same position. Anyway, it could easily be related to a physical quantity, for instance:

scalar mindist = min(p1.d()/10.0,p2.d()/10.0);
mindist = min(mindist,SMALL);

scalar vAlign = vReal & (p/(dist + mindist));

One could also include an if-statement setting vAlign to zero for parcels that close. I'm not sure what would be best without wasting too much computational time. I have found that it's not possible to run the code without some fix for this, at least not if trajectory model is to be used.

/Fabian
fabianpk is offline   Reply With Quote

Old   January 11, 2008, 06:50
Default If it is OK that vAlign -> 0 a
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
If it is OK that vAlign -> 0 as dist -> 0 then I don't see a problem with adding a mindist and avoid the if-statement. If 1e-15 is always acceptable then I don't have a problem with the code as it was and we can reinstate the SMALL. Another option would be to add VSMALL rather than SMALL but that may not solve your problem but it might be interesting to try.

Henry
henry 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
Negative value of k causing simulation to stop velan OpenFOAM Running, Solving & CFD 1 October 17, 2008 06:36
Dynamic Grid Remeshing causing Divergence? Andrew Wick FLUENT 0 January 23, 2006 19:39
Outflow conditions causing ERROR #064 Coriolius Siemens 3 October 10, 2004 11:57
liquid/solide phase change problems mehdi fteity Main CFD Forum 3 September 14, 2000 22:44
Does FLUENT support phase-change problems? Danny Lim FLUENT 2 August 25, 2000 23:50


All times are GMT -4. The time now is 14:54.