[Scripting]: How to get the coordinates of a 2D airfoil @ different angles of attack?
I have this piece of code which calculates the coordinates of a point(qx,qy) after it is rotated around an origin(ox, oy) by an angle(angle):
Code:
import math I have this code that lets the script to open the .txt file with the coordinates at 0 angle of attack: Code:
coordsAt0 = [] Quote:
Any hint or a simpler piece of code on how to do it would be greatly appreciated! Regards, CfdIntro |
Hi,
Looks like a familiar piece of code :-) After line Code:
coords = map(float,l.split()) Code:
angle = 10 # degrees |
Quote:
I was trying to have the script open the .txt file with the coordinates at 0 AoA, rotate the coordinates by the desired AoA, print the results into a new .txt file, then read the coordinates at the new AoA and finally export the results into a .geo format file. That being said, your suggestion saved me about 30 lines of code! Thanks again for the tip :) Regards, CfdIntro |
All times are GMT -4. The time now is 15:28. |