|
[Sponsors] |
Boundary layer calculation, scripting in Post. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 9, 2011, 05: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 06:49. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 58 | July 3, 2020 01:13 |
GAMBIT problem with 3D Boundary Layer when meshing | Anthony Haroutunian | FLUENT | 2 | March 26, 2008 02:02 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 06:18 |
Boundary Layer Flow Paradox | Wen Long | Main CFD Forum | 3 | September 24, 2002 08:47 |
boundary layer thickness | 98.4F | Main CFD Forum | 1 | December 29, 2000 07:23 |