Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

CFD/MATLAB WizardsHelp Wanted

  1. Aug 29, 2009 #1
    Okay then :smile: Here is another one of my ridiculous posts. Yay!

    Let's say I want to write my own CFD code in MATLAB. Is does not need to be robust. I want it to be as simple as possible.

    It should be able to solve a model that consists of only one, single grid cell.

    I know that I will be solving seven equations simultaneously.

    I know I need to give boundary conditions. But how many do I need? I have a six-sided grid cell. I am fairly sure that I need more than 1 BC, but less than 6.

    I know that I have left out a fair amount of necessary info. I also know that this might be a lot more difficult than I am making it out to be. But I think I could learn a lot even by failing at it.

    So what else do I need here? What exactly are the equations?

    I know we have x,y,x momentum, Navier-Stokes (I think), some form of turbulence equation (probably k-Epsilon), continuity and Energy. Correct?

    What's next?

    Anyone who might be interested in joining me in this project, feel free! no experience required--I don't have much!


    Casey
     
  2. jcsd
  3. Aug 31, 2009 #2

    minger

    User Avatar
    Science Advisor

    1 cell? You really can't have a single cell CFD program. You can start small though. Try writing a quasi-2D solver. Basically, you'll just have a "line" of grid points, each with an associated area. Since its 1D, you'll only need to solve 3 equations.

    You'll need:
    • A differencing routine (one that can take derivatives both in the main domain, and near the boundaries). I would recommend a central-differencing routine
    • If you use a central-differencing routine, then you'll need a routine to add artificial dissipation. Again, both central domain, and near the boundaries
    • A time marching routine. I would recommend a Runge-Kutta-style routine for stability.
    • Boundary condition routines. These will be the most difficult. Boundary conditions are the biggest pain in the *** for CFD solvers. Start with Thompson-style boundary conditions and specify total pressure and temp at the inflow, and static pressure at the outflow
    • Since you're only 1D, you won't be calculating turbulence, so you won't need to worry about it.

    Definately start small with a 1D solver. You'd be surprised how much complexity even going to 2D adds. 3D is a whole-nother animal.
     
  4. Sep 12, 2009 #3
    I have written finite difference solutions for simple CFD problems before. I would like to help if the offer is still open.

    With that attitude, you will go far.

    Thanks
    Matt
     
  5. Sep 12, 2009 #4
    That would be awesome! I will post back tomorrow or later tonight with more details on what I actually know about Fluid mechanics and CFD. It is very little. But I am willing to do a lot of reading on the subject.

    Thanks again,
    Casey
     
  6. Sep 13, 2009 #5
    Sounds great.

    Thanks
    Matt
     
  7. Sep 18, 2009 #6
    Would you say that this book would be good if I am interested in a 'crash course' in CFD?

    I am currently trying to read a book my boss lent me "An Intro To CFD" by Versteeg and Malalasekera and I want to gorge my eyes out.

    I realise that no CFD text will be 'easy,' but I believe there has got to be one out there that dives into the concepts a little better as opposed to just being a long list of equations.
     
  8. Sep 18, 2009 #7
    I wouldn't say Andersons's book is a crash course. This book will provide a great understand of how and what CFD is. It also provides a down to Earth approach to the mathematics. If you really want to understand CFD start with the Anderson book.

    Also, once you get through Anderson you can better understand some of the higher level CFD books.

    Thanks
    Matt
     
    Last edited: Sep 18, 2009
  9. Sep 18, 2009 #8
    OK great. So it would be a good '1st Book' in CFD for someone with my background?
     
  10. Sep 18, 2009 #9
    Yes, it is the first book that I used.

    Thanks
    Matt
     
  11. Sep 18, 2009 #10

    minger

    User Avatar
    Science Advisor

    For people just getting started, a slightly quicker (than textbook) is the ARC2D paper put out by Thomas Pulliam. He has the paper on his website (U of Miss. IIRC). Basically, it was one of the first full solvers created, so the paper covers many topics of interest in CFD, particularly useful in describing implicit solver using LDI approaches.
     
  12. Sep 18, 2009 #11
    Cool, never heard of that one. Is it a free publication?

    Thanks
    Matt
     
  13. Sep 18, 2009 #12
    If either of you guys find it, could you link it here? I am having trouble locating it. If it is the same Thomas Pulliam that is at NASA, a lot of the links are dead.

    Minger: Is that U of "Missouri" ? Or "Mississippi" ?
     
  14. Sep 18, 2009 #13
    Yeah. Every one of his links are dead. Maybe it's a coverup !?!
     
  15. Sep 18, 2009 #14
    Yeah, I looked all over, and couldn't get anything other then dead links.

    Maybe thats why I never heard of him or his paper. LOL

    Thanks
    Matt
     
  16. Sep 18, 2009 #15

    minger

    User Avatar
    Science Advisor

    yea thats the guy...who is at Miss....

    Sorry I was thinking of Thompson, who has a terrific book on grid generation located:
    http://www.erc.msstate.edu/publications/gridbook/

    but I digress. I think I have a copy of it though. Gimme a second. Linky
    http://www.eng.utoledo.edu/~mheminge/ARC2D.pdf

    Also some personal notes (some 100+ pages of nicely LaTeX'ed notes)
    http://www.eng.utoledo.edu/~mheminge/CFD_Notes.pdf [Broken]

    Enjoy!

    He's a real important person in the field. Him and Anthony Jameson (http://aero-comlab.stanford.edu/jameson/ look through his website and you'll see [he was solving the 3D Eulers in 1981, multiblock a couple years later!]) come to mind as some of the leading pioneers in CFD.
     
    Last edited by a moderator: May 4, 2017
  17. Sep 18, 2009 #16
    Minger, thanks. I have only written some very crude grid generators. Can't wait to get into the Thompson book.

    Thanks
    Matt
     
  18. Sep 18, 2009 #17

    Minger! That's stupendous of you! When I was searching for Pulliam, Google returned an old PF thread you replied to in which you offered up these notes.

    I was going to PM you to see if you still had them but now I don't have too!

    Thanks! :smile:
     
    Last edited by a moderator: May 4, 2017
  19. Sep 18, 2009 #18

    minger

    User Avatar
    Science Advisor

    Good luck; the first like 4 chapters just set up the mathematics behind it all. I read and took notes over a bit of it. How much I understood though....
     
  20. Oct 11, 2009 #19
    Update:


    Just ordered text. Got the "international Edition" 'cause I am cheap and fickle.
     
  21. Oct 12, 2009 #20
    Great,

    You will enjoy the book.

    Thanks
    Matt
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: CFD/MATLAB WizardsHelp Wanted
  1. Cfd with matlab (Replies: 1)

  2. MATLAB help (Replies: 2)

  3. MATLAB help (Replies: 0)

  4. MATLAB help (Replies: 7)

  5. Matlab help (Replies: 6)

Loading...