CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

improvig stability in timeVaryingMappedFixedValue

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   May 23, 2010, 07:43
Default improvig stability in timeVaryingMappedFixedValue
New Member
Join Date: Jan 2010
Posts: 1
Rep Power: 0
Romario Lopez is on a distinguished road
Hello to all FOAMers,

this is not really a bug, rather an improvement suggestion. I'm using the timeVaryingMappedFixedValue patch mostly to map the results from the velocity measurement (PIV, LDA, you name it) onto the inlet patch in my computational domain. The problem is how FOAM calculates the coordinate system from the point cloud. It takes the first point, then look for the second one, which is further that SMALL, then for the third one, which is further than SMALL and has some angle to the first two. This is indeed correct, but very unstable, since the PIV points are due to measurement precisions not EXACTLY in one plane. This affects the mapping process because the plane chosen by FOAM differs from the "right one". I modified the timeVaryingMappedfvPatchField.C to chose the coordinate system differently:
1) take the first point as the starting point
2) the second coordinate point is the one with maximal distance from the first one
3) the third coordinate point is the one with maximal distance from the line connecting the first two point.

With that modifications (you can understand it as a choice of the "average plane" I was able to get very robust mapping even when the mapped points are not exactly in one plane.

Unfortunately my source code understanding are not deep enough to put the modified code here.
Romario Lopez is offline   Reply With Quote

Old   May 25, 2010, 07:20
Super Moderator
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 18
mattijs is on a distinguished road
Sounds like a good idea. I've implemented your points and tested it on the pitzDailyExptInlet tutorial and get very slightly different results probably due to rounding errors. I've pushed it into 16x. Please let me know if you see any problems.

(if you switch on the debug flag for timeVaryingMappedFixedValue it will print out the choice of points)


mattijs is offline   Reply With Quote

Old   July 6, 2010, 02:09
Senior Member
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 10
panda60 is on a distinguished road
I also found this problem in version 1.6 .
But I changed the first point coordinate, and the reading is OK.
Now in version 1.7.0 , The problem seems to have been fixed.
panda60 is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stability and Amplification Factor hyd Main CFD Forum 0 January 28, 2010 18:05
stability and number of processors ?? sersunzo OpenFOAM Running, Solving & CFD 0 June 9, 2009 11:45
Stability Condition for Immersed Boundary Method Dave Rudolf Main CFD Forum 0 February 6, 2007 00:36
Hydrodynamic Stability vs CFD Ben Main CFD Forum 2 October 18, 2004 02:39
Solving linear stability eq. K S Chang Main CFD Forum 3 January 19, 2004 17:01

All times are GMT -4. The time now is 00:12.