|
[Sponsors] |
UDF doesn't work how I need it to - problems with the coordinate system in Fluent |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 21, 2015, 07:28 |
UDF doesn't work how I need it to - problems with the coordinate system in Fluent
|
#1 |
New Member
Sarah Garden
Join Date: Sep 2014
Posts: 10
Rep Power: 12 |
Hi. I am comparing the case of an oscillating aerofoil in a constant freeflow to the case of stationary aerofoil and oscillating flow. The first case is complete though I noticed something strange about the UDF and how it works...
Now I have this UDF to oscillate my x velocity and y velocity components; #include "udf.h" #define PI 3.14159 DEFINE_PROFILE(unsteady_xvelocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =-cos((0.2321)+(0.1815)*sin((2*PI*0.6*t)+(PI/2)+((3*PI)/2))); } end_f_loop(f, thread) } DEFINE_PROFILE(unsteady_yvelocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =sin((0.2321)+(0.1815)*sin((2*PI*0.6*t)+(PI/2)+((3*PI)/2))); } end_f_loop(f, thread) } 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. I've messed around a bit with introduction of a phase change in different places. It seems to me as though Fluent picks a different axis each time. Last time I wrote an UDF for a sliding mesh it would not rotate below the x axis until I had introduced an arbitrary pi/2 in the function. What I would like to know is; is there a kind of different coordinate system in Fluent ? My function does as I expect when it's calculated somewhere else, like in Excel. Thanks in advance |
|
January 21, 2015, 10:01 |
|
#2 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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:
|
||
January 21, 2015, 11:48 |
|
#3 |
New Member
Sarah Garden
Join Date: Sep 2014
Posts: 10
Rep Power: 12 |
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: 27 |
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: 12 |
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: 27 |
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: 12 |
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: 27 |
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: 12 |
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: 27 |
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: 12 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF | acasas | CFD Freelancers | 1 | January 23, 2015 08:26 |
compiling my UDF | Seyed Farid Hosseinizadeh | FLUENT | 22 | February 14, 2006 11:19 |
UDF of Zimont model in fluent | Z | Main CFD Forum | 0 | February 17, 2005 04:07 |
On Coordinate system used in Fluent | varghese | FLUENT | 9 | March 22, 2002 12:16 |