# Basic questions on CFD theory

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 October 11, 2011, 14:03 Basic questions on CFD theory #1 New Member   Join Date: Aug 2010 Posts: 15 Rep Power: 9 Hi all, I've done beginner level work with CFX and OpenFOAM, but I'm still trying to wrap my head around some of the basic concepts related to how these solvers actually work. What exactly is going on in the solver when it iterates to find a solution? I realize this question is so dependent on the type of analysis being conducted that it nearly renders the question invalid, but bear with me. Is it 'iterating' in the sense of how any non-linear solver might proceed, e.g., Newton-Raphson iteration in the simplest case or something as sophisticated as Excel's solver, or is the solution at each iteration a valid solution, just not the 'particular' solution requested (as manifested in the tolerance/residual parameters). I do wish to pursue a Master's degree in this stuff, but until then, does anybody have any advice on how to tackle the theory on your own? I'm struggling with the disconnect between really great material that describes the theory (John Anderson Intro to CFD, CFX modeling guide, this forum), vs the actual, seemingly insurmountable difficulties of, well, actually implementing it in a computer program. My proficiencies are in programming and use of potential flow codes for large marine structures (AQWA/WAMIT). Thanks. CThib

 October 11, 2011, 15:21 #2 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 557 Rep Power: 13 Hi friend, what actually goes on inside a program depends on the type of solver you are using, that's true...but the basic concept is almost always the same. Take the simplest PDE as a model for a fluid flow: linear scalar advection, du/dt+du/dx=0 You probably know from Andersons book that such a problem is discretized in space and time, and solved in an appropriate way. Discretizing turns the above PDE into an algebraic equation, sth like (u(n+1)_i-u(n)_i)/delta t =( - u(n)_i+1+u(n)_i) / delta x where the ns denote the time level, and the is the spatial position. So what your solver does is solve this equation for u(n+1) (the solution at the next time, or the end time) in an appropriate way. That's the magic behind CFD, and all schemes / models /codes etc differ in the way (accuracy, efficiency, "elegance") they do it. I hope this helps, if not, just keep asking, I'm happy to answer to the best of my knowledge! Cfd Newbie

October 11, 2011, 19:02
#3
Senior Member

Join Date: Aug 2011
Posts: 271
Rep Power: 9
Quote:
 Originally Posted by cfdnewbie Take the simplest PDE as a model for a fluid flow: linear scalar advection, du/dt+du/dx=0 Discretizing turns the above PDE into an algebraic equation, sth like (u(n+1)_i-u(n)_i)/delta t =( - u(n)_i+1+u(n)_i) / delta x where the ns denote the time level, and the is the spatial position. Cfd Newbie
Sorry cfdnewbie, but if you start in your example with a discretizing scheme (forward 1st derivative) which is unconditionnally unstable for this well known hyperbolic equation, I'm afraid you will confuse our friend CThib... lol

October 12, 2011, 03:12
#4
Senior Member

cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 13
Quote:
 Originally Posted by leflix Sorry cfdnewbie, but if you start in your example with a discretizing scheme (forward 1st derivative) which is unconditionnally unstable for this well known hyperbolic equation, I'm afraid you will confuse our friend CThib... lol

Hey leflix,
I admit my basic cfd course has been a while, but I'm 99.9% sure that an upwind spatial scheme with the Euler time integrator I used is stable for reasonable CFL - a central scheme would be unconditionally unstable, but an upwind is certainly not

Cheers!

October 12, 2011, 04:30
#5
Senior Member

Join Date: Aug 2011
Posts: 271
Rep Power: 9
Quote:
 Originally Posted by cfdnewbie I'm 99.9% sure that an upwind spatial scheme with the Euler time integrator I used is stable for reasonable CFL - a central scheme would be unconditionally unstable, but an upwind is certainly not Cheers!
Hi Cfdnewbie,

you are 100% right about the fact that upwind scheme is stable (under CFL condition) but unfortunately for you the scheme you just proposed to Cthib is not he upwind scheme but the forward scheme. And this one is unconditionally unstable.
I think a simple refresh of your basic CFD courses will be enough

 October 12, 2011, 04:59 #6 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 557 Rep Power: 13 Bah, you are so right, darn typo! but instead of changing my wonderfully unstable scheme, I 'll change the problem to fit it by changing the direction of the advection... no, just kidding. Thanks for correcting me, the scheme should read: (u(n+1)_i-u(n)_i)/delta t =-(u(n)_i-1+u(n)_i-1) / delta x so an upwind formulation, not a downwind one....

October 12, 2011, 08:08
#7
Senior Member

Join Date: Aug 2011
Posts: 271
Rep Power: 9
Quote:
 Originally Posted by cfdnewbie the scheme should read: (u(n+1)_i-u(n)_i)/delta t =-(u(n)_i-1+u(n)_i-1) / delta x so an upwind formulation, not a downwind one....

not exactly again !!!

(u(n+1)_i-u(n)_i)/delta t =-(u(n)_i - u(n)_i-1) / delta x

please cfdnewbie you should take some vacancies

no but this is a typo for sure !

 October 12, 2011, 12:22 #8 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 557 Rep Power: 13 haha, I guess I will let you do the math, and focus more explaining the conceptual ideas

 October 12, 2011, 12:52 #9 Senior Member   Join Date: Aug 2011 Posts: 271 Rep Power: 9 ok let's do that !

 October 13, 2011, 16:32 #10 New Member   Join Date: Aug 2010 Posts: 15 Rep Power: 9 Hi friends, Thank you both for the replies, sorry it took me so long to acknowledge you. "Upwind" refers to the direction in which the solution propogates?

 October 13, 2011, 18:32 #11 Senior Member   Join Date: Aug 2011 Posts: 271 Rep Power: 9 Hi CThib, check this post: http://www.cfd-online.com/Forums/mai...g-schemes.html as well as: http://www.cfd-online.com/Wiki/Appro...grids_-_Common you should understand some stuffs...

 October 13, 2011, 21:07 #12 New Member   Join Date: Aug 2010 Posts: 15 Rep Power: 9 Thank you very much leflix, your post in that thread explains it perfectly.

 October 17, 2011, 08:50 #13 Senior Member   Julio Mendez Join Date: Apr 2009 Location: Greensboro, U.S.A Posts: 268 Rep Power: 11 Dear friend. Remember that CFD softawares, solves the Navier stokes equation, but it uses some scheme to operate the non linearities. It is very complicate to explain here, but it is not hard to understand. The most importat to say is that, program solve and "standard" type of equation, which has, a transtive part, convective, diffusive and a soruce term, there you have. In the other hand you have the algorithm to solve it, the normalyy use the TDMA instead of Newtow raphsonj and there a lot of reason to choose it. I DO recommend you to read the book of patankar or malalasekera before starting yu master degree. I am finising my master degree on CFD, and before starting it I was working on it. I f you want I can share with you a digital copy of patankar book. from my point of view it is the most omplete an easy to understand. Good luck, and forgive me for my english mistakes!!!

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post icemcfd ANSYS 2 December 21, 2010 17:01 dshawul Main CFD Forum 0 October 4, 2010 10:56 Newbie Main CFD Forum 3 October 23, 2006 12:22 Chris Kleijn Main CFD Forum 0 September 25, 2001 10:17 Patrick Godon Main CFD Forum 32 August 23, 1999 06:55

All times are GMT -4. The time now is 07:29.

 Contact Us - CFD Online - Privacy Statement - Top