Comments (4)
Also, shouldn't
utoA = lambda u: u**2
be
utoA = lambda u: u
?
Edit: I see now that utoA is actually computing A*u for use on the RHS of the equation for d
It should probably be called utoAU or something...
from cfdpython.
Also, I don't understand why the last 2 terms of the RHS of the discretized Burgers' eqn don't always cancel. Don't we have:
RHS = u(n,i) - dt/(2dx)(E(n,i+1) - E(n,i-1)) + dt/(4dx)(A(n,i+1)*u(n,i+1) - A(n,i-1)*u(n,i-1))
For Invscid Burgers:
E(n,i) = 1/2*u(n,i)^2
A(n,i) = u(n,i)
so both terms reduce to
dt/(4*dx) * (u(n,i+1)^2 - u(n,i-1)^2)
one positive and the other negative.
???
Edit: This appears to be confirmed in Video Lecture #21 from the YouTube channel, although it isn't really discussed in much detail.
from cfdpython.
Hey @claybudin, thanks for reporting these!
Mea culpa, I wrote this notebook a few years ago and we never really put it through any editorial/math checks since we got distracted with other projects. I think you're probably one of the first people to take a serious look at it. Off the top of my head, I can't see anything that you're missing in re: the math mistakes.
At the moment, my inclination is to shunt it off to a separate branch so no one else stumbles into it before I've had a chance to go through it and correct the errors.
Also, the Numba notebooks are also 3+ years out of date -- the changes 11 months ago were purely Python 3 syntax fixes, but no content was updated.
Apologies for the trouble and thanks for bringing it to my attention! I'll be sure to ping you when we get around to fixing this up.
from cfdpython.
Yet another question:
Under the discussion in "Modified Thomas Algorithm Matrix", is what is being done with the modification equivalent to solving the first matrix equation shown under that heading? Why not just solve that equation directly for the full range of values (0 through n+1), with a(0) = c(0) = a(n+1) = c(n+1) = 0, all the b's 1 as before and d(0) = B(0) and d(n+1) = B(n+1) (ie the Boundary Conditions)?
Wouldn't that also ensure that the BCs are enforced (u(0) = B(0) and u(n+1) = B(n+1)) and all the internal values have access to the BCs. What is the advantage to doing the modification to d(0)?
Thanks, in advance...
from cfdpython.
Related Issues (20)
- 11 step, d(div(U))/dt term HOT 2
- Typo in Step 11 HOT 1
- Typo in the Poisson equation discretization in Step 11 HOT 2
- No pressure gradient in step 12? HOT 2
- Maybe there is a bug in code of Array Operations with NumPy HOT 3
- About equation 4 in step11 HOT 4
- Step 8 transpose equations typo
- definition of L1 norm on Step 9: 2D Laplace Equation HOT 2
- CD Derivation - Step 3
- Initialization error in Step 7 HOT 1
- cfdpython HOT 1
- Disappearing viscosity term in the discrete version of Poisson-pressure equation HOT 10
- Initialization error in Step 9 HOT 1
- Step 5: matplotlib error HOT 3
- Outdated dependencies HOT 1
- Lesson 14 build_up_b
- CFD Code Writing HOT 2
- Step #4 Initial Conditions HOT 1
- Problem reproducing the videos inside the notebooks HOT 4
- Staggered or collocated grid? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfdpython.