# New to CFD need help

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 28, 2012, 16: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, 01:06
#2
New Member

Join Date: Mar 2012
Posts: 6
Rep Power: 7
Quote:
 Originally Posted by peterciaran 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.
You can talk to the PDEs which discrete become the linear bellow!

 July 31, 2012, 07:29 #3 Senior Member   Join Date: Dec 2011 Location: Madrid, Spain Posts: 134 Rep Power: 8 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, 09:48
#4
Senior Member

Join Date: Aug 2011
Posts: 271
Rep Power: 9
Quote:
 Originally Posted by michujo 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 ...|

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, 17:07 #5 Senior Member   Join Date: Dec 2011 Location: Madrid, Spain Posts: 134 Rep Power: 8 You are right.

 August 1, 2012, 15:03 #6 Senior Member   Martin Hegedus Join Date: Feb 2011 Posts: 486 Rep Power: 12 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.

 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 CD adapco Group Marketing Siemens 0 February 13, 2002 13:23 John C. Chien Main CFD Forum 36 January 24, 2001 22:10 Chris R. Kleijn Main CFD Forum 0 August 21, 2000 04:49 Tareq Al-shaalan Main CFD Forum 10 June 12, 1999 23:27 Heinz Wilkening Main CFD Forum 38 March 5, 1999 12:44

All times are GMT -4. The time now is 19:51.