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

Crash using DirectMappedVelocityFluxField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2010, 12:06
Default Crash using DirectMappedVelocityFluxField
  #1
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Dear developers, debuggers and forum readers,

When using the directMappedVelocityFlux patch to remap the U field, pisoFoam crashes when using the NEARESTFACE option.

If interested, I can post the error message associated with the crash, but I've traced the origin back to the following piece of code in directMappedVelocityFluxFixedValueFvPatchField:
Code:
00209             newUValues = patch().patchSlice(newUValues);
The thing is that newUValues was declared slightly higher with
Code:
00176     vectorField newUValues;
but was not used/instantiated after that.
Reading the similar routine used in directMappedFixedValueFvPatchField.C, I guess the variable in brackets should be allUValues and not newUValues, leading to:
Code:
00209             newUValues = patch().patchSlice(allUValues);
This is however only an educated guess of yours truly, since I don't know what the patch().patchSlice() function does...

I was also wondering if a kind soul could also make good use of this discussion and explain to me what the patch().patchSlice() command does?

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   September 28, 2010, 10:07
Default
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
We've finally got a proper bug reporting system :-)
Please report any OpenFOAM bugs on http://www.openfoam.com/bugs.

Thanks,

Mattijs
mattijs is offline   Reply With Quote

Old   October 14, 2010, 03:44
Default
  #3
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 16
JamesJCFD is on a distinguished road
This was still crashing for me;

The updated inlet velocity is written out in the wrong place in "case customDirectMappedPolyPatch::NEARESTFACE"

I've attached fixed C source files.
JamesJCFD is offline   Reply With Quote

Old   October 14, 2010, 04:24
Default
  #4
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 16
JamesJCFD is on a distinguished road
The mapDistributes may also need to be corrected?
JamesJCFD is offline   Reply With Quote

Old   October 14, 2010, 08:29
Thumbs up
  #5
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Dear James,

I don't know which version of OpenFOAM you are using, but the issue I had has been resolved in the 1.7.x version. It's just a question of entering "git pull" in the OpenFOAM-1.7.x directory, and recompiling with ./Allwmake.

I haven't yet double checked the order of writing in NEARESTFACE, but I saw that you moved the patch().patchSlice() before the mapDistribute::distribute command. I'll come back to you on that one as soon as I find the time to further investigate the problem.

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 14, 2010, 12:30
Default
  #6
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 16
JamesJCFD is on a distinguished road
Hi Francois,

I was on the most recent pull of the repos, recompiled from scratch.
(Check bug #0000056 on the foam bugs list); nearestFace wasn't working for me at all until I moved new*Values to before the mapDistributes, similar to the other cases...

James
JamesJCFD is offline   Reply With Quote

Old   November 8, 2010, 07:48
Default
  #7
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Hi James,

Thank you for your reply!
Good to know the problem is fixed, as I was just going to start working with the NEARESTFACE option.. ;-)

Regards,

Francois.
Fransje is offline   Reply With Quote

Old   November 9, 2010, 04:28
Default
  #8
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
Dear Fransje,

It seems that nearestFace still doesn't work for me. mattijs has modified this in 2010.10.15.

In my U file, I use like this,

inlet
{
type directMappedVelocityFlux;
value uniform(10 0 0);
setAverage false;
average (10 0 0);
phi phi;
}

Is it right?
Thanks.
panda60 is offline   Reply With Quote

Old   November 10, 2010, 12:09
Default
  #9
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Dear panda,

Yes, this is correct.
By the way, if you are using the directMappedVelocityFlux type you don't need the setAverage and the related average switches since they are not used by the directMappedVelocityFluxFvPatchField class.

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   November 12, 2010, 07:43
Default
  #10
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
And nearestFace should now work as well. See the following thread:

http://www.cfd-online.com/Forums/ope...tml#post283044

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   January 13, 2011, 08:34
Default
  #11
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
Quote:
Originally Posted by JamesJCFD View Post
Hi Francois,

I was on the most recent pull of the repos, recompiled from scratch.
(Check bug #0000056 on the foam bugs list); nearestFace wasn't working for me at all until I moved new*Values to before the mapDistributes, similar to the other cases...

James
Dear James,

Are you working now for "nearestFace" ? I think mattijs have fixed the bug for nearestPatchFace, and it is working now. But I think he didn't repair nearestFace. How about your case ?

Thanks.
panda60 is offline   Reply With Quote

Old   January 13, 2011, 09:16
Default
  #12
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 16
JamesJCFD is on a distinguished road
Hi,

It has been a while since I looked at this, however I'm think that that the fix Mattijs implemented, worked for me?

James
JamesJCFD is offline   Reply With Quote

Reply

Tags
directmapped, nearestface, remapping


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
Graphic/plotted monitors causing Fluent 12.0 to crash Autumn FLUENT 6 May 25, 2010 02:19
Flow Simulation Crash with Trajectories D.Castle FloEFD, FloWorks & FloTHERM 2 August 5, 2009 15:50
Error%7eerror triggers crash after handling exceptions thrown by errorexit twice 7islands OpenFOAM Bugs 2 September 4, 2007 06:24
Design Modeler crash LR CFX 3 May 13, 2005 20:52
track cause of crash Matt Phoenics 2 October 5, 2001 10:16


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