
[Sponsors] 
October 11, 2011, 14:03 
Basic questions on CFD theory

#1 
New Member
Join Date: Aug 2010
Posts: 15
Rep Power: 7 
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 nonlinear solver might proceed, e.g., NewtonRaphson 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: 12 
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)_iu(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: 251
Rep Power: 7 
Quote:


October 12, 2011, 03:12 

#4  
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 12 
Quote:
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: 251
Rep Power: 7 
Quote:
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: 12 
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)_iu(n)_i)/delta t =(u(n)_i1+u(n)_i1) / delta x so an upwind formulation, not a downwind one.... 

October 12, 2011, 08:08 

#7  
Senior Member
Join Date: Aug 2011
Posts: 251
Rep Power: 7 
Quote:
not exactly again !!! (u(n+1)_iu(n)_i)/delta t =(u(n)_i  u(n)_i1) / 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: 12 
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: 251
Rep Power: 7 
ok let's do that !


October 13, 2011, 16:32 

#10 
New Member
Join Date: Aug 2010
Posts: 15
Rep Power: 7 
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: 251
Rep Power: 7 
Hi CThib,
check this post: When to use upwind or central differencing schemes? as well as: http://www.cfdonline.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: 7 
Thank you very much leflix, your post in that thread explains it perfectly.


October 17, 2011, 08:50 

#13 
Senior Member

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  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Very basic questions for ICEM CFD  icemcfd  ANSYS  2  December 21, 2010 17:01 
LES basic and simple questions.  dshawul  Main CFD Forum  0  October 4, 2010 10:56 
New to CFD with some basic question  Newbie  Main CFD Forum  3  October 23, 2006 12:22 
ASME CFD Symposium  Call for Papers  Chris Kleijn  Main CFD Forum  0  September 25, 2001 10:17 
Customer Services  Patrick Godon  Main CFD Forum  32  August 23, 1999 06:55 