UDF Format 8th Order Polynomial
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

Re: UDF Format 8th Order Polynomial
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. 
Re: UDF Format 8th Order Polynomial
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.

All times are GMT 4. The time now is 16:19. 