CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Polynomial fitting

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2012, 10:52
Default Polynomial fitting
  #1
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Hello,

I am fitting polynomials of different degree to some data points.

p(x,y) = a + bx + cy

Question: If I fit the above polynomial to 3 points then I might get a singular matrix when I try to solve the system (e.g. if the points are located on the same axis). What is the rule here in order to Not get a singular matrix?

I wish to fit an arbitrary number of points to a polynomial of higher order and while the above case is simple to figure out I believe I lack the understanding to avoid singular matrices (some times it might work and other times it might not) when doing this.

Regards
Simbelmynė is offline   Reply With Quote

Old   August 9, 2012, 17:58
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
In 2D (x and y) and a polynomial whose maximum order is n the requirement is that no more than n+1 points are aligned. In 3D (x, y and z) you also have the requirement that no more than (n+1)*(n+2)/2 points can be on the same plane.

That's all i remember, but i guess there is some material around on the multi-dimensional polynomial interpolation.

As a side note, consider that for any valid point distribution you can always find a non valid one in the way of exchanging the position of just two points. Indeed, this operation has the effect of exchanging two rows in the interpolation matrix hence, as this imply a change in the sign of the determinant, somewhere along the path the determinant has become 0.
Simbelmynė likes this.
sbaffini is offline   Reply With Quote

Old   August 10, 2012, 03:33
Default
  #3
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Thank you, this was helpful!

By alignment, I assume that you also include diagonal alignment, right?
Simbelmynė is offline   Reply With Quote

Old   August 10, 2012, 05:35
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Yes, alignment in any direction (2D of course).
sbaffini is offline   Reply With Quote

Old   August 10, 2012, 11:41
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
if you use Lagrangian simplex (triangles in 2D, tethraedron in 3D), you will be sure that the matrix is never singula
FMDenaro 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
Polynomial thermophysical properties and laminar porous Zone vemps OpenFOAM 0 June 30, 2011 10:13
Polynomial thermophysical properties and laminar porous Zone vemps OpenFOAM 0 June 28, 2011 10:22
polynomial thermophysical properties jason.ryon OpenFOAM 2 May 11, 2011 06:16
Scalar polynomial for specific heat is not defined! navid STAR-CD 2 April 19, 2010 05:00
Shock Fitting Craig FLUENT 1 April 24, 2008 17:06


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