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

UDF Format 8th Order Polynomial

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2007, 14:45
Default UDF Format 8th Order Polynomial
  #1
Jason
Guest
 
Posts: n/a
I am writting a UDF to model the Womersly solution for a tube. I have fit 8th order polynomials to the Bessel functions. When I use my code in MatLab I obtain the correct answer. When I format it for the UDF applied at the inlet velocity b.c. I obtain incorrect vaules. I beleive the problem to be associated with my 8th order polynomial fit. After ploting the velocity points from both the Matlab version and from Fluent, they match very closely from r/R = 0 to r/R = .5 but after that are radicaly different. Is there anyway of dealing with these "higher frequencies"? I interpert it with no error messages. I can send you the UDF and the MatLab m.file if anyone is interested in helping. Thanks, Jason
  Reply With Quote

Old   June 24, 2007, 10:39
Default Re: UDF Format 8th Order Polynomial
  #2
Swarup
Guest
 
Posts: n/a
Hi,

I may be off the mark but is it proper to use an 8th order polynomial to fit data? High order polynomials produce oscillations during fitting, especially so when no of data points are not many. I have not come across polynomial fittings > order 4. Cubic splines avoid this problem.

Secondly, is there any symmetry in r/R [0.5 1]?

Swarup.
  Reply With Quote

Old   June 24, 2007, 14:21
Default Re: UDF Format 8th Order Polynomial
  #3
Jason
Guest
 
Posts: n/a
The fit I was doing needed this high of an order. I had 1000 points to fit. I actually figured it out with some help. It was a problem with double precison. I used a transformation to make sure no numbers was over 16 digits long.
  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
CFL condition for higher order schemes Shyam Main CFD Forum 2 February 14, 2008 15:24
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 11:55
DEFINE_ON_DEMAND UDF: How to declare A[ND_ND], etc jx FLUENT 1 November 6, 2003 18:23
UDF for second order moments in LES Jimmy FLUENT 0 September 6, 2002 12:16
UDF : Chemical Reaction in Catalytic Converter adhimac FLUENT 1 March 27, 2001 15:04


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