- 258
- 313 992
Brian Sullivan
Registrace 22. 01. 2008
2D Linear Wave Simulation in Python - Leapfrog Integration
In this video we extend our previous 1D Linear Wave code to two spatial dimensions.
Slice notation for numpy arrays makes this a very quick conversion, and 3D axes in matplotlib make the solution easy to visualize.
Here is a link to the source code for the 1D Solution as well as the 2D solution (both codes are in the repository):
github.com/bpatricksullivan/1d_wave_leapfrog
If you missed earlier episodes in this series, here they are:
czcams.com/video/B4rziSNUpAA/video.html
czcams.com/video/4i_Qm_YMHjs/video.html
czcams.com/video/nIuVn14PyJw/video.html
czcams.com/video/VLl-03mSO4U/video.html
czcams.com/video/fTprfksvoXc/video.html
Slice notation for numpy arrays makes this a very quick conversion, and 3D axes in matplotlib make the solution easy to visualize.
Here is a link to the source code for the 1D Solution as well as the 2D solution (both codes are in the repository):
github.com/bpatricksullivan/1d_wave_leapfrog
If you missed earlier episodes in this series, here they are:
czcams.com/video/B4rziSNUpAA/video.html
czcams.com/video/4i_Qm_YMHjs/video.html
czcams.com/video/nIuVn14PyJw/video.html
czcams.com/video/VLl-03mSO4U/video.html
czcams.com/video/fTprfksvoXc/video.html
zhlédnutí: 3 048
Video
Testing Python Solution to the 1d Linear Wave Equation (Leapfrog Integration)
zhlédnutí 283Před 6 měsíci
Testing Python Solution to the 1d Linear Wave Equation (Leapfrog Integration)
The Leapfrog Algorithm with Numpy Arrays and Slice Notation
zhlédnutí 191Před 7 měsíci
The Leapfrog Algorithm with Numpy Arrays and Slice Notation
The Wave Equation & the Leapfrog Algorithm Part 1
zhlédnutí 571Před 7 měsíci
Here is a link to the source code for the 1D Solution for this system as well as the 2D solution (both codes are in the repository): github.com/bpatricksullivan/1d_wave_leapfrog Here are links to the other episodes in this five part series: czcams.com/video/B4rziSNUpAA/video.html czcams.com/video/4i_Qm_YMHjs/video.html czcams.com/video/nIuVn14PyJw/video.html czcams.com/video/VLl-03mSO4U/video.h...
Chain Rule Examples with Trig Functions
zhlédnutí 67Před rokem
Chain Rule Examples with Trig Functions
Chain and Product Rule Together: A parabola times a circle
zhlédnutí 22Před rokem
Chain and Product Rule Together: A parabola times a circle
Chain Rule Example: The "mount doom" function
zhlédnutí 34Před rokem
Chain Rule Example: The "mount doom" function
Chain Rule Example: Reciprocal of A Polynomial
zhlédnutí 167Před rokem
Chain Rule Example: Reciprocal of A Polynomial
Chain Rule: Derivative of a Cuspy Cube Root
zhlédnutí 22Před rokem
Chain Rule: Derivative of a Cuspy Cube Root
Derivative of Square Root X by Definition...Whoa!
zhlédnutí 128Před 2 lety
Derivative of Square Root X by Definition...Whoa!
Using the Limit Definition to Find the Slope of the Tangent Line
zhlédnutí 1,1KPřed 2 lety
Using the Limit Definition to Find the Slope of the Tangent Line
Multiplicity - How Many Microstates in a Macrostate
zhlédnutí 944Před 3 lety
Multiplicity - How Many Microstates in a Macrostate
Counting Heads and Tails- Multiplicity in Two State Systems
zhlédnutí 125Před 3 lety
Counting Heads and Tails- Multiplicity in Two State Systems
Adiabatic & Isothermal Processes Compared
zhlédnutí 64Před 3 lety
Adiabatic & Isothermal Processes Compared
Use the IMPORTHTML command to scrape webpage data to a spreadsheet.
zhlédnutí 259Před 3 lety
Use the IMPORTHTML command to scrape webpage data to a spreadsheet.
Reconstructing the Data with a Model Function
zhlédnutí 257Před 3 lety
Reconstructing the Data with a Model Function
Finding the Damping Coefficient with Log-Linear Fitting
zhlédnutí 1,8KPřed 3 lety
Finding the Damping Coefficient with Log-Linear Fitting
Load Range Data for a Damped Spring into a CoLab Notebook
zhlédnutí 272Před 3 lety
Load Range Data for a Damped Spring into a CoLab Notebook
Dang i came up with this myself at school
Noicr
Thank you so very very much
Excellent thank you
Correct me if I'm mistaken, I'm new to this, but shouldn't it be lim h->1 since we're trying to see how the slope will react as we bring it closer to the x value of 1?
This is an extraordinarily helpful video. Thank you!
Hi (:
So to get the correct derivative do you just take the average of the right and left slope?
Wow, as the width of the rectangle tends to zero, the height of the rectangle tends to the slope of the original function. In other words, that infinitesimal sliver becomes the tangent line at that specific instant of time. Thank you so much!
It works 💯
this video is just awesome. Thank you, mate❤❤
thanks
Great Video!!! btw Drew is silly and not listening
Thanks! I guess I did have a Walter White thing going on in 2019. Drew, listen up!
@@bpatricksullivan drew did listen up and I did change the comment bc of drew
Very helpful, thank you
Glad it was helpful!
Thank you !! Very Clear!!
Thank you so much I needed exactly this, taught me so much about sheets and the SIR model . Needed it for my mathematics essay Lifesaver.
Glad it helped!
I have bien looking for such a video for quite à long time thank you
Glad it was helpful!
AMAZING !!!!!!
Thank you.
A house of bees, is called a hive.
🌭
Hello! How could I change the boundaries condition to produce an absorbing boundary ? Thanks alot!
Great question. This is a complex topic. "open outflow boundary conditions", "zero gradient boundary conditions", or "absorbing boundary conditions" are all terms you can use to learn about ways people have approached this problem. They all have flaws. It is a very desirable boundary condition in many real world systems, but it presents significant difficulties in implementation.
thanks for this !
Glad to help!
Best explanation I have seen of the SIR model! I have watched so many videos to understand this
3Blue1Brown has a beautiful video about this topic, but your explanation is much more intuitive. Congrats.
Thanks a lot! This is the best explanation of complex math to someone who has no understanding of calculus.
Glad it was helpful!
The example was not good. Like, not good at all.
I don't understand why such an important explanation was not in my book. Nice explanation though, Keep it up!
Glad it was helpful!
I’d like to check making some custom wave simulations over the summer, so this will help!
Good. Have fun playing with the code!
Nice job! I look forward to witnessing similar efforts applied to the 2D shallow water equations.
Thanks! I have a few projects higher in my queue for courses I am teaching, but the Saint-Venant Shallow Water Equations are on my list.
This is great, I'm glad the algorithm brought me here 👍
Thank you so much! I am glad the algorithm brought you here as well! I have a lot more similar content in my pipeline over the next few weeks. Please let me know any topics you'd like to see covered within computational physics, data science, data visualization, Python programming, or adjacent areas.
Nice
Thank you! Let me know anything related you'd like to see covered in a video.
his voice is 🗿✨
Thanks. Even tho I am free from calc-1 now, it was a good watch.
Thank you; glad you enjoyed it!
thanks mate, you explained it better than my teacher
Glad it helped!
Brilliant! Thanks so much.
Glad it was helpful!
The way that let me understand integrals the best is that the anti derivative of a function is literally the area formula for under the graph. Like take y=x for example. The distance between any point is X and the height of any point is Y which equals X. This forms a triangle because it’s just a straight diagonal line. The formula for the area of a triangle is bh/2 so base (x) times height(x) divided by 2 =(x^2)/2 Which I thought was really cool. This continues for every other possible line The area for under a quadratic is 1/3(bh) where base is still x and height is x^2 (hence y=x^2) so (x^3)/3 is the area
Your intuition is so much better than 3blue and this video, I don't understand why you didn't get single like, thanks for commenting bro your comment made my day, but I still don't understand how adding infinitesimally small rectangles is equal to taking anti derivative of a integral function f(x) 🥲. Why finding anti derivative will do the work of adding infinitesimally small rectangles? And how ? If you have intuition for this please let me know bro 🥲.
@@lyricass7810 Thank you! I really appreciate what you said. Honestly, I’m just glad that my comment could help at least one person. When it comes to the logic behind why the anti derivative gives the area could be best explained saying that, the derivative of a function is found by dividing the function by a tiny change dx, while the area is found by multiplying it by tiny changes dx(which by multiplying tiny change in x by the formula for y getting the area for the rectangle under that little instance of the graph), ultimately undoing what the derivative did. Hope this helps! If not i can try and clarify for you.
@@benbearse4783 thanks for the reply bro, I would say I understood 50 percent 😂, can you clarify clearly please. How anti derivative will take care of adding infinitesimally small rectangles with different areas 🥲. Thanks in advance,
@@lyricass7810And that is where fundamental theorem of calculus steps in.
ribbit
Loved the video, great explanation! I have a question though; when you divide by dx and then take the limit, on the right side of the equation you’d have something of the form 0/0, does this matter?
That is one of the most significant results of calculus. Often we have ratios of infinitesimals which we can evaluate in the contexts of limits, and although both numerator and denominator approach zero, they approach zero at different rates, and as a result the ratio remains finite and non-zero.
very helpfull
Good shyt my nigga. Real shit You a Physics God.
This video is gold!
After doing an entire physics degree I never saw an explanation as clear as this for illustrating the fundamental theorem of calculus. Bravo sir 👏
This should be in every calculus textbook!
I have a q about this, we must've added the limit as dx->0 before the last step So we have Lim dx->0[g(x+h)-g(x)]=f(x)dx So when we divide by dx we have { Lim dx->0[g(x+h)-g(x)] }/dx=f(x) So what we actually have now is that the numerator applies only on the numerator of the lhs,which is not exactly what the derivative of a function is
Just wonderfully tasty
Real thanks bro, you can explain it in really simple term, i dont know is that simple, real thanks!
Happy to help! Thank you for viewing.
Thanks for taking the time to make these videos.
you on mathstack or twitter by chance?
No. I've written answers for Socratic, but not Math Stack Exchange or Twitter yet. I will look into it.
That is really very good.Every single rectangle has as a height the original function and as width dx. So if the slope is constant (say a horizontal line) the area will alyas be dx times 1. I seem to understand. thank you so much for this super interesting video.
I am glad you found it helpful!
sir, where is part 2?
Thank you for clear explanation
We should rule out outliers because they're sus.