Uploaded April 2019 | Updated September 2026, 2 weeks ago
In this video, we will compute the circulation around an ellipse for an arbitrary vector field using MATLAB and Python. First we will look at the equation for circulation, and then transform it into a useful form for its calculation using a discrete vector field. Finally, we will run some code that computes the circulation for an arbitrary vector field in both MATLAB and Python.
The purpose of this code is to be able to compute the circulation, and thus the lift per unit span, of an airfoil in my future vortex panel method video/code. I will also be using it in my potential flow elementary solutions videos.
===== ERRORS =====
► The angle definitions in the MATLAB code shown in the video are incorrect. The Python version was always correct, but I was using an old version of the MATLAB code in the video by accident. The code available on my website has been updated as of 08/19/19, and both Python and MATLAB functions are correct now.
► The error is that you do in fact need a duplicate angle in order to finish the line integral around the ellipse. Without the duplicate angle, it leaves the integrated ellipse open. Including the duplicate angle ensures that the entire ellipse is integrated over (i.e. a closed curve).
===== RELEVANT LINKS =====
MATLAB and Python code from my website
► joshtheengineer.com/2019/04/01/compute-circulation-of-a-vector-field-in-matlab-and-python
GitHub: Panel Methods
► github.com/jte0419/Panel_Methods
===== NOTES =====
► I'm using the circulation defined in Anderson's "Fundamentals of Aerodynamics".
► You can use any other shape you want for the closed curve, but the ellipse is useful for my purposes.
In this video, we will compute the circulation around an ellipse for an arbitrary vector field using MATLAB and Python. First we will look at the equation for circulation, and then transform it into a useful form for its calculation using a discrete vector field. Finally, we will run some code that computes the circulation for an arbitrary vector field in both MATLAB and Python.
The purpose of this code is to be able to compute the circulation, and thus the lift per unit span, of an airfoil in my future vortex panel method video/code. I will also be using it in my potential flow elementary solutions videos.
===== ERRORS =====
► The angle definitions in the MATLAB code shown in the video are incorrect. The Python version was always correct, but I was using an old version of the MATLAB code in the video by accident. The code available on my website has been updated as of 08/19/19, and both Python and MATLAB functions are correct now.
► The error is that you do in fact need a duplicate angle in order to finish the line integral around the ellipse. Without the duplicate angle, it leaves the integrated ellipse open. Including the duplicate angle ensures that the entire ellipse is integrated over (i.e. a closed curve).
===== RELEVANT LINKS =====
MATLAB and Python code from my website
► joshtheengineer.com/2019/04/01/compute-circulation-of-a-vector-field-in-matlab-and-python
GitHub: Panel Methods
► github.com/jte0419/Panel_Methods
===== NOTES =====
► I'm using the circulation defined in Anderson's "Fundamentals of Aerodynamics".
► You can use any other shape you want for the closed curve, but the ellipse is useful for my purposes.


