|
[Sponsors] |
July 28, 2012, 17:15 |
New to CFD need help
|
#1 |
New Member
Join Date: Jul 2012
Posts: 2
Rep Power: 0 |
Hi All
This is probably a very basic question but I'm a beginner in CFD and looking to get to grips with the fundementals, recently I've been developing basic 1D codes and now I wanna take in into 2D. In the 1D forumations I've been constructing a matrix such that say for a central difference scheme |AP AE aaaaaaa | |AW AP AE aaaa | |aa AW AP AE a | = A then solving A^-1*D=x |aaaaaaaaaaaaa | | aaaaaaaaaaaa | Can I use a similar method to solve in 2D where I have values at the north and south nodes as well. |
|
July 30, 2012, 02:06 |
|
#2 | |
New Member
Join Date: Mar 2012
Posts: 6
Rep Power: 14 |
Quote:
|
||
July 31, 2012, 08:29 |
|
#3 |
Senior Member
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 15 |
Hi peterciaran. You are right, the procedure would be exactly the same when you go to a 2D problem with south and north nodes. The matrix would look like this:
|AP AE 0 0 0 ... AN ... | |AW AP AE 0 0 .... AS ... AN ... | |0 AW AP AE 0 .... AS ... AN ... | |0 0 AW AP AE 0 ... AS ...AN ...| I also suggest that you use the Thomas algotrith for your 1D problem instead of inverting the matrix, it will go much faster. For the 2D problem I think you can use a line-by-line version of the Thomas algorithm, although I would suggest and iterative method (Gauss-Seidel for instance). This is all very well explained in Patankar's book (1980). Cheers. |
|
July 31, 2012, 10:48 |
|
#4 | |
Senior Member
Join Date: Aug 2011
Posts: 272
Rep Power: 16 |
Quote:
There is a little mistake.. on a given line the matrix will rather look like: 0.....AS.......AW AP AE.......AN.....0 |
||
July 31, 2012, 18:07 |
|
#5 |
Senior Member
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 15 |
You are right.
|
|
August 1, 2012, 16:03 |
|
#6 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
If you are solving for a structured grid I would suggest using Beam-Warming ADI (Alternating Direction Implicit). Under some circumstances it does have a penalty of reduced CFL compared to direction inversion (thus more iterations), but it is faster per iteration and takes less memory. It is also straight forward to implement.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
STAR-Works : Mainstream CAD with CFD | CD adapco Group Marketing | Siemens | 0 | February 13, 2002 13:23 |
Where do we go from here? CFD in 2001 | John C. Chien | Main CFD Forum | 36 | January 24, 2001 22:10 |
ASME CFD Symposium, Atlanta, July 2001 | Chris R. Kleijn | Main CFD Forum | 0 | August 21, 2000 05:49 |
Which is better to develop in-house CFD code or to buy a available CFD package. | Tareq Al-shaalan | Main CFD Forum | 10 | June 13, 1999 00:27 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 12:44 |