# UDF doesn't work how I need it to - problems with the coordinate system in Fluent

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

January 21, 2015, 10:01
#2
Senior Member

Join Date: Nov 2013
Posts: 1,965
Rep Power: 25
I read your question, but I can not see the difference between what your UDF does and what you want your UDF to do.

Quote:
 This is to give a pitching amplitude of A= 20.8/2 (starting at 2.9 degrees and going up to 23.7 in an oscillatory manner) and mean angle of attack is 13.3 degrees.
And? Did you get it? If no, what did you get instead? If yes, what is the problem?

 January 21, 2015, 11:48 #3 New Member   Sarah Garden Join Date: Sep 2014 Posts: 10 Rep Power: 10 Hello and thanks for your reply. I want it to oscillate the flow so that the y velocity component is always positive and the x velocity component is always negative. The x works this way but the y velocity becomes negative. I can show you the aerofoil lift curve so you can maybe infer what is happening; http://tinypic.com/m/igdf9x/3

 January 21, 2015, 11:59 #4 Senior Member   Join Date: Nov 2013 Posts: 1,965 Rep Power: 25 For me it is more useful if you could show the y-velocity, if that is the one that is wrong. I am more an expert in UDFs than in aerofoils, I don't know what the aerofoil lift curve shows...

 January 21, 2015, 16:45 #5 New Member   Sarah Garden Join Date: Sep 2014 Posts: 10 Rep Power: 10 Here is a time history of the y velocity at a point just before the aerofoil nose; http://tinypic.com/m/igdi0h/3

 January 22, 2015, 04:20 #6 Senior Member   Join Date: Nov 2013 Posts: 1,965 Rep Power: 25 Is that the location where you apply "unsteady_yvelocity"?

 January 22, 2015, 11:07 #7 New Member   Sarah Garden Join Date: Sep 2014 Posts: 10 Rep Power: 10 Ahh, okay. It is doing what is expected at the inlet; http://tinypic.com/m/igdxyb/3 but at the same time I got the same graph as before for just before the aerofoil; http://tinypic.com/m/igdi0h/3 I have an interface, because I'm comparing the case of oscillating aerofoil to oscillating flow, and for a direct comparison I need to keep the mesh the same. The mesh looks like this with the interface. http://s46.photobucket.com/user/merl...4ded6.jpg.html

 January 22, 2015, 11:15 #8 Senior Member   Join Date: Nov 2013 Posts: 1,965 Rep Power: 25 If the velocity at the inlet is what it should be, then the UDF is behaving correctly. I understand that the flow at point 11 is not what you expect. I can't help you with that; I don't know what you expect there, and if I knew what you were expecting there, I would not know if your expectation was wrong or if the simulation was wrong, and if I knew that the simulation would be wrong, I would have no idea which aspect of the simulation is wrong. All I can say is that the UDF works as you want, but you also saw that, so I am useless for you, I'm afraid...

 January 22, 2015, 11:26 #9 New Member   Sarah Garden Join Date: Sep 2014 Posts: 10 Rep Power: 10 I want it to do the same at that point-11 as it does at the inlet, except with a bit of a phase delay obviously because the flow has to get from the inlet to the aerofoil. I'm running a simulation with another mesh without an interface to see if it might have to do with the interface

 January 22, 2015, 11:38 #10 Senior Member   Join Date: Nov 2013 Posts: 1,965 Rep Power: 25 I don't know where your inlet is, and where your point 11 is, so I don't know how reasonable it is to expect that the flow at point 11 is the same as the flow at the inlet.

 January 25, 2015, 17:51 #11 New Member   Sarah Garden Join Date: Sep 2014 Posts: 10 Rep Power: 10 Hello again. I will try to illustrate my problem with a bit more clarity (although not a problem with the UDF after all). Here is where 'point-11' is, now called nose-point http://s46.photobucket.com/user/merl...0f48f.jpg.html This is the Y velocity that is desired at the nose-point, which is okay at the inlet http://s46.photobucket.com/user/merl...65c74.jpg.html This was the Y velocity at the nose; http://s46.photobucket.com/user/merl...a2601.jpg.html It has overshot the amplitude, and this is what the velocity vectors look like, to show the interface works properly http://s46.photobucket.com/user/merl...244dd.jpg.html I found out that I got a better match if I made the slip walls into a periodic boundary; http://s46.photobucket.com/user/merl...de312.jpg.html but there is still a problem in that it overshoots the amplitude in the -y axis direction. Edit: I think I have it working now with periodic boundary conditions and reducing the distance between the inlet and the aerofoil. Thanks Last edited by SarahG; January 25, 2015 at 19:02.