|
[Sponsors] |
June 21, 2007, 14:45 |
UDF Format 8th Order Polynomial
|
#1 |
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
|
|
June 24, 2007, 10:39 |
Re: UDF Format 8th Order Polynomial
|
#2 |
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. |
|
June 24, 2007, 14:21 |
Re: UDF Format 8th Order Polynomial
|
#3 |
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.
|
|
|
|
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 |