|
[Sponsors] |
Boundary layer calculation, scripting in Post. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 9, 2011, 06:39 |
Boundary-layer thickness calculation. Scripting in Post.
|
#1 |
New Member
Andreas
Join Date: Feb 2011
Location: Sweden
Posts: 9
Rep Power: 15 |
Hey everyone,
I'm currently working on on way to calculate the thickness of the momentum boundary-layer as well as the boundary layer of an airfoil. After reading around about the possibilites to do this in Post I've realised that there's no easy way to do this other than writing a script. What I want the script to do is sweep over the midspan of the airfoil creating lines normal to the surface and then saving necessary data to a file. I can then use this data in MATLAB to calculate the thickness and plot it against the relative position on the airfoil. So far I've used a script that creates a polyline along the midspan on the upper side of the airfoil and then creates a file containing x,y,z coordinates as well at the normal X and normal Y direction for 100 points along the line. (I should mention that the scripting is done in PERL) I then write a new script that looks something like this Code:
! $cnt=0 ! open(IN, "<./Axial-Profile_vane-0_sst_002.csv"); ! while (defined ($line = <IN>)) {; ! @coord = split(',' $line); ! $coord[4] = $coord[4] * -1; ! $cnt = $cnt +1; ! print "$coord[0] \n"; PLANE: PlaneNorm # Here I create a plane with the coordinates and normal directions from axial-profile. .... CONTOUR: Contour Z #Here I create a contour plot on PlaneNorm with 3 contours in z-direction. .... POLYLINE: Polyline1 #Here I create a polyline in the normal direction at the midspan by creating it from Contour Z and contour level 2 ..... ! $LineName = "Polylines/Line.".$cnt.".csv"; EXPORT: #Here I export the x- and y-coordinates as well as the velocity of Polyline1 to the file $LineName ..... ! } ! close(IN) However... and this is where my problem is. The polylines that are created goes in both directions. That is, in the normal direction on both the upper AND lower side of the airfoil. What I wonder is if there's any easy way of manipulating the polylines so they're only created on the upper side of the airfoil and not across the entire domain. One possible solution I've thought of is to compare the actual y-coordinate in axial_profile each loop to the y-coordinates on each row in $LineName. Then if the coordinates for the polyline are found to be below that from axial_profile, delete those rows. Thus giving me a file with only the points on the upper side of the airfoil. Is this something that's possible? and if so, how could I do it? My knowledge in programming is a bit limited and especially in PERL so any help will be greatly appreciated. Regards Andreas Last edited by a.ob; March 9, 2011 at 07:49. |
|
March 11, 2011, 09:03 |
|
#2 |
New Member
Andreas
Join Date: Feb 2011
Location: Sweden
Posts: 9
Rep Power: 15 |
I managed to come up with a solution for my problem by introducing a second while-loop within the while-loop. This loop went through all the lines of coordinates in the polyline file and compared the y-coordinate with the y-coordinate in the axial_profile file and then saved them to a new file. Thus giving me 100 polylines normal to the surface at the midspan on the suction side of the airfoil. All that's left now is to contruct a MATLAB program that calculates the B-L thickness from the data.
If anyone is interested in knowing in more detail how I made the script, just send me a pm /Andreas |
|
March 30, 2011, 16:18 |
|
#3 |
New Member
Irfan
Join Date: Jan 2011
Location: Netherlands
Posts: 16
Rep Power: 15 |
Hi,
I am also working on the same problem. I have to calculate boundary layer characteristics of 2D airfoil (BL thickness, Displacement thickness and momentum thickness). So far I am not able to calculate them but I have an idea to calculate BL thickness which is simple but I am not sure whether is correct or not. Anyways I will share it. To calculate BL thickness: 1) Plot velocity contours in CFX-Post. For the range use option "Value List". For the values use two values of "0 and 0.99*U freestream (means the second value should be the 99% of the free stream velocity). 2) Create Polyline (say polyline 1). For method use option "From Contour". For the contour select the velocity contour and for the level select 2. This will create a polyline at 99% of the free stream velocity in the whoyle domain. 3) To extract the values of the BL, insert a Chart. For location' specify the polyline 1. For X variable use variable from the list of variables "X" and for y variable use "Y" variable from the list. This will give the coordinates of the BL. This method seems to work but I get some some strange values near the leading edge of the airfoil. Regards, Irfan |
|
April 1, 2011, 04:40 |
|
#4 |
New Member
Andreas
Join Date: Feb 2011
Location: Sweden
Posts: 9
Rep Power: 15 |
Hi Irfan,
To calculate the displacement and momentum thickness I had to use Matlab where I imported the data from the lines normal to the surface that my script created. Each file contained X- and Y-coordinates along the line together with Total and Static Pressure. The stream situation in my simulations lacked real free stream conditions everwhere so I had to calculate my velocity from, v= sqrt(2*(P0-Pstat,wall)/rho). Because of this I didn't get very good results from your solution to finding 0,99*free stream velocity but I did get it to work very well for the flow over a flat plate. So thank you! I still haven't managed to figure out how to calculate the BL thickness in matlab but if you want some hints on how to calculate the displacement and momentum thickness, just let me know /Andreas |
|
April 1, 2011, 12:47 |
|
#5 |
New Member
Irfan
Join Date: Jan 2011
Location: Netherlands
Posts: 16
Rep Power: 15 |
Hi Andreas,
It will be very helfpul, if you can share how to calculate momentum and displacement thickness. Actually I was trying to calculate it in some easy way, but guess there is no easy way to do. Can you give some info about it? Thanks in advance. Irfan |
|
April 5, 2011, 05:50 |
|
#6 |
New Member
Andreas
Join Date: Feb 2011
Location: Sweden
Posts: 9
Rep Power: 15 |
I sent you a PM
/Andreas |
|
October 8, 2013, 06:28 |
|
#7 |
Member
Ye Zhang
Join Date: Dec 2009
Location: Delft,Netherland
Posts: 92
Rep Power: 17 |
Hello Andreas,
Currently I am working on calculating the displacement thickness and momentum thickness on the airfoil. Could you please give me some hints to calculate it? and how to creat line normal to the airfoil surface? Thank you so much! Best regards, Ye |
|
August 20, 2014, 12:18 |
Shape factor
|
#8 |
Member
venkatesh
Join Date: May 2012
Posts: 93
Rep Power: 14 |
I am analyzing transition point over NACA 4412 airfoil at low Reynolds number using Transition Kw-SST model. I am using FLUENT for simulation. I dont know how to plot Shape factor from FLUENT result. I know that Shape factor is the displacement thickness divided by moment thickness. I read in a post that velocity profile can be obtained by creating a line perpendicular to the surface at the point of interest and with the help of that velocity variation can be plotted.
I don't know how to plot shape factor in fluent. Can anybody please help me in this regard. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
GAMBIT problem with 3D Boundary Layer when meshing | Anthony Haroutunian | FLUENT | 2 | March 26, 2008 03:02 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |
Boundary Layer Flow Paradox | Wen Long | Main CFD Forum | 3 | September 24, 2002 09:47 |
boundary layer thickness | 98.4F | Main CFD Forum | 1 | December 29, 2000 08:23 |