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

New to CFD need help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2012, 17:15
Default New to CFD need help
  #1
New Member
 
Join Date: Jul 2012
Posts: 2
Rep Power: 0
peterciaran is on a distinguished road
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.
peterciaran is offline   Reply With Quote

Old   July 30, 2012, 02:06
Default
  #2
New Member
 
Join Date: Mar 2012
Posts: 6
Rep Power: 14
vanchanh123 is on a distinguished road
Quote:
Originally Posted by peterciaran View Post
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!
vanchanh123 is offline   Reply With Quote

Old   July 31, 2012, 08:29
Default
  #3
Senior Member
 
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 15
michujo is on a distinguished road
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.
michujo is offline   Reply With Quote

Old   July 31, 2012, 10:48
Default
  #4
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 16
leflix is on a distinguished road
Quote:
Originally Posted by michujo View Post
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
leflix is offline   Reply With Quote

Old   July 31, 2012, 18:07
Default
  #5
Senior Member
 
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 15
michujo is on a distinguished road
You are right.
michujo is offline   Reply With Quote

Old   August 1, 2012, 16:03
Default
  #6
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
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.
Martin Hegedus 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
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


All times are GMT -4. The time now is 06:32.