CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   How to start a 2D CFD code? (http://www.cfd-online.com/Forums/main/91172-how-start-2d-cfd-code.html)

entropies August 2, 2011 12:17

How to start a 2D CFD code?
 
Hi everybody,

I just want to start from scratch of building a 2D/2D-axis NS program which is used in compressible flow. I prefer to use FORTRAN as the developing language. Is there any good reference to start with?

Simple will be great! At the moment, I think structured grid is enough for my application.

Thanks a lot.
Qi

cfdnewbie August 2, 2011 12:29

If you want to write your own Finite Volume code, there's no better book than Blazcek:
http://books.google.com/books?id=IKu...page&q&f=false

That explains how to write a FV code from scratch, if you understand that, you'll be well on your way...

entropies August 2, 2011 12:38

Quote:

Originally Posted by cfdnewbie (Post 318536)
If you want to write your own Finite Volume code, there's no better book than Blazcek:
http://books.google.com/books?id=IKu...page&q&f=false

That explains how to write a FV code from scratch, if you understand that, you'll be well on your way...

I just got Blazek's book from library last week. I found out there is already some 2d programs attached in the CD-ROM.

Two quick questions:
1. Is it a compressible NS code?
2. Is it non-dimensional or dimensional?

Thank you!
Qi

cfdnewbie August 2, 2011 12:44

Sorry, I have never actually looked at the CD, so I do not know....but maybe there's a readme on the CD, or you might look at the code and find comments in it?

VincentD August 2, 2011 14:17

Just look at the continuity equation, if it's \nabla \bf{U} then you know it's incompressible. If they are taking time derivatives of \rho it's compressible.

Docfreezzzz August 2, 2011 15:05

You'll find that most CFD codes are written in a non-dimensional way for conditioning reasons. Very likely the only place you'll run into dimensions is when dealing with chemistry components and even then only in the fluid property evaluations. There are some very specific mathematical reasons for this.

cfdnewbie August 2, 2011 15:19

Quote:

Originally Posted by VincentD (Post 318554)
Just look at the continuity equation, if it's \nabla \bf{U} then you know it's incompressible. If they are taking time derivatives of \rho it's compressible.


Just be careful with this, it is not uncommon to name the conservative state vector \bf{U} as well, which then turns out to be (rho, rhou, rhov...)


All times are GMT -4. The time now is 13:47.