![Explained: Area-Mach Number Relation [CPG]
Can we approximate the exit Mach number of a rocket nozzle knowing only the area ratio? With a few assumptions, we certainly can! In fact, if we know how the area changes along a nozzle from the throat to the exit, we can calculate how the Mach number varies throughout the entire nozzle.
NOTES
► Ill make sure to never use my orange marker again
► If you download my Method of Characteristics MATLAB code from my GitHub (link below), you can see that the results of both match very closely!
HOW TO SOLVE AREA-MACH NUMBER RELATION
http://www.joshtheengineer.com/2016/11/16/solving-the-area-mach-number-relation/
ROCKET NOZZLE - METHOD OF CHARACTERISTICS
https://github.com/jte0419/Rocket_Nozzle_Design
RELEVANT VIDEOS
Area-Mach Number Differential Form
https://goo.gl/tDzBtM
Sonic State
https://goo.gl/j6yCxD
Stagnation-to-Static Relations
https://goo.gl/r5JZSQ
Normal Shock Relations
https://goo.gl/E5Lwac
REFERENCES
► Notes by Matt MacLean
► Modern Compressible Flow, Anderson
► Elements of Gasdynamics, Liepmann and Roshko
► Gas Dynamics, Zucrow and Hoffman
THUMBNAIL IMAGE
By NASA (http://mix.msfc.nasa.gov/abstracts.php?p=2388) [Public domain], via Wikimedia Commons Explained: Area-Mach Number Relation [CPG]](https://i.ytimg.com/vi/bdcxN0u5hMs/mqdefault.jpg)
![Explained: Pitch Stiffness [Flight Dynamics]
Explained: Pitch Stiffness [Flight Dynamics] Explained: Pitch Stiffness [Flight Dynamics]](https://i.ytimg.com/vi/bo68hptU6YA/mqdefault.jpg)

![Explained: Static Text GUI [MATLAB]
Static text fields can be used to indicate the status of your program, or simply to write text or numbers. This video describes how to set the static text field in a MATLAB GUI. Explained: Static Text GUI [MATLAB]](https://i.ytimg.com/vi/cWZLGpaVwwE/mqdefault.jpg)

![How To: Calculate F1 Car Aerodynamic Deceleration at Top Speed
Lets calculate the instantaneous deceleration that an F1 driver will feel when they lift off the throttle at top speed! This deceleration that Im calculating in the video is solely due to aerodynamic drag.
I forgot to mention that Im assuming no rolling resistance in this analysis. I mentioned it in my Top Speed video, and then forgot to add it in here. If I did include rolling resistance, it would be another term on the right-hand-side of the power equation, because the engine would need to overcome rolling resistance as well. Another assumption I forgot to mention is that there is no wind, that is, the air we are driving through is calm.
I misspoke (and mis-wrote) the name Peter Windsor, instead of Peter Wright. My apologies, but I dont want to film everything again. Another thing to note is that in the article (linked to below), the author says that the CdA of 1.3 m^2 is for a non-DRS car, whereas for a car with DRS enabled, the Cd will decrease. The product of CdA will then also decrease. In my analysis, Im just using the non-DRS value given, based on an assumption that right when the driver lifts, the DRS flap will close, even if its technically activated by pressing the brakes.
If you want to learn how to calculate the top speed of a car, check out my other video here:
goo.gl/rl1Igx
Links for information used in the video:
Value for CdA: goo.gl/xa7u3a
DRS : goo.gl/icOeCL
FIA Event Timing for Bahrain: goo.gl/GbBIXM
If you liked the video, please subscribe! If you didnt, let me know how I can improve.
Photo credits for the thumbnail image:
By Morio (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons How To: Calculate F1 Car Aerodynamic Deceleration at Top Speed](https://i.ytimg.com/vi/dy0D69pMYak/mqdefault.jpg)
![Explained: Critical Mach Number [Airplanes]
Explained: Critical Mach Number [Airplanes] Explained: Critical Mach Number [Airplanes]](https://i.ytimg.com/vi/e3BWJZIvXQ4/mqdefault.jpg)

![Explained: NACA 4-Digit GUI Part 8/10 [MATLAB]
This is the eighth video in my 10-video series on coding a program in MATLAB to compute, display, and save a NACA 4-digit airfoil.
IN THIS VIDEO:
We code the radio button for showing the camber line of the airfoil. We also code the Exit button.
Radio Button Video:
https://goo.gl/E4Owva
Exit Button Video:
https://goo.gl/aarwmW
IN THIS SERIES:
Part 1/10 : https://goo.gl/9UBgbo
Part 2/10 : https://goo.gl/jRRcYJ
Part 3/10 : https://goo.gl/rSVLHo
Part 4/10 : https://goo.gl/HwHB39
Part 5/10 : https://goo.gl/AlDne8
Part 6/10 : https://goo.gl/7n1QP7
Part 7/10 : https://goo.gl/nTGleR
Part 8/10 : https://goo.gl/ez247P
Part 9/10 : https://goo.gl/8mXYcc
Part 10/10: https://goo.gl/ovBlbW Explained: NACA 4-Digit GUI Part 8/10 [MATLAB]](https://i.ytimg.com/vi/eW8eEJtwRqA/mqdefault.jpg)