Coder Social home page Coder Social logo

Comments (4)

claybudin avatar claybudin commented on May 16, 2024

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.

claybudin avatar claybudin commented on May 16, 2024

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.

gforsyth avatar gforsyth commented on May 16, 2024

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.

claybudin avatar claybudin commented on May 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.