CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Build your own CFD solver (https://www.cfd-online.com/Forums/main/4200-build-your-own-cfd-solver.html)

Govert de With December 10, 2001 07:51

Build your own CFD solver
 
Hello,

Since I am working in the field of CFD I have used (rather then developed) mainly commercial and open CFD code. As a sort of a personal exercise I would like to build my own CFD code. I am thinking about a standard predictor-corrector method for 2-D incompressible flow. Is there anyone who can give me a reference to a good website or book which describes step by step how to build your own CFD solver.

Govert

Li Yang December 10, 2001 08:52

Re: Build your own CFD solver
 
Hello Govert,

What is your purpose to build up your own CFD code ? Nowadays, there are so many very good softwares available in different institutions for unsteady 3D NS calcualtion using different schemes with complex turbulence models. If you have time, you should build up your code based on such kind of codes. Otherwise, I can not imagine how long it will take in order to bring yourself to an advanced stage.

Good luck

Li


Seb Perron December 10, 2001 09:17

Re: Build your own CFD solver
 
Personnaly, If you don't plan on developping on new scheme, but just use what is already available, it will be a waste of time. As it was said by Li Yang, there are many good codes available.

But If you don't change your mind, this book:

Numerical Heat Transfer and Fluid Flow

Computational Methods in Mechanics and Thermal Science

Suhas V. Patankar

Hemisphere Publishing Corporation, 1980

Is a very good start. In this book, you will go through most of the tasks of building a flow solver: choice of space discretization scheme, time stepping, Upwinding, computing discrete equations, linear solvers ....

Good luck.


Govert de With December 10, 2001 09:18

Re: Build your own CFD solver
 
I simply would like to develop a small CFD code myself to learn about the numerical issues involved. It should be clear that is not my aim to develop an advanced code which can compete with existing commercial code.

From the discussions which are going on at this website I do get the impression that building a CFD code yourself is a tasks which can be done in a small number of weeks. It is worth for me to spend such an amount of time to gain an in-depth CFD knowledge. Clearly I am not interested in developing a whole windows environment around it for pre- and post-processing analysis. Instead the programme should purely focus on a numerical implementation of the Navier-Stokes equations.

Govert

Li Yang December 10, 2001 10:27

Re: Build your own CFD solver
 
Hello Govert,

the following books might be helpful:

(1) Fletcher, C. A. J., Computational Techniques for Fluid Dynamics. (2) Toro, E.F., Riemann Solvers and Numerical Methods for Fluid Dynamics

Regards

Li

Li Yang December 10, 2001 10:38

Re: Build your own CFD solver
 
For incomprssible flow, the following book is a must:

Versteeg, H.K. An introduction to Computational Fluid Dynamics.

Regards,

Li

Axel Rohde December 10, 2001 12:27

Re: Build your own CFD solver
 
If you really want to learn CFD, I don't think it is ever a "waste of time" to develop your own code. For my dissertation, I decided to develop a 3-D unsteady, compressible Navier Stokes solver to solve a relatively simple problem (flow over a rotating disc in flight). Many people asked me why I did not use a commercial code instead, since it could have saved me at least a year in development time, starting with the preliminary research on different numerical methods. Looking back I would say that the experience I gained was invaluable. It is much easier to judge a solution produced by a commercial code, if you once went through the trouble to develop your own code.

Li Yang December 10, 2001 13:31

Re: Build your own CFD solver
 
Hello Axel,

If you could develop an unsteady unstructured 3D NS code from scratch and you didn't have very good experience before, I would be very surprised.

Your PhD thesis is very impressive. I have downloaded one and wish I could print them out but I failed.

I also find that the experience in writing a source code for testing some schemes in 1D or 2D flow are very helpful for understanding the schemes. Probably I have misunderstood Govert's purpose.

Regards

Li

Axel Rohde December 11, 2001 18:15

Re: Build your own CFD solver
 
>If you could develop an unsteady unstructured 3D NS code from scratch and you didn't have very good experience before, I would be very surprised.

Well, I had only worked with unsteady 2-D inviscid solvers before (as a Master's student). Going from inviscid to viscous was the most difficult step. Getting stable results, with an explicit solver, and being able to accurately predict a viscous boundary layer, i.e. without smearing due to numerical viscosity, was not a trivial task. Code extension from 2-D to 3-D was relatively straightforward, although it involves considerably more book-keeping.

>Your PhD thesis is very impressive. I have downloaded one and wish I could print them out but I failed.

Thank you very much!

When I created the PDF, I decided to encrypt* it and disable the print option for a number of reasons. Reason #1, I always try to save paper, because it saves trees - I am very environmentally conscious. Reason # 2, I wanted to retain the copyright for printed copies, and the only way to enforce it was to disable the print option. I thought that some time down the road I may write my own book on CFD, and I would probably incorporate a significant part of my dissertation.

If you need a printed copy, let me know. For the cost of printing, binding (ring binding or glued soft cover), and shipping, I can send you one. Probably around $80. Although I have my own color laser printer, the cost of printing is about $0.35 per page on average. A set of toner cartridges is $500, $125 for each color, and they only last about 3000 pages at 10% coverage. Some of these pages have coverages as high as 60% though.

*See little yellow key at the bottom of the Adobe Acrobat window when the document is open.

Li Yang December 12, 2001 06:51

Re: Build your own CFD solver
 
Alex,

Thank you, I will consider to have a printed one when I feel it is necessary. I think a comprehensive book on unstructured grid NS calculation would be certainly welcomed.

Best regards

Li


All times are GMT -4. The time now is 02:39.