Okay, so I have created 3 m-file function for aerodynamics toolbox so far and all of them is airfoil vertex generation function. Actually, there are one more NACA series (which is series 6) which I haven’t code for its vertex generation, but I’m kinda bored with airfoil generation stuff. So, I looked back to my Aerodynamic textbook and decided to do potential flow sim.
Badaboom badabang, so here is the m-file function for 2D potential flow sim in my MATLAB Aerodynamics Toolbox page. In short, this code creates a flow field based on the given elementary flow such as uniform flow, source/sinks, doublet, and vertex. You just pick any elementary flow that you like and combine it.
To input the elementary flows that you wanted, you need to fill in a nx4 array. I know it is a bit complicated but you’ll understand how to do it from the instruction that I’ve wrritten in the code (use ‘help PotentialFlow2DSim.m’ command to view the instruction!). Here is several potential flow that I created using this function.
Uniform + Doublet + Vortex Flow
I’m planning to make a GUI for this function since it will look much nice with GUI. In the meantime, I need you guys to give me any feedback on this code:D.