CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Basic questions on CFD theory

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2011, 14:03
Default Basic questions on CFD theory
  #1
New Member
 
Join Date: Aug 2010
Posts: 15
Rep Power: 15
CThib is on a distinguished road
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
CThib is offline   Reply With Quote

Old   October 11, 2011, 15:21
Default
  #2
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
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
cfdnewbie is offline   Reply With Quote

Old   October 11, 2011, 19:02
Talking
  #3
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by cfdnewbie View Post

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
leflix is offline   Reply With Quote

Old   October 12, 2011, 03:12
Default
  #4
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
Quote:
Originally Posted by leflix View Post
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!
cfdnewbie is offline   Reply With Quote

Old   October 12, 2011, 04:30
Default
  #5
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by cfdnewbie View Post
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
leflix is offline   Reply With Quote

Old   October 12, 2011, 04:59
Default
  #6
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
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....
cfdnewbie is offline   Reply With Quote

Old   October 12, 2011, 08:08
Default
  #7
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by cfdnewbie View Post
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 !
leflix is offline   Reply With Quote

Old   October 12, 2011, 12:22
Default
  #8
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
haha, I guess I will let you do the math, and focus more explaining the conceptual ideas
cfdnewbie is offline   Reply With Quote

Old   October 12, 2011, 12:52
Default
  #9
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
ok let's do that !
leflix is offline   Reply With Quote

Old   October 13, 2011, 16:32
Default
  #10
New Member
 
Join Date: Aug 2010
Posts: 15
Rep Power: 15
CThib is on a distinguished road
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?
CThib is offline   Reply With Quote

Old   October 13, 2011, 18:32
Default
  #11
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
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...
leflix is offline   Reply With Quote

Old   October 13, 2011, 21:07
Default
  #12
New Member
 
Join Date: Aug 2010
Posts: 15
Rep Power: 15
CThib is on a distinguished road
Thank you very much leflix, your post in that thread explains it perfectly.
CThib is offline   Reply With Quote

Old   October 17, 2011, 08:50
Default
  #13
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 18
juliom is on a distinguished road
Send a message via Skype™ to juliom
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!!!
juliom is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very basic questions for ICEM CFD icemcfd ANSYS 2 December 21, 2010 16: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


All times are GMT -4. The time now is 04:36.